Expand description
One Dreams pass, from a queued dream to a proposal waiting for review (SPEC_DREAMS §2, §8).
The runner takes what the pass read (the caller’s job: files from the store, session text from the history), builds
the prompt (dream_prompt), makes the one model call through a function the caller supplies, checks the answer
(dream_proposal) and records the proposal and what the pass cost. It never writes a memory file: a proposal waits
in the record until a person applies it, and applying is a later step.
The model call is a parameter, so the runner has no account, no CLI and no spend of its own; a test passes a fake. The one real call site is the next step, with the account decision (§2.4, D5).
How a pass ends, so a dream never stays running:
ready: the answer was the schema; its operations (possibly none) are recorded;held: nothing was sent because a rule said wait (there is nothing to read), so the dream can be queued again;failed: the prompt could not be built, the call failed, or the answer was not the schema. What the call cost is recorded either way, because the spend happened.
Structs§
- Call
Failed - A model call that failed. When the call was made and billed before it failed (a timeout after the reply started, a
refused reply),
spentcarries what it used, so the entry still shows the spend; itstextis ignored. - Model
Answer - What the model call returned.
- Pass
- What the pass reads and the limits it works under.
Enums§
- End
- Where the dream is when
runreturns.
Functions§
- run
- Run one queued dream.
callreceives the prompt and makes the model call; it is not called when a rule holds the pass back. AnErris a store failure the caller should log: the dream is moved tofailedon a best effort, so it does not stayrunning(nothing moves a running dream back to the queue).