@nura-js/client
v0.2.0
Published
Interact with the Nura AI intent surface from any UI or agent client
Maintainers
Readme
@nura-js/client
Interact with the Nura AI intent surface from any UI or automation client.
Installation
pnpm add @nura-js/clientUsage Example
import { AiClient, UiDispatcher } from '@nura-js/client'
const client = new AiClient('https://api.example.com/ai')
const dispatcher = new UiDispatcher()
dispatcher.register('ui.open', (_, hint) => openModal(hint?.target))
const { id } = await client.createIntent({
type: 'orders.create',
payload: { id: 'o-88' }
})
await client.approveIntent(id)
dispatcher.dispatch(await client.getIntentResult(id))See @nura-js/intents and @nura-js/transport-http for server-side integration.
