Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
Merge origin/dev into feat/ux-improvements-29
Miguelon Peluchona1fb389da289
diff --cc control-ui/app/hosts/[name]/page.tsxindex 17204699f,3ddb5c442..f59b197e4--- a/control-ui/app/hosts/[name]/page.tsx+++ b/control-ui/app/hosts/[name]/page.tsx@@@ -11,24 -9,12 +11,23 @@@ import { HOST_DEFAULT_TAB, HOST_TABS }import { CONTROL_ROUTES } from '@constants/routes'import { HostAccessTab } from '../../../components/HostAccessTab'import { HostAdvancedTab } from '../../../components/HostAdvancedTab'- import { HostGuardrailsSection } from '../../../components/HostGuardrailsSection'import type { HostGuardrails } from '../../../components/HostGuardrailsSection/types'import { HostIdentityTab } from '../../../components/HostIdentityTab'+import { HostOverviewTab } from '../../../components/HostOverviewTab'+import { LlmCredentialFields } from '../../../components/LlmCredentialFields'import { LlmProviderConfig } from '../../../components/LlmProviderConfig'+import { RowActionsMenu } from '../../../components/RowActionsMenu'import { IconRobot } from '../../../components/Sidebar/icons'-import { IconCheck, IconPencil, IconX } from '../../../components/icons'-import { apiSend, getHost, getHostDetailBundle } from '../../../lib/api'+import { IconCheck, IconMoreHorizontal, IconPencil, IconX } from '../../../components/icons'+import {+ apiSend,+ getHost,+ getHostDetailBundle,+ getMcpServers,+ updateContext,+} from '../../../lib/api'+import type { ContextResource, ContextSpec } from '../../../lib/api'+import { buildContextUpdatePayload, contextMutationError } from '../../../lib/contextMutation'import { useLlmAllowedModels } from '../../../lib/hooks/useLlmAllowedModels'import { FIRST_PARTY_CHANNEL_WORKFLOW_CONTROL_SCOPES } from '../../../lib/hostWorkflowControl'import {@@@ -1317,49 -1018,27 +1318,39 @@@ export default function HostDetailsPage)}{activeTab === 'advanced' && (- <>- <HostAdvancedTab- busy={busy}- hostName={routeName}- initialLoading={initialLoading}- initialTools={approvalToolsData}- onSaveApprovalTools={persistApprovalTools}- />- {!initialLoading && (- <HostGuardrailsSection- initialGuardrails={guardrailsData}- onSave={persistGuardrails}- busy={busy}- canWrite={- true /* TODO: wire to actual host:write check if/when per-field RBAC lands */- }- />- )}- </>+ <HostAdvancedTab+ busy={busy}+ hostName={routeName}+ initialGuardrails={guardrailsData}+ initialLoading={initialLoading}+ initialTools={approvalToolsData}+ onSaveApprovalTools={persistApprovalTools}+ onSaveGuardrails={persistGuardrails}+ />)}- {activeTab === 'contexts' && (+ {activeTab === 'connectors' && (<>- <p className="cu-muted" style={{ fontSize: '0.875rem', marginBottom: '1rem' }}>- Associated context for this agent.- </p>+ <div className="cu-agent-detail-heading">+ <p className="cu-muted" style={{ fontSize: '0.875rem', margin: 0 }}>+ Connectors available to this agent.+ </p>+ <div className="cu-agent-detail-heading__actions">+ <button+ type="button"+ className="cu-btn cu-btn--primary cu-btn--sm"+ onClick={() => void openAddConnectorDialog()}+ disabled={busy || !agentContext}+ >+ Add connector+ </button>+ </div>+ </div><div className="cu-table-wrap">- <table className="cu-table cu-table--header-band cu-table--static-rows">+ <table className="cu-table cu-table--header-band cu-table--static-rows cu-agent-connectors-table"><thead><tr>- <th>Context</th>+ <th>Connector</th><th className="cu-table__col-actions">Actions</th></tr></thead>diff --cc control-ui/components/__tests__/HostDetailsPage.identity.test.tsxindex 85fa2fc2d,726bdea78..17a443f6e--- a/control-ui/components/__tests__/HostDetailsPage.identity.test.tsx+++ b/control-ui/components/__tests__/HostDetailsPage.identity.test.tsx@@@ -161,28 -148,21 +161,43 @@@ describe('HostDetailsPage identity inteexpect(container.querySelector('.cu-agent-detail-card .cu-agent-detail-scroll')).not.toBeNull()})+ it('frames one linked LLM Secret and exposes additive provider credentials', async () => {+ mockParams = { name: 'foo', tab: 'model' }+ render(<HostDetailsPage />)++ fireEvent.click(await screen.findByRole('button', { name: 'Edit' }))++ expect(screen.getByRole('link', { name: 'Manage LLM Secrets' })).toHaveAttribute(+ 'href',+ '/secrets/llm'+ )+ expect(screen.getByText('OpenAI · configured')).toBeInTheDocument()+ expect(screen.getByText('Additional providers')).toBeInTheDocument()++ fireEvent.click(screen.getByLabelText('Add provider'))+ fireEvent.click(screen.getByRole('option', { name: 'Anthropic' }))++ expect(+ screen.getByText('Anthropic', { selector: '.cu-llm-cred-group__title' })+ ).toBeInTheDocument()+ expect(screen.getByLabelText(/Claude API key/i)).toBeInTheDocument()+ })++ it('opens Advanced on the Hooks sub-tab', async () => {+ mockParams = { name: 'foo', tab: 'advanced' }+ render(<HostDetailsPage />)++ const hooksTab = await screen.findByRole('tab', { name: 'Hooks' })+ expect(hooksTab).toHaveAttribute('aria-selected', 'true')+ expect(screen.getByRole('tab', { name: 'Per-tool approval' })).toHaveAttribute(+ 'aria-selected',+ 'false'+ )+ expect(await screen.findByText('No guardrail hooks on this agent yet.')).toBeInTheDocument()+ // The approval editor stays unmounted until its sub-tab is selected.+ expect(screen.queryByLabelText('http_request')).toBeNull()+ })+it('keeps Per-tool approval actions in the top toolbar without a duplicate title', async () => {mockParams = { name: 'foo', tab: 'advanced' }const { container } = render(<HostDetailsPage />)