The CLI's side of harness spec 3.12.0, for a terminal emulator with LLeMbas
built in. Without LLEMBAS_TTY nothing here applies.
- src/terminal/env.ts: the terminal's environment; `lembas --version --json`.
- src/terminal/uservars.ts, tui.ts: the TUI's state as user vars (OSC 1337
SetUserVar), on start and on change, emptied on every way out.
- src/terminal/context.ts, session.ts, command.ts: the context file — read
once, removed, checked — as one <terminal> block on the person's next
message; `--terminal-context` for the TUI and `lembas run`,
`/terminal-context` in the TUI; a chip in the transcript.
- src/tool/terminal.ts, src/terminal/pane.ts: terminal_run and terminal_read
through the terminal's own program, as an argument list.
- src/permission/evaluate.ts: a typed command is judged as bash would judge
it, then asked every time outside auto mode, never always.
- src/terminal/complete.ts: `lembas complete --shell`.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
After an independent review of the spec 3.11.0 work.
- acp/files.ts: a write judged its path, waited for the base hash, then
opened and renamed by name - a move in between could swap a link in and
send the write out of remote.roots. Changes now run one at a time for
every link of the process, a path is judged again after each wait and
must be the same place, the part file is proved to lie in the target's
own directory before the rename, and hashes and reads go through an open
descriptor. A part file is never removed by a name that may lead
elsewhere. Copy, delete and the listing of names for a search no longer
block; uploads are capped in all; a listing is cut before its entries
are looked at; names are kept for four folders; part files are hidden,
journalled and swept at start.
- remote.files_that_run_code (off by default; lembas remote
files-that-run-code on|off): off, _lembas/fs write, mkdir, move, copy
and delete refuse git's own directory, a project's agent configuration
and the user's start-up files with the reason runs_code. Said in the
limits.
- tool/buffers.ts: a file read through the editor is never read or written
from the disk behind it; previews record nothing; a write the client
never answered is not repeated. The client's fs capabilities are read on
stdio only.
- Rewrites are tracked from the start, capped at four, stopped with the
client; the id is read one way. show's handle is an open descriptor.
- A typed message beginning like the editor's block is shown; a closing
tag in a diagnostic or a selection cannot end the block.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
From an independent review of the round. Spec and CLI together.
- A scheduled prompt for a session open in a terminal is judged, then
refused (data.reason terminal) instead of being passed to the terminal as
a person's turn on the terminal's model.
- A schedule's session keeps its model with it: opened from the store again
— or in a terminal — it is on the model it had, and stays a schedule's
session there (nothing in it becomes the directory's model).
- On a refused scheduled turn nothing about the session is changed; a
command's interactive-only model in one is the same -32602 with its
reason. In a schedule's session a turn a job wakes, and a subagent started
with no person's turn running, are still scheduled work.
- A rerouted title or summary is counted under the model that was asked and
that model is named; a model that cannot take a summary (window too
small, no tools) is nowhere to go.
- A borrowed model is given back with returnModel, so a command whose model
is the session's own leaves nothing borrowed. What is remembered goes
through records(), the rule the conformance cases test; a change of model
inside a turn the harness started is not remembered.
- models.json: a directory's time is refreshed as it is used; a write stats
nothing, and gone directories are dropped apart from any turn.
- lembas run with no terminal says the way forward, in the refusal and in
--help.
- Permission rules: a rule written again (the same permission and pattern,
later) sets the earlier one aside, as a narrower one does. Cases pin it.
- Conformance and the examples use made-up model names.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Harness spec 3.9.0 (interactive.md), the CLI's side.
- interactive_only is read from /v1/models; /model says which models are
for interactive use only.
- A session's title and its compaction, asked for or automatic, are not
asked of an interactive-only model: they go to its twin, else to the
global model or the server's default when that is not interactive-only;
with none the title is left, automatic compaction is skipped and said
once, and a compaction asked for is refused in the spec's words.
- Scheduled work never uses one: a scheduled session/new or session/prompt
is refused with the sentence and data.reason interactive_only before
anything is sent, a scheduled turn cannot switch to one or start a
subagent on one, and a scheduled session opened with no model skips one
the directory remembers. lembas run with no terminal at all is the same.
- A person's turns, and the subagents of their session, are untouched.
Also the type of LOOP.interactive, which the spec commit left too narrow
for the JSON it reads.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Harness spec 3.9.0, the CLI's side.
- A session starts on: the model asked for, the project's setting, the
model last used in exactly this directory (while the login serves it),
the global setting, the server's default.
- The directory's model is written when a person's prompt starts a turn and
when the person changes the model (/model, a setting, _lembas/configure, a
shared terminal's session) — to models.json in the state directory, and
nowhere else. Not for a turn the harness started, a command's own model, a
one-shot run, or anything in a session a schedule opened (kept in the
session's meta, so it holds after a restart).
- _lembas/directories: `model` on each directory a session may be opened
in, and `list: false` for one directory alone; capability
directory_model.
- /schedule names each schedule's type, Chat or Agentic, and /schedule new
offers the two by name.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On the shared menu: unread first with the schedule and when; a report's
own menu — read it here (rendered in the transcript, a page as its note,
marked read), reply (the report and the person's words to this session's
agent), mark read, delete (asked once); ctrl+r and ctrl+d in the list.
/reports <id or title> reads one; lembas run prints the list or a report
as text. Built against a provisional /api/v2/reports contract, marked in
src/lembas/reports.ts. /schedule new takes notify-when: the default
condition, the person's own words, every run, never.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A command that takes no words is the command only alone, and /mcp <word>
only for a server's name: anything else is a prompt. lembas run --json
gets the text as an event and the end; a command that could not do what
was asked exits 1. /command <name> runs a custom command by name (TUI and
link), /skill works over the link, and a custom command hidden by a
built-in's name is said once at start. The start-up line for a failed MCP
server is cleaned, redacted, and promises only what every front end has.
The status bar's MCP subscription is dropped with the screen.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The dialog every picker uses gains sections, state marks, a body, a line
about the highlighted row, esc-goes-back, paging and a position in long
lists. /mcp is a menu on it: the servers by where they come from, with
state and what they offer; a server's actions (reconnect, off/on — kept
for a trusted project —, sign in/out, the last error in full), its tools
with their permission rule, changeable there (engine.setRule: the session,
and the project when trusted; never under the user's own stricter rule),
and its prompts. /mcp <name> opens one. Where there is no menu — over the
link, lembas run — /mcp is a plain table (mcp/text.ts).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
remote.scheduled (lembas service scheduled on|off, lembas remote scheduled on|off) said as
limits.scheduled; a scheduled session runs in the schedule's mode (Edit when none, Plan refused,
lowered to max_mode), reports ok/silent/failed/cancelled and the final reply, waits the
schedule's wait on approvals and offers no question, plan card or show. _lembas/monitor judges
the watch command by the mode (ask is refused) and hashes the output as it streams.
Conformance areas scheduled, silent and monitor run here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With a stored login for the same server, login only refreshed it; a 401
said "run login again", which did the same again. A SignInRejected from
the refresh now falls through to a fresh device login, which replaces the
old one. The installer's last line points at lembas login.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Levels (models/schema.json levels): provider/effort.ts levelsOf/levelFields/
readLevel — `off` only with thinking_switch and sends enable_thinking false
and no effort, `default` for a model that takes no efforts and sends
nothing, a level not offered is read as the start level. The engine's
effort is a level; /effort shows nothing for one level, a Thinking switch
for [off, X], a list otherwise; the status bar follows. /v1/models'
thinking_switch, efforts [] and capacity.parallel are read
(lembas/webui.ts); session/capacity.ts counts parallel slots.
Reasoning (context.md §8): an assistant message of the current turn
carries reasoning_content (provider/common.ts turnReasoning,
openai-chat.ts); step-boundary deliveries, nudges and the wrap-up are
marked turn: false and do not start a turn.
Paths (context.md §11): the <env> block names the project and, started
below the root, that directory relative to it (assemble.ts envLines);
instruction files and @ attachments are named from the root or as ~/…;
file tools and bash resolve relative paths against the project root.
The team rules (team/team.ts) and conformance runners for levels,
reasoning, paths and team; the team runtime follows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`lembas login --token-stdin --server <url> [--ca file] [--json]` reads one lmb_ token from
stdin (never an argument or the environment), checks discovery's protocol and then
GET /api/v1/instance with the token, whose `scope` must include `link` (a 404 or no `scope`
is an older server), and stores the login through the same path as the device code:
the key file, the webui entry, lembas.json, an earlier login replaced with its token signed
out naming the new one. --json prints the device login's `done` / `error` line. For LLeMbas
Desktop, which gets the agent's token from the one approval.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The login asks the server for the memory scope in place of library (the
server accepts both; library is no longer offered for new tokens).
/v1/usage is read in the server's 2.0 shape: no plan, balance, credit
costs or windows. The status bar shows what the month has cost so far and
/usage the month's tokens and cost and this device's tokens, each
currency's amount on its own (month.cost_by_currency, else cost_money in
currency). The credit wording is gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LLeMbas CLI 2.0 is LLeMbas-server-specific (CLI rule 2). Removed: the
anthropic, gemini, ollama and responses clients, context discovery and
llama-swap unloading (discover.ts), the Connection schema with its dialect,
auth, key_cmd, discover, unload_url and one_model_at_a_time, the model
`fallback` (it only ever moved to another server), effort_map and cache, and
the multi-connection refs. Kept: openai-chat, http, sse, think, effort,
tokens and all of src/lembas.
- connections.yaml holds the login (`type: webui`, as lembas login writes
it). A custom entry from 1.x is read past with a warning that says how to
log in, so an old file still starts; with several logins left, the latest
is used and the others named.
- A model's ref is the id the server serves it under; the older forms
(`<login>/<id>`, `<login>/<model>`) still resolve and config.yaml is
rewritten once. Without a login there is no model, and the error (and the
first-run screen, now the sign-in alone) says `lembas login <address>`.
- A login to another server signs this machine out of the previous one.
- The window is the server's word (no discovery); a capacity group comes
from the server's `capacity.group` alone; embeddings use the server's
/v1/embeddings.
- `lembas models` lists the server's models; install.sh's starter files, the
README and the JSON schemas say the same.
Tests: every fixture is a login now (the fake server lists models, answers
other GETs with 404, and can hand one model to another script, as a server
with several backends); the dialect suites and the cross-connection tests are
gone with their code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One registry per process, every job owned by a session: bash's background commands (and a command
still running at its timeout, which now goes to the background instead of being killed) and
subagents started with task background: true. job_list, job_output, job_stop (the former
bash_list, bash_output, bash_kill) and the new job_send and report; a finished job wakes the owning
session in every front end with its marked note. The TUI counts jobs, lists them (/jobs), opens a
command's output, enters a subagent and messages it, moves a command to the background (ctrl+b)
and asks before quitting with jobs running. The link gains the jobs capability. Subagents get a
session row of their own, the spec's preamble and agent texts, and their errors reach the report.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Config, data and state are rooted at <project>/.agent/local/lembas (or
.lembas/), kept out of git; a local directory the repository carries is
refused. The user's logins and connections.yaml are read, never written; the
user's config.yaml is not read. The TUI is started with TMPDIR inside it (the
compiled binary unpacks its native library there) and OpenTUI's cache goes
there too; the agent's commands keep the user's TMPDIR.
An instance serves models, chat, speech and the balance only: the link,
/remote, the service and the hub are off, deletes are not sent, and the server
library, search, fetch, embeddings and personalization are not used.
Self-update and uninstall are refused. hardline_disable is ignored, and tools
treat the local directory as outside the project.
The smoke test runs a whole local session in the compiled binary and checks
that HOME, the XDG directories and TMPDIR gained nothing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`lembas remote list | add | remove | enable | disable | mode | terminal`, with
`--json` printing {enabled, roots, max_mode, terminal}, for LLeMbas Desktop.
Writes go through the global config writer and keep comments.
The device's limits are now live getters over the remote: block, re-read when
config.yaml's stat changes. `lembas service` links even with remote work off
or no roots: it says roots: [] and refuses every session, directory and
terminal, so the instance can tell "no folder allowed yet" from "not running".
When what the instance was told changes, the link re-dials once nothing is
working, so `lembas remote add` or `enable` takes effect without a restart.
Harness spec 1.0.1 documents both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first public release of LLeMbas CLI: a terminal coding agent and project manager for any LLM
API, with permission modes, git snapshots, memory and skills, knowledge bases, MCP, voice, and a
link to a LLeMbas instance whose web UI can work its sessions too. Signed Linux binaries for x64
and arm64.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>