Files
raea/io/clef/src/lib.rs
shinyobjectz 68433ab526 AK3: raea ask: questions about a piece's picture and sound, prepared, asked in parallel and kept
raea-app-ask. prepare.rs reads what raea knows of the piece before it spends: what the file holds, the nearest brief.ts
(through raea spec) and a words file. A question that doesn't apply is dropped or swapped with why (a silent piece
asks sound-silent in place of sound); not knowing whether anyone speaks, both variants go in one call with the voice
question, and the answer sets the other aside. runner.rs plans a batch into calls (by file, window, files beside it
and what the questions look at, 64 a call), cuts each clip once, calls in parallel (--jobs), streams the answers, and
when the pool is spent partway keeps what came and reports the rest as waiting. record.rs keeps every call and
answer under ~/.raea/ask with the clips it cut, by hash, at most 2 GB. verbs.rs is raea ask: own words (--choose,
--grade, --rate, --flag), the standard sets (--set, --std, ask list), windows (--from, --to, --at), --with, --batch
(a JSON list or lines, - for stdin), --dry, --json and --gate for pipelines.

sdk/raea's raea/ask gives scripts ask and askMany over raea ask --batch --json. The clef client's failures are
typed so a spent pool waits rather than fails; decide.changed needs files beside it. The manual's CLI and SDK pages
are written with it; AK1, AK1b, AK2 and AK3 are done in docs/ask.feature.
2026-11-20 15:07:41 -08:00

20 lines
643 B
Rust

//! The decision model, called one way for every caller (docs/ask.feature AK1b): a call's body and its answers
//! (`client`), the media cut to what it reads (`media`), the route it takes, the person's plan first (`route`), and the
//! answers kept by request (`cache`). `raea ask` (apps/ask) and `raea judge` call it.
pub mod cache;
pub mod client;
pub mod media;
pub mod route;
pub use client::{Answered, Call, Fail, Http, Media, Transport};
pub use route::Route;
/// One call, by the routes open on this computer.
pub fn ask(call: &Call) -> Result<Answered, Fail> {
route::ask(&Http, call, &route::open())
}
#[cfg(test)]
mod tests;