Skip to content

v0.0.19

Pre-release
Pre-release

Choose a tag to compare

@rsdoiel rsdoiel released this 09 Oct 20:45
· 76 commits to main since this release

The terminal interface can now change something, and kb describes its own command language in one table. The decisions are DR-0059 (one verb table, in part), DR-0064 to DR-0067 (keys, a shared chooser, the menu tree, and which writes get which gate), DR-0068 (ingest) and DR-0069 and DR-0070 (documents and promotion), from the design brief tui-keys-and-write-flows-design.md. Everything was written and tested red first, including the built binary on a pseudo-terminal with real bytes. The race detector passed on darwin/arm64 at the last code commit, and the interface was tried by hand in a real terminal on Linux.

Bare kb, on a terminal, opens a menu with one row per verb group (Projects, Records, Observations, Concepts, Sources, Documents, Search, Ingest, Index, Check), under a header naming the workspace, its database and what it holds. A group opens its own menu; rows that are not built yet are dimmed with the release that brings them, and choosing one shows the command-line equivalent. A project's observations, concepts and records are tabs with counts (o, c, r). Records Browse and Pending list records in the scope kb record list would use, one line each with its qualified reference, and a widens the scope. On a record, Enter reads it and s sets its status: the record file is shown in your pager ($KB_PAGER, else bat, else less -R) with the interface suspended, or in a built-in viewer when there is none, then each status is one key, y confirms, and Esc or q backs out at either step with nothing written. The write is the same function kb record set-status uses, and the screen shows the equivalent command.

The keys follow clasm's. q goes back one screen and quits only at the top menu, Esc cancels something in progress and never closes a screen, Ctrl-C quits from anywhere, and a legend line on every screen lists the keys that apply. While you type in the search prompt every key is text, so a term that starts with q works. A complete command line always runs and prints, on a terminal or not; only an incomplete one opens the interface, and only on a terminal (bare kb, a bare group such as kb record, kb record show or kb project show with no argument). The new global option -i opens the interface at a command: kb -i record pending, kb -i record show REF, kb -i search TERM.

kb verbs (and kb -json verbs) prints the verb table: every verb, subverb and flag, with what it does to the database. kb record set-status REF with no status is now a review that takes single keys, with no Enter, and Enter on the confirmation does nothing. kb document review promote needs a person at a terminal, as accepted does: a model can draft a summary but cannot make it trusted. kb ingest reports a status that arrives through a file, such as clasm/DR-0012 proposed -> accepted (edited in file) or a record first ingested already accepted; it is a report, not a block.

Upgrading: the interface's keys changed (q goes back instead of quitting, Esc no longer leaves a screen), and a script that promoted summaries without a person at the keyboard must hand that step over. Bare kb with no terminal is now a usage error (exit 2) and no longer tries to start a terminal program, and opening the interface no longer creates a database where there is no workspace. lipgloss is a direct dependency; it was already built into kb through bubbles. Skills that tell a model to run set-status ... accepted or document review promote need kb >= 0.0.19.

Full Changelog: v0.0.18...v0.0.19