Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
feat(control-api): enable the Publisher UI by default on all deploys
Jose Ramirez74a2c0d8c9a5
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex fe7fd32a5..7d6d171e9 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.360",+ "version": "0.1.361","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.360",+ "version": "0.1.361","dependencies": {"@clerum/image-policy": "file:../packages/image-policy","@clerum/llm-providers": "file:../packages/llm-providers",diff --git a/control-api/package.json b/control-api/package.jsonindex 173651ca2..2da951f40 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.360",+ "version": "0.1.361","description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets","main": "dist/main.js","engines": {diff --git a/control-api/src/config.ts b/control-api/src/config.tsindex 3c214e751..2dca4a6f6 100644--- a/control-api/src/config.ts+++ b/control-api/src/config.ts@@ -549,15 +549,13 @@ export const config: Config = {registryClientSecret: process.env.CLERUM_REGISTRY_CLIENT_SECRET ?? '',registryAuthEnabled: process.env.CLERUM_REGISTRY_AUTH_ENABLED === 'true',registryConnectionMode,- // 'true'/'false' wins explicitly; otherwise default OFF for self-hosted,- // ON for managed — reuses the registryConnectionMode value above rather- // than re-parsing REGISTRY_CONNECTION_MODE.- publisherUiEnabled:- process.env.CONTROL_API_PUBLISHER_UI_ENABLED === 'true'- ? true- : process.env.CONTROL_API_PUBLISHER_UI_ENABLED === 'false'- ? false- : registryConnectionMode !== 'self-hosted',+ // Default ON for every deploy now that the Publisher UI is production-ready+ // (publish → install verified end-to-end); only an explicit+ // CONTROL_API_PUBLISHER_UI_ENABLED='false' disables it. This flag only exposes+ // the surface — the control-ui still fails CLOSED for curator / non-org-bound+ // deploys (isPublisherEnabled requires scope.scope !== null && !curator), so an+ // unconnected self-hosted deploy won't show the Publisher regardless.+ publisherUiEnabled: process.env.CONTROL_API_PUBLISHER_UI_ENABLED !== 'false',adminAuthMaxFailures: Number(process.env.CONTROL_API_ADMIN_AUTH_MAX_FAILURES || 5),adminAuthLockMinutes: Number(process.env.CONTROL_API_ADMIN_AUTH_LOCK_MINUTES || 15),adminBootstrapUsername: requiredOrDevDefault('CONTROL_API_ADMIN_BOOTSTRAP_USERNAME', 'admin'),diff --git a/control-api/test/app.publisherUiEnabled.test.ts b/control-api/test/app.publisherUiEnabled.test.tsindex e05e8f96f..e2f204b5e 100644--- a/control-api/test/app.publisherUiEnabled.test.ts+++ b/control-api/test/app.publisherUiEnabled.test.ts@@ -60,13 +60,13 @@ describe('GET /admin/registry/publish-scope: publisherUiEnabled (effective, throvi.resetModules()})- it('is false by default in self-hosted mode', async () => {+ it('is true by default in self-hosted mode (now production-ready)', async () => {process.env.REGISTRY_CONNECTION_MODE = 'self-hosted'const { createApp } = await import('../src/app.js')const app = createApp(new MockGateway('mcp-server') as never)const res = await request(app).get('/api/v1/admin/registry/publish-scope')expect(res.status).toBe(200)- expect(res.body.publisherUiEnabled).toBe(false)+ expect(res.body.publisherUiEnabled).toBe(true)// The registry-derived fields still pass through untouched.expect(res.body.scope).toBe('@acme')})diff --git a/control-api/test/config.publisherUiEnabled.test.ts b/control-api/test/config.publisherUiEnabled.test.tsindex bb98aed3b..fa993f45d 100644--- a/control-api/test/config.publisherUiEnabled.test.ts+++ b/control-api/test/config.publisherUiEnabled.test.ts@@ -13,42 +13,49 @@ afterEach(() => {vi.resetModules()})-describe('config: publisherUiEnabled (mode-based default + env override)', () => {- it('defaults to false when REGISTRY_CONNECTION_MODE=self-hosted', async () => {+describe('config: publisherUiEnabled (default ON; only CONTROL_API_PUBLISHER_UI_ENABLED=false disables)', () => {+ it('defaults to true on self-hosted (Publisher UI is production-ready)', async () => {process.env.REGISTRY_CONNECTION_MODE = 'self-hosted'const { config } = await import('../src/config.js')- expect(config.publisherUiEnabled).toBe(false)+ expect(config.publisherUiEnabled).toBe(true)})- it('defaults to true when REGISTRY_CONNECTION_MODE=managed', async () => {+ it('defaults to true on managed', async () => {process.env.REGISTRY_CONNECTION_MODE = 'managed'const { config } = await import('../src/config.js')expect(config.publisherUiEnabled).toBe(true)})- it('defaults to true when REGISTRY_CONNECTION_MODE is unset (implicit managed)', async () => {+ it('defaults to true when REGISTRY_CONNECTION_MODE is unset', async () => {const { config } = await import('../src/config.js')expect(config.publisherUiEnabled).toBe(true)})- it('CONTROL_API_PUBLISHER_UI_ENABLED=true overrides the self-hosted default to true', async () => {- process.env.REGISTRY_CONNECTION_MODE = 'self-hosted'- process.env.CONTROL_API_PUBLISHER_UI_ENABLED = 'true'+ it('CONTROL_API_PUBLISHER_UI_ENABLED=false disables it (even on managed)', async () => {+ process.env.REGISTRY_CONNECTION_MODE = 'managed'+ process.env.CONTROL_API_PUBLISHER_UI_ENABLED = 'false'const { config } = await import('../src/config.js')- expect(config.publisherUiEnabled).toBe(true)+ expect(config.publisherUiEnabled).toBe(false)})- it('CONTROL_API_PUBLISHER_UI_ENABLED=false overrides the managed default to false', async () => {- process.env.REGISTRY_CONNECTION_MODE = 'managed'+ it('CONTROL_API_PUBLISHER_UI_ENABLED=false disables it on self-hosted too', async () => {+ process.env.REGISTRY_CONNECTION_MODE = 'self-hosted'process.env.CONTROL_API_PUBLISHER_UI_ENABLED = 'false'const { config } = await import('../src/config.js')expect(config.publisherUiEnabled).toBe(false)})- it('an unrecognized CONTROL_API_PUBLISHER_UI_ENABLED value falls back to the mode-based default', async () => {+ it('CONTROL_API_PUBLISHER_UI_ENABLED=true keeps it enabled', async () => {+ process.env.REGISTRY_CONNECTION_MODE = 'self-hosted'+ process.env.CONTROL_API_PUBLISHER_UI_ENABLED = 'true'+ const { config } = await import('../src/config.js')+ expect(config.publisherUiEnabled).toBe(true)+ })++ it('an unrecognized value stays enabled — only "false" disables', async () => {process.env.REGISTRY_CONNECTION_MODE = 'self-hosted'process.env.CONTROL_API_PUBLISHER_UI_ENABLED = 'yes'const { config } = await import('../src/config.js')- expect(config.publisherUiEnabled).toBe(false)+ expect(config.publisherUiEnabled).toBe(true)})})diff --git a/deploy/overlays/minikube/configmaps/control-api-config.yaml b/deploy/overlays/minikube/configmaps/control-api-config.yamlindex 991ee0ddc..5ee924f4b 100644--- a/deploy/overlays/minikube/configmaps/control-api-config.yaml+++ b/deploy/overlays/minikube/configmaps/control-api-config.yaml@@ -65,10 +65,9 @@ data:CLERUM_REGISTRY_URL: 'https://registry.evenfire.ai'REGISTRY_CONNECTION_MODE: 'self-hosted'CLERUM_REGISTRY_AUTH_ENABLED: 'false'- # The Publisher UI (Sidebar entry + /publisher route) defaults OFF for- # self-hosted deployments (mode-based default, derived from- # REGISTRY_CONNECTION_MODE above; ON for managed) — publishing into the- # curated registry isn't part of the self-hosted flow. Force it on by- # uncommenting the line below.- # CONTROL_API_PUBLISHER_UI_ENABLED: 'true'+ # The Publisher UI (Sidebar entry + /publisher route) defaults ON for every+ # deploy. It only surfaces for an org-bound, non-curator deploy (the control-ui+ # fails closed otherwise), so an unconnected self-hosted deploy still won't show+ # it. Set the line below to 'false' to hide it explicitly.+ # CONTROL_API_PUBLISHER_UI_ENABLED: 'false'CLERUM_ATTACHMENT_MAX_BYTES: '52428800'