The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore: files changed app/src/components/settings/panels/AgentAccessPanel.tsx,app/src/lib/i18n/en.ts
Steven Enamakel6a5e599a1382
diff --git a/app/src/components/settings/panels/AgentAccessPanel.tsx b/app/src/components/settings/panels/AgentAccessPanel.tsxindex d79ba1567c..38e7092dfa 100644--- a/app/src/components/settings/panels/AgentAccessPanel.tsx+++ b/app/src/components/settings/panels/AgentAccessPanel.tsx@@ -1,3 +1,4 @@+import { ChevronRight, Plus } from 'lucide-react';import { useEffect, useRef, useState } from 'react';import { useT } from '../../../lib/i18n/I18nContext';@@ -11,15 +12,12 @@ import {type TrustedAccess,type TrustedRoot,} from '../../../utils/tauriCommands';-import { Alert, AlertDescription } from '../../ui';-import Button from '../../ui/Button';+import { Alert, AlertDescription, Button, Card, Field } from '../../ui';import {SettingsBadge,SettingsEmptyState,SettingsListItem,SettingsNumberField,- SettingsRow,- SettingsSection,SettingsSelect,SettingsStatusLine,SettingsSwitch,@@ -265,49 +263,95 @@ const AgentAccessPanel = () => {<SettingsPanel description={t('settings.agentAccess.menuDesc')}>{/* Desktop-only notice */}{!isTauri() && (- <p className="text-sm text-coral-600 dark:text-coral-300">- {t('settings.agentAccess.desktopOnly')}- </p>+ <Alert variant="info" density="compact">+ <AlertDescription>{t('settings.agentAccess.desktopOnly')}</AlertDescription>+ </Alert>)}{isLoading ? (<p className="text-sm text-content-muted">{t('settings.agentAccess.loading')}</p>) : (<>- {/* Auto-approve everything — blanket bypass of the approval- prompt. Security-sensitive: kept at the very top of the panel- with a persistent warning, visible regardless of toggle state,- so the user reads it before flipping the switch. */}- <SettingsSection>- <SettingsRow- htmlFor="switch-auto-approve-all"- label={t('settings.agentAccess.autoApproveAll.label')}+ {/* ── Approvals: when the agent must ask first ─────────────────── */}+ <Card title={t('settings.agentAccess.group.approvals')}>+ {/* Auto-approve everything — blanket bypass of the approval+ prompt. Security-sensitive: first on the page, with a+ persistent warning visible regardless of toggle state. */}+ <div>+ <Field+ htmlFor="switch-auto-approve-all"+ label={t('settings.agentAccess.autoApproveAll.label')}+ control={+ <SettingsSwitch+ id="switch-auto-approve-all"+ checked={autoApproveAll}+ onCheckedChange={toggleAutoApproveAll}+ aria-label={t('settings.agentAccess.autoApproveAll.label')}+ />+ }+ />+ <div className="-mt-1 px-4 pb-3">+ {/* Persistent, not a response to a user action — so no+ assertive announcement on every visit. */}+ <Alert+ variant="warning"+ density="compact"+ role={undefined}+ data-testid="auto-approve-all-warning">+ <AlertDescription>+ {t('settings.agentAccess.autoApproveAll.desc')}+ </AlertDescription>+ </Alert>+ </div>+ </div>++ {/* Always-allowed tools */}+ <div>+ <div className="px-4 pt-3">+ <div className="text-sm font-medium text-content">+ {t('settings.agentAccess.alwaysAllow')}+ </div>+ <p className="mt-0.5 text-xs leading-relaxed text-content-muted">+ {t('settings.agentAccess.alwaysAllowDesc')}+ </p>+ </div>+ {autoApprove.length === 0 ? (+ <SettingsEmptyState label={t('settings.agentAccess.alwaysAllowNone')} />+ ) : (+ <ul className="py-1">+ {autoApprove.map(tool => (+ <SettingsListItem+ key={tool}+ label={tool}+ mono+ onRemove={() => removeAutoApprove(tool)}+ removeLabel={t('settings.agentAccess.remove')}+ />+ ))}+ </ul>+ )}+ </div>++ <Field+ label={t('settings.agentAccess.approvalHistory')}+ description={t('settings.agentAccess.approvalHistoryDesc')}control={- <SettingsSwitch- id="switch-auto-approve-all"- checked={autoApproveAll}- onCheckedChange={toggleAutoApproveAll}- aria-label={t('settings.agentAccess.autoApproveAll.label')}- />+ <Button+ type="button"+ variant="secondary"+ size="sm"+ trailingIcon={<ChevronRight className="h-3.5 w-3.5" aria-hidden />}+ onClick={() => navigateToSettings('approval-history')}+ data-testid="agent-access-approval-history-link">+ {t('settings.agentAccess.viewApprovalHistory')}+ </Button>}/>- <div className="px-4 pb-3 -mt-1">- {/* Persistent, visible regardless of toggle state — not a- response to a user action, so it must not interrupt with an- assertive announcement on every visit. */}- <Alert- variant="warning"- density="compact"- role={undefined}- data-testid="auto-approve-all-warning">- <AlertDescription>{t('settings.agentAccess.autoApproveAll.desc')}</AlertDescription>- </Alert>- </div>- </SettingsSection>+ </Card>- {/* Workspace confinement + task plan approval */}- <SettingsSection>- <SettingsRow+ {/* ── File system: where the agent may read and write ─────────── */}+ <Card title={t('settings.agentAccess.group.fileSystem')}>+ <FieldhtmlFor="switch-workspace-only"label={t('settings.agentAccess.confine.label')}description={t('settings.agentAccess.confine.desc')}@@ -320,16 +364,89 @@ const AgentAccessPanel = () => {/>}/>- </SettingsSection>- {/* Action timeout */}- <SettingsSection- title={t('settings.agentAccess.timeout.label')}- description={t('settings.agentAccess.timeout.desc')}>- <SettingsRow- stacked- control={- <div className="space-y-2">+ {/* Granted folders (trusted roots) */}+ <div>+ <div className="px-4 pt-3">+ <div className="text-sm font-medium text-content">+ {t('settings.agentAccess.grantedFolders')}+ </div>+ <p className="mt-0.5 text-xs leading-relaxed text-content-muted">+ {t('settings.agentAccess.grantedDesc')}+ </p>+ </div>+ {trustedRoots.length === 0 ? (+ <SettingsEmptyState label={t('settings.agentAccess.noneGranted')} />+ ) : (+ <ul className="py-1">+ {trustedRoots.map(r => (+ <SettingsListItem+ key={r.path}+ label={r.path}+ mono+ badge={+ r.access === 'readwrite' ? (+ <SettingsBadge variant="success">+ {t('settings.agentAccess.readWrite')}+ </SettingsBadge>+ ) : (+ <SettingsBadge variant="neutral">+ {t('settings.agentAccess.readOnly')}+ </SettingsBadge>+ )+ }+ onRemove={() => removeRoot(r.path)}+ removeLabel={t('settings.agentAccess.remove')}+ />+ ))}+ </ul>+ )}+ {/* Add-folder row */}+ <div className="flex items-center gap-2 px-4 pb-4 pt-1">+ <SettingsTextField+ mono+ className="flex-1"+ value={newRootPath}+ onChange={e => setNewRootPath(e.target.value)}+ placeholder={t('settings.agentAccess.pathPlaceholder')}+ aria-label={t('settings.agentAccess.pathPlaceholder')}+ onKeyDown={e => {+ if (e.key === 'Enter') {+ e.preventDefault();+ addRoot();+ }+ }}+ inputSize="sm"+ />+ <SettingsSelect+ value={newRootAccess}+ onChange={e => setNewRootAccess(e.target.value as TrustedAccess)}+ aria-label={t('settings.agentAccess.accessLevelLabel')}+ inputSize="sm"+ className="w-32">+ <option value="read">{t('settings.agentAccess.readOnly')}</option>+ <option value="readwrite">{t('settings.agentAccess.readWrite')}</option>+ </SettingsSelect>+ <Button+ type="button"+ variant="secondary"+ size="sm"+ leadingIcon={<Plus className="h-3.5 w-3.5" aria-hidden />}+ onClick={addRoot}+ disabled={!newRootPath.trim()}>+ {t('settings.agentAccess.add')}+ </Button>+ </div>+ </div>+ </Card>++ {/* ── Limits ───────────────────────────────────────────────────── */}+ <Card title={t('settings.agentAccess.group.limits')}>+ <div>+ <Field+ label={t('settings.agentAccess.timeout.label')}+ description={t('settings.agentAccess.timeout.desc')}+ control={<SettingsNumberFieldid="timeout-input"value={timeoutInput}@@ -342,10 +459,12 @@ const AgentAccessPanel = () => {invalid={!!timeoutError}aria-label={t('settings.agentAccess.timeout.label')}/>+ }+ />+ {(timeoutEnvOverride || timeoutSavedNote || timeoutError) && (+ <div className="space-y-2 px-4 pb-3">{timeoutEnvOverride && (- // Reflects a resolved config value, not a user action —- // opt out of the assertive default for the same reason- // as the auto-approve-all warning above.+ // Reflects a resolved config value, not a user action.<Alert variant="warning" density="compact" role={undefined}><AlertDescription>{t('settings.agentAccess.timeout.envOverride')}@@ -359,117 +478,13 @@ const AgentAccessPanel = () => {savingLabel={t('settings.agentAccess.saving')}/></div>- }- />- </SettingsSection>-- {/* Granted folders (trusted roots) */}- <SettingsSection- title={t('settings.agentAccess.grantedFolders')}- description={t('settings.agentAccess.grantedDesc')}>- {trustedRoots.length === 0 ? (- <SettingsEmptyState label={t('settings.agentAccess.noneGranted')} />- ) : (- <ul>- {trustedRoots.map(r => (- <SettingsListItem- key={r.path}- label={r.path}- mono- badge={- r.access === 'readwrite' ? (- <SettingsBadge variant="success">- {t('settings.agentAccess.readWrite')}- </SettingsBadge>- ) : (- <SettingsBadge variant="neutral">- {t('settings.agentAccess.readOnly')}- </SettingsBadge>- )- }- onRemove={() => removeRoot(r.path)}- removeLabel={t('settings.agentAccess.remove')}- />- ))}- </ul>- )}- {/* Add-folder row */}- <div className="flex items-center gap-2 px-4 py-3 border-t border-line-subtle">- <SettingsTextField- mono- className="flex-1"- value={newRootPath}- onChange={e => setNewRootPath(e.target.value)}- placeholder={t('settings.agentAccess.pathPlaceholder')}- aria-label={t('settings.agentAccess.pathPlaceholder')}- onKeyDown={e => {- if (e.key === 'Enter') {- e.preventDefault();- addRoot();- }- }}- inputSize="sm"- />- <SettingsSelect- value={newRootAccess}- onChange={e => setNewRootAccess(e.target.value as TrustedAccess)}- aria-label={t('settings.agentAccess.accessLevelLabel')}- inputSize="sm"- className="w-32">- <option value="read">{t('settings.agentAccess.readOnly')}</option>- <option value="readwrite">{t('settings.agentAccess.readWrite')}</option>- </SettingsSelect>- <Button- type="button"- variant="primary"- size="xs"- onClick={addRoot}- disabled={!newRootPath.trim()}>- {t('settings.agentAccess.add')}- </Button>+ )}</div>- </SettingsSection>-- {/* Always-allowed tools */}- <SettingsSection- title={t('settings.agentAccess.alwaysAllow')}- description={t('settings.agentAccess.alwaysAllowDesc')}>- {autoApprove.length === 0 ? (- <SettingsEmptyState label={t('settings.agentAccess.alwaysAllowNone')} />- ) : (- <ul>- {autoApprove.map(tool => (- <SettingsListItem- key={tool}- label={tool}- mono- onRemove={() => removeAutoApprove(tool)}- removeLabel={t('settings.agentAccess.remove')}- />- ))}- </ul>- )}- </SettingsSection>+ </Card>{/* Action rate limit (formerly the standalone /settings/autonomy page) */}<AutonomyRateLimitSection />- {/* Approval history */}- <SettingsSection- title={t('settings.agentAccess.approvalHistory')}- description={t('settings.agentAccess.approvalHistoryDesc')}>- <div className="px-4 py-3">- <Button- type="button"- variant="secondary"- size="xs"- onClick={() => navigateToSettings('approval-history')}- data-testid="agent-access-approval-history-link">- {t('settings.agentAccess.viewApprovalHistory')}- </Button>- </div>- </SettingsSection>-{/* Auto-save status */}<SettingsStatusLinesaving={isSaving}diff --git a/app/src/lib/i18n/en.ts b/app/src/lib/i18n/en.tsindex e45091f0a8..b5005dc7cc 100644--- a/app/src/lib/i18n/en.ts+++ b/app/src/lib/i18n/en.ts@@ -6167,6 +6167,9 @@ const en: TranslationMap = {'Enter a whole number of seconds within the allowed range','settings.agentAccess.timeout.envOverride':'The OPENHUMAN_TOOL_TIMEOUT_SECS environment variable is overriding this setting, so changes here have no effect until it is unset.',+ 'settings.agentAccess.group.approvals': 'Approvals',+ 'settings.agentAccess.group.fileSystem': 'File system',+ 'settings.agentAccess.group.limits': 'Limits','settings.agentAccess.grantedFolders': 'Granted folders','settings.agentAccess.alwaysAllow': 'Always-allowed tools','settings.agentAccess.alwaysAllowDesc':