feat(agent): sync external agent profiles into spritz#175
Conversation
👍 GitRank PR AnalysisScore: 20 points
Eligibility Checks
Impact SummaryThis PR adds a complete agent profile sync system allowing Spritz instances to display deployment-owned agent metadata (name, image) in the UI without direct provider API calls. It introduces new API types (SpritzAgentRef, SpritzAgentProfile, SpritzAgentProfileStatus), an extension hook (agent.profile.sync), and updates the UI to render profiles with proper precedence rules. The implementation maintains backward compatibility through fallback behavior and includes comprehensive tests across API, operator, and UI layers. Analysis DetailsComponent Classification: This PR introduces a new feature (agent profile sync) rather than fixing a specific bug or addressing a categorized component. It spans API, operator, and UI layers with cross-cutting concerns, making it an architectural enhancement rather than a component-specific fix. Severity Justification: This is a P2 (Medium) contribution because it adds significant new functionality (agent profile syncing, UI rendering, extension framework integration) that enhances the system's capabilities but does not address critical service failures or security risks. The feature is well-designed with fallback behavior and non-fatal sync semantics. Eligibility Notes: Tests are required and included: the PR adds 183 lines of agent_profile_test.go, updates create_admission_test.go with 72 new lines, adds spritz_types_test.go updates, and includes UI tests (spritz-profile.test.ts, sidebar.test.tsx, chat.test.tsx). The PR is well-documented with a 415-line architecture document explaining design principles, precedence rules, and implementation phases. This is a new feature requiring tests for business logic, API changes, and UI behavior. Analyzed by GitRank 🤖 |
|
Final status:
Local validation before merge:
Local Codex review found and I fixed the profile status conflict/staleness issues before merge. |
TL;DR
This adds Spritz-owned agent profile sync so the UI can render an external agent's name and image without calling provider APIs directly. Spritz now stores the synced profile on the instance status and prefers it over ACP runtime identity when rendering.
Summary
spec.agentRef,spec.profileOverrides, andstatus.profileto the Spritz API model and CRDsagent.profile.syncextension hook and run it during create to persist synced profile dataReview focus
agentRef, local overrides, and persistedstatus.profileTest plan
go test ./...inapigo test ./...inoperatorpnpm typecheckinuipnpm test -- src/lib/spritz-profile.test.ts src/components/acp/sidebar.test.tsx src/pages/chat.test.tsxinui