apps/cli: the lion command and the areas page - #15
Merged
Merged
Conversation
- apps/cli (lion-cli, a workspace member): `lion agent` builds a long-running agent from its chores.toml (trusted senders, the bounded khive client, the gate, the chores, the desk when configured), claims its directory before any branch, and serves, runs once or reruns; `lion chat`, `lion context` and `lion areas` sit beside it. - The verdict triage is built only with [desk.verdicts]; a section that names no verdict_dir is refused at build. - hub/areas.py and hub/app.py: the residents by area and the page and API that show them. - Tests for the command, the areas page, chat, the box tools and the resident's checkpoint; ADR-0019 points at where those tests live. - CI installs the CLI in the lowest-dependency and built-wheel jobs.
A handler thread of an earlier request can still be ending when the test counts threads, so a count taken before the stream opens can be one high. The stream's thread is the one that is new once the stream is open; the test checks that it lives while the client is connected and ends after.
- page: a resident's detail lands only on the route that asked for it; a slower answer for another resident, or one that arrives after going back to the list, is dropped, and controls and sends target the resident whose page is shown. - page: an unanswered send keeps its token, so sending the same words again replays the first send instead of mailing twice; changed words get a new token. - page: the token is 32 hex characters from getRandomValues, the form the server keys a send on, over plain http too. - controls: a resident whose lock is held and whose cursor says a wake is running is not idle, whatever its backend; an unreadable cursor reads as busy. A restart then needs force. - cap: wakes_per_hour takes a whole number of at least 1; stopping wakes is what hold does.
- context: pending declarations are split at LF only. The writer keeps U+0085, U+2028 and U+2029 unescaped inside a JSON string, and str.splitlines broke a declared value holding one of them into records that do not parse. - cap: chores.toml is read and written as bytes, so a CRLF file keeps its line endings and only the two keys change; a file that is not UTF-8 is refused and left as it was.
- page: a control or send answered after the page moved to the list or to another resident no longer reloads or clears anything there. - page: an unanswered send keeps its token per resident, so a send to another resident in between does not drop it. - controls: under a held lock, only a cursor naming a finished wake reads idle; no cursor yet, one with no outcome, or one that does not read is busy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lion, the command line, as a workspace member (apps/cli, packagelion-cli), with the areas page.lion agentbuilds a long-running agent from itschores.toml(trusted senders, the bounded khive client, the gate, the chores, the desk when configured), claims its directory before any branch, and serves, runs once or reruns.lion chat,lion contextandlion areassit beside it.[desk.verdicts]; a section that names noverdict_diris refused at build.hub/areas.pyandhub/app.py: the residents by area, and the page and API that show them.Stacked on #14.