aion_server/assistant/mod.rs
1//! The built-in assistant: the aion authoring assistant ships INSIDE the
2//! server binary, present the moment `aion server` runs.
3//!
4//! This is the ops-console doctrine applied to a workflow document. The
5//! console is compiled into the binary and served at `/` with no operator
6//! step; the assistant document
7//! (`crates/aion-server/assistant-embed/assistant.awl`) is compiled into the
8//! binary the same way, installed into the engine at boot, and described over
9//! `/assistant`. A stock `cargo install aion-cli` therefore carries the
10//! assistant — no repository checkout, no example crate, no hand deploy.
11//!
12//! # The brain is a seam, not a dependency
13//!
14//! Nothing here names an agent harness. The document declares one `agent`
15//! action on the `default` queue; WHICH agent serves that queue is the
16//! worker's business (`aion worker agent --harness …`, norn today, ACP for
17//! external agents). This module installs the document and describes it; it
18//! neither spawns nor selects a brain.
19//!
20//! # What the install will and will not do
21//!
22//! [`install::install_embedded_assistant`] loads the embedded package into
23//! the engine ONLY when the catalog holds no version of the assistant
24//! workflow type at all — a fresh home. Loading a package re-points routing
25//! for its type ([`aion::Engine::load_package`]), so an unconditional boot
26//! install would silently steal the route from an operator's deliberate
27//! rollback, on every restart. When any version is already resident the
28//! install stands down and says so, naming both hashes and the operator's own
29//! cut verbs. The live cut is the operator's act, never a side effect of a
30//! restart.
31
32/// The served description of the embedded assistant: identity, contract, and
33/// current residency in the engine catalog.
34pub mod descriptor;
35/// The embedded AWL document, its compiled identity, and its verified session
36/// contract.
37pub mod document;
38/// Boot-time installation of the embedded document into the engine catalog.
39pub mod install;
40
41pub use descriptor::{
42 AssistantDescriptor, AssistantResidency, AssistantSessionContract, AssistantSignal, describe,
43};
44pub use document::{
45 CONTINUE_END_FIELD, CONTINUE_MESSAGE_FIELD, CONTINUE_SIGNAL, EMBEDDED_ASSISTANT_DOCUMENT,
46 EMBEDDED_ASSISTANT_FILENAME, EmbeddedAssistant, EmbeddedAssistantError, OBJECTIVE_INPUT,
47 REPO_PATH_INPUT, STATUS_QUERY, embedded_assistant,
48};
49pub use install::{
50 AssistantInstall, install_embedded_assistant, install_embedded_assistant_for_server,
51};