Skip to content

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

TypeScript

docs(control-api): note that workflow-recipes also compares control scopes (BR-08)

Diego Zacariasdeeb7d4b4d1e
diff --git a/control-api/package-lock.json b/control-api/package-lock.json
index 4eaebe0dc..626cecc58 100644
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-api",
- "version": "0.1.819",
+ "version": "0.1.820",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.819",
+ "version": "0.1.820",
"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 10853ccc2..3e2fe36e4 100644
--- a/control-api/package.json
+++ b/control-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-api",
- "version": "0.1.819",
+ "version": "0.1.820",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --git a/control-api/src/utils/auth/mcpHostJwtToken.ts b/control-api/src/utils/auth/mcpHostJwtToken.ts
index 04a5873bf..f57103042 100644
--- a/control-api/src/utils/auth/mcpHostJwtToken.ts
+++ b/control-api/src/utils/auth/mcpHostJwtToken.ts
@@ -366,8 +366,11 @@ export function issueMcpHostControlJwt(
// The OAuth broker binds a control token to a live Host through host_uid, so
// only HCC-lineage tokens may carry the broker scope. Filtering here (not in
// each route) also covers refresh/reissue of older chains that still list the
- // scope. Access and refresh keep it: they never authorize at the broker, and
- // workflow-recipes compares their scopes against what it requested.
+ // scope. Access and refresh keep it because they never authorize at the
+ // broker. workflow-recipes compares the scopes of all three tokens, control
+ // included, against what it requested and re-mints on any difference: if it
+ // ever requests oauth:user-token, this strip turns into a permanent re-mint
+ // loop. Today only host-context-controller requests that scope.
const scopeStripped = !hccCredential && requestedScopes.includes(BROKER_USER_TOKEN_SCOPE)
const scopes = scopeStripped
? requestedScopes.filter(scope => scope !== BROKER_USER_TOKEN_SCOPE)