Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

elicitation

The agent asking for input (elicitation/create, ADR 4.5): a form to fill in, or a URL to open. brnr holds each until it is answered with ACP’s action, accept, decline or cancel. One scoped to a request outside any session (a login) has no session, and is named by its process, --pid <pid>.

brnr elicitation requests

Lists the elicitations waiting, in every process that answers, or in one session. A process that doesn’t answer is passed over and said on stderr, as for permission requests.

brnr elicitation requests [<session>] [--json]

Output (--json): each row is elicitation show’s object, with fewer fields.

FieldTypeMeaning
requestslist of objectsOne for each elicitation waiting.
requests[].sessionstring or nullIts session; null for one outside any session.
requests[].pidnumberIts process.
requests[].requeststringIts handle, e1.
requests[].ownerstringeditor or headless.
requests[].modestring or nullform, url, or a mode brnr doesn’t know, as the agent sent it.
requests[].scopestringsession, tool_call or request.
requests[].textstring or nullThe agent’s message.
{
  "requests": [
    {
      "session": "sess-1",
      "pid": 4466,
      "request": "e1",
      "owner": "headless",
      "mode": "form",
      "scope": "session",
      "text": "Tell me about you"
    }
  ]
}

Text output: a table, SESSION, REQUEST, OWNER, MODE, MESSAGE; one outside any session has --pid <pid> as its session.

Exit codes: 0; 1 if it fails. Errors: with <session>, those of a running session.

brnr elicitation show

Shows one elicitation waiting, in full: the message, the mode and scope, the form’s fields with their types, bounds and choices, or the URL. A URL is printed, never opened.

brnr elicitation show (<session> | --pid <pid>) <request> [--json]
FlagMeaning
--pid <pid>The process, for one outside any session, in place of <session>.
--jsonPrint it as JSON.

Output (--json):

FieldTypeMeaning
modestring or nullform, url, or a mode brnr doesn’t know, as the agent sent it.
textstring or nullThe agent’s message (ACP’s message).
scopestringsession, tool_call (a tool call in the session) or request (a request outside any session).
tool_call_idstring or nullThe tool call, for scope tool_call; else null.
scope_request_idstring, number or nullThe request, for scope request; else null.
schemaobject or nullA form’s requestedSchema, as the agent sent it; null for a URL.
urlstring or nullA URL’s address; null for a form.
elicitation_idstring or nullA URL’s elicitationId; null for a form.
requeststringIts handle, e1.
sessionstring or nullIts session; null for one outside any session.
pidnumberIts process.
ownerstringeditor or headless.
answerablebooleanWhether elicitation accept, decline and cancel would be taken: an editor’s session needs the experimental elicitation in its profile.
why_notstring or nullWhy not; null when it is answerable.
timeout_leftnumber or nullSeconds until the response timeout answers it cancel; null without one.
{
  "mode": "url",
  "text": "Log in to the fake",
  "scope": "session",
  "tool_call_id": null,
  "scope_request_id": null,
  "schema": null,
  "url": "https://login.example/a?b=1",
  "elicitation_id": "el-1",
  "request": "e1",
  "session": "sess-1",
  "pid": 4466,
  "owner": "headless",
  "answerable": true,
  "why_not": null,
  "timeout_left": null
}

Text output: the message, the mode and scope, the fields or the URL, and how to answer it.

Exit codes: 0; 1 if it fails. Errors: those of a running session, process_not_found (--pid), request_not_found.

brnr elicitation accept, decline, cancel

Answers an elicitation with ACP’s action.

brnr elicitation accept (<session> | --pid <pid>) <request> [--field <k>=<v>]... [-] [--json]
brnr elicitation decline (<session> | --pid <pid>) <request> [--json]
brnr elicitation cancel (<session> | --pid <pid>) <request> [--json]
FlagMeaning
--pid <pid>The process, for one outside any session, in place of <session>.
--field <k>=<v>accept: a form’s field. Repeat it for a list’s values.
-accept: the form’s fields as one JSON object on stdin, in place of --field.
--jsonPrint the answer as JSON.

The process checks an accept’s values against the form’s schema before anything is sent: fields in the schema, the required ones given, their types (a --field string read as the type asks), bounds and choices. pattern and format are not checked. A value that doesn’t fit fails, naming the field, and nothing is sent (answer_invalid). A URL’s accept takes no fields. A mode brnr doesn’t know can’t be accepted, only declined or cancelled.

Output (--json):

FieldTypeMeaning
sessionstring or nullThe session; null for one outside any session.
requeststringThe handle.
actionstringaccept, decline or cancel.
contentobject or null, ACP’sAn accept’s form values, with ACP’s value types; null for a URL’s accept, decline and cancel.
{
  "session": "sess-1",
  "request": "e1",
  "action": "accept",
  "content": {
    "color": "green",
    "name": "Ada"
  }
}

Text output: e1 accepted (declined, cancelled).

Exit codes: 0; 1 if it fails. Errors: those of a running session, process_not_found (--pid), request_not_found, answer_invalid, input_invalid (stdin isn’t one JSON object), experimental_disabled, process_stopping.