Skip to main content

Module document

Module document 

Source
Expand description

The embedded AWL document, its compiled identity, and its verified session contract. The embedded assistant document: its bytes, its compiled identity, and the session contract the operator verbs bind to.

§One document, one place

crates/aion-server/assistant-embed/assistant.awl is the ONLY copy of the assistant document in this repository. It is not a copy of an example — the example was moved here, so there is no second file to drift from. Everything downstream (the boot install, the /assistant description, the aion assistant verbs, the ops-console contract test) reads this one artifact.

§The session contract is named once and VERIFIED, never restated

An operator verb has to know which input carries the objective, which signal continues the session, and which fields that signal’s payload takes. Those names are declared here exactly once, as constants, and EmbeddedAssistant::load proves each one against the compiled document before returning. A document edit that renames objective, drops the assistant_continue signal, or changes the continuation’s fields therefore fails loudly at load — at boot, in the verb, and in this module’s own tests — instead of leaving a constant quietly disagreeing with the document it names.

§The task queue is DERIVED, and it is never default

The built-in assistant owns a private queue named after itself: private_task_queue IS the rule, and the queue is that function of the document’s own workflow type — not a constant beside it, not a configuration key with a default. EmbeddedAssistant::load proves the document declares exactly that one queue and refuses it otherwise, so the derivation cannot drift from the document and the document cannot drift from the server.

default is where an out-of-box worker comes up when nobody has told it otherwise. Contract admission holds a registering worker against EVERY reachable contract on its queue at once, so while the assistant sat on default the first worker a newcomer started was refused for not advertising assistant — the built-in assistant starved the workers it exists to welcome (#200). The queue therefore belongs to those workers, and this document never claims it.

Structs§

EmbeddedAssistant
The embedded assistant: the document’s bytes, the package compiled from them, and the contract surfaces an operator drives it through.

Enums§

EmbeddedAssistantError
A refusal to produce the embedded assistant.

Constants§

CONTINUE_END_FIELD
The continuation field that ends the session cleanly.
CONTINUE_MESSAGE_FIELD
The continuation field carrying the operator’s next prompt.
CONTINUE_SIGNAL
The one control signal a parked session listens on.
EMBEDDED_ASSISTANT_DOCUMENT
The embedded assistant document, compiled into the binary.
EMBEDDED_ASSISTANT_FILENAME
The document’s own filename, recorded in the assembled archive’s awl/ provenance tree so a deployed package carries the source it was built from.
OBJECTIVE_INPUT
The start input carrying the operator’s opening ask.
REPO_PATH_INPUT
The start input carrying the repository the session grounds itself in. The document’s documented scratch mode is the empty string.
STATUS_QUERY
The read-only query reporting a live session’s phase and round count.

Functions§

embedded_assistant
The process-wide embedded assistant, compiled once on first use.
private_task_queue
The assistant’s private task queue, derived from its own identity.