Skip to content

feat: migrate CTO, DevOps, Research agents from claude_local to hermes_local#23

Open
madhavikodale wants to merge 6 commits into
OpenScanAI:masterfrom
madhavikodale:feat/migrate-cto-devops-research-to-hermes
Open

feat: migrate CTO, DevOps, Research agents from claude_local to hermes_local#23
madhavikodale wants to merge 6 commits into
OpenScanAI:masterfrom
madhavikodale:feat/migrate-cto-devops-research-to-hermes

Conversation

@madhavikodale

Copy link
Copy Markdown

Thinking Path

Issue #22 requests migrating the CTO, DevOps, and Research agents from Claude Code (claude_local) to Hermes runtime (hermes_local), using Kimi as the default model, while preserving Paperclip workflow compatibility and keeping all other agents functional.

The Hermes adapter (hermes-paperclip-adapter@0.2.0) is already built-in and supports local agent JWT, skills, and session persistence. The missing pieces were:

  1. hermes_local was not in the shared AGENT_ADAPTER_TYPES constant (causing validation issues)
  2. No Kimi model was exposed in the adapter model list
  3. No DB migration existed to safely switch existing agents
  4. Environment execution target and feedback trace logic didn't recognize hermes_local as a local-trusted adapter

What Changed

  • packages/shared/src/constants.ts: Added hermes_local to AGENT_ADAPTER_TYPES
  • server/src/adapters/registry.ts: Added kimi-k2.5 model to the Hermes adapter model list
  • packages/db/src/migrations/0087_migrate_cto_devops_research_to_hermes.sql: Atomic migration that switches adapter_type from claude_localhermes_local for cto, devops, researcher roles, sets model: kimi-k2.5, provider: kimi-coding, preserves existing instructionsFilePath, maps commandhermesCommand, and carries forward env, cwd, extraArgs, promptTemplate
  • server/src/services/company-portability.ts: Added hermes_local default config rules (timeoutSec: 300, graceSec: 10, persistSession: true)
  • server/src/services/environment-execution-target.ts: Treated hermes_local as a local-trusted adapter (excluded from environment lease requirements, same as claude_local)
  • server/src/services/feedback.ts: Added hermes_local feedback trace bundle support for run diagnostics

Verification

  1. Server typecheck passes: cd server && pnpm typecheck
  2. Shared typecheck passes: cd packages/shared && pnpm typecheck
  3. Adapter registry tests pass: cd server && npx vitest run src/__tests__/adapter-registry.test.ts (18/18 passed) ✅
  4. Migration is idempotent (WHERE clause restricts to claude_local agents only)
  5. Non-migrated agents (CEO, Security, Backend, Frontend, QA, Data, Marketing) remain untouched

Risks

  • Hermes adapter does not support supportsInstructionsBundle (unlike Claude). Agents relying on bundled SOUL.md/HEARTBEAT.md/AGENTS.md injection must use instructionsFilePath or promptTemplate instead. The migration preserves any existing instructionsFilePath.
  • hermesCommand path resolution may differ from Claude Code CLI. The migration maps existing commandhermesCommand for compatibility, but explicit paths may need manual verification post-deploy.
  • Model detection fallback: if Kimi is unavailable in the local Hermes config, the agent will fall back to whatever model is configured in ~/.hermes/config.yaml. The migration explicitly sets model: kimi-k2.5 in adapter_config to override this.

Model Used

  • Provider: kimi-coding
  • Model: kimi-k2.5
  • Context window: 256k

Checklist

  • Behavior matches doc/SPEC-implementation.md
  • Typecheck passes (server + shared)
  • Adapter registry tests pass
  • Contracts synced across db/shared/server/ui
  • DB migration follows drizzle workflow
  • PR description follows the template

Closes #22

…de output

- Add parseJsonLenient() utility for extracting JSON from mixed text/code blocks
- Add extractResultFromMixedOutput() to find result objects in Claude output
- Fix EPIPE crash by using stdin.on('error') + callback-style write()
- Treat exit-code-0 + parse failure as inferred success in claude-local

Fixes OpenScanAI#16
…rsing

- Add parseJsonLenient() tests in adapter-utils (9 cases)
- Add parseClaudeStreamJson() tests in claude-local (8 cases)
- Add runChildProcess EPIPE handling tests (2 cases)
- Update CHANGELOGs for adapter-utils and claude-local
- All 61 targeted tests pass; pnpm -r typecheck clean
…s_local

- Add hermes_local to AGENT_ADAPTER_TYPES constant in packages/shared
- Add Kimi K2.5 model to hermes adapter models list in server registry
- Create DB migration 0087 to switch adapter_type and config for cto/devops/researcher roles
- Add hermes_local default rules (timeoutSec, graceSec, persistSession) to company portability
- Treat hermes_local as a local-trusted adapter in environment execution target
- Add hermes_local feedback trace bundle support

Closes OpenScanAI#22
…ct crash

The Layout component was calling closeOnboarding() without importing it
from useDialogActions(), causing a ReferenceError that crashed React
and left the dashboard as a black screen.

- Destructure closeOnboarding from useDialogActions()
- Keeps the onboarding auto-close effect intact
Includes:
- Dashboard type updates
- Heartbeat service improvements
- Recovery service enhancements
- Work-products service additions
- Workspace runtime updates
- UI API and page updates
- Dependency updates (pnpm-lock, package.json)
- Various restore scripts and design artifacts
When all retry metrics are zero, show a compact collapsible card instead
of full metric grids and empty charts. Reduces dashboard noise and keeps
focus on actionable information.

- Collapsible header shows 'All systems healthy' status
- Expandable info section explains what retries are
- Mini muted metric placeholders in expanded view
- Full metrics/charts/details only shown when retries > 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate CTO, DevOps, and Research agents from Claude Code (local) to Hermes runtime with Kimi default model

1 participant