Skip to content

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

TypeScript

chore: merge origin/dev into feat/context-removal

Miguelon Peluchone90034550ecb
diff --cc control-ui/app/mcp-servers/[name]/edit/page.tsx
index 47f7adfd0,40397b1af..2550646dc
--- a/control-ui/app/mcp-servers/[name]/edit/page.tsx
+++ b/control-ui/app/mcp-servers/[name]/edit/page.tsx
@@@ -373,19 -365,25 +377,25 @@@ export default function EditMcpServerPa
serverName={name}
envSecret={envSecret}
registryCredentialSource={registryCredentialSource}
+ surface={resolveCredentialSurface(
+ server.status?.conditions,
+ server.spec as { managed?: boolean } | undefined
+ )}
+ // Ownership is a spec fact, independent of observed status.
+ recipeOwned={isRecipeOwned(server.spec as { managed?: boolean } | undefined)}
/>
</div>
- ) : activeTab === 'context' ? (
+ ) : activeTab === 'access' ? (
<div className="cu-connector-edit-form cu-connector-edit-content">
- <section className="cu-form-section" aria-labelledby="connector-context-title">
+ <section className="cu-form-section" aria-labelledby="connector-access-title">
<div className="cu-form-section__header">
- <h2 id="connector-context-title" className="cu-form-section__title">
- Context access
+ <h2 id="connector-access-title" className="cu-form-section__title">
+ Agent access
</h2>
<p className="cu-form-section__description">
- This connector is available in the contexts shown below. Context assignments
- are derived from the current Context allowlists and cannot be changed here
- yet.
+ This connector is available to the agents, teams, and users shown below.
+ Assignments are derived from the current access setup and cannot be changed
+ here yet.
</p>
</div>
diff --cc control-ui/components/HostWizard/index.tsx
index 50d2823f4,da80b39e6..8932db25c
--- a/control-ui/components/HostWizard/index.tsx
+++ b/control-ui/components/HostWizard/index.tsx
@@@ -34,7 -47,7 +46,8 @@@ import
resolveDefaultModel,
validateLlmSecretData,
} from '@/lib/llm'
+ import { credentialSelectValue, parseCredentialSelect } from '@/lib/llmCredentialSelect'
+import { createPrivateContext } from '@/lib/privateContext'
import { toKebabCase, toKebabInput } from '@/lib/string'
import {
HOST_NAMESPACE,
diff --cc control-ui/components/McpServerTable.tsx
index 6eb487cc3,de336f5f7..895ab115c
--- a/control-ui/components/McpServerTable.tsx
+++ b/control-ui/components/McpServerTable.tsx
@@@ -183,7 -194,7 +183,7 @@@ function ConnectorAgentsGroup(
{onAdd ? (
<button
type="button"
- className="cu-btn cu-btn--secondary cu-btn--sm cu-connector-agent-access__add"
- className="cu-btn cu-btn--sm cu-connector-context-access__add"
++ className="cu-btn cu-btn--sm cu-connector-agent-access__add"
disabled={busy}
onClick={onAdd}
>
diff --cc control-ui/package.json
index a4b7858e8,9434e6613..f9619f44b
--- a/control-ui/package.json
+++ b/control-ui/package.json
@@@ -1,6 -1,6 +1,6 @@@
{
"name": "clerum-control-ui",
- "version": "0.1.476",
- "version": "0.1.486",
++ "version": "0.1.487",
"private": true,
"scripts": {
"dev": "NEXT_IGNORE_INCORRECT_LOCKFILE=1 next dev",
diff --cc desktop-app/src/__tests__/config.onboardingPreview.test.ts
index 000000000,79c915389..8a830423c
mode 000000,100644..100644
--- a/desktop-app/src/__tests__/config.onboardingPreview.test.ts
+++ b/desktop-app/src/__tests__/config.onboardingPreview.test.ts
@@@ -1,0 -1,162 +1,159 @@@
+ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
+ import fs from 'node:fs'
+ import os from 'node:os'
+ import path from 'node:path'
+
+ const testUserDataDir = fs.mkdtempSync(path.join(os.tmpdir(), 'evenfire-test-userdata-'))
+
+ vi.mock('electron', () => ({
+ app: {
+ getPath: vi.fn(() => testUserDataDir),
+ isPackaged: false,
+ isReady: vi.fn(() => true),
+ setName: vi.fn(),
+ setPath: vi.fn(),
+ getName: vi.fn(() => 'Evenfire'),
+ },
+ }))
+
+ const LOCALHOST_EXTERNAL = 'http://127.0.0.1:8091'
+ const LOCALHOST_RPC = 'http://127.0.0.1:8094'
+
+ async function loadState() {
+ vi.resetModules()
+ const config = await import('../config.js')
+ // getDesktopRuntimeConfigState hydrates first, so this is the value the
+ // renderer actually receives — not the pre-hydrate one.
+ return config.getDesktopRuntimeConfigState()
+ }
+
+ describe('EVENFIRE_ONBOARDING_PREVIEW', () => {
+ const saved = {
+ external: process.env.EXTERNAL_REST_API_BASE_URL,
+ rpc: process.env.RPC_PROXY_BASE_URL,
+ preview: process.env.EVENFIRE_ONBOARDING_PREVIEW,
+ explicit: process.env.CLERUM_DESKTOP_CONFIG_PATH,
+ }
+
+ beforeEach(() => {
+ delete process.env.EVENFIRE_ONBOARDING_PREVIEW
+ delete process.env.CLERUM_DESKTOP_CONFIG_PATH
+ })
+
+ afterEach(() => {
+ for (const [key, value] of [
+ ['EXTERNAL_REST_API_BASE_URL', saved.external],
+ ['RPC_PROXY_BASE_URL', saved.rpc],
+ ['EVENFIRE_ONBOARDING_PREVIEW', saved.preview],
+ ['CLERUM_DESKTOP_CONFIG_PATH', saved.explicit],
+ ] as const) {
+ if (value === undefined) delete process.env[key]
+ else process.env[key] = value
+ }
+ vi.resetModules()
+ })
+
+ it('defaults to off: an env-configured app stays configured', async () => {
+ process.env.EXTERNAL_REST_API_BASE_URL = LOCALHOST_EXTERNAL
+ process.env.RPC_PROXY_BASE_URL = LOCALHOST_RPC
+
+ expect((await loadState()).configured).toBe(true)
+ })
+
+ it('ignores any value other than "true"', async () => {
+ process.env.EXTERNAL_REST_API_BASE_URL = LOCALHOST_EXTERNAL
+ process.env.RPC_PROXY_BASE_URL = LOCALHOST_RPC
+ process.env.EVENFIRE_ONBOARDING_PREVIEW = 'false'
+
+ expect((await loadState()).configured).toBe(true)
+
+ process.env.EVENFIRE_ONBOARDING_PREVIEW = '1'
+ expect((await loadState()).configured).toBe(true)
+ })
+
+ it('starts cold when enabled, even with the make local-app runtime vars set', async () => {
+ process.env.EXTERNAL_REST_API_BASE_URL = LOCALHOST_EXTERNAL
+ process.env.RPC_PROXY_BASE_URL = LOCALHOST_RPC
+ process.env.EVENFIRE_ONBOARDING_PREVIEW = 'true'
+
+ // configured === false is what routes the renderer to onboarding.
+ expect((await loadState()).configured).toBe(false)
+ })
+
+ it('reads and writes a separate directory, never the real runtime config', async () => {
+ process.env.EVENFIRE_ONBOARDING_PREVIEW = 'true'
+ const previewPath = (await loadState()).storagePath
+
+ delete process.env.EVENFIRE_ONBOARDING_PREVIEW
+ const realPath = (await loadState()).storagePath
+
+ expect(previewPath).not.toBe(realPath)
+ expect(previewPath).toContain('runtime-configs-onboarding-preview')
+ expect(realPath).toMatch(/runtime-configs$/)
+ })
+
+ it('survives hydration under a real `make local-app` launch', async () => {
+ // Regression: hydrateDesktopRuntimeConfig re-pinned the Localhost option
+ // whenever the app was launched with --evenfire-desktop-dev-package AND
+ // localhost endpoints — exactly what `make local-app` does. That flipped
+ // `configured` back to true after boot, so the app opened on sign-in while
+ // the boot log still claimed onboarding.
+ process.argv.push('--evenfire-desktop-dev-package')
+ try {
+ process.env.EXTERNAL_REST_API_BASE_URL = LOCALHOST_EXTERNAL
+ process.env.RPC_PROXY_BASE_URL = LOCALHOST_RPC
+ process.env.EVENFIRE_ONBOARDING_PREVIEW = 'true'
+
+ const state = await loadState()
+
+ expect(state.configured).toBe(false)
+ expect(state.activeOptionId).not.toBe('__localhost__')
+ } finally {
+ process.argv = process.argv.filter(a => a !== '--evenfire-desktop-dev-package')
+ }
+ })
+
+ it('still pins Localhost for a dev-package launch when preview is off', async () => {
+ process.argv.push('--evenfire-desktop-dev-package')
+ try {
+ process.env.EXTERNAL_REST_API_BASE_URL = LOCALHOST_EXTERNAL
+ process.env.RPC_PROXY_BASE_URL = LOCALHOST_RPC
+
+ const state = await loadState()
+
+ expect(state.configured).toBe(true)
+ } finally {
+ process.argv = process.argv.filter(a => a !== '--evenfire-desktop-dev-package')
+ }
+ })
+
+ it('starts cold again after a previous preview selected an environment', async () => {
+ // Regression: selecting Localhost (or saving) inside the preview wrote
+ // activeProfileId into the preview's own directory, so the NEXT launch
+ // came up configured and went to sign-in. The switch showed onboarding
+ // once and then quietly stopped working.
- const previewDir = path.join(
- testUserDataDir,
- 'runtime-configs-onboarding-preview'
- )
++ const previewDir = path.join(testUserDataDir, 'runtime-configs-onboarding-preview')
+ fs.mkdirSync(previewDir, { recursive: true })
+ fs.writeFileSync(
+ path.join(previewDir, 'index.json'),
+ JSON.stringify({ version: 1, activeProfileId: '__localhost__', profiles: [] })
+ )
+
+ process.env.EVENFIRE_ONBOARDING_PREVIEW = 'true'
+
+ const state = await loadState()
+
+ expect(state.configured).toBe(false)
+ expect(state.activeOptionId).not.toBe('__localhost__')
+ })
+
+ it('does not let an explicit config path hand the preview an environment', async () => {
+ process.env.EVENFIRE_ONBOARDING_PREVIEW = 'true'
+ process.env.CLERUM_DESKTOP_CONFIG_PATH = '/tmp/evenfire-explicit/runtime-config.json'
+
+ const state = await loadState()
+
+ expect(state.configured).toBe(false)
+ expect(state.storagePath).toContain('runtime-configs-onboarding-preview')
+ })
+ })
diff --cc tests/e2e/playwright/package.json
index cf4da438d,3ca70203d..c703423af
--- a/tests/e2e/playwright/package.json
+++ b/tests/e2e/playwright/package.json
@@@ -1,6 -1,6 +1,6 @@@
{
"name": "clerum-playwright-tests",
- "version": "0.1.26",
- "version": "0.1.38",
++ "version": "0.1.39",
"private": true,
"description": "Playwright E2E tests for Control UI and Desktop App",
"scripts": {