Skip to content

apps/cli: the lion command and the areas page - #15

Merged
ohdearquant merged 8 commits into
mainfrom
hub/app
Sep 28, 2026
Merged

ohdearquant merged 8 commits into
mainfrom
hub/app

Conversation

@ohdearquant

Copy link
Copy Markdown
Owner

lion, the command line, as a workspace member (apps/cli, package lion-cli), with the areas page.

  • 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.
  • CI installs the CLI in the lowest-dependency and built-wheel jobs.

Stacked on #14.

- 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.
@ohdearquant
ohdearquant changed the base branch from hub/lookups to main September 28, 2026 03:38
@ohdearquant
ohdearquant merged commit cddb63c into main Sep 28, 2026
16 of 32 checks passed
@ohdearquant
ohdearquant deleted the hub/app branch September 28, 2026 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant