Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat: show agent provider route configuration

[._.]/ Adam Eivyf99165e17144
diff --git a/client/src/components/cos/tabs/AgentCard.jsx b/client/src/components/cos/tabs/AgentCard.jsx
index bb7393af32..c0528a0c25 100644
--- a/client/src/components/cos/tabs/AgentCard.jsx
+++ b/client/src/components/cos/tabs/AgentCard.jsx
@@ -40,6 +40,7 @@ import ConfirmButtonPair from '../../ui/ConfirmButtonPair';
import { useConfirmDelete } from '../../../hooks/useConfirmDelete';
import { AgentProgress, AgentRuntimeStatus } from './AgentRuntimeStatus';
import { agentIssueLinkifier } from '../../../lib/issueRefs';
+import { harnessLabel, providerHarnessId } from '../../../utils/providerHarnesses';
// Pre-compiled regexes for normalizeDescriptionToMarkdown
// Avoid lookbehind to support older Safari/iOS runtimes
@@ -59,6 +60,107 @@ const CONFIG_BADGE_KEYS = [
'configReviewLoop',
];
+const PROVIDER_BADGE_CLASSES = {
+ provider: 'bg-blue-500/15 text-blue-400',
+ harness: 'bg-cyan-500/15 text-cyan-400',
+ service: 'bg-violet-500/15 text-violet-400',
+ plan: 'bg-fuchsia-500/15 text-fuchsia-400',
+ route: 'bg-slate-500/15 text-slate-300',
+ command: 'bg-indigo-500/15 text-indigo-400',
+ execution: 'bg-emerald-500/15 text-emerald-400',
+ dispatch: 'bg-teal-500/15 text-teal-400',
+ tier: 'bg-orange-500/15 text-orange-400',
+ prompt: 'bg-amber-500/15 text-amber-400',
+ auth: 'bg-rose-500/15 text-rose-400',
+};
+
+function buildProviderConfigBadges(metadata = {}) {
+ const providerId = metadata.providerId || null;
+ const providerType = metadata.providerType || null;
+ const providerCommand = metadata.providerCommand || null;
+ const inferredHarnessId = providerHarnessId({ id: providerId, type: providerType, command: providerCommand });
+ const harnessId = metadata.harnessId ?? inferredHarnessId;
+ const providerName = metadata.providerName || providerId;
+ const providerMethod = metadata.providerMethod || providerType;
+ const dispatch = metadata.useRunner === true || metadata.useRunner === 'true'
+ ? 'Runner'
+ : metadata.useRunner === false || metadata.useRunner === 'false' ? 'Server' : null;
+ const isCredentialBootstrap = metadata.providerHasCredentialBootstrap === true
+ || metadata.providerHasCredentialBootstrap === 'true';
+ const credentialBootstrap = metadata.providerCredentialBootstrapId || (isCredentialBootstrap ? 'bootstrap' : null);
+
+ return [
+ providerName && {
+ key: 'provider',
+ label: 'Provider',
+ value: providerName,
+ title: providerId && providerName !== providerId ? `Provider ${providerName} (${providerId})` : `Provider ${providerName}`,
+ },
+ harnessId && {
+ key: 'harness',
+ label: 'Harness',
+ value: harnessLabel(harnessId),
+ title: `Harness ${harnessId}`,
+ },
+ metadata.serviceId && {
+ key: 'service',
+ label: 'Service',
+ value: metadata.serviceId,
+ title: `Service ${metadata.serviceId}`,
+ },
+ metadata.servicePlan && {
+ key: 'plan',
+ label: 'Plan',
+ value: metadata.servicePlan,
+ title: `Service plan ${metadata.servicePlan}`,
+ },
+ providerMethod && {
+ key: 'route',
+ label: 'Route',
+ value: providerMethod,
+ title: `Provider route ${providerMethod}`,
+ },
+ providerCommand && {
+ key: 'command',
+ label: 'Command',
+ value: providerCommand,
+ title: `Provider command ${providerCommand}`,
+ },
+ metadata.executionMode && {
+ key: 'execution',
+ label: 'Execution',
+ value: metadata.executionMode,
+ title: `Execution mode ${metadata.executionMode}`,
+ },
+ dispatch && {
+ key: 'dispatch',
+ label: 'Dispatch',
+ value: dispatch,
+ title: `${dispatch}-owned child process`,
+ },
+ metadata.modelTier && {
+ key: 'tier',
+ label: 'Tier',
+ value: metadata.modelTier,
+ title: metadata.modelReason ? `Model selection: ${metadata.modelReason}` : `Model tier ${metadata.modelTier}`,
+ },
+ metadata.leanMode && {
+ key: 'prompt',
+ label: 'Prompt',
+ value: 'lean',
+ title: 'Lean prompt mode',
+ },
+ credentialBootstrap && {
+ key: 'auth',
+ label: 'Auth',
+ value: credentialBootstrap,
+ title: credentialBootstrap === 'bootstrap'
+ ? 'Credentials supplied by a bootstrap command'
+ : `Credential bootstrap ${credentialBootstrap}`,
+ },
+ ].filter(Boolean);
+}
+
const FINISH_SENTINEL_MESSAGE = 'Finish work and write sentinel.';
// Normalize raw task description text into markdown for readable rendering.
@@ -332,6 +434,7 @@ export default function AgentCard({ agent, onPause, onKill, onDelete, onResume,
// instead of reaching a verdict, so it is neither a success nor a failure.
const isSystemAgent = isSystemAgentRecord(agent);
const inactive = completed || paused;
+ const providerConfigBadges = buildProviderConfigBadges(agent.metadata);
// Handle feedback submission
const submitFeedback = useCallback(async (rating) => {
@@ -832,8 +935,17 @@ export default function AgentCard({ agent, onPause, onKill, onDelete, onResume,
)}
{/* Agent configuration badges */}
- {(CONFIG_BADGE_KEYS.some(key => agent.metadata?.[key]) || agent.metadata?.effort) && (
+ {(providerConfigBadges.length > 0 || CONFIG_BADGE_KEYS.some(key => agent.metadata?.[key]) || agent.metadata?.effort) && (
<div className="flex items-center gap-1.5 flex-wrap mb-2">
+ {providerConfigBadges.map(({ key, label, value, title }) => (
+ <span
+ key={key}
+ className={`flex items-center min-w-0 max-w-full [overflow-wrap:anywhere] px-1.5 py-0.5 text-[11px] rounded ${PROVIDER_BADGE_CLASSES[key]}`}
+ title={title}
+ >
+ {label}: {value}
+ </span>
+ ))}
{agent.metadata?.effort && (
<span
className="flex items-center px-1.5 py-0.5 text-[11px] rounded bg-orange-500/15 text-orange-400"
diff --git a/client/src/components/cos/tabs/AgentCard.test.jsx b/client/src/components/cos/tabs/AgentCard.test.jsx
index f617e60d34..5caaa09ab7 100644
--- a/client/src/components/cos/tabs/AgentCard.test.jsx
+++ b/client/src/components/cos/tabs/AgentCard.test.jsx
@@ -524,6 +524,70 @@ describe('AgentCard responsive header', () => {
cleanup();
}
});
+
+ it('shows provider route provenance on active and completed cards', () => {
+ const routeMetadata = {
+ providerId: 'claude-ollama',
+ providerName: 'Claude Ollama',
+ providerType: 'cli',
+ providerMethod: 'cli',
+ providerCommand: 'claude',
+ harnessId: 'claude',
+ serviceId: 'ollama',
+ servicePlan: 'local',
+ providerCredentialBootstrapId: 'example-auth',
+ executionMode: 'runner',
+ useRunner: true,
+ modelTier: 'heavy',
+ leanMode: true,
+ providerHasCredentialBootstrap: true,
+ };
+
+ for (const [cardAgent, isCompleted] of [
+ [{ ...agent, status: 'running', completedAt: null, metadata: { ...agent.metadata, ...routeMetadata } }, false],
+ [{ ...agent, metadata: { ...agent.metadata, ...routeMetadata } }, true],
+ ]) {
+ render(
+ <MemoryRouter>
+ <AgentCard agent={cardAgent} completed={isCompleted} />
+ </MemoryRouter>
+ );
+
+ expect(screen.getByText('Provider: Claude Ollama')).toBeInTheDocument();
+ expect(screen.getByText('Harness: Claude Code')).toBeInTheDocument();
+ expect(screen.getByText('Service: ollama')).toBeInTheDocument();
+ expect(screen.getByText('Plan: local')).toBeInTheDocument();
+ expect(screen.getByText('Route: cli')).toBeInTheDocument();
+ expect(screen.getByText('Command: claude')).toBeInTheDocument();
+ expect(screen.getByText('Execution: runner')).toBeInTheDocument();
+ expect(screen.getByText('Dispatch: Runner')).toBeInTheDocument();
+ expect(screen.getByText('Tier: heavy')).toBeInTheDocument();
+ expect(screen.getByText('Prompt: lean')).toBeInTheDocument();
+ expect(screen.getByText('Auth: example-auth')).toBeInTheDocument();
+ cleanup();
+ }
+ });
+
+ it('derives a known harness for legacy provider metadata', () => {
+ render(
+ <MemoryRouter>
+ <AgentCard
+ agent={{
+ ...agent,
+ metadata: {
+ ...agent.metadata,
+ providerId: 'claude-ollama',
+ providerType: 'cli',
+ providerCommand: 'claude',
+ },
+ }}
+ completed
+ />
+ </MemoryRouter>
+ );
+
+ expect(screen.getByText('Harness: Claude Code')).toBeInTheDocument();
+ });
});
describe('AgentCard transcript truncation (#3498)', () => {
diff --git a/server/lib/agentRegistrationRecord.js b/server/lib/agentRegistrationRecord.js
index 1be6a94760..d72274baef 100644
--- a/server/lib/agentRegistrationRecord.js
+++ b/server/lib/agentRegistrationRecord.js
@@ -97,6 +97,18 @@ export function buildAgentRegistration({
taskType: task.taskType,
priority: task.priority,
providerId: provider.id,
+ // Immutable, non-secret route provenance for the active/completed cards.
+ // Keep this as individual fields rather than copying the provider record:
+ // envVars, endpoints, args and credentials are execution details, not run
+ // metadata that should be persisted or rendered in the card.
+ providerName: provider.name || null,
+ providerType: provider.type || null,
+ providerMethod: provider.method || provider.type || null,
+ harnessId: provider.harnessId || null,
+ serviceId: provider.serviceId || null,
+ servicePlan: provider.servicePlan || null,
+ providerCredentialBootstrapId: provider.credentialBootstrapId || null,
+ providerHasCredentialBootstrap: Boolean(provider.credentialBootstrap),
// Persisted alongside the id because the cleanup path's `agentOpensOwnPr`
// gate must derive from the SAME `canTypeSlashCommands` predicate the prompt
// used to decide whether the agent opens its own PR (#3114). An id alone
diff --git a/server/lib/agentRegistrationRecord.test.js b/server/lib/agentRegistrationRecord.test.js
index b5872e8aec..dc2db30cca 100644
--- a/server/lib/agentRegistrationRecord.test.js
+++ b/server/lib/agentRegistrationRecord.test.js
@@ -7,9 +7,9 @@ import { buildAgentRegistration } from './agentRegistrationRecord.js';
// so a field nobody lists simply does not survive the spawn — the failure mode the
// module header records (`quotaBurnStepId`, #6406). These pin the one field whose
// absence is invisible at spawn time and only shows up as a missing link in the UI.
-const args = (taskMetadata) => ({
+const args = (taskMetadata, provider = { id: 'claude', command: 'claude' }) => ({
task: { id: 'task-1', description: 'do the thing', taskType: 'user', priority: 'normal', metadata: taskMetadata },
- provider: { id: 'claude', command: 'claude' },
+ provider,
instanceId: 'instance-1',
workspacePath: '/tmp/ws',
sourceWorkspace: null,
@@ -59,3 +59,33 @@ it('retains recovery lineage and the persisted boolean marker through task markd
const record = buildAgentRegistration({ ...args({}), task });
expect(record).toMatchObject({ isRecovery: true, recoveryOrigin });
});
+
+it('projects non-secret provider route provenance for active and archived cards', () => {
+ const record = buildAgentRegistration(args({}, {
+ id: 'claude-ollama',
+ name: 'Claude Ollama',
+ type: 'cli',
+ command: 'claude',
+ method: 'cli',
+ harnessId: 'claude',
+ serviceId: 'ollama',
+ servicePlan: 'local',
+ credentialBootstrapId: 'example-auth',
+ credentialBootstrap: { command: 'example-auth' },
+ envVars: { EXAMPLE_SECRET: 'must-not-be-copied' },
+ }));
+
+ expect(record).toMatchObject({
+ providerId: 'claude-ollama',
+ providerName: 'Claude Ollama',
+ providerType: 'cli',
+ providerMethod: 'cli',
+ harnessId: 'claude',
+ serviceId: 'ollama',
+ servicePlan: 'local',
+ providerCredentialBootstrapId: 'example-auth',
+ providerHasCredentialBootstrap: true,
+ });
+ expect(record).not.toHaveProperty('envVars');
+ expect(record).not.toHaveProperty('credentialBootstrap');
+});