refactor: rename ACP "provider" to "runtime" across the codebase#783
Draft
wpfleger96 wants to merge 7 commits into
Draft
refactor: rename ACP "provider" to "runtime" across the codebase#783wpfleger96 wants to merge 7 commits into
wpfleger96 wants to merge 7 commits into
Conversation
The codebase conflated three unrelated concepts under "provider": ACP runtime/harness (goose, claude, codex), LLM inference provider (Databricks, Anthropic), and deployment backend. This rename disambiguates the first concept as "runtime" throughout. KnownAcpProvider becomes KnownAcpRuntime with new capability metadata fields (supports_acp_model_switching, model_env_var, provider_env_var, provider_locked, default_env) that Phase 3 will consume for metadata-driven env var injection. PersonaRecord.provider becomes PersonaRecord.runtime with an idempotent startup migration. ResolvedPersona.provider becomes ResolvedPersona.llm_provider to clarify it holds the LLM provider from the model string colon prefix, not the harness ID. PersonaConfig/Frontmatter gain a runtime field so persona packs can declare their preferred harness. The pack import conflation is fixed: llm_provider no longer leaks into PersonaRecord.runtime. persona_card.rs reads "provider" as a fallback key from old .persona.json files. TemplateAgentEntry/TemplateTeamEntry use serde alias for the same backward compat. Deployment backend types (BackendKind::Provider, provider_binary_path) are intentionally NOT renamed.
Remaining provider: field names in PersonaDialog submit, personaDialogState initial values, useTeamActions update call, and test fixtures that were missed in the main rename — all feeding into CreatePersonaInput / UpdatePersonaInput which now only accept runtime:.
localStorage key migration: useLastRuntime now reads the legacy "sprout:last-runtime-provider" key as a fallback and clears it on first write, preventing silent loss of saved runtime preference on upgrade. Remaining stale local variable names (selectedProviderId, acpProvidersQuery, etc.) renamed for consistency across 12 TS files. Migration and template serde alias backward-compat tests added.
…ove stale conflict marker
430fc47 to
32b58f7
Compare
… dropdown UX Replace hardcoded GOOSE_MODE injection with a metadata-driven default_env loop on KnownAcpRuntime, and inject GOOSE_MODEL via model_env_var for runtimes that don't support ACP model switching. This ensures goose agents respect PersonaRecord.model even without a persona pack. Redesign the AddChannelBotDialog runtime dropdown: defaults to "Use persona defaults" (unset) instead of auto-selecting the first runtime. Explicit selection overrides all personas. Per-persona runtime badges on chips show the effective runtime with warning styling when overridden or when a stored preference is unavailable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This branch renames every use of "provider" that means ACP harness/runtime to "runtime", resolves the pack import conflation that caused all 7 Dune personas to show "sprout-agent" as runtime, and enriches
KnownAcpRuntimewith capability metadata for Phase 3.The codebase used "provider" for three unrelated concepts: ACP runtime/harness (goose, claude, codex), LLM inference provider (Databricks, Anthropic), and deployment backend — making it impossible to read a field name and know what it contains. The rename establishes a clean vocabulary.
BackendKind::Providerand related deployment backend types are intentionally NOT renamed.Changes
KnownAcpProvider→KnownAcpRuntimewith 5 new capability fields (supports_acp_model_switching,model_env_var,provider_env_var,provider_locked,default_env) that Phase 3 will consume for metadata-driven env var injectionPersonaRecord.provider→PersonaRecord.runtimewith an idempotent startup migration inmigration.rsResolvedPersona.provider→ResolvedPersona.llm_providerto make explicit it comes from the model string colon prefixPersonaConfig/Frontmattergain aruntimefield so persona packs can specify their preferred harness in frontmatterllm_providerno longer leaks intoPersonaRecord.runtime(was the root cause of the Dune persona bug)persona_card.rsreads"provider"as a fallback key from old.persona.jsonfiles;TemplateAgentEntry/TemplateTeamEntryuse#[serde(alias = "provider")]for backward compatinstall_acp_runtimeTauri IPC param renamed fromprovider_idtoruntime_id(coordinated Rust + TS)useLastRuntimelocalStorage key migrated from"sprout:last-runtime-provider"to"sprout:last-runtime"with fallback read from the legacy key so existing users don't lose their saved preferenceprovider→runtimepersona migration and template serde alias backward compat