The same check the other LLeMbas repositories run: private domains, .lan
names, container numbers, private address ranges, machine names. Three
lines are allowed, each with its reason in the script: the public forge
the release workflow republishes from, a theme's former name read from old
configurations, and the made-up private hosts the web tool's test needs
(renamed to made-up ones). Wired into scripts/ci.sh as its first step.
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>
reports.md, tools/report_write.json (requires: scheduled), loop.json
scheduled.notify: a schedule's run files a report or leaves a history
line; notify when always | when | never with the instruction for each, in
the run's prompt; one report per run; the answer filed under always;
[SILENT] retired. A run on a linked computer carries its report in the
turn's answer (acp.md, capability reports). conformance/reports.json.
pages.md, prompts/blocks/html-pages.md, loop.json pages, models/schema.json
html_pages: a reply may carry a complete page in an html-view fence, when
the instance, the model and the chat all say so; never to a subagent, the
phone assistant or an agent chat. The note, the text projection, the
session note. blocks/prototypes.md, the prototypes context field and
capability, and conformance/prototype.json are gone; conformance/pages.json.
permission/rules.md, conformance/rules.json: the candidate and the floors
a later-made rule gives way to, and what making a rule does — for a rule
typed into a file as for one a menu wrote.
The CLI carries it: report_write in a scheduled turn, the pages fence read
and noted in the transcript (/pages; prototypes: true dropped with a
line), the model's html_pages kept and unused, lookupRule the strictest of
the floors, judgeNewRule.
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>
One function (mcp/clean.ts) takes control characters out of everything a
server supplies, where it enters and where a name is shown. /mcp's text
shows an address without credentials or query, a local server by its
program's name, an error by its first line with secrets out, never stderr;
as a markdown reply, names are code and descriptions escaped. A prompt is
listed and inserted under its registered name. Both of two colliding tool
names get a hash; a library server's tools other than the one it is there
for are ordinary MCP tools. In the menu: sign-out asks once, a failure is
said once, a failed save is said, a server the user's own config switches
off is switched on for the session only (and says why).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The box is laid out in the rows there are (the detail under the list and
then the body above it give way first); a menu whose rows have a detail
keeps that space, so the list does not jump; a paste goes into the filter
or the text a menu takes (Add a rule); Enter on an inert row (a key in
/help, a /status row with nothing behind it, a line of an error) does
nothing. A finished job's line keeps the warning sign when it did not end
well.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
They ran the command directly, past submit()'s mid-task check: /new,
/compact, /undo, /model and the rest could start while a reply ran. A
menu now hands the line to the same function a typed line goes through.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
setRule appended a sourceless rule last, so 'read * allow' shadowed the
default 'read *.env: ask' and 'bash allow' the user's own 'rm *' deny, and
wrote it to the project. Now: choosing what is in force is a no-op; a rule
the user's own config or a written deny takes in whole is refused; a rule
that is made is a project's rule in the session as in the saved file, and
a rule made after the written ones (project, 'always', menu) decides what
a broader rule decided, never what a narrower stricter one did — lookupRule
keeps the strictest narrower match. The menu says where the rule holds,
whether it was saved (a failed save is said), and which stricter rules
still apply. Removing a session rule removes its saved copy.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Lines begin with "- " instead of an indent: one to a line in a terminal
and where the reply is drawn as markdown (the web UI).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
/help: every command under a heading, found by typing, run or put in the
box. /permissions (new): the rules in force by where they were made;
change, add, remove. /status (new): server, model, session, project, MCP
and terminal on one screen, what needs attention marked, enter opens what
changes it. /agents: a menu. Each has its text for where there is no menu
(session/report.ts): over the link, and lembas run now prints a
message-kind command instead of sending it to the model.
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>
Every bus notice was drawn with the warning sign, whatever it said, and a
server that connected said so at each start. A connect now says nothing
(the status bar counts: MCP 2, MCP 1/2); a server that failed or needs a
sign-in gets one line naming it and /mcp <name>. Notices carry a level —
info, success, warn, error — drawn from one table (tui/notices.ts) in the
transcript and in lembas run; the informational ones say so.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Paste placeholders: the extmark is placed from the cursor after the insert
(a paste over a selection put it at the wrong range and sent the bare
label); a placeholder is atomic (cutting into its label removes all of
it); the same paste opens a placeholder only with the cursor where the
first paste left it; a paste of white space is not a clipboard read; a
data URL that is no image is pasted as text. The label is shown in this
transcript only: the prompt event and the session's title get the words.
kitty OSC 5522: the box's input is held during a read, input that arrives
meanwhile means a packet was lost (OpenTUI flushes an unfinished OSC after
about 20 ms), what arrives is believed by its bytes and must be a whole
image — else one line and nothing saved. It can still fail on a stalling
connection, so it is off unless kitty_clipboard: true.
The approval card over the link keeps the whole command (or the tool's
name) as its title and carries _meta.lembas.tool; spec text says so. The
stored end of a turn is tied to the conversation's length, so /undo, a
rewind or a compaction takes it away. A refused call is titled from
schema-parsed arguments. A stored call with no result is failed; the
person's own !command is not failed by the turn's end; 59.96 s is 1m 00s
(conformance case).
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A denied call was sent as a tool_call_update of an id no plain ACP client
had been given (the approval card carries its own), which a client drops:
it is one tool_call, failed, with its title, arguments and reason, and
_meta.lembas.denied. acp.md says so.
Dictated text is inserted at the end of the box instead of setting its
whole text, which dropped every paste placeholder.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
callTitle is the one title of a tool call: on the tool_start event, in the
transcript (argSummary is gone), as running_tool's what (callWhat is
gone), in lembas run and as the link's tool_call title; a refused call
carries _meta.lembas.denied and its title. A finished call shows what its
result adds and how long it took; a denied one its reason and no time; a
call still running when its turn ends is failed.
stopped and failed are drawn as the spec's line on the reply (budget too),
once, in the TUI and in lembas run, and kept with the session (meta
'ended') so a resumed session says it again. waiting_for_subagents counts
the foreground task calls and the session's running subagent jobs. Numbers
go through the terminal's locale; the working line has one clock.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ctrl+v reads the clipboard with OpenTUI's createHostClipboard (macOS,
Windows, Wayland, X11; PNG, JPEG, WebP, GIF, known by their bytes), with
wl-paste / xclip behind it, awaited instead of spawnSync so the screen is
never held. Pasted copies live in the state directory's clipboard/ and go
after a week.
Over SSH: an image pasted as a data URL or bare base64 is decoded,
size-checked, saved and shown as [Image N]; with a forwarded X display the
X clipboard is read; in kitty the terminal is asked for its clipboard over
OSC 5522 (listed first, then read with a name and password so it asks
once), through renderer.subscribeOsc; and when nothing came through, one
line names the ways that work.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
A paste of three lines or more, or over 150 characters, is shown as
[Pasted text N lines] / [Pasted text N chars]; an image as [Image N],
numbered after the highest in the box. They are OpenTUI extmarks over the
label; the content is kept beside them and sent in full (an image as its
@path). Deleting a placeholder removes its content; the same paste again
opens it. The transcript shows the box as it looked; history, /undo, a
refused send and a copy of a selection in the box use the full text.
paste: full shows pastes whole.
The box's offsets are columns: the @file list and the edge-line check now
take text by range instead of slicing by offset.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
pickShell: $SHELL where it exists, else bash, zsh, sh, as a login shell;
on Windows pwsh, then powershell, then ComSpec/cmd, without -l. A spawn
that fails (the runtime's PTY is POSIX's) is a one-line refusal, not an
internal error. The refusals for terminals switched off, a folder outside
the allowed ones, a missing folder and too many terminals say what to do.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
tools/python.json: unavailable is now only "no page of this chat is open"
and says where to open it; texts.no_answer (a page is open but did not
answer) and texts.timeout (the run passed its seconds) are their own
texts. conformance/python.json; the server's tool alone.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
harness/display.md, loop.json display, conformance/display.json.
A tool call has one short title made from its arguments (questions and
patch by what they name, else the first non-blank string among the listed
keys; first line, 80 characters): the same in the transcript, as
running_tool's what and as the link's tool_call title. Pattern and query
now come before path, so a grep is titled by its pattern. Four states
(running, done, failed, denied), a finished call's duration, an edit's
+added −removed counted by the diff's hunks, a command's non-zero exit, a
search's hits; the kinds of block. stopped and failed stay on the finished
reply as the progress text alone. The approval, question and plan cards'
actions. Numbers in the client's locale format; conformance texts plain.
The pure functions (src/session/display.ts) answer the new area; the
clients' drawing follows. progress gains the budget stop; the README's
lost 3.5.0 heading is back.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
harness/phone.md, tools/phone_action.json, loop.json phone, conformance/phone.json.
The LLeMbas server's tool alone (scope llembas, sessions chat), offered once a
message came from the LLeMbas app with the capability phone_actions (new
requirement phone). Actions: alarm, timer, calendar_event, sms_draft,
email_draft, dial, navigate, add_stop, search_nearby, stop_navigation,
open_app, open_url, media, torch, settings_panel, automation_intent. Each
reads its own fields; required fields and value checks give the call's
refusal in the spec's words. The person confirms on the phone every time;
the result is done, declined or failed with what the phone said, or no
answer in time. add_stop carries the route's destination: no map app adds
to a running route, so the phone plans again via the stop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shared-command test caught the four new TUI commands missing from TUI_COMMAND_NAMES, so a
project command could have taken one of their names.
Co-Authored-By: Claude Opus 5.5 <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>
Accept scheduled work (remote.scheduled, off by default) said as limits.scheduled; a scheduled
turn is an agent session marked `scheduled` in the schedule's mode (Edit when none chosen, Plan
refused, lowered to remote.max_mode) with its Min/Max; the answer reports status ok, silent,
failed or cancelled and the final reply. Approvals wait the schedule's wait and go to the person
through the server, then count as denied. _lembas/monitor runs a watch command under the mode's
rules (one that would ask is refused) and answers a hash and an excerpt. Schedule routes of
/api/v2 accept the device's token. team_add under a sub-manager names it (added_under).
Conformance areas scheduled, silent, monitor; team cases changed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
acp.md: a turn without agents keeps the device's own setting (an older server), as before 3.4.0.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
team/team.ts: ids, positions, parents; only the main agent adds, assigns, replaces, stops and
decides; sub-managers; slots; modes inherited and never widened, request options and grants;
findings; team_finish; pause and out_of_context; ended subagents kept; the tree's data.
Seven new tools. A subagent's call is decided by team/delegation.ts (itself, the main agent
through a request, or the person). Its engine does not compact: at pause_at it is paused and
gets one final turn. Every engine says its progress as phase events (session/progress.ts).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
acp.md *Subagents in an agent chat*: capability agents carries the chat's {min, max} (and
subagents: false) down on every turn and _lembas/configure, said (the person's earlier words)
on session/new; the tree, progress, approvals, findings and transcripts come up; what the server
keeps. subagents.md §14. team.json: ten 3.4.0 cases (only the main agent, sub-managers and parent,
slots, modes and request options, whoami, finish, findings, running out of context and replacing,
requests and decisions, assign); a member's own task is refused only_main. subagents.md: the
subagents under a sub-manager that ended by itself move under its parent until it is replaced.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conformance areas progress and delegation pass. delegation.json: own_reason marks the cases
whose deny reason is each project's own.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
progress.md: thirteen fixed phases (queued … failed), each { phase, since, data },
their texts as shared i18n keys (loop.json progress), one line every client draws,
sent beside the old status text in /api/v2 and over the link (capability progress).
subagents.md §5–§13 (supersedes team.md where they differ): only the main agent
adds, assigns, replaces, stops and decides; sub-managers direct those placed under
them; ids, positions, parents; Min above 1 opens slots; permissions inherited and
never widened, request options decided by the main agent, what nobody in the tree
can allow goes to the person; team_finish, findings, running out of context;
transcripts read-only; the tree over the link (capability tree). New tools
team_whoami, team_finish, team_findings, team_request, team_decide, team_assign,
team_replace. Conformance: progress, delegation; team updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
/effort's Subagents row and /team size are a two-handle range from 1 to the cap (left/right move
the handle in focus, tab the other, enter sets both); the dialog gains a range row. Every text says
Min and Max, never fewest/most, and that the count includes this agent: "Subagents: Min 1, Max 4 -
1 is this agent alone". /settings shows the same beside agents.min / agents.max; config schema
and the bounds refusal likewise. CHANGELOG in the 2.0.0-beta.5 section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
loop.json subagents.setting: min/max are "Min" and "Max" (not fewest/most), with a hint and a short
form saying the numbers include the session's own agent - 1 is the agent alone, Max 4 the agent and
up to three subagents. team.md §2 and subagents.md §4 state that, and the UI rule: one range from 1
to the cap with two handles (a slider; two numbers on one line in a terminal). team_add says the
size includes the caller. Conformance team: max 2 is the lead and one task subagent.
Still 3.3.0, unreleased: edited in place.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A task subagent or a team member runs on the session's model unless the
person named another in this session's own messages (team/subagents.ts;
engine.personSaid reads every prompt and mid-turn message, compacted ones
included). Not named: refused; an agent file's own model is not used.
- Another model on the session's one-model server is refused; a one-request
session model is not its own subagent, and nothing else is picked.
- The team is offered when a model could serve: the session's with two
slots, or any usable model off its one-model server; the size note adds
team_own when the session's model cannot serve its own.
- "Subagents" in /effort, /team, /settings and the config schema; the status
bar reads "agents 3/4 · 2 subagents working".
- /context: used of the window, one bar by category, each category's share,
what is free, and "N until auto-compact".
- Conformance runner for the subagents area (26 cases); helper -> task.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- "Subagent" in every text a person or a model reads; "helper" retired
(the team area's step helper_done is now task_done).
- A subagent runs on the session's model unless the person named another
in this session's own messages; task's and team_add's `model` is refused
otherwise. No setting chooses a subagent's model.
- Capacity: another model on the session's model's one-model server is
refused; the session's model as its own subagent needs parallel >= 2 or
no limit; no fallback.
- The agents {min, max} setting is shown as Subagents, offered when a model
could serve; context.note.team_own when the session's model cannot.
- subagents.md, loop.json subagents, conformance/subagents.json (26 cases).
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>
The four team tools (tool/team_tools.ts) on the rules of team/team.ts,
driven from real turns by team/runtime.ts:
- Members run on the subagent job machinery (app.ts spawn with `member`):
background, unattended, their own prompt from blocks/team_member.md
(the whole of team_lead.md for one with lead: true), team_send and
team_read (team_add and team_stop for one that leads). Not jobs to the
model: job_list and the job_* tools skip them; a client over the link
still sees them as subagent jobs named "<name>: <role>".
- The room: messages and reports with their marks, delivered at the next
step boundary or waking a finished member or the idle lead; report
posts to the manager.
- A manager's work calls answer the refusal before the permission check,
by risk class (an MCP tool by its readOnlyHint); the tool list is
unchanged. job_stop and reading bash stay.
- Slots: the lead waits for one before its turn (Esc stops the wait);
members wait in order; task helpers in a team count toward the size
and hold a slot; job_send restarting a helper is refused when full.
- The offer is decided with the prompt and kept with it: a resumed
session takes it from its kept tool list.
- The size: agents.min/max settings, refused outside 1 <= min <= max <=
cap, kept across /new and resume; said in a note on the first message,
after a change, after a compaction and a rewind.
- TUI: /team (tree and room, size, stop a member, dialogs for both), an
"agents" row beside the effort in /effort, "team n/max" in the status
bar. /team works over ACP too.
tests/team.test.ts runs a lead, a member and its report through the app.
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>
VERSION 3.2.0; README's file table, the `team` requirement and a 3.2.0
section; CHANGELOG Unreleased. Two tests that pinned the AGENTS.md
block's absolute root now pin the relative text (context.md §11).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
team.md: a lead adds members (team_add) that work in the background on
the parts they own; members may lead areas of their own. The chat
setting agents {min, max} (defaults 1/4, an instance cap of 32) bounds
the whole tree, task helpers included; a team is offered only where
subagents are enabled and the model serves two requests at once
(capacity.parallel). A manager's work calls — risk write or execute,
bar job_stop and reading bash — answer a fixed refusal while the tool
list stays unchanged. The room: team_send to names or all, delivered
under "[Team message from X to Y:]" at the next step or waking a
finished member; a member's final reply is its report to its manager;
team_read shows the tree and the visible part of the room; team_stop
stops a subtree. Past the model's capacity a member waits for a slot,
the lead first. Size notes in context.note; texts in loop.json team;
prompts blocks/team_lead.md and team_member.md; tools allowed by
default. Conformance area team, written from a reference model.
The CLI embeds the new tool and prompt files; its tools are pending.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
context.md §8: every assistant message of the current turn (after the
last message that started a turn — a step-boundary delivery does not)
carries its reasoning back, as reasoning_content in OpenAI chat and as
thinking blocks in Anthropic; earlier turns carry none, which the common
templates render identically. §11: an agent session's prompt names no
absolute machine path: the environment block names the project and says
paths are relative to its root (loop.json context.env), files outside
the project under home as ~/…; relative paths resolve against the
project root, absolute ones still accepted. agents-missing.md and
init.md no longer name the root. New conformance areas: reasoning, paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
models/schema.json: thinking_switch (the server turns thinking off for
chat_template_kwargs.enable_thinking: false) and capacity.parallel
(single_session is parallel 1). The level `off` exists only with the
switch and sends enable_thinking false and no effort; a model that takes
no efforts has the one level `default`, which sends nothing. The levels a
chat offers are (off) + efforts; one level shows no control, [off, X] a
Thinking switch, more a slider. A start level and a level the model does
not offer follow one rule. quirks.json: thinking-default; acp.md: effort
values are levels. New conformance area: levels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The system prompt is made once per session (start, compaction, model
switch), kept in session_meta and resent byte for byte; it holds no
date. What changes mid-session -- the date, a mode the person chose, a
plan or memory or instruction file they edited, a personality, MCP
instructions that arrived later -- is a <session-note> on the next user
message, stored with it. The tool list is fixed for the session:
plan_submit is always offered and answers unavailable outside plan
mode, the wrap-up keeps the tools and runs no call, a withdrawn tool
stays listed and answers its refusal; the first request waits up to
mcp_wait_ms for MCP servers. Compaction asks for its summary as the
next turn of the same conversation. Cached input tokens are parsed
(incl. llama.cpp timings), stored per request and shown in /context.
Spec: context.md §7/§10, loop.json context.note (+ plan_ended,
plan_own, personal, empty, mcp_wait_ms), modes.json plan.refused,
compact.md without the transcript heading. Conformance area prefix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured on 2026-11-05 against a local model's prompt cache: a harness
that rebuilds its system prompt for every request re-reads the whole
session whenever any part changes (a date at midnight: 16,912 tokens,
99 % -> 0 % cached, 139 s). context.md §10: the system prompt is made
once per session and resent; no clock in it; mid-session changes go as
a <session-note> on the next user message (loop.json context.note); the
tool list is fixed for the session, a requires that comes and goes
answers unavailable instead (plan_submit gains requires: plan); §7: the
compaction summary is the next turn of the same conversation, not a
separate request with a pasted transcript; cached tokens are recorded.
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>
acp.md: GET /v1/usage in the server's 2.0 shape -- month.cost_by_currency,
never summed across currencies, cost_money only with one currency; the
credit fields null and windows empty for a 1.x client and not read by a
3.0.0 one. The device's login asks for models memory link.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
instructions.json and fs_access.json pointed at services/files/*.py,
which LLeMbas never had: the chain is services/workspace.py, the view
services/fs.py with security/access.py. context.json no longer says
"to be written". python's {{seconds}}, {{memory}}, {{output}} and
{{packages}} are implementation-defined; their descriptions record what
LLeMbas 2.0 fills (30 s, 512 MB, 20,000 characters, the standard library
only).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
filesystem.md, spec 3.0.0-draft, and the CLI made to match:
- Paths: absolute in every answer except a result's bracket (context.md),
which keeps the call's path. glob and grep now give full paths.
- A missing file is `No such file or directory: {path}` for every tool
that needs it, with no hint after it: in a chat a hidden file must read
as a missing one. The CLI's "does not exist. Use write to create it." and
"Write it first." are gone; an edit of a directory is `Is a directory`,
glob over a file `Not a directory`.
- write/edit refusals, exactly: "{path} exists and has not been read in
this session. Read it first." and "{path} changed since you last read
it. Read it again before changing it." (no "on disk"), absolute path.
- A listing sorts names in code-point order; `list` with a depth is a
tree indented two spaces a level, marks as in a single listing, cut at
400 lines with a line saying so.
- Skills: where they are found and in what order on each side (the
session's own place first, the person's next, what is shared last), and
the name rule ^[a-z0-9][a-z0-9-]{0,63}$ that skill_manage checks. The
CLI no longer makes names with _ or .; such skills still load.
README's 3.0.0 notes say so; CHANGELOG [Unreleased].
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
context.md and loop.json `context`, spec 3.0.0-draft:
- A stub names only a result in the request being built. A chat on the
server sends no earlier reply's tool results, so a read in the next reply
is answered in full there; the CLI, which resends every result, keeps
stubbing across steps. Said for reads and for repeated listings alike.
- The compaction table is drawn from the reads the summary covers: the
full reads since the previous compaction in turns still in the history,
whether or not the request still carries them. A turn taken back takes
its reads with it. The CLI's dedupe table is exactly that set; a chat
finds it in what it stored.
- Ids are the result's number in the session, in hex, at least 4 digits
(#0001); the examples and the prompt block now use such ids.
- A bracket names the path as the call gave it; what identifies a file
is its absolute path.
Conformance `context`: a `reply` step (a request carrying none of the
results so far) and a case for both rules. The CLI's runner keeps the
history apart from the request; compactionTable takes the reads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"keeps its note until the session is resumed" started `sleep 0.5` and counted
on the turn taking less than that before /new. On a loaded machine (load 7 on
two cores) the turn took longer, the job ended while the session was still
open, and its note went in as a turn instead of waiting. The command now
waits for a file written after /new.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What a user sees change: the CLI uses the server it is logged in to and
nothing else, models by their served names, memory on the server, stacked
instruction files, short tool results that are never rewritten, recall and
show, link protocol 3, and a chat's model or a refusal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- LEMBAS_PROTOCOL, the device protocol and the protocols the CLI logs in to
and links with are 3 alone (harness/acp.md *Versions*). A server listing
only 1 and 2 is refused at login and at every dial — before anything is
dialled — with its version and protocols and "update the server, or use
LLeMbas CLI 1.x with it"; a newer one is told to update the CLI
(ProtocolError). A 4400 stops the link with the same advice. The old
downgrade to protocol 1 is gone.
- session/new's result says `instance`: whether the session's model is the
link's instance's.
- `lembas_model` is the model, full stop: a device not logged in to the link's
instance, a link with no instance (serve --stdio), or a model the instance
does not serve to this device is -32602 with the reason, never a session on
the device's own model. `_lembas/configure` naming such a model is refused
likewise and the session keeps its model.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
acp.md *Versions*: LLeMbas 2.0 and LLeMbas CLI 2.0 speak link protocol 3 and
nothing else, so a 1.x peer and a 2.0 one refuse each other and each says what
to update. A 2.0 server's discovery says `protocol: 3, protocols: [3]` —
`protocol` was frozen at 1 so 1.x clients comparing it could log in; raising
it now is the point. A 2.0 CLI logs in and links only where 3 is listed and
otherwise names the server's version and protocols; a 2.0 server closes a
hello of 1 or 2 with 4400 and "update LLeMbas CLI to 2.0".
Model naming: the served id is the device's ref (one server, no connection
prefix, no second login); the older forms still resolve. A configure naming a
model the device cannot run is -32602 too, and the session keeps its model.
initialize's example says 3; `show` in the client's capabilities.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Harness spec 3.0.0 (acp.md *Memory*): memory records are the server's for the
device as for a chat; everything else in the library is the device's own.
- `library: lembas` (the default when the login's token has the `memory`
scope, or the older `library`) adds the server's /mcp with its `memory`
tool alone, in place of this machine's memory tool; notes_*, knowledge_*
and skill_* are always this machine's. No prompts, resources or
instructions are taken from it.
- The memory in the prompt is the server's: the resource lembas://memory,
read as a session starts (McpManager.readResource) and kept for it — put in
while nothing has been sent, so the prompt never changes under a session.
- A session the client opened (session/new, or opened from the store) sends
its id as `_meta.lembas.scope` on every memory call and on the resource
read (App.setScope); a session of the device's own sends none.
- An instance's `library` context (its knowledge bases) is no longer read:
the knowledge block names this machine's bases only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
acp.md said a logged-in device reads "the resource holding the entries for
the prompt" without naming it, so neither side could implement it. It is
`lembas://memory`: the entries as the memory block of a system prompt shows
them, read as a session starts and kept for it. Only `memory` is taken from
/mcp — notes, knowledge bases and skills stay the device's; the scope rides on
the resource read as on the tool call; a token's older `library` scope counts
as `memory`.
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>
Harness spec 3.0.0 (context.md, loop.json `context`), in session/results.ts,
applied by the engine when a result goes into the conversation and never
afterwards:
- every result is headed by its id ([#0001]); a read also by the path as
given, its lines, the file's length and the first 8 hex digits of the
content's SHA-256; an empty file says so;
- a read of an unchanged file whose lines lie inside an earlier full read is
a stub naming it; a list/glob/grep repeated with the same arguments and the
same result is "Same result as #…";
- output over 400 lines or 40,000 characters keeps head and tail with the
elided line; the full result is kept with the session (a new `results`
table in sessions.db, gone with the session);
- edit, multiedit, write and apply_patch answer with their hunks under a
bracket with the new content's hash; a new file is "Created, N lines.";
- recall (new built-in tool) shows any stored result, or a range of it, also
after a resume; ids are never reused;
- compaction appends the table of the reads still in the conversation to the
summary.
A stub only ever points at a result still in the conversation, so after a
compaction, an /undo or a rewind the file is read in full. compaction.prune
is gone: cutting old outputs in place threw the prompt cache away (an old
config's key is dropped with a warning). blocks/context.md is in the prompt
wherever recall is offered. Conformance runner for the `context` area (11
cases pass).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README linked the page on the forge's own host. It names the page in
LLeMbas CLI's wiki instead, so the spec (vendored by the server) carries no
host name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
conformance/context.json named results #g001…#k001, which are not the
lowercase hex context.md requires (an implementation that finds a result's id
at the head of the result by that rule cannot see them); they are #1001…#5001
now, with the same answers. Its `about` names the CLI's module,
session/results.ts.
context.md §5 says what it left open: a deleted file's bracket, and an
apply_patch over several files — the id alone, then each file in its own
bracket with its change, in the patch's order; a tool's note after the diff.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
instructionChain (spec 3.0.0, filesystem.md): from the boundary — the project
root — down to the start directory, outermost first, each directory gives the
first of AGENTS.md, CLAUDE.md that is a file really inside the project; one
that is not (a link out) is passed over and the walk goes on below it. Before,
only the nearest file counted. The chain's files are named to the model by
their path in the project; agentsBlock reads them all: none means "make one",
and git is settled when any of them settles it.
Conformance runner for the `instructions` area (all 9 cases pass).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The spec's version may be a pre-release (3.0.0-draft). Every tool file is
loaded, with the new fields `sessions`, `requires`, `unavailable` and
`confirm`; the CLI's tools are those not the server's alone and offered in an
agent session (forCli) — a chat's own tools over the server's tree (mkdir, mv,
rm, search, python, the forge verbs) are not built in. blocks/context.md is
known; blocks/workspace.md is the server's alone.
show is built in with `requires: display`: offered only in a session a client
opened over the link when that client said `show: true` (capability `show`);
the device reads the file (at most 1 MB) and sends it with `_lembas/show`.
The harness tests now say 3.0.0's split of tools instead of "the execution
tools are the CLI's alone".
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
blocks/context.md tells the model about stubs and recall; blocks/workspace.md
tells a chat's model its view. blocks/library.md and blocks/prototypes.md are
the CLI's alone. acp.md: `instance` on session/new, a client-opened session
runs on the chat's model and no other (the own-model notice is gone),
capability `show` with `_lembas/show`, memory through the instance. README:
the new fields and the 3.0.0 section. VERSION 3.0.0-draft.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
context.md and loop.json `context`: every result has an id, a read carries its
lines and content hash, an unchanged re-read (or a range inside one) is a stub,
large output keeps head and tail with the elided line, recall shows any stored
result, edits answer with their diff, a repeated listing or search with the
same result is a stub, and compaction adds a table of reads and empties the
dedupe table. Nothing already sent is ever rewritten. Conformance area context.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
filesystem.md: paths, the node kinds dir/file/mount, the access levels
none/ro/stage/commit with grants and floors, the exact error texts, and the
rule that a granted path under one that is not is reached only by its full
path. Listings, search, indexing by tokens (480 a piece, 64 repeated),
instruction files stacked from the boundary to the start directory, skills,
and memory kept by the server for both sides. Conformance areas fs_access,
instructions and chunk_tokens, answered from a reference model of the rules.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every tool says its `sessions` (chat, agent or both). The file tools read, write,
edit, glob, grep and list are shared; mkdir, mv, rm, search, python and the forge
verbs (commit, branch, pr, merge, tag, release) are the chat's; show and recall
are new and shared. New fields: `requires` (page, display, forge) with the exact
`unavailable` answer, and `confirm: always` for merge, tag and release.
knowledge_*, notes_search, note_view and note_manage leave the chat. Default
rules for the new tools; modes.json says what `confirm` does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A second `lembas login` to the same instance overwrote the old token without
signing it out, leaving an offline twin of the device holding its agent chats.
The old token is now signed out over the TLS that just worked, naming the new
one, so an instance that knows `replaced_by` moves the chats; a failed sign-out
is said.
`login --ca` kept the path as typed, so a service started in another directory
dialled with no CA. It is kept in full now, the link trusts what discovery got
through with (the system's bundle included), and "could not reach the instance"
says why: a CA file that is gone, or what discovery met.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An image counted as half a million tokens: the context estimate measured its
base64 as text, so a 1-3 MB screenshot read as "context at 150-280%" the
moment view_image added it, and the session compacted after every image.
An image now counts by its dimensions (28 px patches, at most 16k tokens, a
flat 1600 when unreadable) everywhere the CLI estimates -- the meter, pruning,
/context and the no-usage fallback of all five dialects. Images over 1600 px
or 500 KB are shrunk to 1600 px when ImageMagick is there.
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>
The CLI's facts in memory, notes_search, note_manage, skills_list,
skill_view and skill_manage are `variables` now, filled with the CLI's own
values (src/tool/spec-vars.ts): every description and parameter list the CLI
sends is word for word what 1.1.0 said, except note and document ids, which
are strings on both sides (a number is still taken). Descriptions are
filled by the prompt texts' rules, parameter descriptions too. `narrow`
says what a project offers of a shared tool's parameters. Memory's changes
are one pure function (applyOps). Conformance: fill, narrow, memory.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The turn log answered a repeated id with what that turn had answered, which
was right for a prompt sent twice over a dropped link and wrong for a turn
the web UI had just rewound to edit: the same id came back with the old
reply. rewind now returns the ids it took out, both handlers forget them from
the log, and the turn file drops them too, or the next load would have
brought them back.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>