/** * The open subject — what the person has open, said to the model every turn (operato-application * design/ai/screen-pattern.md §2-1). * * A conversation is anchored to what its screen shows, and the server stores and checks that anchor. Each turn the * door reads it through the describer of its anchor type and puts one line at the end of the system prompt, so the * model starts from "the figure SCARA robot is open" instead of asking which one. * * The line comes from the stored anchor, never from `hostContext`: what the screen sends is not trusted * (ADR-0061 decision 7). It is built again every turn, so it does not linger when the subject changes. What changes * while the subject stays open - the selection, the edit in progress, a live value - is still for the read tools. */ /** What a describer says about a subject: a noun for its kind and its name, both for the model. */ export interface OpenSubject { /** `figure`, `board`, `site`, `stock location` - English, a word the model can use in a sentence. */ noun: string; /** The subject's own name, as the person sees it. */ name: string; /** * How a conversation about this subject is held, said after the line - a rule of the kind, written by the module * that describes it, never a value a person typed (a person - ADR-0200: answer from their records only). */ guidance?: string; } export interface AssistantSubjectDescriber { /** A session anchor type (`figure`, `board`, `space`, `subject`, ...). */ anchorType: string; /** * For `subject` anchors (`:`, one subject of a 360 - ADR-0072 decision 6): the axis this describes. * Many packages keep subjects, each its own axes, so a `subject` describer names its axis. */ axis?: string; /** * Read the subject in this domain. `undefined` when it is not there or belongs to another domain - the line then * says it could not be read, and names nothing. */ describe(input: { anchorId: string; domain: { id: string; }; state?: any; }): Promise; } /** * An app describes the anchors its screens use - figure-service the figure, twin the space and the instance, an * app with a 360 its subjects. A second registration for one anchor type is refused: which name the model sees * would depend on boot order. */ export declare function registerAssistantSubject(describer: AssistantSubjectDescriber): void; /** The shared parts' describers (domain · application · board), used when no application registered its own. */ export declare function registerFallbackSubject(describer: AssistantSubjectDescriber): void; export declare function assistantSubjectDescriber(anchorType: string, anchorId?: string): AssistantSubjectDescriber | undefined; /** Test only. */ export declare function clearAssistantSubjects(): void; declare function quoted(name: string): string; /** A name put before the model as data: in quotes, on one line, without control characters, cut short (above). */ export declare const quotedName: typeof quoted; /** * The line for this turn, or `undefined` when the conversation is about nothing in particular (`none`, or no * anchor). A subject that cannot be read is said to be unreadable - the model must not fill in a name. */ export declare function openSubjectLine(input: { anchorType?: string | null; anchorId?: string | null; domain: { id: string; }; state?: any; }): Promise; export {};