diosc() is the global command function the widget installs. Call it with a command name and its
arguments. Calls made before the widget finishes loading are queued and replayed in order.
Approval decisions are not global commands: there is no diosc('approve'). A global approve would
let any script on the host page auto-approve the assistant’s actions, which the consensus model exists
to prevent. The built-in consensus dialog resolves every approval, and there is no host-rendered alternative at
any tier. You can restyle the dialog’s detail body per tool with
diosc('consensusView', …) — that surface reports field edits but carries
no verdict channel.
The object passed to diosc('config', …). All fields are optional.
Field
Type
Description
backendUrl
string
Backend URL for the WebSocket/REST connection.
apiKey
string
Embed key.
assistantId
string
Assistant ID. Auto-detected from the config fetch if omitted.
bindEndpoint
string
Your host endpoint that authenticates the user and forwards identity to DioscHub’s /auth/bind. The widget POSTs { wsId } to it with credentials. See Identity & auth.