Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
495347f
add notice_body to efr-stdx, the one body rule of a desktop notice
eggfriedrice24 Nov 17, 2026
9a05e2c
add the notify table, conversation.ask_user and ten notices per watch…
eggfriedrice24 Nov 17, 2026
cc80388
add the wire of 0.0.12: the model's question and question.respond, at…
eggfriedrice24 Nov 17, 2026
8996ea9
add a frozen decoder of the 0.0.11 app that reads the fixtures of thi…
eggfriedrice24 Nov 17, 2026
be64b30
batch the matched lines of a job's watch into one notice per second o…
eggfriedrice24 Nov 17, 2026
dd8f3fb
tell the model how to monitor with a job's watch: batches of one seco…
eggfriedrice24 Nov 17, 2026
3f5af43
add the row state of a conversation to the app, from its status and a…
eggfriedrice24 Nov 17, 2026
729e8f5
move the times of the conversations sheet once a minute on one shared…
eggfriedrice24 Nov 17, 2026
d6982be
show the row states of 0.0.12 and the offline banner in the conversat…
eggfriedrice24 Nov 17, 2026
9ef8fe9
keep the questions of the model and their ends in the stream of the app
eggfriedrice24 Nov 17, 2026
33874a0
add the words of the question of the model on the phone and its answe…
eggfriedrice24 Nov 17, 2026
6857e37
answer the questions of the model on the phone: the strip, the action…
eggfriedrice24 Nov 17, 2026
b5b1bac
keep the tool name ask_user for efr: the registry refuses a tool of t…
eggfriedrice24 Nov 17, 2026
629ed13
let the model ask the user a question with ask_user, which waits as a…
eggfriedrice24 Nov 17, 2026
5dbcb42
answer the model's question over question.respond, from the terminal …
eggfriedrice24 Nov 17, 2026
a941fda
name the one wait loop and the model's question in the doc of turn.rs
eggfriedrice24 Nov 17, 2026
8b94999
add the attention of a conversation to the store: the waits projectio…
eggfriedrice24 Nov 17, 2026
857d469
test that each attention of a conversation sends one watch row and th…
eggfriedrice24 Nov 17, 2026
00f77b8
bench the projections after an output update and the rebuild of 500,0…
eggfriedrice24 Nov 17, 2026
01c8a28
wake the idle prompt of a terminal through its notices fifo, with the…
eggfriedrice24 Nov 17, 2026
c1c88d0
show the notices of efrd above a waiting zsh prompt at once and send …
eggfriedrice24 Nov 17, 2026
964edc2
send a desktop notice from efr when a card waits 10 s with no key and…
eggfriedrice24 Nov 17, 2026
d64b197
show a watch batch of a job as one row with the count of its lines
eggfriedrice24 Nov 17, 2026
32fa638
list the row state of each conversation in efr history --list: needs …
eggfriedrice24 Nov 17, 2026
6b0c83d
drop the escape sequences of the keys in one place, so a byte of one …
eggfriedrice24 Nov 17, 2026
9b435b3
answer the model's question in the terminal: a card with a digit per …
eggfriedrice24 Nov 17, 2026
65a21ef
document the monitor, the desktop notices, the model's question and t…
eggfriedrice24 Nov 17, 2026
6b49e88
describe the 0.0.12 parts in the crate readmes, the architecture map …
eggfriedrice24 Nov 17, 2026
48667eb
add the changes of 0.0.12 to the changelog
eggfriedrice24 Nov 17, 2026
9e7233d
show the matched lines that wait at a job's end above its end row, an…
eggfriedrice24 Nov 17, 2026
8bb5d12
keep the answer line of the model's question in the live zone under a…
eggfriedrice24 Nov 17, 2026
445cc4f
throw away the unread keys of an open answer line when the model's qu…
eggfriedrice24 Nov 17, 2026
ddc3095
show the line of the answer that efrd took when another client answer…
eggfriedrice24 Nov 17, 2026
ed342b5
send no desktop notice within 10 s after a key, give a wait that foll…
eggfriedrice24 Nov 17, 2026
f381121
keep the name of the tool ask_user in one constant of efr-protocol
eggfriedrice24 Nov 17, 2026
a07ebc2
give the matched lines of one watch notice one byte budget of 8 KiB, …
eggfriedrice24 Nov 17, 2026
a15359d
record an unanswered question of the model as away only when the user…
eggfriedrice24 Nov 17, 2026
8f5d193
tie the numbers of the watch text and the answer limit to their const…
eggfriedrice24 Nov 17, 2026
02bcdc8
stop the pattern work of a job's reader at once when its watch is over
eggfriedrice24 Nov 17, 2026
73bf532
bless the scenario fixtures for the new watch clause of the shell too…
eggfriedrice24 Nov 18, 2026
8743bfe
decide who may answer the model's question by the one scope rule of t…
eggfriedrice24 Nov 18, 2026
db0b7bb
share the flow of an answer to a parked question between question.res…
eggfriedrice24 Nov 18, 2026
01b69ef
share the test helpers of tool outputs and of the wait events instead…
eggfriedrice24 Nov 18, 2026
8a28d3c
mark a pending rebuild of the projections in the database header, so …
eggfriedrice24 Nov 18, 2026
3d70149
record in adr 0025 that 0.0.12 keeps the model's question and its ans…
eggfriedrice24 Nov 18, 2026
253ba03
tell efrd that the phone app answers the model's question, so a quest…
eggfriedrice24 Nov 18, 2026
b25501e
count a question of the model and a terminal wait in the strip of wai…
eggfriedrice24 Nov 18, 2026
e464882
keep a typed answer of the phone out of the message draft, and clear …
eggfriedrice24 Nov 18, 2026
ac92456
close a question of the model that a snapshot misses when the convers…
eggfriedrice24 Nov 18, 2026
ad920a5
announce a question of the model to voiceover, and read an ended ques…
eggfriedrice24 Nov 18, 2026
7d1c78a
read a new kind of a tagged union with an unknown variant as unknown …
eggfriedrice24 Nov 18, 2026
fa16a6e
document the waits of the phone strip, the answer field and the new d…
eggfriedrice24 Nov 18, 2026
b6b2c71
keep the cursor at the end of the typed answer to the model's questio…
eggfriedrice24 Nov 18, 2026
728456d
test that a digit typed before the model's question goes to the row a…
eggfriedrice24 Nov 18, 2026
cee00bf
keep the desktop body of a notice that waits for a client, so it goes…
eggfriedrice24 Nov 18, 2026
9b717b8
index the model's question with its option labels and a typed answer,…
eggfriedrice24 Nov 18, 2026
75c2960
read the waits of the approval strip in one walk of the turns with on…
eggfriedrice24 Nov 18, 2026
b086222
add the 0.0.12 frames of tm-questions, tm-endings and tm-commands to …
eggfriedrice24 Nov 18, 2026
d4223c2
fix the changelog and use docs facts on the phone answers, the quaran…
eggfriedrice24 Nov 18, 2026
2a0fa5f
drop the presence push of the model's question from the permissions d…
eggfriedrice24 Nov 18, 2026
76a1494
let the row of the model's question take a tap only while the phone c…
eggfriedrice24 Nov 18, 2026
978bfd0
test the typed answer of the conversation screen: it stays until efrd…
eggfriedrice24 Nov 18, 2026
a368f54
let a batch of watch matches hold its first line apart, and log a wat…
eggfriedrice24 Nov 18, 2026
1d05436
find the place of a desktop notice only when the notice is written, a…
eggfriedrice24 Nov 18, 2026
bfa3340
delete the wait selectors and the live question count that nothing us…
eggfriedrice24 Nov 18, 2026
8403834
check and take the model's question under one lock, record each answe…
eggfriedrice24 Nov 18, 2026
009474c
draw the approval strip and the question strip with one strip row
eggfriedrice24 Nov 18, 2026
a1a98ec
share one ticker of lib between the second clock of the transcript an…
eggfriedrice24 Nov 18, 2026
2686e47
reuse the answer placeholder and BodyText in the answer row, drop the…
eggfriedrice24 Nov 18, 2026
fcbb80d
pin the sha256 of the frozen v0.0.11 protocol files in the old app test
eggfriedrice24 Nov 18, 2026
0974e39
name the waits elsewhere, their hook, dot, slot kinds and sheet mark …
eggfriedrice24 Nov 18, 2026
b855645
share the test helpers of the model's question and the desktop notice…
eggfriedrice24 Nov 18, 2026
a98f67a
rebuild the card of the model's question only when its answer line op…
eggfriedrice24 Nov 18, 2026
3e4ef69
fix stale docs of the watch notice kind and the presence push, wrap a…
eggfriedrice24 Nov 18, 2026
2eb0da4
release 0.0.12
eggfriedrice24 Nov 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 35 additions & 5 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ shipped binary.

| Crate | Kind | Tier | Owns | Allowed workspace dependencies |
|---|---|---|---|---|
| `efr-stdx` | lib | 0 | XDG paths, `Clock` and `Rng` traits, `process::command`, atomic and 0600 writes, files changed through a link, named threads, UUIDv7 | none |
| `efr-stdx` | lib | 0 | XDG paths, `Clock` and `Rng` traits, `process::command`, atomic and 0600 writes, files changed through a link, named threads, UUIDv7, the text helpers (`one_line`, format characters) and the one body rule of a desktop notice (`text::notice_body`) | none |
| `efr-protocol` | lib | 0 | everything on the wire: frames, `Method`, params and results, `Event`, ids, `Scope`, `ShellContext`, framing, `PROTOCOL_VERSION`; no tokio, no IO | `efr-stdx` |
| `efr-store` | lib | 1 | the only SQLite owner: migrations, the single writer, readers, events, projections, receipts, outbox, recording index, turn messages, the search index (FTS5) with its reads, its search lanes and the indexer's read connection, the tombstones and steps of conversation deletes, the enrolled devices with the feed of their revokes | `efr-protocol`, `efr-stdx` |
| `efr-credentials` | lib | 1 | `SecretStore` and the 0600 file store; optional keyring | `efr-stdx` |
Expand All @@ -57,7 +57,7 @@ shipped binary.
| `efr-snapshot` | lib | 2 | efr's own snapshot store: one bare git repository per project or `$SCRATCH` in the data root, hardened git through `efr_scope::Git::command`, the trees before and after each call that can write, the turn's `pre`, `last` and `post` refs and the paths that its calls touched, the mirror of a project's refs and objects from the git dirs that efrd trusts, the check that a snapshot covers each file below a target, the changes of a call or a turn, the diff of a turn, the plan of an undo or a redo (pure: it writes no file of a root), the home store of the files outside the roots, the collector | `efr-scope`, `efr-protocol`, `efr-stdx` |
| `efr-config` | lib | 2 | `config.toml` for `efrd` and `efr`: the schema of every key, defaults, validation, the effective view with sources, the JSON schema, the example file and the format-preserving writer; no async, no network | `efr-permissions`, `efr-protocol`, `efr-stdx` |
| `efr-proxy` | lib | 2 | the network proxy of the `auto` sandbox, as tokio tasks in efrd: one listener per contained call, the request head and ClientHello parsers, the allow and deny lists before any lookup, the call's host grants, the address guard, the SNI check, plain `GET` and `HEAD` for http hosts, the upload budget and the refusal records; the resolver, the connector and the host's addresses are seams | `efr-protocol`, `efr-stdx`, `efr-permissions` |
| `efr-conversation` | lib | 3 | one actor per conversation: queue, turn loop, the single permission check point, approvals, interrupt, steer, withdraw; in `auto` the launch of each shell call, exit questions and their records (in full mode too, with the judge `full`, the timed question of a guarded delete and the gate before each call), the review of an exit by the `ExitJudge` before the user with the allow rule and the naming rule, the denial pause, the away wait through `PresenceReader`, the cache delete questions, the quarantine question and the fallback to `cautious`; the undo of a turn between turns; the gate of web search (`web.rs`: which hosted tools a turn's requests carry, by the mode and `[web]`, because a hosted search never reaches the check point); the index redaction of search (`redact_for_index`, `REDACTION_VERSION`); drives tools through its own `Toolbox` trait, implemented by `efr-daemon` | `efr-provider`, `efr-permissions`, `efr-scope`, `efr-store`, `efr-sandbox`, `efr-protocol`, `efr-stdx` |
| `efr-conversation` | lib | 3 | one actor per conversation: queue, turn loop, the single permission check point, approvals, interrupt, steer, withdraw; the model's question (the tool `ask_user`, which it owns, and the one wait loop of every question, `turn/wait.rs`); in `auto` the launch of each shell call, exit questions and their records (in full mode too, with the judge `full`, the timed question of a guarded delete and the gate before each call), the review of an exit by the `ExitJudge` before the user with the allow rule and the naming rule, the denial pause, the away wait through `PresenceReader`, the cache delete questions, the quarantine question and the fallback to `cautious`; the undo of a turn between turns; the gate of web search (`web.rs`: which hosted tools a turn's requests carry, by the mode and `[web]`, because a hosted search never reaches the check point); the index redaction of search (`redact_for_index`, `REDACTION_VERSION`); drives tools through its own `Toolbox` trait, implemented by `efr-daemon` | `efr-provider`, `efr-permissions`, `efr-scope`, `efr-store`, `efr-sandbox`, `efr-protocol`, `efr-stdx` |
| `efr-transport` | lib | 3 | the protocol edge: codec, Unix listener, the WebSocket entry of the phone (handshake, frames, pings; efrd owns its TCP listener and peer check), connection table, subscriptions, the `Dispatcher` trait; `client`: the client side of the protocol for `efr`, tests and the proxy | `efr-protocol`, `efr-stdx` |
| `efr-daemon` | bin `efrd` | 4 | the composition root; one file per protocol method; the settings tool, which needs `efr-config` and so cannot live in `efr-tools`; the `auto` sandbox service: the launcher's copy, the probe, the spec of each call, the plan lock, the facts of a line (with the git remotes), the turn-end report, the read-only scope of model-side socket peers, the gate of full mode (`full.rs`: whether efrd allows or refuses it, the count of running full work) and the config hold (`loosens.rs`, `reload.rs`), and the network proxy's socket for each call with its lifetime, its host list and the hosts that a token in a project file denies; the bus filter: an `xdg-dbus-proxy` for each filtered bus of a call or a job, with its self-test and the refusals of its log; the writer of always-allow rules, which checks a rule and appends it to `config.toml`; the judge of `auto` exits (the reviewer's request and its chain of models), the presence of each conversation, the table of background jobs (the launch, the output file, the time limit, the stops, the sweep of a job's session and the port forwards of a contained job on `127.0.0.1`), the home copies of the files that an approved exit, or an exit that full mode let through, writes outside the roots, the apply of an undo or a redo with the undo trash, and the deletes in the real tool caches; the search indexer (a background task with its text rules and its duty cycle) and the search methods with their time caps; the open pairings of new devices, in memory (`pairing.rs`), and the device methods; the heap trim (`heap_trim.rs`: one `malloc_trim` after the actors' idle trims), and its one `unsafe` module `malloc.rs` (ADR 0020); the recorder of model streams (`stream_record.rs`, `EFR_RECORD_STREAMS`) | every library crate above except the test crates |
| `efr-cli` | bin `efr` | 4 | `efr send`, `new`, `status`, `history`, `resume`, `conversation delete`, `diff`, `compact`, `context`, `jobs` (list, stop), `shell`, `settings`, `models`, `login` (openai, openai-api, anthropic), `logout`, `config` (show, check, edit, set, unset, schema, reload), `project` (list, add, remove, through the daemon), `paths`, `sandbox` (check, explain, allow), `undo`, `search`, `device` (add with its QR code, list, revoke); the fzf picker of `resume`, inline below the command line; renders replies through `efr-render` | `efr-transport`, `efr-config`, `efr-render`, `efr-protocol`, `efr-stdx` |
Expand Down Expand Up @@ -254,8 +254,9 @@ and adds `efr-daemon -> efr-pty` to the forbidden edges.
eval of the corpus lines and of the auto prompt is in
`crates/efr-daemon/tests/it/classifier_eval.rs`.
- Presence and the away wait: the seam `PresenceReader` in
`crates/efr-conversation/src/presence.rs`; the wait of a question while the user is
away in `crates/efr-conversation/src/turn.rs`; the state of each conversation in
`crates/efr-conversation/src/presence.rs`; the one wait loop of every question (an
approval, the quarantine question, the model's question) in
`crates/efr-conversation/src/turn/wait.rs`; the state of each conversation in
`crates/efr-daemon/src/presence.rs`; `presence.set` in
`crates/efr-daemon/src/methods/presence_set.rs`; `efr away` in
`crates/efr-cli/src/commands/away.rs`; `[presence]` in
Expand Down Expand Up @@ -321,7 +322,36 @@ and adds `efr-daemon -> efr-pty` to the forbidden edges.
`crates/efr-conversation/src/actor/notices.rs`. `efr jobs` in
`crates/efr-cli/src/commands/jobs.rs`, and the lines of the view and of `efr history`
in `crates/efr-cli/src/format/jobs.rs`. The fake launcher of the tests is
`crates/efr-test-daemon/src/fake_launcher.rs`.
`crates/efr-test-daemon/src/fake_launcher.rs`. The watch batches (v0.0.12): the
batch follower `JobTable::follow_matches` in `crates/efr-daemon/src/jobs.rs`;
`MatchWindow` and `Matched` in `crates/efr-daemon/src/jobs/output.rs`; the text and
the rows of a notice in `crates/efr-conversation/src/notice.rs` (`batch_rows`);
`BATCH_HEAD` and `BATCH_TAIL` in `crates/efr-protocol/src/jobs.rs`.
- The model's question (ADR 0025): the wire types in
`crates/efr-protocol/src/question.rs` and `methods/question_respond.rs`; the tool,
its input check and its results in `crates/efr-conversation/src/ask.rs`; the call in
`crates/efr-conversation/src/turn.rs` and its wait in `turn/wait.rs`; the answer in
`crates/efr-conversation/src/actor.rs` (`respond_question`); the reserved name in
`crates/efr-tools/src/registry.rs`; `question.respond` in
`crates/efr-daemon/src/methods/question_respond.rs`; who can answer
(`answers_questions`) in `crates/efr-daemon/src/methods/conversation_subscribe.rs`,
`connections.rs` and `presence.rs`; the card and its end line in
`crates/efr-cli/src/format/card.rs` (`user_question`, `question_end`) and the keys
in `crates/efr-cli/src/follow/view/asking.rs`; the phone in
`app/src/features/conversation/`.
- Who can act on a conversation (the row states): `status` and `attention` in
`crates/efr-store/src/conversations.rs` (`refresh_status`, `changes_status`) and the
`waits` projection in `crates/efr-store/src/waits.rs`; the words in
`crates/efr-cli/src/format/status.rs` (`row_state`) and
`app/src/lib/protocol/status.ts` (`rowState`).
- Desktop notices and the wake of a waiting prompt: the body rule in
`crates/efr-stdx/src/text.rs` (`notice_body`); efrd's bodies in
`crates/efr-daemon/src/notices.rs` (`desktop_what`, `place`) and the FIFO in
`crates/efr-daemon/src/notices/wake_fifo.rs`; the plugin's reader in
`shell/zsh/efr.plugin.zsh`, section "the wake of a waiting prompt"
(`_efr_open_wake`, `_efr_notice_wake`, `_efr_notify_wanted`); `efr`'s notices of a
wait and of the end of a turn in `crates/efr-cli/src/notify.rs`; `[notify]` in
`crates/efr-config/src/tables/notify.rs`.
- Job port forwards (ADR 0016). Trust: efrd decodes bytes that come from the sandbox,
so the frames have a fixed size and a hand decoder with property tests, and every
other byte is copied opaque. The pure rules (the parse of the TCP tables, the
Expand Down
59 changes: 58 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,64 @@ into the GitHub release notes, and it stops when the section is missing.

## [Unreleased]

## [0.0.12] - 2026-11-18

### Added

- The model can monitor a log, a build, a test run or a deploy: it starts a background
job with a `watch` pattern and ends its turn. Lines of the job that match the
pattern within 1 second reach the model as one notice of at most 20 lines (the first
10 and the last 10). A watch gives 3 notices by default and 10 at most. Lines that
match just before the job ends go into the notice of its end, so a burst and an exit
start one wake turn. The turn view and `efr history` show a batch as one row, such
as `job j3 matched 20 lines (19 not shown): <first line>`.
- efr sends a desktop notice through the terminal (OSC 777, `[notify]`) when a
question or an answer line waited 10 seconds and you typed no key, and when a turn
that took at least `notify.after_secs` (30) ends: `app: done in 4m 12s` or
`app: failed after 1m 3s`. An interrupted turn sends none, and no notice goes out
within 10 seconds after a key, such as the answer to a card. `notify.terminal = "auto"`
sends it only in Ghostty and never through tmux, GNU screen or zellij. Leave
Ghostty's `notify-on-command-finish` at `never` for efr, or you get two notices at
the end of a turn.
- The notices of efrd now show above a waiting zsh prompt at once, and the text that
you typed stays. Before, they waited for your next Enter. A notice that needs you,
such as a question, the end of a job notice turn or job notices that wait at the
wake limit, also sends a desktop notice through the same `notify.terminal` rule.
- The model can ask you a question with 2 to 4 options (the tool `ask_user`). Press a
digit to pick an option, `t` to type an answer of your own, or Esc to skip. The
phone app can answer too: tap the strip or the row of the question, then pick an
option in the action sheet, skip, or type an answer in the composer. An answer is
information for the model: it approves nothing, and efr never reads it as your
message for its own rules. While nobody who can answer follows the conversation, the
question waits `presence.away_wait_secs` (300 s), and then the model goes on with a
choice that is safe and easy to undo. `conversation.ask_user = false` turns the tool
off. `efr search` and the search of the phone find the question, its option labels
and an answer that you typed.
- `efr history --list` and the conversations sheet of the phone app show who must act:
"needs approval", "needs an answer", "answer in the terminal", "running" and
"failed". The sheet shows a banner when a machine is offline, with the age of the
rows that the phone keeps, such as `homelab offline · rows from 2h ago`, and its
times move once a minute. The strip of the phone for another conversation says what
it waits for: "Approval waiting", "Question waiting", "Answer in the terminal", or a
count such as "3 conversations need you".

### Changed

- A watch of a job counts notices, not lines. `jobs.max_wakes_per_watch` is 10 by
default (it was 3), and a watch that names no `max_wakes` gives 3 notices (it was 1).
After the last notice the job runs on until it ends or its time limit passes, and
the notice of its end always comes.
- The first start of efrd after the update rebuilds the lists from the log once.
- A question of the model in a terminal that does not follow the turn leaves a notice
row, as an approval does. The row of a failed job notice turn has its head in the
error colour.
- The lists count a quarantine question as "needs approval". Before, they showed the
conversation as running.

### Fixed

- A quarantine question no longer waits without end while you are away. It waits
`presence.away_wait_secs`, and the change stays in quarantine.
- The quarantine sheet of the phone app shows Next after its question closed while
another question waits, as the approval sheet does. Before, it showed only Close.

Expand Down Expand Up @@ -2573,7 +2629,8 @@ The first release, on the AUR as `efr-code` and `efr-code-bin`.
- Settings in `config.toml` with live reload, `efr config` commands and `efr paths`.
- The AUR packages `efr-code` and `efr-code-bin`.

[Unreleased]: https://github.com/eggfriedrice24/eggfriedrice.code/compare/v0.0.11...HEAD
[Unreleased]: https://github.com/eggfriedrice24/eggfriedrice.code/compare/v0.0.12...HEAD
[0.0.12]: https://github.com/eggfriedrice24/eggfriedrice.code/compare/v0.0.11...v0.0.12
[0.0.11]: https://github.com/eggfriedrice24/eggfriedrice.code/compare/v0.0.10...v0.0.11
[0.0.10]: https://github.com/eggfriedrice24/eggfriedrice.code/compare/v0.0.9...v0.0.10
[0.0.9]: https://github.com/eggfriedrice24/eggfriedrice.code/compare/v0.0.8...v0.0.9
Expand Down
Loading
Loading