refactor: rename ACP "provider" to "runtime" across the codebase (#783)

This commit is contained in:
Will Pfleger
2026-06-07 14:40:59 -04:00
committed by GitHub
parent 056b87d3da
commit 0a6067ca1b
69 changed files with 1255 additions and 747 deletions
+10 -12
View File
@@ -39,7 +39,7 @@ import type {
AgentModelsResponse,
UpdateManagedAgentInput,
AcpAvailabilityStatus,
AcpProviderCatalogEntry,
AcpRuntimeCatalogEntry,
CommandAvailability,
InstallRuntimeResult,
OpenDmInput,
@@ -242,7 +242,7 @@ type RawManagedAgentLog = {
log_path: string;
};
export type RawAcpProviderCatalogEntry = {
export type RawAcpRuntimeCatalogEntry = {
id: string;
label: string;
avatar_url: string;
@@ -869,9 +869,9 @@ export function fromRawManagedAgent(agent: RawManagedAgent): ManagedAgent {
};
}
function fromRawAcpProviderCatalogEntry(
entry: RawAcpProviderCatalogEntry,
): AcpProviderCatalogEntry {
function fromRawAcpRuntimeCatalogEntry(
entry: RawAcpRuntimeCatalogEntry,
): AcpRuntimeCatalogEntry {
return {
id: entry.id,
label: entry.label,
@@ -1056,20 +1056,18 @@ export async function getManagedAgentLog(pubkey: string, lineCount?: number) {
};
}
export async function discoverAcpProviders(): Promise<
AcpProviderCatalogEntry[]
> {
export async function discoverAcpRuntimes(): Promise<AcpRuntimeCatalogEntry[]> {
return (
await invokeTauri<RawAcpProviderCatalogEntry[]>("discover_acp_providers")
).map(fromRawAcpProviderCatalogEntry);
await invokeTauri<RawAcpRuntimeCatalogEntry[]>("discover_acp_providers")
).map(fromRawAcpRuntimeCatalogEntry);
}
export async function installAcpRuntime(
providerId: string,
runtimeId: string,
): Promise<InstallRuntimeResult> {
const raw = await invokeTauri<RawInstallRuntimeResult>(
"install_acp_runtime",
{ providerId },
{ runtimeId },
);
return fromRawInstallRuntimeResult(raw);
}
@@ -15,14 +15,14 @@ type RawChannelTemplate = {
agents?: {
personas?: Array<{
personaId: string;
provider?: string | null;
runtime?: string | null;
model?: string | null;
role?: string | null;
backend?: { type: "local" } | { type: "provider"; id: string } | null;
}>;
teams?: Array<{
teamId: string;
provider?: string | null;
runtime?: string | null;
model?: string | null;
backend?: { type: "local" } | { type: "provider"; id: string } | null;
}>;
@@ -43,14 +43,14 @@ function fromRawChannelTemplate(raw: RawChannelTemplate): ChannelTemplate {
agents: {
personas: (raw.agents?.personas ?? []).map((p) => ({
personaId: p.personaId,
provider: p.provider ?? null,
runtime: p.runtime ?? null,
model: p.model ?? null,
role: p.role ?? null,
backend: p.backend ?? null,
})),
teams: (raw.agents?.teams ?? []).map((t) => ({
teamId: t.teamId,
provider: t.provider ?? null,
runtime: t.runtime ?? null,
model: t.model ?? null,
backend: t.backend ?? null,
})),
+7 -7
View File
@@ -10,7 +10,7 @@ type RawParsedPersonaPreview = {
display_name: string;
system_prompt: string;
avatar_data_url: string | null;
provider: string | null;
runtime: string | null;
model: string | null;
name_pool?: string[];
source_file: string;
@@ -31,7 +31,7 @@ export type ParsedPersonaPreview = {
displayName: string;
systemPrompt: string;
avatarDataUrl: string | null;
provider: string | null;
runtime: string | null;
model: string | null;
namePool: string[];
sourceFile: string;
@@ -52,7 +52,7 @@ type RawPersona = {
display_name: string;
avatar_url: string | null;
system_prompt: string;
provider?: string | null;
runtime?: string | null;
model?: string | null;
name_pool?: string[];
is_builtin: boolean;
@@ -68,7 +68,7 @@ function fromRawPersona(persona: RawPersona): AgentPersona {
displayName: persona.display_name,
avatarUrl: persona.avatar_url,
systemPrompt: persona.system_prompt,
provider: persona.provider ?? null,
runtime: persona.runtime ?? null,
model: persona.model ?? null,
namePool: persona.name_pool ?? [],
isBuiltIn: persona.is_builtin,
@@ -92,7 +92,7 @@ export async function createPersona(
displayName: input.displayName,
avatarUrl: input.avatarUrl,
systemPrompt: input.systemPrompt,
provider: input.provider,
runtime: input.runtime,
model: input.model,
namePool: input.namePool ?? [],
envVars: input.envVars ?? {},
@@ -111,7 +111,7 @@ export async function updatePersona(
displayName: input.displayName,
avatarUrl: input.avatarUrl,
systemPrompt: input.systemPrompt,
provider: input.provider,
runtime: input.runtime,
model: input.model,
namePool: input.namePool ?? [],
// Send envVars only when caller explicitly provided it; omitting
@@ -149,7 +149,7 @@ export async function parsePersonaFiles(
displayName: p.display_name,
systemPrompt: p.system_prompt,
avatarDataUrl: p.avatar_data_url,
provider: p.provider,
runtime: p.runtime,
model: p.model,
namePool: p.name_pool ?? [],
sourceFile: p.source_file,
+10 -10
View File
@@ -369,7 +369,7 @@ export type AcpAvailabilityStatus =
| "cli_missing"
| "not_installed";
export type AcpProviderCatalogEntry = {
export type AcpRuntimeCatalogEntry = {
id: string;
label: string;
avatarUrl: string;
@@ -384,8 +384,8 @@ export type AcpProviderCatalogEntry = {
underlyingCliPath: string | null;
};
/** An AcpProviderCatalogEntry that is confirmed available — command and binaryPath are non-null. */
export type AcpProvider = AcpProviderCatalogEntry & {
/** An AcpRuntimeCatalogEntry that is confirmed available — command and binaryPath are non-null. */
export type AcpRuntime = AcpRuntimeCatalogEntry & {
availability: "available";
command: string;
binaryPath: string;
@@ -457,9 +457,9 @@ export type AgentPersona = {
displayName: string;
avatarUrl: string | null;
systemPrompt: string;
/** Preferred ACP provider ID (e.g. "goose", "claude"). */
provider: string | null;
/** Preferred model ID (e.g. "gpt-4o", "claude-sonnet-4-20250514"). */
/** Preferred ACP runtime ID (e.g. "goose", "claude"). */
runtime: string | null;
/** Opaque, harness-specific model identifier string. Sprout stores and passes through without interpretation. */
model: string | null;
namePool: string[];
isBuiltIn: boolean;
@@ -477,7 +477,7 @@ export type CreatePersonaInput = {
displayName: string;
avatarUrl?: string;
systemPrompt: string;
provider?: string;
runtime?: string;
model?: string;
namePool?: string[];
envVars?: Record<string, string>;
@@ -488,7 +488,7 @@ export type UpdatePersonaInput = {
displayName: string;
avatarUrl?: string;
systemPrompt: string;
provider?: string;
runtime?: string;
model?: string;
namePool?: string[];
envVars?: Record<string, string>;
@@ -525,7 +525,7 @@ export type TemplateBackend =
export type TemplateAgentEntry = {
personaId: string;
provider: string | null;
runtime: string | null;
model: string | null;
role: string | null;
backend: TemplateBackend | null;
@@ -533,7 +533,7 @@ export type TemplateAgentEntry = {
export type TemplateTeamEntry = {
teamId: string;
provider: string | null;
runtime: string | null;
model: string | null;
backend: TemplateBackend | null;
};