nexus/.planning/phases/28-ollama-integration/28-02-SUMMARY.md
Nexus Dev 285bf585be chore: complete v1.5 Smart Onboarding + Personal AI Assistant milestone
6 phases, 13 plans, 21 requirements.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 03:55:49 +00:00

5.8 KiB

phase plan subsystem tags requires provides affects tech-stack key-files key-decisions requirements-completed duration completed
28-ollama-integration 02 ui
ollama
hermes
react
tanstack-query
typescript
adapter
phase provides
28-01 Ollama server routes (GET /companies/:id/ollama/status and /ollama/models)
ollamaApi client (ui/src/api/ollama.ts) with status() and models() methods
Hermes agent config shows Ollama model dropdown when Ollama is detected
Install callout with link when Ollama is absent
Selecting Ollama model in edit mode atomically sets model + provider:custom + base_url
Hermes native skills show purple badge in AgentSkillsTab
Skills section header reads 'Hermes native skills & user-installed skills' for hermes_local agents
28-03
hermes-adapter
agent-config
added patterns
Adapter config-fields use useCompany() hook for companyId (not useParams or prop drilling)
Hybrid dropdown: useQuery for ollamaStatus/ollamaModels, useState for manual entry fallback
Origin-label badge pattern: conditional rendering for 'Hermes skill' vs generic originLabel
created modified
ui/src/api/ollama.ts
ui/src/adapters/hermes-local/config-fields.tsx
ui/src/pages/AgentDetail.tsx
Used useCompany() hook for companyId in config-fields.tsx — consistent with AgentConfigForm pattern, no useParams or prop drilling needed
Create mode only sets model (not provider/base_url) — CreateConfigValues lacks provider/base_url fields; buildHermesConfig comment confirms provider is resolved at runtime from model name or ~/.hermes/config.yaml
Edit mode sets all three fields atomically: model + provider:custom + base_url via mark() calls
Manual entry fallback via useState(manualEntry) local flag — toggled by 'Other (manual entry)...' option
OLLA-02
OLLA-03
OLLA-05
HERM-05
12min 2026-04-02

Phase 28 Plan 02: Ollama UI Surface Summary

Hermes agent config gains Ollama model dropdown with install callout, and AgentSkillsTab shows purple "Hermes skill" badge for native Hermes skills

Performance

  • Duration: ~12 min
  • Started: 2026-04-02T17:00:19Z
  • Completed: 2026-04-02T17:12:00Z
  • Tasks: 2
  • Files modified: 3

Accomplishments

  • Created ollamaApi client with status() and models() methods calling the Plan 01 server routes
  • Rewrote HermesLocalConfigFields with hybrid Ollama dropdown: live model list with recommended markers, install callout when absent, and manual entry fallback
  • Selecting an Ollama model in edit mode atomically sets model, provider: "custom", and base_url: "http://localhost:11434/v1" via mark() calls
  • Added purple "Hermes skill" badge rendering in AgentSkillsTab.renderSkillRow for skills with originLabel === "Hermes skill"
  • Conditional section header in unmanaged skills section shows "Hermes native skills & user-installed skills" for hermes_local agents

Task Commits

  1. Task 1: Create ollamaApi client and enhance HermesLocalConfigFields with model dropdown - 076c42c8 (feat)
  2. Task 2: Add Hermes skill badge rendering in AgentSkillsTab - a9783f00 (feat)

Files Created/Modified

  • ui/src/api/ollama.ts — OllamaStatus/OllamaModel/OllamaModelsResponse types + ollamaApi.status() and ollamaApi.models()
  • ui/src/adapters/hermes-local/config-fields.tsx — Rewritten with Ollama dropdown, install callout, and manual fallback
  • ui/src/pages/AgentDetail.tsx — Hermes skill badge in renderSkillRow, conditional section header

Decisions Made

  • Used useCompany() hook (not useParams) for companyId in config-fields — consistent with how AgentConfigForm parent already works
  • Create mode only sets model (not provider/base_url) because CreateConfigValues type doesn't include those fields; Hermes's buildHermesConfig intentionally leaves provider for runtime resolution
  • Edit mode uses three sequential mark() calls (model, provider, base_url) since that's how adapterConfig dirty tracking works

Deviations from Plan

Auto-fixed Issues

1. [Rule 1 - Bug] Create mode provider/base_url not settable via set!()

  • Found during: Task 1 (TypeScript compilation)
  • Issue: Plan specified set!({ model, provider: "custom", base_url: "..." }) but CreateConfigValues type does not include provider or base_url fields — TypeScript error TS2353
  • Fix: Create mode only calls set!({ model: selectedModel }). Added comment explaining Hermes runtime resolves provider from model name at execute time (per buildHermesConfig source comments)
  • Files modified: ui/src/adapters/hermes-local/config-fields.tsx
  • Verification: TypeScript compiled cleanly after fix
  • Committed in: 076c42c8 (Task 1 commit)

Total deviations: 1 auto-fixed (Rule 1 - TypeScript type constraint) Impact on plan: Minor — create mode sets model only (as designed by the adapter package); edit mode sets all three fields atomically as planned. Functional result is equivalent since provider is resolved at runtime.

Issues Encountered

None beyond the TypeScript deviation noted above.

User Setup Required

None — Ollama detection is on-demand per request, no environment variables required.

Next Phase Readiness

  • Ollama UI surface complete — model dropdown, install callout, and Hermes skill badges all implemented
  • Phase 28 Plan 03 (Hermes runtime dashboard card) can proceed independently
  • TypeScript compiles cleanly — no type regressions

Phase: 28-ollama-integration Completed: 2026-04-02

Self-Check: PASSED

  • ui/src/api/ollama.ts: FOUND
  • ui/src/adapters/hermes-local/config-fields.tsx: FOUND
  • ui/src/pages/AgentDetail.tsx: FOUND
  • 28-02-SUMMARY.md: FOUND
  • Commit 076c42c8: FOUND
  • Commit a9783f00: FOUND