Driving, with the airc viewer on the car screen: an agent's input box is
visible and what you want to give it is a PROMPT, a sentence, not a keypress.
airc's buttons cover keypresses well and the Android app has IME dictation, but
the car browser has no dictation at all — so today a prompt means the laptop
keyboard. dais already transcribes locally and pastes into a tmux pane; what
was missing is a way to say "record now, and deliver it to the pane I am
looking at" without touching the laptop.
{"op":"dictate","action":"toggle","pane":"%19"}
start | stop | discard | toggle, the last resolved against the CURRENT mode so
a client that missed a poll — or a latch someone started at the desk — cannot
be inverted by a stale button. stop TRANSCRIBES and discard throws the
recording away, which is the existing latch-vs-voice-off rule and what makes a
remote ✕ useful: a misheard prompt can be dropped instead of typed. Omit the
pane and it is F10 over the socket.
The pane is an ephemeral override (:dictate-target), never a slot. transition!
persists on any :targets/:active-slot change, so writing a slot would churn
targets.edn and the digits addressed by voice; a reserved slot is worse, since
load-targets honors the overlay only while (get targets active-slot) is truthy
and a dangling active-slot silently discards every persisted target on the next
start. save-targets! writes only :targets/:active-slot, so nothing a car-side
tap aims at can survive a restart — asserted by a test rather than by new code.
Two orderings are load-bearing, and both are the opposite of the obvious one:
- The override is set in the same transition as the mode change and AFTER it.
Every mic OPEN drops a pending override (drop-override), which is exactly
what keeps a forgotten one from stealing a later utterance — so setting the
aim first would erase it.
- It is consumed after dispatch, not before, and only when the plan actually
DELIVERED. :armed is cleared before dispatch for the opposite reason; copying
that placement here would deliver to the slot instead. An utterance the
confidence gate refused ("say again?") keeps its aim, or the repeat lands in
the wrong pane.
No TTL. The plan sketched one; the rule set turned out not to need a clock,
because a mic open, a voice-off and any explicit target op all drop the aim,
and the only utterance that can reach a pending override is the one it was set
for. Dropping the TTL also removes the failure mode where an aim expires
mid-sentence.
state gains the precedence split the feature needs: active-target is where an
UTTERANCE goes (override, else slot) and is the single point everything the
router produces reads through; slot-target is the active slot ignoring any
override, and the desk-side router-bypassing paths now use it — the keystroke
bridge behind dais-top's passthrough lock and F11/esc are keys typed by
someone sitting at the machine, aimed at the slot they can see, and must not
follow a recording someone made from the car.
The ear's transcribe-vs-discard decision moves from a hardcoded via string to
ear/transcribing-stops, so the next caller that latches has one obvious place
to register — miss it and recordings vanish silently, which is a bad way to
find out.
The dictation run is now keyed on the delivery LABEL rather than the slot: an
override, a re-pointed slot and two slots naming one pane all have to answer
"same cursor?" correctly, and only the label does.
parse-target-value accepts a bare pane id ("%23"). tmux takes one anywhere a
target-pane goes, it is how airc reports panes, and it is the one spec form
immune to the pane_index renumbering trap — so `dais-ctl target set 3 %19`
starts working as a side effect.
Reporting: dictate_target rides along in state.json, the status query, the
state_changed broadcast and the target-list reply (a UI that missed an event
self-heals on the poll it already runs), and dais-top shows the override on the
target line so the cockpit never claims the slot while speech goes elsewhere.
tools/dais-ctl gains `dictate` with completion, which makes the whole feature
hand-testable without airc.
Also drops the last references to FABLE_PLAN.md, GOAL.md and CODEX_PLAN.md,
deleted in 9353d85: the README reading order, one code comment, and AGENTS.md's
claim that a missing file is normative.
3.3 KiB
Glossary
One line per term: TERM :: definition.
ear :: the resident Python worker (mic capture, Silero VAD, faster-whisper) supervised by the daemon over stdin/stdout ndjson; deliberately mode-DUMB — the daemon owns all mode state.
latch :: manual recording mode (F10/dais-rec): start/stop toggle, no VAD endpointing; stopping via toggle TRANSCRIBES, stopping via "voice off" DISCARDS.
target slot :: numbered entry (1-5 in the UIs) in daemon state mapping to a delivery target — a tmux pane ({:type :tmux :pane "s:w.p"}) or the focused app ({:type :focus}); switched by voice ("target two") or dais-ctl target use. Lifecycle: picked (target set/pick), then DURABLE — it survives daemon restarts and its own pane dying, deliberately — until explicitly freed with target release / x in dais-top.
dictate override :: state :dictate-target — an ephemeral, single-use delivery target set by the dictate op (a remote UI's mic button, e.g. airc in the car) so ONE recording lands in the pane that UI is viewing. Shadows the active slot for UTTERANCES only (state/active-target), never for keys typed at the machine (state/slot-target — the send bridge, esc); never persisted; dropped by any mic OPEN, "voice off", or explicit target op, and consumed by a delivery. Structurally :armed: session-only, one shot.
focus backend :: delivery via ydotool/uinput to whatever window is focused; assumes US keyboard layout (uinput emits US keycodes).
whole-match :: default router strategy — an utterance is a command iff the ENTIRE utterance matches (vocabulary or keypress grammar); near-misses become dictation, never partial commands.
armed :: single-shot daemon flag (dais-ctl arm) forcing the next utterance to be command-only; a miss executes nothing and the flag clears either way.
enter-mode :: dictation submit policy — :no-enter (default, type only), :enter-auto (trailing spoken "enter" submits), :enter-always.
via :: origin string carried through a state transition (e.g. "toggle-record" vs "voice:voice-off"); dais.ear/ear-message uses it to pick latch_stop (transcribe) vs set_mode off (discard) — the transcribing vias are the ear/transcribing-stops set, everything else discards.
asr.dropped :: event for an utterance rejected by the false-trigger gates (min voiced duration, no_speech_prob, avg_logprob); the WAV is kept and referenced for replay.
marker files :: mic-recording / speech-detected in $XDG_RUNTIME_DIR/dais/ — existence-only flags for statusline [ -f ] checks; maintained by the same code as state.json.
brief :: BRIEF.md + dais-ctl brief — the voice-input notice a driven agent reads at session start (pointer by default, --full pastes the text).
keypress grammar :: trigger verb + every-non-filler-token-must-map-to-a-key rule, ported from lausu intent.clj; the every-token rule is the safety property.
dictation run :: state :dictation-run {:at ms :target label} — open while the last thing DELIVERED was an unsubmitted dictation, so the next utterance is typed with a LEADING space (a spoken paragraph arrives as several utterances). Keyed on the delivery LABEL, not the slot, so a dictate override, a re-pointed slot and two slots naming one pane all answer "same cursor?" correctly. Ends on submit/keys/macro, raw send, esc, slot switch, "voice off"/mute, or :dictation-continue-gap-s.