Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

docs(control-api): r1-l9 narrow the allowlist-union docstring to its callers

Diego Zacarias3d8546313bad
diff --git a/control-api/package-lock.json b/control-api/package-lock.json
index 3d59738d0..1289f81c6 100644
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-api",
- "version": "0.1.748",
+ "version": "0.1.749",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.748",
+ "version": "0.1.749",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/grok-provider-attempt-contract": "file:../packages/grok-provider-attempt-contract",
diff --git a/control-api/package.json b/control-api/package.json
index 5536d5d8b..b4a29b702 100644
--- a/control-api/package.json
+++ b/control-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-api",
- "version": "0.1.748",
+ "version": "0.1.749",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --git a/control-api/src/services/access/mcpInvocable.ts b/control-api/src/services/access/mcpInvocable.ts
index 5096e421a..aea30f789 100644
--- a/control-api/src/services/access/mcpInvocable.ts
+++ b/control-api/src/services/access/mcpInvocable.ts
@@ -213,9 +213,13 @@ async function loadAllowedNamesByContext(
/**
* Union of the `spec.mcpServers` allowlists of the given Contexts (by
- * `spec.contextId`), names trimmed. The single definition of "these Contexts
- * enable these servers" for the consent gate and the rpc-proxy rail, so the
- * two cannot drift. An empty `contextIds` resolves without listing Contexts.
+ * `spec.contextId`), names trimmed. Shared by the user-scope consent gate and
+ * the flat `/mcp-servers` rail, so those two cannot drift on which servers a
+ * set of Contexts enables. The per-agent resolvers (`resolveMcpServersForAgents`,
+ * `resolveConnectorsForAgents`) read `loadAllowedNamesByContext` directly
+ * instead: they need each agent's own Context allowlist, not a union, and
+ * both paths apply the same per-Context trimming there. An empty `contextIds`
+ * resolves without listing Contexts.
*/
export async function allowedMcpServerNamesForContexts(
gateway: Pick<K8sGateway, 'listResource'>,