application-agent/harness.lisp
Provider agent plus application owner, transcript, observers, and lifecycle.
Return agent's application while attached, or NIL after release.
Whether both agent's close request and FIFO worker have terminated.
Return a stable newest-first snapshot of agent's retained turns.
Attach function once while agent is open.
Detach function if present; safe during notification and after release.
Notify an atomic observer snapshot, containing every failure independently.
Reporting is diagnostic, not another observer. A WARN handler that promotes warnings to errors (or any custom reporter that fails) must not prevent the remaining observers from running.
Promptly initiate agent's terminal provider close, containing failures.
OPENAI:CLOSE-AGENT only publishes a WebSocket close frame. It is deliberately allowed to overlap the sole worker's active receive so the socket's :CLOSED event can wake NEXT-AGENT-EVENT. Ordinary provider turns remain confined to the FIFO worker, and this lifecycle path is created exactly once.
Own agent's provider turns in mailbox FIFO order until release.
Return agent's sole worker. Caller holds agent's state lock.
Publish one provider turn to agent's FIFO worker and return immediately.
ask and wait up to timeout seconds on the caller, never the canvas thread.
Wait for agent's close path and FIFO worker, returning NIL on timeout.
Release state and application detachment do not wait for this join point. A
finite timeout therefore remains safe even when a provider-specific close
function stalls or fails to wake its active receive.
Detach agent and initiate its provider close exactly once.
Terminal state is visible before this function returns. A dedicated lifecycle
thread promptly sends the provider's non-destructive close frame so an active
receive can wake; it never executes on the caller or application canvas. The
sole FIFO worker rejects queued turns and exits after the active turn settles.
Concurrent callers return NIL; the teardown owner returns true.
wait-for-application-agent-release is the explicit bounded join point.
(text &key agent)Provider agent plus application owner, transcript, observers, and lifecycle.
((agent application-agent) &key)The APPLICATION-AGENT whose CLIM command is executing dynamically.
Logical conjunction of tests and raw truth values.
(agent function)(agent function)Logical negation of one test or raw truth value.
(agent failure)Test whether one compatible scalar is greater than another.
(agent kind object)(agent call)(turn call)(agent call)(key)(event key)((agent application-agent) event)Headings, paragraphs, figures and their IDs, mentions, marks.
Logical disjunction of tests and raw truth values.
(agent turn)The HANDLE-TABLE dynamically current while an agent command is handled.
(turn)(agent turn)(agent condition)(agent)Promptly initiate AGENT's terminal provider close, containing failures. OPENAI:CLOSE-AGENT only publishes a WebSocket close frame. It is deliberately allowed to overlap the sole worker's active receive so the socket's :CLOSED event can wake NEXT-AGENT-EVENT. Ordinary provider turns remain confined to the FIFO…
(text &key agent (timeout 120) (print-p t))(turn &key timeout)(turn &optional (stream *standard-output*))(agent &key timeout)Wait for AGENT's close path and FIFO worker, returning NIL on timeout. Release state and application detachment do not wait for this join point. A finite TIMEOUT therefore remains safe even when a provider-specific close function stalls or fails to wake its active receive.
Addition over compatible quantities.
Multiplication and scalar scaling.
Division of two represented quantities.
Subtraction or unary negation.
Convert one scalar float or unsigned value to a 32-bit float.
(agent)Detach AGENT and initiate its provider close exactly once. Terminal state is visible before this function returns. A dedicated lifecycle thread promptly sends the provider's non-destructive close frame so an active receive can wake; it never executes on the caller or application canvas. The sole FIFO worker rejects…
(table)
One agent owns one provider connection and one FIFO mailbox worker.
askonly publishes aturnto that worker. Provider turns, tool settlement, observer callbacks, and provider close therefore never execute on the application's canvas thread or race one another on the provider socket.