refactor(agent): clean up hermes adapter structure#994
Conversation
❌ Tests failed — 3/1244 failed
Failed tests
|
Greptile SummaryThis PR is a structural refactoring of the Hermes adapter: Hermes path/provider-map helpers move from
Confidence Score: 4/5Safe to merge; all changes are structural relocations with equivalent logic and good test coverage. The refactoring is mechanically correct — path helpers, interfaces, and startup logic all move to more logical homes without altering runtime behaviour. The two items worth watching are the global env mutation in the test helper and the concurrent install/start fire-and-forget preserved from the original main.ts. hermes-container-runtime.ts (concurrent install/start) and agent-harness-service.test.ts (global env mutation in test helper) Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
main["main.ts\nApplication.start()"]
best["startHermesRuntimeBestEffort()"]
configure["configureHermesRuntime()"]
runtime["HermesContainerRuntime\n(hermesHarnessHostDir only)"]
install["void executeAction('install')"]
start["void executeAction('start')"]
error["logHermesStartupError()"]
main -->|"calls"| best
best -->|"calls configureRuntime()"| configure
configure --> runtime
best -->|"void"| install
best -->|"void (concurrent)"| start
install -->|".catch"| error
start -->|".catch"| error
subgraph "Relocated modules"
hpaths["lib/agents/hermes/hermes-paths.ts\n(was api/services/hermes/)"]
hmap["lib/agents/hermes/hermes-provider-map.ts\n(was api/services/hermes/)"]
acp["lib/agents/openclaw/acp-command.ts\n(new — extracted from acpx-runtime)"]
end
service["AgentHarnessService\n(no browserosDir dep)"]
service -->|"import"| hpaths
service -->|"import"| hmap
runtime -->|"import"| hpaths
|
No description provided.