MCPcopy Create free account
hub / github.com/block/buzz / fromRawManagedAgent

Function fromRawManagedAgent

desktop/src/shared/api/tauri.ts:970–1011  ·  view source on GitHub ↗
(agent: RawManagedAgent)

Source from the content-addressed store, hash-verified

968}
969
970export function fromRawManagedAgent(agent: RawManagedAgent): ManagedAgent {
971 return {
972 pubkey: agent.pubkey,
973 name: agent.name,
974 personaId: agent.persona_id,
975 relayUrl: agent.relay_url,
976 acpCommand: agent.acp_command,
977 agentCommand: agent.agent_command,
978 agentCommandOverride: agent.agent_command_override ?? null,
979 agentArgs: agent.agent_args,
980 mcpCommand: agent.mcp_command,
981 turnTimeoutSeconds: agent.turn_timeout_seconds,
982 idleTimeoutSeconds: agent.idle_timeout_seconds,
983 maxTurnDurationSeconds: agent.max_turn_duration_seconds,
984 parallelism: agent.parallelism,
985 systemPrompt: agent.system_prompt,
986 avatarUrl: agent.avatar_url ?? null,
987 model: agent.model,
988 // Fallbacks for pre-feature mocks/fixtures. Real records always carry them.
989 provider: agent.provider ?? null,
990 personaOutOfDate: agent.persona_out_of_date ?? false,
991 personaOrphaned: agent.persona_orphaned ?? false,
992 mcpToolsets: agent.mcp_toolsets,
993 envVars: agent.env_vars ?? {},
994 status: agent.status,
995 pid: agent.pid,
996 createdAt: agent.created_at,
997 updatedAt: agent.updated_at,
998 lastStartedAt: agent.last_started_at,
999 lastStoppedAt: agent.last_stopped_at,
1000 lastExitCode: agent.last_exit_code,
1001 lastError: agent.last_error,
1002 logPath: agent.log_path,
1003 startOnAppLaunch: agent.start_on_app_launch,
1004 backend: agent.backend,
1005 backendAgentId: agent.backend_agent_id,
1006 // Fallbacks for pre-feature mocks/fixtures that don't carry these fields.
1007 // Real agent records always include them (defaulted server-side).
1008 respondTo: agent.respond_to ?? "owner-only",
1009 respondToAllowlist: agent.respond_to_allowlist ?? [],
1010 };
1011}
1012
1013function fromRawAcpRuntimeCatalogEntry(
1014 entry: RawAcpRuntimeCatalogEntry,

Callers 5

createManagedAgentFunction · 0.85
startManagedAgentFunction · 0.85
stopManagedAgentFunction · 0.85
updateManagedAgentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected