@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,151 @@
|
|
|
1
|
+
import "./commands/index.js";
|
|
2
|
+
const metadata = {
|
|
3
|
+
name: "agent_orchestrator",
|
|
4
|
+
title: "Agent Orchestrator",
|
|
5
|
+
version: "0.1.0",
|
|
6
|
+
description: "Callable Agent SDK core: defineAgent, agentRuntime, runs and proposals.",
|
|
7
|
+
author: "Open Mercato Team",
|
|
8
|
+
license: "Proprietary",
|
|
9
|
+
ejectable: true
|
|
10
|
+
};
|
|
11
|
+
import { features } from "./acl.js";
|
|
12
|
+
import { defineAgent, getAgentEntry, listAgentEntries } from "./lib/sdk/defineAgent.js";
|
|
13
|
+
import { AgentRuntimeService, AgentNotFoundError, AgentOutputInvalidError, AgentGuardrailBlockedError } from "./lib/runtime/agentRuntime.js";
|
|
14
|
+
import { AgentWorkflowBridgeService } from "./lib/runtime/invokeAgentForWorkflow.js";
|
|
15
|
+
import { executeProposal } from "./lib/runtime/executeProposal.js";
|
|
16
|
+
import {
|
|
17
|
+
proposedActionSchema,
|
|
18
|
+
proposalOptionSchema,
|
|
19
|
+
agentProposalSchema,
|
|
20
|
+
autoDispositionBlockSchema,
|
|
21
|
+
agentResultSchema,
|
|
22
|
+
baseAgentResultSchema,
|
|
23
|
+
dealHealthCheckResult,
|
|
24
|
+
disposeProposalSchema,
|
|
25
|
+
proposalListQuerySchema,
|
|
26
|
+
guardrailVerdictSchema,
|
|
27
|
+
guardrailCheckSchema,
|
|
28
|
+
guardrailEvidenceSchema,
|
|
29
|
+
guardResultsSchema,
|
|
30
|
+
guardrailSetBodySchema,
|
|
31
|
+
groundingClaimSchema,
|
|
32
|
+
groundingCitationSchema,
|
|
33
|
+
citableSourceSchema
|
|
34
|
+
} from "./data/validators.js";
|
|
35
|
+
import {
|
|
36
|
+
normalizeProposalEnvelope,
|
|
37
|
+
rankProposalOptions,
|
|
38
|
+
leadProposalOption,
|
|
39
|
+
findProposalOption,
|
|
40
|
+
listProposalOptionIds,
|
|
41
|
+
deriveEnvelopeConfidence,
|
|
42
|
+
readProposalActions,
|
|
43
|
+
replaceOptionActions,
|
|
44
|
+
isProposalEnvelope
|
|
45
|
+
} from "./data/proposalEnvelope.js";
|
|
46
|
+
import { autoApprovable, evaluateAutoApproval } from "./lib/disposition/dispositionService.js";
|
|
47
|
+
import { GuardrailService, GUARDRAIL_SET_VERSION } from "./lib/guardrails/guardrailService.js";
|
|
48
|
+
import {
|
|
49
|
+
registerGroundingSet,
|
|
50
|
+
resolveGroundingSet,
|
|
51
|
+
listGroundingSets,
|
|
52
|
+
guardrailSetVersionFor
|
|
53
|
+
} from "./lib/guardrails/groundingSets.js";
|
|
54
|
+
import { checkGrounding, evaluateGrounding } from "./lib/guardrails/grounding.js";
|
|
55
|
+
import { syncGroundingSets, resolveCurrentGroundingSet } from "./lib/guardrails/syncGroundingSets.js";
|
|
56
|
+
import {
|
|
57
|
+
ContextResolverImpl,
|
|
58
|
+
ContextModuleNotFoundError,
|
|
59
|
+
assembleInputSchema,
|
|
60
|
+
registerContextModule,
|
|
61
|
+
resolveContextModule,
|
|
62
|
+
listContextCapabilities,
|
|
63
|
+
entityProvenance,
|
|
64
|
+
estimateTokens,
|
|
65
|
+
packCandidates
|
|
66
|
+
} from "./lib/context/index.js";
|
|
67
|
+
import {
|
|
68
|
+
contextSourceKind,
|
|
69
|
+
contextRoutedSourceSchema,
|
|
70
|
+
contextPrunedSourceSchema,
|
|
71
|
+
contextProvenanceSchema,
|
|
72
|
+
contextRedactionAppliedSchema,
|
|
73
|
+
contextBundleRoutedSourcesSchema,
|
|
74
|
+
contextBundlePrunedSourcesSchema,
|
|
75
|
+
contextBundleSourcesSchema,
|
|
76
|
+
contextBundleRedactionAppliedSchema,
|
|
77
|
+
contextBundleListQuerySchema
|
|
78
|
+
} from "./data/validators.js";
|
|
79
|
+
import { disposeProposalCommand } from "./commands/dispose.js";
|
|
80
|
+
export {
|
|
81
|
+
AgentGuardrailBlockedError,
|
|
82
|
+
AgentNotFoundError,
|
|
83
|
+
AgentOutputInvalidError,
|
|
84
|
+
AgentRuntimeService,
|
|
85
|
+
AgentWorkflowBridgeService,
|
|
86
|
+
ContextModuleNotFoundError,
|
|
87
|
+
ContextResolverImpl,
|
|
88
|
+
GUARDRAIL_SET_VERSION,
|
|
89
|
+
GuardrailService,
|
|
90
|
+
agentProposalSchema,
|
|
91
|
+
agentResultSchema,
|
|
92
|
+
assembleInputSchema,
|
|
93
|
+
autoApprovable,
|
|
94
|
+
autoDispositionBlockSchema,
|
|
95
|
+
baseAgentResultSchema,
|
|
96
|
+
checkGrounding,
|
|
97
|
+
citableSourceSchema,
|
|
98
|
+
contextBundleListQuerySchema,
|
|
99
|
+
contextBundlePrunedSourcesSchema,
|
|
100
|
+
contextBundleRedactionAppliedSchema,
|
|
101
|
+
contextBundleRoutedSourcesSchema,
|
|
102
|
+
contextBundleSourcesSchema,
|
|
103
|
+
contextProvenanceSchema,
|
|
104
|
+
contextPrunedSourceSchema,
|
|
105
|
+
contextRedactionAppliedSchema,
|
|
106
|
+
contextRoutedSourceSchema,
|
|
107
|
+
contextSourceKind,
|
|
108
|
+
dealHealthCheckResult,
|
|
109
|
+
defineAgent,
|
|
110
|
+
deriveEnvelopeConfidence,
|
|
111
|
+
disposeProposalCommand,
|
|
112
|
+
disposeProposalSchema,
|
|
113
|
+
entityProvenance,
|
|
114
|
+
estimateTokens,
|
|
115
|
+
evaluateAutoApproval,
|
|
116
|
+
evaluateGrounding,
|
|
117
|
+
executeProposal,
|
|
118
|
+
features,
|
|
119
|
+
findProposalOption,
|
|
120
|
+
getAgentEntry,
|
|
121
|
+
groundingCitationSchema,
|
|
122
|
+
groundingClaimSchema,
|
|
123
|
+
guardResultsSchema,
|
|
124
|
+
guardrailCheckSchema,
|
|
125
|
+
guardrailEvidenceSchema,
|
|
126
|
+
guardrailSetBodySchema,
|
|
127
|
+
guardrailSetVersionFor,
|
|
128
|
+
guardrailVerdictSchema,
|
|
129
|
+
isProposalEnvelope,
|
|
130
|
+
leadProposalOption,
|
|
131
|
+
listAgentEntries,
|
|
132
|
+
listContextCapabilities,
|
|
133
|
+
listGroundingSets,
|
|
134
|
+
listProposalOptionIds,
|
|
135
|
+
metadata,
|
|
136
|
+
normalizeProposalEnvelope,
|
|
137
|
+
packCandidates,
|
|
138
|
+
proposalListQuerySchema,
|
|
139
|
+
proposalOptionSchema,
|
|
140
|
+
proposedActionSchema,
|
|
141
|
+
rankProposalOptions,
|
|
142
|
+
readProposalActions,
|
|
143
|
+
registerContextModule,
|
|
144
|
+
registerGroundingSet,
|
|
145
|
+
replaceOptionActions,
|
|
146
|
+
resolveContextModule,
|
|
147
|
+
resolveCurrentGroundingSet,
|
|
148
|
+
resolveGroundingSet,
|
|
149
|
+
syncGroundingSets
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/modules/agent_orchestrator/index.ts"],
|
|
4
|
+
"sourcesContent": ["import type { ModuleInfo } from '@open-mercato/shared/modules/registry'\nimport './commands'\n\nexport const metadata: ModuleInfo = {\n name: 'agent_orchestrator',\n title: 'Agent Orchestrator',\n version: '0.1.0',\n description: 'Callable Agent SDK core: defineAgent, agentRuntime, runs and proposals.',\n author: 'Open Mercato Team',\n license: 'Proprietary',\n ejectable: true,\n}\n\nexport { features } from './acl'\n\n// Public re-exports (single source of the SDK + result contract).\nexport { defineAgent, getAgentEntry, listAgentEntries } from './lib/sdk/defineAgent'\nexport type { DefineAgentInput, AgentRegistryEntry, AgentResultKind } from './lib/sdk/defineAgent'\nexport { AgentRuntimeService, AgentNotFoundError, AgentOutputInvalidError, AgentGuardrailBlockedError } from './lib/runtime/agentRuntime'\nexport type { AgentRunCtx } from './lib/runtime/agentRuntime'\nexport { AgentWorkflowBridgeService } from './lib/runtime/invokeAgentForWorkflow'\nexport type {\n AgentWorkflowBridge,\n InvokeAgentForWorkflowArgs,\n InvokeAgentForWorkflowOutcome,\n} from './lib/runtime/invokeAgentForWorkflow'\nexport { executeProposal } from './lib/runtime/executeProposal'\nexport type { ExecuteProposalActionResult } from './lib/runtime/executeProposal'\nexport {\n proposedActionSchema,\n proposalOptionSchema,\n agentProposalSchema,\n autoDispositionBlockSchema,\n agentResultSchema,\n baseAgentResultSchema,\n dealHealthCheckResult,\n disposeProposalSchema,\n proposalListQuerySchema,\n guardrailVerdictSchema,\n guardrailCheckSchema,\n guardrailEvidenceSchema,\n guardResultsSchema,\n guardrailSetBodySchema,\n groundingClaimSchema,\n groundingCitationSchema,\n citableSourceSchema,\n} from './data/validators'\nexport {\n normalizeProposalEnvelope,\n rankProposalOptions,\n leadProposalOption,\n findProposalOption,\n listProposalOptionIds,\n deriveEnvelopeConfidence,\n readProposalActions,\n replaceOptionActions,\n isProposalEnvelope,\n} from './data/proposalEnvelope'\nexport { autoApprovable, evaluateAutoApproval } from './lib/disposition/dispositionService'\nexport type { AutoApprovalDecision } from './lib/disposition/dispositionService'\nexport type {\n ProposedAction,\n ProposalOption,\n AutoDispositionBlock,\n AgentProposalPayload,\n AgentResult,\n DealHealthCheckResult,\n ProposalDisposition,\n DisposeProposalInput,\n ProposalListQuery,\n GuardrailVerdict,\n GuardrailCheck,\n GuardrailEvidence,\n GuardResults,\n GuardrailPhaseInput,\n GuardrailKindInput,\n GuardrailResultInput,\n GuardrailSetBody,\n GroundingClaim,\n GroundingCitation,\n CitableSource,\n} from './data/validators'\n\n// Runtime guardrails (Phase 1) \u2014 service + constant for cross-module consumers.\nexport { GuardrailService, GUARDRAIL_SET_VERSION } from './lib/guardrails/guardrailService'\nexport type { CheckOutputArgs, CheckInputArgs } from './lib/guardrails/guardrailService'\n\n// Runtime guardrails (Phase 4) \u2014 grounding sets + cite-or-abstain check.\nexport {\n registerGroundingSet,\n resolveGroundingSet,\n listGroundingSets,\n guardrailSetVersionFor,\n} from './lib/guardrails/groundingSets'\nexport { checkGrounding, evaluateGrounding } from './lib/guardrails/grounding'\nexport { syncGroundingSets, resolveCurrentGroundingSet } from './lib/guardrails/syncGroundingSets'\n\n// Context overlay (Phase 1) \u2014 TDCR resolver + registry + provenance schemas for\n// trace (\"context assembled\" panel), guardrails grounding, and compliance lineage.\nexport {\n ContextResolverImpl,\n ContextModuleNotFoundError,\n assembleInputSchema,\n registerContextModule,\n resolveContextModule,\n listContextCapabilities,\n entityProvenance,\n estimateTokens,\n packCandidates,\n} from './lib/context'\nexport type {\n ContextResolver,\n AssembleInput,\n AssembleResult,\n RetrieveScope,\n RetrievedSnippet,\n ContextModule,\n ContextSourceDecl,\n ContextSourceHit,\n PackCandidate,\n PackResult,\n} from './lib/context'\nexport {\n contextSourceKind,\n contextRoutedSourceSchema,\n contextPrunedSourceSchema,\n contextProvenanceSchema,\n contextRedactionAppliedSchema,\n contextBundleRoutedSourcesSchema,\n contextBundlePrunedSourcesSchema,\n contextBundleSourcesSchema,\n contextBundleRedactionAppliedSchema,\n contextBundleListQuerySchema,\n} from './data/validators'\nexport type {\n ContextSourceKind,\n ContextRoutedSource,\n ContextPrunedSource,\n ContextProvenance,\n ContextRedactionApplied,\n ContextBundleListQuery,\n} from './data/validators'\n\n// Disposition seam (area 03) \u2014 consumed inline by area 02's INVOKE_AGENT executor.\nexport type {\n DispositionService,\n DispositionOutcome,\n DispositionOnResult,\n DispositionCtx,\n} from './lib/disposition/dispositionService'\nexport { disposeProposalCommand } from './commands/dispose'\nexport type {\n DisposeProposalCommandInput,\n DisposeProposalCommandResult,\n} from './commands/dispose'\n"],
|
|
5
|
+
"mappings": "AACA,OAAO;AAEA,MAAM,WAAuB;AAAA,EAClC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AAAA,EACT,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,WAAW;AACb;AAEA,SAAS,gBAAgB;AAGzB,SAAS,aAAa,eAAe,wBAAwB;AAE7D,SAAS,qBAAqB,oBAAoB,yBAAyB,kCAAkC;AAE7G,SAAS,kCAAkC;AAM3C,SAAS,uBAAuB;AAEhC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gBAAgB,4BAA4B;AA0BrD,SAAS,kBAAkB,6BAA6B;AAIxD;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gBAAgB,yBAAyB;AAClD,SAAS,mBAAmB,kCAAkC;AAI9D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAaP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAiBP,SAAS,8BAA8B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WORKFLOW_STUDIO_CREATE_HREF } from "@open-mercato/core/modules/workflows/lib/visual-editor-navigation";
|
|
2
|
+
const WORKFLOW_DEFINITIONS_HREF = "/backend/definitions";
|
|
3
|
+
const AUTOMATION_EDITOR_HREF = WORKFLOW_STUDIO_CREATE_HREF;
|
|
4
|
+
const AUTOMATION_AUTHOR_FEATURE = "workflows.definitions.create";
|
|
5
|
+
const AUTOMATION_VIEW_FEATURE = "workflows.definitions.view";
|
|
6
|
+
export {
|
|
7
|
+
AUTOMATION_AUTHOR_FEATURE,
|
|
8
|
+
AUTOMATION_EDITOR_HREF,
|
|
9
|
+
AUTOMATION_VIEW_FEATURE,
|
|
10
|
+
WORKFLOW_DEFINITIONS_HREF
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=automationLinks.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/modules/agent_orchestrator/lib/automationLinks.ts"],
|
|
4
|
+
"sourcesContent": ["import { WORKFLOW_STUDIO_CREATE_HREF } from '@open-mercato/core/modules/workflows/lib/visual-editor-navigation'\n\n/**\n * Where the cockpit sends someone who has to leave the Agents group and go\n * build the automation that invokes an agent (F2/F5).\n *\n * The two hrefs live here rather than inline so the cross-group bridge has one\n * definition: the editor entry point is re-exported from the workflows module's\n * own helper (the retired form-create route forwards there), and the list href\n * is the only literal this module owns.\n */\nexport const WORKFLOW_DEFINITIONS_HREF = '/backend/definitions'\n\nexport const AUTOMATION_EDITOR_HREF = WORKFLOW_STUDIO_CREATE_HREF\n\n/** ACL feature a user needs before the \"build an automation\" actions are offered. */\nexport const AUTOMATION_AUTHOR_FEATURE = 'workflows.definitions.create'\n\n/** ACL feature a user needs to merely see the automations list. */\nexport const AUTOMATION_VIEW_FEATURE = 'workflows.definitions.view'\n"],
|
|
5
|
+
"mappings": "AAAA,SAAS,mCAAmC;AAWrC,MAAM,4BAA4B;AAElC,MAAM,yBAAyB;AAG/B,MAAM,4BAA4B;AAGlC,MAAM,0BAA0B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { AgentContextBundle } from "../../data/entities.js";
|
|
3
|
+
import {
|
|
4
|
+
contextBundleRoutedSourcesSchema,
|
|
5
|
+
contextBundlePrunedSourcesSchema,
|
|
6
|
+
contextBundleSourcesSchema,
|
|
7
|
+
contextBundleRedactionAppliedSchema
|
|
8
|
+
} from "../../data/validators.js";
|
|
9
|
+
import {
|
|
10
|
+
resolveContextModule
|
|
11
|
+
} from "./registry.js";
|
|
12
|
+
import { estimateTokens, packCandidates } from "./packer.js";
|
|
13
|
+
import { readRetrievalSource } from "./retrievalSource.js";
|
|
14
|
+
import {
|
|
15
|
+
documentExtractionToCandidates,
|
|
16
|
+
documentProvenance,
|
|
17
|
+
DEFAULT_DOCUMENT_MIN_CONFIDENCE
|
|
18
|
+
} from "./documentSource.js";
|
|
19
|
+
import { redactRecord, staticEncryptedFieldNames } from "./redactor.js";
|
|
20
|
+
import { defaultEncryptionMaps } from "../../encryption.js";
|
|
21
|
+
const assembleInputSchema = z.object({
|
|
22
|
+
// tenant/org/run ids are server-derived (never user input), so we validate them
|
|
23
|
+
// as non-empty rather than strict RFC-UUID — the caller scope is the authority.
|
|
24
|
+
tenantId: z.string().min(1),
|
|
25
|
+
organizationId: z.string().min(1),
|
|
26
|
+
agentRunId: z.string().min(1),
|
|
27
|
+
workflowInstanceId: z.string().nullable().optional(),
|
|
28
|
+
stepId: z.string().nullable().optional(),
|
|
29
|
+
capability: z.string().min(1),
|
|
30
|
+
budget: z.number().int().positive()
|
|
31
|
+
});
|
|
32
|
+
class ContextModuleNotFoundError extends Error {
|
|
33
|
+
constructor(capability) {
|
|
34
|
+
super(`[internal] no ContextModule declared for capability "${capability}"`);
|
|
35
|
+
this.code = "context_module_not_found";
|
|
36
|
+
this.name = "ContextModuleNotFoundError";
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
class ContextResolverImpl {
|
|
40
|
+
constructor(container) {
|
|
41
|
+
this.container = container;
|
|
42
|
+
}
|
|
43
|
+
get queryEngine() {
|
|
44
|
+
return this.container.resolve("queryEngine");
|
|
45
|
+
}
|
|
46
|
+
get documentIngestService() {
|
|
47
|
+
const hasRegistration = typeof this.container.hasRegistration === "function" ? this.container.hasRegistration.bind(this.container) : null;
|
|
48
|
+
if (hasRegistration && !hasRegistration("agentDocumentIngestService")) return null;
|
|
49
|
+
try {
|
|
50
|
+
return this.container.resolve("agentDocumentIngestService");
|
|
51
|
+
} catch {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
get encryptionService() {
|
|
56
|
+
const hasRegistration = typeof this.container.hasRegistration === "function" ? this.container.hasRegistration.bind(this.container) : null;
|
|
57
|
+
if (hasRegistration && !hasRegistration("tenantEncryptionService")) return null;
|
|
58
|
+
try {
|
|
59
|
+
const service = this.container.resolve("tenantEncryptionService");
|
|
60
|
+
if (service && typeof service.getEncryptedFieldNames === "function") {
|
|
61
|
+
return service;
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
} catch {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The least-privilege set of fields to redact for an entity source: the
|
|
70
|
+
* module's static encryption-map floor (always on) UNION the per-tenant
|
|
71
|
+
* encrypted-field set from `TenantDataEncryptionService` (when registered). The
|
|
72
|
+
* PII name-based rule is applied independently inside `redactRecord`.
|
|
73
|
+
*/
|
|
74
|
+
async encryptedFieldNamesFor(entityType, scope) {
|
|
75
|
+
const fields = new Set(staticEncryptedFieldNames(entityType, defaultEncryptionMaps));
|
|
76
|
+
const service = this.encryptionService;
|
|
77
|
+
if (service) {
|
|
78
|
+
try {
|
|
79
|
+
const tenantFields = await service.getEncryptedFieldNames(
|
|
80
|
+
entityType,
|
|
81
|
+
scope.tenantId,
|
|
82
|
+
scope.organizationId
|
|
83
|
+
);
|
|
84
|
+
for (const field of tenantFields) fields.add(field);
|
|
85
|
+
} catch {
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return [...fields];
|
|
89
|
+
}
|
|
90
|
+
async assemble(em, input) {
|
|
91
|
+
const parsedScope = assembleInputSchema.parse(input);
|
|
92
|
+
const parsed = {
|
|
93
|
+
...parsedScope,
|
|
94
|
+
documentInputs: input.documentInputs,
|
|
95
|
+
documentExtractions: input.documentExtractions,
|
|
96
|
+
documentMinConfidence: input.documentMinConfidence
|
|
97
|
+
};
|
|
98
|
+
const module = resolveContextModule(parsed.capability);
|
|
99
|
+
if (!module) throw new ContextModuleNotFoundError(parsed.capability);
|
|
100
|
+
const { candidates, redactions } = await this.collectCandidates(module, parsed);
|
|
101
|
+
const packed = packCandidates(candidates, parsed.budget);
|
|
102
|
+
const routedKeys = new Set(packed.routedSources.map((source) => `${source.kind}:${source.ref}`));
|
|
103
|
+
const untrustedSpans = candidates.filter(
|
|
104
|
+
(candidate) => (candidate.kind === "document" || candidate.kind === "retrieval") && routedKeys.has(`${candidate.kind}:${candidate.hit.ref}`)
|
|
105
|
+
).map((candidate) => ({
|
|
106
|
+
sourceKind: candidate.kind,
|
|
107
|
+
sourceRef: candidate.hit.ref,
|
|
108
|
+
locator: candidate.hit.locator ?? `${candidate.kind}:${candidate.hit.ref}`,
|
|
109
|
+
text: typeof candidate.hit.record.snippet === "string" ? candidate.hit.record.snippet : JSON.stringify(candidate.hit.record)
|
|
110
|
+
}));
|
|
111
|
+
const citableSources = packed.routedSources.filter((source) => typeof source.locator === "string" && source.locator.length > 0).map((source) => ({
|
|
112
|
+
sourceKind: source.kind,
|
|
113
|
+
sourceRef: source.ref,
|
|
114
|
+
locator: source.locator,
|
|
115
|
+
score: typeof source.score === "number" ? source.score : 1
|
|
116
|
+
}));
|
|
117
|
+
const routedSources = contextBundleRoutedSourcesSchema.parse(packed.routedSources);
|
|
118
|
+
const prunedSources = contextBundlePrunedSourcesSchema.parse(packed.prunedSources);
|
|
119
|
+
const sources = contextBundleSourcesSchema.parse(packed.sources);
|
|
120
|
+
const redactionApplied = contextBundleRedactionAppliedSchema.parse(redactions);
|
|
121
|
+
const bundle = em.create(AgentContextBundle, {
|
|
122
|
+
tenantId: parsed.tenantId,
|
|
123
|
+
organizationId: parsed.organizationId,
|
|
124
|
+
agentRunId: parsed.agentRunId,
|
|
125
|
+
workflowInstanceId: parsed.workflowInstanceId ?? null,
|
|
126
|
+
stepId: parsed.stepId ?? null,
|
|
127
|
+
capability: parsed.capability,
|
|
128
|
+
routedSources,
|
|
129
|
+
prunedSources: prunedSources.length ? prunedSources : null,
|
|
130
|
+
sources,
|
|
131
|
+
tokenBudget: parsed.budget,
|
|
132
|
+
tokensUsed: packed.tokensUsed,
|
|
133
|
+
// Field-encryption/PII redaction applied before packing (least-privilege).
|
|
134
|
+
// Encrypted/PII values are removed from every routed record; this records
|
|
135
|
+
// exactly what was withheld for the trace inspector + compliance lineage.
|
|
136
|
+
redactionApplied: redactionApplied.length ? redactionApplied : null,
|
|
137
|
+
// P4 offloads the packed payload to storage-s3 and stores the ref here.
|
|
138
|
+
payloadRef: null
|
|
139
|
+
});
|
|
140
|
+
em.persist(bundle);
|
|
141
|
+
await em.flush();
|
|
142
|
+
return { bundle, payloadRef: bundle.payloadRef ?? null, untrustedSpans, citableSources };
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Standalone grounding lookup — the contract the Wave 3 guardrails grounding
|
|
146
|
+
* (cite-or-abstain) check consumes. Wraps `searchService` (RRF, `packages/search`)
|
|
147
|
+
* over the capability's declared `retrieval` sources plus its structured
|
|
148
|
+
* `entity` sources, ALWAYS org+tenant scoped (cross-tenant retrieval is
|
|
149
|
+
* structurally impossible — the scope is the authority, never user input).
|
|
150
|
+
*
|
|
151
|
+
* GROUNDING CONTRACT: every returned snippet is CITABLE — it carries
|
|
152
|
+
* `sourceRef` + `locator` + `score`. No snippet is ever emitted without a
|
|
153
|
+
* locator or score (a malformed search row is dropped, not returned uncited),
|
|
154
|
+
* so the grounding check can verify a proposal's cites or force an abstain.
|
|
155
|
+
*
|
|
156
|
+
* Signature:
|
|
157
|
+
* retrieve(em, query, { tenantId, organizationId, capability })
|
|
158
|
+
* => Promise<RetrievedSnippet[]>
|
|
159
|
+
* RetrievedSnippet = { sourceKind, sourceRef, locator, snippet, score }
|
|
160
|
+
*/
|
|
161
|
+
async retrieve(_em, query, scope) {
|
|
162
|
+
const module = resolveContextModule(scope.capability);
|
|
163
|
+
if (!module) throw new ContextModuleNotFoundError(scope.capability);
|
|
164
|
+
const readScope = { tenantId: scope.tenantId, organizationId: scope.organizationId };
|
|
165
|
+
const snippets = [];
|
|
166
|
+
for (const source of module.sources) {
|
|
167
|
+
if (source.kind !== "retrieval") continue;
|
|
168
|
+
const hits = await readRetrievalSource(this.container, source, query, readScope);
|
|
169
|
+
for (const hit of hits) {
|
|
170
|
+
if (!hit.locator || typeof hit.score !== "number") continue;
|
|
171
|
+
snippets.push({
|
|
172
|
+
sourceKind: "retrieval",
|
|
173
|
+
sourceRef: hit.ref,
|
|
174
|
+
locator: hit.locator,
|
|
175
|
+
snippet: typeof hit.record.snippet === "string" ? hit.record.snippet : JSON.stringify(hit.record),
|
|
176
|
+
score: hit.score
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
for (const source of module.sources) {
|
|
181
|
+
if (source.kind !== "entity") continue;
|
|
182
|
+
const encryptedFields = await this.encryptedFieldNamesFor(source.entityType, readScope);
|
|
183
|
+
const hits = await this.readEntitySource(source, readScope);
|
|
184
|
+
for (const hit of hits) {
|
|
185
|
+
const { record } = redactRecord(hit.record, encryptedFields);
|
|
186
|
+
const locator = hit.locator ?? `${source.entityType}:${hit.ref}`;
|
|
187
|
+
snippets.push({
|
|
188
|
+
sourceKind: "entity",
|
|
189
|
+
sourceRef: hit.ref,
|
|
190
|
+
locator,
|
|
191
|
+
snippet: JSON.stringify(record),
|
|
192
|
+
score: hit.score ?? 1
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return snippets;
|
|
197
|
+
}
|
|
198
|
+
async collectCandidates(module, input) {
|
|
199
|
+
const scope = { tenantId: input.tenantId, organizationId: input.organizationId };
|
|
200
|
+
const candidates = [];
|
|
201
|
+
const redactionByField = /* @__PURE__ */ new Map();
|
|
202
|
+
const ordered = [...module.sources].sort((left, right) => left.priority - right.priority);
|
|
203
|
+
const recordRedactions = (applied) => {
|
|
204
|
+
for (const redaction of applied) {
|
|
205
|
+
const key = `${redaction.field}:${redaction.rule}`;
|
|
206
|
+
if (!redactionByField.has(key)) redactionByField.set(key, redaction);
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
for (const source of ordered) {
|
|
210
|
+
if (source.kind !== "entity") continue;
|
|
211
|
+
const encryptedFields = await this.encryptedFieldNamesFor(source.entityType, scope);
|
|
212
|
+
const hits = await this.readEntitySource(source, scope);
|
|
213
|
+
for (const hit of hits) {
|
|
214
|
+
const { record, redactions } = redactRecord(hit.record, encryptedFields);
|
|
215
|
+
recordRedactions(redactions);
|
|
216
|
+
const redactedHit = { ...hit, record };
|
|
217
|
+
const provenance = source.provenance(redactedHit);
|
|
218
|
+
candidates.push({
|
|
219
|
+
kind: source.kind,
|
|
220
|
+
tier: source.tier,
|
|
221
|
+
hit: redactedHit,
|
|
222
|
+
tokens: estimateTokens(record),
|
|
223
|
+
provenance
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
const retrievalQuery = buildRetrievalQuery(candidates, input.capability);
|
|
228
|
+
for (const source of ordered) {
|
|
229
|
+
if (source.kind !== "retrieval") continue;
|
|
230
|
+
const hits = await readRetrievalSource(this.container, source, retrievalQuery, scope);
|
|
231
|
+
for (const hit of hits) {
|
|
232
|
+
const { record, redactions } = redactRecord(hit.record, []);
|
|
233
|
+
recordRedactions(redactions);
|
|
234
|
+
const redactedHit = { ...hit, record };
|
|
235
|
+
const provenance = source.provenance(redactedHit);
|
|
236
|
+
candidates.push({
|
|
237
|
+
kind: source.kind,
|
|
238
|
+
tier: source.tier,
|
|
239
|
+
hit: redactedHit,
|
|
240
|
+
tokens: estimateTokens(record),
|
|
241
|
+
provenance
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
const extractions = await this.collectDocumentExtractions(input, scope);
|
|
246
|
+
const minConfidence = input.documentMinConfidence ?? DEFAULT_DOCUMENT_MIN_CONFIDENCE;
|
|
247
|
+
for (const extraction of extractions) {
|
|
248
|
+
for (const { fact, hit } of documentExtractionToCandidates(extraction, { minConfidence })) {
|
|
249
|
+
const { record, redactions } = redactRecord(hit.record, []);
|
|
250
|
+
recordRedactions(redactions);
|
|
251
|
+
const redactedHit = { ...hit, record };
|
|
252
|
+
candidates.push({
|
|
253
|
+
kind: "document",
|
|
254
|
+
tier: "optional",
|
|
255
|
+
hit: redactedHit,
|
|
256
|
+
tokens: estimateTokens(record),
|
|
257
|
+
provenance: documentProvenance(fact)
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return { candidates, redactions: [...redactionByField.values()] };
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Ingest raw `documentInputs` through the swappable pipeline (org+tenant scoped)
|
|
265
|
+
* and merge with any pre-supplied `documentExtractions`. Returns `[]` when no
|
|
266
|
+
* documents are supplied or the ingest service is unregistered — document facts
|
|
267
|
+
* are optional fill, so their absence never breaks assembly.
|
|
268
|
+
*/
|
|
269
|
+
async collectDocumentExtractions(input, scope) {
|
|
270
|
+
const extractions = [...input.documentExtractions ?? []];
|
|
271
|
+
const documentInputs = input.documentInputs ?? [];
|
|
272
|
+
if (documentInputs.length) {
|
|
273
|
+
const service = this.documentIngestService;
|
|
274
|
+
if (service) {
|
|
275
|
+
for (const document of documentInputs) {
|
|
276
|
+
const extraction = await service.ingest({ ...document, scope });
|
|
277
|
+
extractions.push(extraction);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return extractions;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Read a structured `entity` source via the `queryEngine` (`query_index`),
|
|
285
|
+
* ALWAYS org+tenant scoped — cross-tenant reads are structurally impossible.
|
|
286
|
+
*/
|
|
287
|
+
async readEntitySource(source, scope) {
|
|
288
|
+
const result = await this.queryEngine.query(source.entityType, {
|
|
289
|
+
tenantId: scope.tenantId,
|
|
290
|
+
organizationId: scope.organizationId,
|
|
291
|
+
fields: source.fields,
|
|
292
|
+
page: { page: 1, pageSize: 100 }
|
|
293
|
+
});
|
|
294
|
+
return result.items.map((record) => ({
|
|
295
|
+
ref: String(record.id ?? ""),
|
|
296
|
+
record
|
|
297
|
+
}));
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
const RETRIEVAL_QUERY_FIELDS = ["title", "name", "subject", "label", "summary", "description"];
|
|
301
|
+
function buildRetrievalQuery(candidates, capability) {
|
|
302
|
+
const terms = [capability];
|
|
303
|
+
for (const candidate of candidates) {
|
|
304
|
+
if (candidate.tier !== "mandatory") continue;
|
|
305
|
+
for (const field of RETRIEVAL_QUERY_FIELDS) {
|
|
306
|
+
const value = candidate.hit.record[field];
|
|
307
|
+
if (typeof value === "string" && value.trim()) terms.push(value.trim());
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return [...new Set(terms)].join(" ").slice(0, 512).trim();
|
|
311
|
+
}
|
|
312
|
+
export {
|
|
313
|
+
ContextModuleNotFoundError,
|
|
314
|
+
ContextResolverImpl,
|
|
315
|
+
assembleInputSchema
|
|
316
|
+
};
|
|
317
|
+
//# sourceMappingURL=contextResolver.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/modules/agent_orchestrator/lib/context/contextResolver.ts"],
|
|
4
|
+
"sourcesContent": ["import type { AwilixContainer } from 'awilix'\nimport type { EntityManager } from '@mikro-orm/postgresql'\nimport type { QueryEngine } from '@open-mercato/shared/lib/query/types'\nimport { z } from 'zod'\nimport { AgentContextBundle } from '../../data/entities'\nimport {\n contextBundleRoutedSourcesSchema,\n contextBundlePrunedSourcesSchema,\n contextBundleSourcesSchema,\n contextBundleRedactionAppliedSchema,\n type ContextProvenance,\n} from '../../data/validators'\nimport {\n resolveContextModule,\n type ContextModule,\n type ContextSourceDecl,\n type ContextSourceHit,\n} from './registry'\nimport { estimateTokens, packCandidates, type PackCandidate } from './packer'\nimport { readRetrievalSource } from './retrievalSource'\nimport type { DocumentExtraction } from '../../data/validators'\nimport type { ContextRedactionApplied, UntrustedSpan, CitableSource } from '../../data/validators'\nimport {\n documentExtractionToCandidates,\n documentProvenance,\n DEFAULT_DOCUMENT_MIN_CONFIDENCE,\n} from './documentSource'\nimport type { DocumentIngestInput, DocumentIngestService } from './documentIngest'\nimport { redactRecord, staticEncryptedFieldNames } from './redactor'\nimport { defaultEncryptionMaps } from '../../encryption'\n\n/**\n * Minimal slice of `TenantDataEncryptionService` the redactor consults \u2014 only the\n * read of which fields are encrypted at rest for an entity (per-tenant map). Typed\n * narrowly so the resolver never depends on the full service surface and so it\n * degrades to the static-map floor when the service is unregistered (tests/envs\n * with encryption-at-rest disabled).\n */\nexport interface EncryptedFieldNameSource {\n getEncryptedFieldNames(\n entityId: string,\n tenantId: string | null | undefined,\n organizationId?: string | null,\n ): Promise<string[]>\n}\n\n/**\n * Input to a TDCR assembly. Validated by `assembleInputSchema`; tenant/org are\n * NEVER taken from anywhere but the caller scope so a run can't assemble\n * cross-tenant context.\n */\nexport const assembleInputSchema = z.object({\n // tenant/org/run ids are server-derived (never user input), so we validate them\n // as non-empty rather than strict RFC-UUID \u2014 the caller scope is the authority.\n tenantId: z.string().min(1),\n organizationId: z.string().min(1),\n agentRunId: z.string().min(1),\n workflowInstanceId: z.string().nullable().optional(),\n stepId: z.string().nullable().optional(),\n capability: z.string().min(1),\n budget: z.number().int().positive(),\n})\n\n/**\n * Assemble input. The serializable fields are validated by `assembleInputSchema`;\n * `documentInputs` (raw bytes the resolver ingests via the document pipeline) and\n * `documentExtractions` (already-ingested facts) are typed outside the strict\n * Zod parse \u2014 the `Buffer` payload is not a JSON value. Both feed `document`\n * candidates into the bundle with provenance + confidence (Phase 3).\n */\nexport type AssembleInput = z.infer<typeof assembleInputSchema> & {\n /** Raw documents the resolver ingests (OCR \u2192 classify \u2192 extract) at assembly time. */\n documentInputs?: Array<Omit<DocumentIngestInput, 'scope'>>\n /** Pre-ingested document extractions to fold in (e.g. from an async ingest worker). */\n documentExtractions?: DocumentExtraction[]\n /** Facts below this confidence are excluded from routing (default 0.5). */\n documentMinConfidence?: number\n}\n\nexport type AssembleResult = {\n bundle: AgentContextBundle\n payloadRef: string | null\n /**\n * The UNTRUSTED (`document`/`retrieval`) spans that were ROUTED into this bundle,\n * carrying their raw text + provenance locator. Surfaced (not persisted on the\n * bundle) so the Wave-3 pre-call prompt-injection guardrail can screen them\n * before the model call. Trusted `entity` spans are excluded. Empty when the\n * capability routes no untrusted content.\n */\n untrustedSpans: UntrustedSpan[]\n /**\n * The CITABLE sources routed into this bundle \u2014 every routed source with a\n * resolvable `locator`, carrying its `score`. Surfaced (not separately persisted;\n * derived from the bundle's `routedSources`) so the Wave-3 grounding\n * (cite-or-abstain) guardrail can resolve a factual proposal's citations against\n * exactly what the agent was given. A routed source without a locator is excluded\n * (a citation must always resolve to a pointer).\n */\n citableSources: CitableSource[]\n}\n\nexport type RetrieveScope = {\n tenantId: string\n organizationId: string\n capability: string\n}\n\n/**\n * A citable grounding snippet returned by `retrieve()`. The grounding contract\n * GUARANTEES `sourceRef` + `locator` + `score` on every snippet \u2014 `locator` is\n * required (not optional) so the Wave 3 cite-or-abstain check can always resolve\n * a cite back to its source.\n */\nexport type RetrievedSnippet = {\n sourceKind: 'entity' | 'document' | 'retrieval'\n sourceRef: string\n locator: string\n snippet: string\n score: number\n}\n\n/**\n * A capability has no declared `ContextModule` \u2014 the assembler fails closed\n * rather than assembling an ungoverned (and so unbounded least-privilege) context.\n */\nexport class ContextModuleNotFoundError extends Error {\n readonly code = 'context_module_not_found'\n constructor(capability: string) {\n super(`[internal] no ContextModule declared for capability \"${capability}\"`)\n this.name = 'ContextModuleNotFoundError'\n }\n}\n\nexport interface ContextResolver {\n assemble(em: EntityManager, input: AssembleInput): Promise<AssembleResult>\n retrieve(em: EntityManager, query: string, scope: RetrieveScope): Promise<RetrievedSnippet[]>\n}\n\n/**\n * Hybrid Task-Driven Context Routing (TDCR) resolver (context overlay, Phase 1).\n *\n * Resolves the per-capability `ContextModule` (code-first registry, fails closed),\n * reads the declared MANDATORY floor over `entities`/custom fields via the\n * `queryEngine` (`query_index`, org-scoped) with provenance stamped at assembly\n * time, packs mandatory-first under the token budget, and persists exactly ONE\n * append-only `AgentContextBundle` per run.\n *\n * Clean seams for later phases:\n * - `retrieve()` is the standalone grounding hook \u2014 Phase 2 wires `searchService`\n * RRF fill behind it; it returns citable snippets (sourceRef + locator + score)\n * and is the contract the Wave 3 grounding (cite-or-abstain) check consumes.\n * - the packer's token estimator + redaction stage are where P4 plugs the\n * model-appropriate tokenizer and PII/field-encryption redaction.\n * - the `document` source kind is declared by the registry and assembled by P3.\n */\nexport class ContextResolverImpl implements ContextResolver {\n constructor(private readonly container: AwilixContainer) {}\n\n private get queryEngine(): QueryEngine {\n return this.container.resolve('queryEngine') as QueryEngine\n }\n\n private get documentIngestService(): DocumentIngestService | null {\n const hasRegistration =\n typeof this.container.hasRegistration === 'function'\n ? this.container.hasRegistration.bind(this.container)\n : null\n if (hasRegistration && !hasRegistration('agentDocumentIngestService')) return null\n try {\n return this.container.resolve('agentDocumentIngestService') as DocumentIngestService\n } catch {\n return null\n }\n }\n\n private get encryptionService(): EncryptedFieldNameSource | null {\n const hasRegistration =\n typeof this.container.hasRegistration === 'function'\n ? this.container.hasRegistration.bind(this.container)\n : null\n if (hasRegistration && !hasRegistration('tenantEncryptionService')) return null\n try {\n const service = this.container.resolve('tenantEncryptionService') as unknown\n if (service && typeof (service as EncryptedFieldNameSource).getEncryptedFieldNames === 'function') {\n return service as EncryptedFieldNameSource\n }\n return null\n } catch {\n return null\n }\n }\n\n /**\n * The least-privilege set of fields to redact for an entity source: the\n * module's static encryption-map floor (always on) UNION the per-tenant\n * encrypted-field set from `TenantDataEncryptionService` (when registered). The\n * PII name-based rule is applied independently inside `redactRecord`.\n */\n private async encryptedFieldNamesFor(\n entityType: string,\n scope: { tenantId: string; organizationId: string },\n ): Promise<string[]> {\n const fields = new Set<string>(staticEncryptedFieldNames(entityType, defaultEncryptionMaps))\n const service = this.encryptionService\n if (service) {\n try {\n const tenantFields = await service.getEncryptedFieldNames(\n entityType,\n scope.tenantId,\n scope.organizationId,\n )\n for (const field of tenantFields) fields.add(field)\n } catch {\n // The static floor still applies; a service read failure must never\n // un-redact a field, so we fall through with what we have.\n }\n }\n return [...fields]\n }\n\n async assemble(em: EntityManager, input: AssembleInput): Promise<AssembleResult> {\n // Validate the serializable scope/budget fields; the Buffer-bearing document\n // inputs ride alongside as a typed param (not a JSON value).\n const parsedScope = assembleInputSchema.parse(input)\n const parsed: AssembleInput = {\n ...parsedScope,\n documentInputs: input.documentInputs,\n documentExtractions: input.documentExtractions,\n documentMinConfidence: input.documentMinConfidence,\n }\n const module = resolveContextModule(parsed.capability)\n if (!module) throw new ContextModuleNotFoundError(parsed.capability)\n\n const { candidates, redactions } = await this.collectCandidates(module, parsed)\n const packed = packCandidates(candidates, parsed.budget)\n\n // Surface the UNTRUSTED (document/retrieval) spans that were actually ROUTED so\n // the Wave-3 pre-call injection guardrail screens only what the model will see.\n // A span is routed when its ref appears in `routedSources` for that kind. The\n // raw text rides on the candidate's redacted record `snippet`; it is surfaced\n // in-memory only (never written to the persisted bundle).\n const routedKeys = new Set(packed.routedSources.map((source) => `${source.kind}:${source.ref}`))\n const untrustedSpans: UntrustedSpan[] = candidates\n .filter(\n (candidate) =>\n (candidate.kind === 'document' || candidate.kind === 'retrieval') &&\n routedKeys.has(`${candidate.kind}:${candidate.hit.ref}`),\n )\n .map((candidate) => ({\n sourceKind: candidate.kind as 'document' | 'retrieval',\n sourceRef: candidate.hit.ref,\n locator: candidate.hit.locator ?? `${candidate.kind}:${candidate.hit.ref}`,\n text:\n typeof candidate.hit.record.snippet === 'string'\n ? candidate.hit.record.snippet\n : JSON.stringify(candidate.hit.record),\n }))\n\n // Derive the citable sources (grounding cite target) from the routed set:\n // every routed source with a locator, carrying its score (a routed entity read\n // has a certain score of 1; retrieval/document carry their ranked score).\n const citableSources: CitableSource[] = packed.routedSources\n .filter((source) => typeof source.locator === 'string' && source.locator.length > 0)\n .map((source) => ({\n sourceKind: source.kind,\n sourceRef: source.ref,\n locator: source.locator as string,\n score: typeof source.score === 'number' ? source.score : 1,\n }))\n\n // Validate the jsonb shapes at the Zod boundary before persisting.\n const routedSources = contextBundleRoutedSourcesSchema.parse(packed.routedSources)\n const prunedSources = contextBundlePrunedSourcesSchema.parse(packed.prunedSources)\n const sources = contextBundleSourcesSchema.parse(packed.sources)\n const redactionApplied = contextBundleRedactionAppliedSchema.parse(redactions)\n\n const bundle = em.create(AgentContextBundle, {\n tenantId: parsed.tenantId,\n organizationId: parsed.organizationId,\n agentRunId: parsed.agentRunId,\n workflowInstanceId: parsed.workflowInstanceId ?? null,\n stepId: parsed.stepId ?? null,\n capability: parsed.capability,\n routedSources,\n prunedSources: prunedSources.length ? prunedSources : null,\n sources,\n tokenBudget: parsed.budget,\n tokensUsed: packed.tokensUsed,\n // Field-encryption/PII redaction applied before packing (least-privilege).\n // Encrypted/PII values are removed from every routed record; this records\n // exactly what was withheld for the trace inspector + compliance lineage.\n redactionApplied: redactionApplied.length ? redactionApplied : null,\n // P4 offloads the packed payload to storage-s3 and stores the ref here.\n payloadRef: null,\n })\n em.persist(bundle)\n await em.flush()\n\n return { bundle, payloadRef: bundle.payloadRef ?? null, untrustedSpans, citableSources }\n }\n\n /**\n * Standalone grounding lookup \u2014 the contract the Wave 3 guardrails grounding\n * (cite-or-abstain) check consumes. Wraps `searchService` (RRF, `packages/search`)\n * over the capability's declared `retrieval` sources plus its structured\n * `entity` sources, ALWAYS org+tenant scoped (cross-tenant retrieval is\n * structurally impossible \u2014 the scope is the authority, never user input).\n *\n * GROUNDING CONTRACT: every returned snippet is CITABLE \u2014 it carries\n * `sourceRef` + `locator` + `score`. No snippet is ever emitted without a\n * locator or score (a malformed search row is dropped, not returned uncited),\n * so the grounding check can verify a proposal's cites or force an abstain.\n *\n * Signature:\n * retrieve(em, query, { tenantId, organizationId, capability })\n * => Promise<RetrievedSnippet[]>\n * RetrievedSnippet = { sourceKind, sourceRef, locator, snippet, score }\n */\n async retrieve(\n _em: EntityManager,\n query: string,\n scope: RetrieveScope,\n ): Promise<RetrievedSnippet[]> {\n const module = resolveContextModule(scope.capability)\n if (!module) throw new ContextModuleNotFoundError(scope.capability)\n\n const readScope = { tenantId: scope.tenantId, organizationId: scope.organizationId }\n const snippets: RetrievedSnippet[] = []\n\n // Retrieval sources: RRF-ranked `searchService` hits (the primary grounding\n // surface). Every hit is citable by construction (locator + score).\n for (const source of module.sources) {\n if (source.kind !== 'retrieval') continue\n const hits = await readRetrievalSource(this.container, source, query, readScope)\n for (const hit of hits) {\n if (!hit.locator || typeof hit.score !== 'number') continue\n snippets.push({\n sourceKind: 'retrieval',\n sourceRef: hit.ref,\n locator: hit.locator,\n snippet: typeof hit.record.snippet === 'string' ? hit.record.snippet : JSON.stringify(hit.record),\n score: hit.score,\n })\n }\n }\n\n // Structured `entity` sources also ground a proposal \u2014 emit them as citable\n // snippets (the record id is the locator, score defaults to a certain 1).\n // Redact encrypted/PII fields here too: a grounding snippet is agent-visible,\n // so it must obey the same least-privilege boundary as the packed bundle.\n for (const source of module.sources) {\n if (source.kind !== 'entity') continue\n const encryptedFields = await this.encryptedFieldNamesFor(source.entityType, readScope)\n const hits = await this.readEntitySource(source, readScope)\n for (const hit of hits) {\n const { record } = redactRecord(hit.record, encryptedFields)\n const locator = hit.locator ?? `${source.entityType}:${hit.ref}`\n snippets.push({\n sourceKind: 'entity',\n sourceRef: hit.ref,\n locator,\n snippet: JSON.stringify(record),\n score: hit.score ?? 1,\n })\n }\n }\n\n return snippets\n }\n\n private async collectCandidates(\n module: ContextModule,\n input: AssembleInput,\n ): Promise<{ candidates: PackCandidate[]; redactions: ContextRedactionApplied[] }> {\n const scope = { tenantId: input.tenantId, organizationId: input.organizationId }\n const candidates: PackCandidate[] = []\n const redactionByField = new Map<string, ContextRedactionApplied>()\n const ordered = [...module.sources].sort((left, right) => left.priority - right.priority)\n\n const recordRedactions = (applied: ContextRedactionApplied[]): void => {\n for (const redaction of applied) {\n const key = `${redaction.field}:${redaction.rule}`\n if (!redactionByField.has(key)) redactionByField.set(key, redaction)\n }\n }\n\n // First pass: read structured `entity` sources. The mandatory floor comes\n // exclusively from these (retrieval is always optional fill), so we read it\n // before deriving the retrieval query from the assembled mandatory facts.\n // Each record is REDACTED here, before it becomes a candidate \u2014 encrypted/PII\n // field values never enter the pack, the budget estimate, or the payload.\n for (const source of ordered) {\n if (source.kind !== 'entity') continue\n const encryptedFields = await this.encryptedFieldNamesFor(source.entityType, scope)\n const hits = await this.readEntitySource(source, scope)\n for (const hit of hits) {\n const { record, redactions } = redactRecord(hit.record, encryptedFields)\n recordRedactions(redactions)\n const redactedHit = { ...hit, record }\n const provenance: ContextProvenance = source.provenance(redactedHit)\n candidates.push({\n kind: source.kind,\n tier: source.tier,\n hit: redactedHit,\n tokens: estimateTokens(record),\n provenance,\n })\n }\n }\n\n // Second pass: retrieval-ranked OPTIONAL fill (Phase 2). The query is derived\n // from the mandatory floor so retrieval is grounded in the subject the\n // capability MUST see; results pack into the budget remaining after the floor\n // and flow through the same routed/pruned recording as every other candidate.\n // Retrieval records are PII-redacted by name (no per-entity encryption map is\n // known for a fused snippet) so a sensitive field can't ride in via search.\n const retrievalQuery = buildRetrievalQuery(candidates, input.capability)\n for (const source of ordered) {\n if (source.kind !== 'retrieval') continue\n const hits = await readRetrievalSource(this.container, source, retrievalQuery, scope)\n for (const hit of hits) {\n const { record, redactions } = redactRecord(hit.record, [])\n recordRedactions(redactions)\n const redactedHit = { ...hit, record }\n const provenance: ContextProvenance = source.provenance(redactedHit)\n candidates.push({\n kind: source.kind,\n tier: source.tier,\n hit: redactedHit,\n tokens: estimateTokens(record),\n provenance,\n })\n }\n }\n\n // Third pass: document facts (Phase 3). Ingest any raw documents via the\n // swappable OCR/extraction pipeline, fold in any pre-ingested extractions,\n // then pack each fact as an OPTIONAL `document` candidate. Low-confidence\n // facts are excluded before they enter the pool (excludable-from-routing);\n // extracted text is UNTRUSTED data, never an instruction. Document records\n // also pass through PII-name redaction before packing.\n const extractions = await this.collectDocumentExtractions(input, scope)\n const minConfidence = input.documentMinConfidence ?? DEFAULT_DOCUMENT_MIN_CONFIDENCE\n for (const extraction of extractions) {\n for (const { fact, hit } of documentExtractionToCandidates(extraction, { minConfidence })) {\n const { record, redactions } = redactRecord(hit.record, [])\n recordRedactions(redactions)\n const redactedHit = { ...hit, record }\n candidates.push({\n kind: 'document',\n tier: 'optional',\n hit: redactedHit,\n tokens: estimateTokens(record),\n provenance: documentProvenance(fact),\n })\n }\n }\n\n return { candidates, redactions: [...redactionByField.values()] }\n }\n\n /**\n * Ingest raw `documentInputs` through the swappable pipeline (org+tenant scoped)\n * and merge with any pre-supplied `documentExtractions`. Returns `[]` when no\n * documents are supplied or the ingest service is unregistered \u2014 document facts\n * are optional fill, so their absence never breaks assembly.\n */\n private async collectDocumentExtractions(\n input: AssembleInput,\n scope: { tenantId: string; organizationId: string },\n ): Promise<DocumentExtraction[]> {\n const extractions: DocumentExtraction[] = [...(input.documentExtractions ?? [])]\n const documentInputs = input.documentInputs ?? []\n if (documentInputs.length) {\n const service = this.documentIngestService\n if (service) {\n for (const document of documentInputs) {\n const extraction = await service.ingest({ ...document, scope })\n // The ingest pipeline binds every fact to this document's sourceRef; the\n // scope is the authority, so a cross-tenant document can never be folded in.\n extractions.push(extraction)\n }\n }\n }\n return extractions\n }\n\n /**\n * Read a structured `entity` source via the `queryEngine` (`query_index`),\n * ALWAYS org+tenant scoped \u2014 cross-tenant reads are structurally impossible.\n */\n private async readEntitySource(\n source: ContextSourceDecl,\n scope: { tenantId: string; organizationId: string },\n ): Promise<ContextSourceHit[]> {\n const result = await this.queryEngine.query<Record<string, unknown>>(source.entityType, {\n tenantId: scope.tenantId,\n organizationId: scope.organizationId,\n fields: source.fields,\n page: { page: 1, pageSize: 100 },\n })\n return result.items.map((record) => ({\n ref: String((record as { id?: unknown }).id ?? ''),\n record,\n }))\n }\n}\n\n/** Field names whose value is a human-meaningful term to seed retrieval. */\nconst RETRIEVAL_QUERY_FIELDS = ['title', 'name', 'subject', 'label', 'summary', 'description']\n\n/**\n * Derive the retrieval query for the optional fill from the assembled mandatory\n * floor: the capability id plus short, human-meaningful values from the\n * mandatory facts. Deterministic and bounded so retrieval is grounded in what\n * the capability MUST see (not free-form user input).\n */\nfunction buildRetrievalQuery(candidates: PackCandidate[], capability: string): string {\n const terms: string[] = [capability]\n for (const candidate of candidates) {\n if (candidate.tier !== 'mandatory') continue\n for (const field of RETRIEVAL_QUERY_FIELDS) {\n const value = candidate.hit.record[field]\n if (typeof value === 'string' && value.trim()) terms.push(value.trim())\n }\n }\n return [...new Set(terms)].join(' ').slice(0, 512).trim()\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|