context injection — named reference blurbs from contexts.toml injected ahead of a
dictated instruction, read-before-send (never auto-submits):
- new contexts.py mirrors config.py: [contexts] name = "blurb"; missing file = empty
set; names validated as simple words, looked up on a despaced/lowercased key so
"web hooks"/"web-hooks"/"webhooks" all resolve the same block.
- grammar: context|prepare <name> <instruction> -> Action("context", (name, dictation)).
same-utterance dictation (everything after <name> is literal, incl. "send"); bare
context <name> injects just the blurb. one-shot targeting composes:
[target <name>] [context <ctx>] [filler] <dictation>.
- daemon assembles blurb + (Shift+Enter soft newline | flattened separator) + dictation
via the existing send_literal/type path, tracks the uncommitted-input buffer, and
WAITS. config-gated by behavior.context_multiline / context_separator. unknown context
name announces and injects nothing.
system daemon-control namespace — lands the pass-through vs control split the router was
structured for. reserved leading "system" routes to _do_system (never injects to
claude): system status (mode/target/model/contexts) and system reload [config|contexts].
live reload — voice reload + CLI claudedo reload (SIGHUP) re-read config.toml +
contexts.toml without reinitializing the loaded whisper model. customs now lists loaded
contexts. install.sh installs the contexts.toml template copy-if-absent (else .new).
keys.NEWLINE (S-Enter) added for the soft-newline assembly. wake list unchanged.
Signed-off-by: disqualifier <dev@disqualifier.me>
19 lines
1.0 KiB
TOML
19 lines
1.0 KiB
TOML
# claudedo contexts — named reference blurbs you can inject ahead of a dictated
|
|
# instruction with the `context <name> <instruction>` voice command (alias `prepare`).
|
|
#
|
|
# the named blurb is injected as a preamble, then your dictated instruction, and the
|
|
# daemon WAITS — nothing is auto-submitted. you say "send" to submit (read-before-send;
|
|
# claude's own permission prompt is the backstop for anything consequential).
|
|
#
|
|
# names are SPOKEN and fuzzy-matched, so keep them simple, distinct, single words
|
|
# (a-z, 0-9; spaces/hyphens/underscores are stripped for matching, so "web hooks",
|
|
# "web-hooks" and "webhooks" all resolve the same block). values are free-form text.
|
|
#
|
|
# edit this file, then say "reload" (or run `claudedo reload`) — no daemon restart,
|
|
# the whisper model is not reloaded.
|
|
|
|
[contexts]
|
|
webhooks = "discord webhooks — test: <url> (safe to spam), live: <url> (real, careful)"
|
|
testing = "use the test/staging resources only, never touch prod"
|
|
discord = "discord.py 2.x; bot token in .env as BOT_TOKEN; guild id 12345"
|