@openharness/vue package provides the same functionality as the React package, using Vue 3 composables and Nuxt-compatible components.
Setup
OpenHarnessProvider component:
useOpenHarness
Creates a chat session connected to your API endpoint. Returns an AI SDK 5 Chat instance with reactive properties (messages, status, sendMessage, stop, etc.), typed with OHUIMessage:
Resuming Streams
Pass a stableid and resume: true to reconnect to an active server-side stream when the component mounts:
GET ${endpoint}/${id}/stream. The server must own the active run and return the active stream or 204 when no stream is running.
AI SDK stream resumption is not compatible with treating browser request abort as cancellation. If a user needs to stop a background run, expose a separate server-side cancel action.
useSubagentStatus
Returns a computed ref deriving reactive state from data-oh:subagent.* events:
useSessionStatus
Returns a computed ref tracking turn index, compaction state, and retry info:
Full Example
The
OpenHarnessProvider is a renderless wrapper component that provides shared subagent, session, and sandbox state via Vue’s provide/inject.