Commit Graph
84 Commits
Author SHA1 Message Date
HomerandClaude Opus 5.5 ff51eb5323 The ask id in the terminal's form: approval#12, /answer <n> as before, a cut ends in …
The terminal's round shipped `<kind>#<id> <keys> <text>` with a numeric id
(1-9 digits) and sends /approve <id>, /always <id>, /deny <id> when an id
was shown, /answer <n> without one. lembas_ask now says approval#12 yn …;
ids are a counter per display; /answer with one word is the option, with
two the id and the option. A lembas_ask value cut to state.max_bytes ends
in U+2026 (ask_id.ellipsis), the placed kind too.

Conformance: terminal.json ask_id cases redone (+7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 08:32:44 +00:00
HomerandClaude Opus 5.5 a302f22957 Texts and duplicates: one word for the server, one containment, one mode order (T6-T9, duplicates 1 and 4)
- User texts: "LLeMbas server" (the word used most) instead of "LLeMbas
  instance"; "sign-in" instead of 1.x's "connection"/"webui connection";
  "forge" out of SECURITY.md, the config schema, get.sh's help (earlier
  commit) and the workspace prompt block. --help: lembas logout [name],
  service run [name], files_that_run_code in remote --json.
- within.ts relativeWithin(): the four relative()-and-".." copies (showPath,
  the editor's and autocomplete's paths, the prompt's paths) and read.ts's
  root+"/" use the one containment. paths.json: a ..cache env case.
- permission/modes.ts: the mode order from modes.json, stricterMode and
  clampMode — the seven tables in app, config/load, tool/settings,
  session/commands, acp/agent, acp/scheduled and team/delegation go.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 08:32:44 +00:00
HomerandClaude Opus 5.5 591198c48f Approvals bind to what was shown: an id in lembas_ask (terminal point d)
- loop.json terminal.surface.ask_id (spec 3.15.0): # and four characters,
  new for each approval and each question of a card; texts.wrong_id;
  feature terminal_ask_id.
- lembas_ask: "approval yn #k3f9 terminal_run: make test". The released
  terminal's parse_ask (kind, keys, text) reads it with the id at the start
  of the text, so nothing breaks there.
- /approve, /always, /deny, /answer take the id as their first word; another
  id decides nothing and is said; no id answers what is asked now.

Conformance: terminal.json kind ask_id (+6). Display test for the binding.
Also: the await test expects `reported` for an end a user-var record alone
reports (the previous commit's rule).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 08:32:44 +00:00
HomerandClaude Opus 5.5 7804909413 A status record that came by user var is never sole evidence (terminal point c)
- promptFree: under a via=uservar record the input mark is not read; the
  pane's last line decides whether the prompt is free.
- awaitCommand / awaitPlaced mark an end reported only by such a record
  (reported); runAnswer and placedAnswer add run.texts.unverified and do not
  give the exit status as known.

Spec: acp.md, The user var route. Conformance: terminal.json prompt +2,
answer +1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 08:32:44 +00:00
HomerandClaude Opus 5.5 026e4f3219 A shell line that looks as if it holds a secret is not sent: one table (terminal point a)
loop.json terminal.secrets (spec 3.15.0) replaces
terminal.complete.history_secret: named patterns (assignments and set/setenv
of key/token/secret/password/credential/auth names, client password options,
-u user:pass, Authorization/Bearer/Basic, user:pass@ in an address, key
prefixes, a long high-entropy word), one entry for history lines alone.

- lembas complete --shell: a matching typed line makes no request — status 0,
  empty output, texts.secret on stderr, the rule's name in --debug.
- History lines are filtered by the same table.
- A terminal context's block with such a command: placeholder, no output.

Conformance: terminal.json kind secret (40 ordinary commands that must not
match, 26 that must), a context case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 08:32:44 +00:00
HomerandClaude Opus 5.5 87b9a711d9 Device files open regular files only; a terminal context is removed only once it is one (L-S2, L-S6, terminal point b)
- acp/files.ts openRegular(): stat first, regular files only, opened
  O_NONBLOCK and checked again; fs/read, stat's hash and the base check use
  it. A named pipe under a root stopped the service.
- terminal/context.ts: judgeFile refuses the CLI's own directories (own);
  takeContext reads, parses and only then removes. A file that does not read
  as a context is left where it is. A context with no command and no screen
  is valid and adds nothing (chip_empty; refusals.empty removed).
- lembas terminal starts with a refused --terminal-context and shows the
  sentence as a warning.

Spec: acp.md (fs/read, Terminal context), loop.json terminal.context.
Conformance: terminal.json kind file +3 (own), the empty case now accepted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 07:56:15 +00:00
HomerandClaude Opus 5.5 ead689301a "Always" on a path outside the project makes its external_directory rule (S11, S12)
permission/rules.md §3 (spec 3.15.0): an always answer to a call asked
about for reaching outside the project also makes an external_directory
rule per such path, for the session only, never saved to a project.
evaluate's Decision names those paths (outside); alwaysRules() is what the
engine and the conformance runner both make. A project rule that cannot be
saved no longer fails the approved call.

Conformance: rules.json `call` (+3).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 07:49:48 +00:00
HomerandClaude Opus 5.5 9945b76f74 The settings tool is the person's alone; files that run code have one definition (S9, S10)
- permission/rules.md §1, defaults.json user_only (spec 3.15.0): for a call
  of the settings tool only the default and user layers are read. A
  project's key that matches it (settings, sett*, *) and a rule made in the
  session are not read for it; the loader drops a project key that matches
  the name and says so.
- loop.json files.runs_code.project_dirs (was project_dir): .agent and
  .lembas. src/runs-code.ts is the one definition; edit mode's guarded files
  and device files both read it.

Conformance: rules.json +7, device_files.json +6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 07:43:22 +00:00
HomerandClaude Fable 5.2 299bac55b0 Texts that named what does not exist (T1-T5, T16, T21), and a check for tool names
- family/anthropic.md: plan_write/plan_update and their statuses, not the
  todo tool removed in spec 1.1.0.
- ask_user's result: 'call ask_user again', not 'question'.
- --help: -m takes a model's id; settings.json's example likewise.
- /trust makes the project directory, so 'no project directory yet — /trust
  creates it' is true; it points at /reload.
- SECURITY.md: auto mode.
- tasks.json: the plan, not 'todo', is the checklist of the task at hand.
- tests/harness.test.ts: no prompt text, tool description or tool result may
  name a tool the registry does not have, or a former name of one.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 21:14:30 +00:00
HomerandClaude Fable 5.2 83e51137c8 The remote limits are judged on every request of an open session (L-M1, L-S1, L-C1)
The limits are read live, but only load() and session/new asked them: a
session already in memory (the hub's, across links), a terminal's shared
session and an open web terminal were never judged again. lembas remote
disable, a removed root, a lowered mode or terminal off changed nothing for
them.

- get() and terminalFor() judge the session by the rule a new one in its
  directory is judged by; one that no longer fits is refused and halted (turn,
  queue, subagents, jobs); one that fits is lowered to max_mode. cancel,
  status and delete are always answered; a session shared by name stays.
- The link applies a change at once (enforce) instead of waiting for a
  request, then redials as before.
- terminal input is judged like terminal/open; a refused terminal is closed
  with a reason.
- sessions/list needs a cwd on the link; status and title of a session out
  of reach answer as for one that does not exist.
- One within(path, dir) replaces the containment copies; the two written
  with relative() called a child named ..cache outside.

Spec: acp.md. Conformance: limits.json (new, 24 cases), paths.json op
within. Link tests against a stand-in server for each of the four changes.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 21:12:57 +00:00
HomerandClaude Fable 5.2 95706bc46c A custom command's shell substitution is a bash call of the session (M3, S19, S20)
`!`…`` in a command file ran through bash -c with the arguments pasted in
and only the hardline checked — for a prompt from the link too, before any
mode applied. It is now judged as a bash call of the line in the session's
mode and rules and runs only on allow; the arguments are positional
parameters and ARGUMENTS in the environment; placeholders are filled in one
pass; a substitution has the bash tool's environment and a 10 s limit.

Spec: permission/rules.md §6.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 21:04:32 +00:00
HomerandClaude Fable 5.2 cc42bbc390 grep returns no line of a file read would ask about (M2)
The grep tool's permission is judged for the directory it searches; the
files in it were then read with rg --hidden and their lines returned, so a
.env came back unasked in manual and plan mode. Each file a match comes from
is now judged as read of it would be (the rules and the mode as they are);
what is not allowed is left out and named after the matches.

Spec: filesystem.md, 'A search does not read what read would ask about'.
glob/list return names only and are unchanged; show is the person's view.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 21:02:58 +00:00
HomerandClaude Fable 5.2 4a2a97ffc7 Permissions: a command is judged by what it touches, and fails closed (M1, S1, S13, S18)
The files a command names were read from its spelling. Brace lists, ~name,
variables and a path riding on an option read protected files unasked in
manual mode; in auto mode a command could write a protected path; a very
long line kept the judge busy for seconds; the force-push floor matched the
word "main" anywhere and missed deletions.

- permission/rules.md §5 (spec 3.15.0): words are read with their quoting,
  expanded as far as modelled (braces, ~, $HOME/$PWD, globs); anything else
  is unresolved, and an unresolved word is never allowed by a rule. Option
  values, name=PATH operands, redirections and cd are read.
- A path a line may write (a redirection's target, or named by a program
  that is not a known reader) that is a protected path is refused in every
  mode.
- A line over 32 KiB is asked about in every mode without being analysed;
  prefix() no longer joins every prefix of a command.
- force-push-main is a reader of the push's refspecs (check: git_push).

Conformance: permission.json 39 -> 99 cases, hardline.json 44 -> 69.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 21:01:22 +00:00
HomerandClaude Fable 5.2 99081c4ed4 The terminal is LLeMbas TERM: terminal contract 4, harness spec 3.15.0
LLEMBAS_TERM, LLEMBAS_TERM_PANE, LLEMBAS_TERM_EXECUTABLE, LLEMBAS_TERM_STATUS_DIR,
llembas-term-status=1, llembas-term-input=1, the llembas-term directory and the
llembas_term_status user var are the names. The ones from before the rename are
also read — a whole family at a time, the new one first — so the terminal's
releases before it work unchanged. One place decides: src/terminal/env.ts
(terminalNames, namesOf, isMagic). lembas --version --json: terminal_contract 4,
capability terminal_names_2. connection.json: product term.

The terminal's tests run in both spellings (scripts/test-terminal-names.sh, in
scripts/ci.sh).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 20:15:36 +00:00
HomerandClaude Fable 5.2 8611d245da A placed command that was entered no longer stands at the prompt: lembas_ask is emptied and the state is the tool's
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 13:48:21 +00:00
HomerandClaude Fable 5.2 f137090622 Contract 3: conformance cases and tests — placed commands with a stand-in person, the settings store on a real disk
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 13:36:52 +00:00
HomerandClaude Fable 5.2 79369f0003 Terminal contract 3: manual mode places the command at the prompt; the terminal's settings store, machine-wide and per directory
terminal_run in the display's manual mode types the command without Enter and opens no card;
the call waits for the person and answers ran, dismissed, left or unknown. lembas terminal
settings reads, sets and forgets; the display and lembas complete use what holds in their
directory. lembas complete: --cwd may be left out, --debug says each decision.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 13:32:50 +00:00
HomerandClaude Fable 5.2 0d1ecbe530 Harness 3.14.0, terminal contract 3: a command placed at the prompt in manual mode, the terminal's settings machine-wide and per directory
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 13:24:04 +00:00
HomerandClaude Fable 5.2 e9ea9e4f43 The display in a real PTY (smoke), the changelog, and no team note in a display's resumed session
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 12:02:05 +00:00
HomerandClaude Fable 5.2 a15df5f870 The terminal's display: lembas terminal, a display-only surface for a LLeMbas terminal (contract 2)
A header, the conversation, one row per tool call and cards; input is what the terminal
writes to the pane. The terminal profile of tools (no bash, no file tool), two modes, a typed
command waited for by the pane's status record, context that continues, one conversation per
window, the terminal's two models. The TUI in a split pane keeps working for contract 1.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 11:59:53 +00:00
HomerandClaude Fable 5.2 968844668d Harness 3.13.0, terminal contract 2: the terminal's display, a typed command waited for, context that continues, the terminal's two models
Spec first. The CLI is the engine behind a LLeMbas terminal: a display-only surface
(lembas terminal) in place of the TUI in a split pane, which stays for a terminal
written for contract 1. Offered: terminal client only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-02 11:44:48 +00:00
Homer d677dec186 Merge remote-tracking branch 'origin/round/connection' into round/merge
# Conflicts:
#	CHANGELOG.md
#	tests/conformance.ts
2026-12-01 20:36:11 +00:00
Homer f4b0232a95 WIP: connection round, work in progress saved when the session was interrupted 2026-12-01 20:30:41 +00:00
HomerandClaude Fable 5.2 31f9199155 terminal: lembas_state only at the prompt box; one write of command and question; sessions --json
- lembas_state is empty until the TUI's prompt box takes what is typed, and
  while a menu, panel or subagent's view is in front of it: the first `idle`
  means a typed line reaches the box.
- /terminal-context is in no menu (found only in a LLeMbas terminal); a test
  drives the real Root with the terminal's one write — the command line,
  Enter, the question as a bracketed paste, Enter.
- `lembas sessions --json`: the recent sessions as one array.
- Spec: those three, and that a terminal decides by terminal_contract and
  capabilities, not by the version number.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 19:56:31 +00:00
HomerandClaude Fable 5.2 07f4d9715e terminal: the tools in no list outside a LLeMbas terminal, also for a session carried on there
A session whose prefix was kept before the terminal tools existed, or in a
LLeMbas terminal, listed them when carried on outside one. The headless
approval offers a typed command once only; the state publisher is started once.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 19:22:44 +00:00
HomerandClaude Fable 5.2 452e6e0fb1 harness 3.12.0: a terminal as the client
The contract between a terminal emulator with LLeMbas built in and the CLI,
written into the spec before the implementation that follows it:

- acp.md, "A terminal as the client": recognising the terminal by its
  environment (LLEMBAS_TTY, LLEMBAS_TTY_PANE, LLEMBAS_TTY_EXECUTABLE), the
  session's state as user vars, the terminal context file, the tools
  terminal_run and terminal_read, `lembas complete --shell`, and what
  `lembas --version --json` says.
- context.md §12: the <terminal> block of a message.
- permission/rules.md §4: a command typed into the person's terminal is
  judged as bash would judge it, then asked every time outside auto mode.
- tools/terminal_run.json, tools/terminal_read.json (requires: terminal,
  offered: main); loop.json `terminal`; conformance/terminal.json.

The CLI's alone: a server offers none of it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 19:18:39 +00:00
HomerandClaude Fable 5.2 7c0d885784 harness: LLeMbas connection 1 — one way for every product to connect
New `connection.md` and `connection.json`: the address rule, discovery and its
outcomes, identity (`llembas-<product>/<version>`), versions judged both ways,
a refused token, the link's handshake, close codes and liveness, the one
reconnect schedule, state between programs as codes, and the table of
conditions, codes and sentences. Conformance: `address` (47 cases), `version`
(31), `errors` (81), answered by `src/lembas/connection.ts`.

`acp.md`: a failed turn is reported in the prompt's answer
(`_meta.lembas.error`); `_lembas/complete` as the code reads it (`sessionId`,
`open`, `context`, `too_large`); the link's close code 4409 for a device
replaced by a newer link of itself, and `linked` only once `initialize` is
answered; `clientInfo`, and the answer to a client that says a higher protocol.

Two points are written as open, not as rules: which address a client stores,
and `min_clients` in discovery.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-12-01 19:14:56 +00:00
Homer f99269151f Add live LiNA-style side displays, session-aware autocomplete context, and IDE session resume 2026-11-26 19:14:26 +00:00
HomerandClaude Fable 5.2 aba74cacb1 An editor that reads but does not write: a saved file is edited on disk, an unsaved one refused
ci / check (push) Canceled after 0s
A client offering fs.readTextFile without fs.writeTextFile left the agent
unable to change any file it had read through the editor: with no write
to ask, every edit was answered "refused the write".

Spec (3.11.0, acp.md Unsaved text; conformance editor.json kind buffer,
2 cases more: 51): with such a client the device writes the disk. For a
file the session read through the client it asks for the text once more:
equal to the disk's, nothing is unsaved and the disk is written; different,
the call is refused with a sentence asking for the file to be saved in the
editor first.

Tests: both branches against a client that only reads, and a client that
writes (buffer and disk before it answers) taking two edits and a new file.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 12:15:05 +00:00
HomerandClaude Fable 5.2 e8a6cbeb06 spec 3.11.0, after review: judged again after every wait, files that run code, unsaved text never replaced from the disk
Device files:
- Changes run one at a time on a device, and a method that waits for
  anything between judging a path and acting on it judges the path again:
  it goes on only when the path is still allowed and still the same place
  (conformance device_files.json, kind again). What is read is read through
  the file that was judged, held open.
- Files that run code - git's own directory, a project's agent
  configuration, the user's start-up files (loop.json files.runs_code) -
  are read, and changed only where the device's new setting
  remote.files_that_run_code is on. Off by default, global config only,
  said as limits.files_that_run_code in the hello and initialize; refused
  with the reason runs_code and a sentence naming the setting.
- An upload is capped in all; part files are never listed or found and are
  swept by the next process; nothing of what a link that leads out points
  to is said; large work does not stop the device answering.

An editor as the client:
- ACP's fs capabilities are honoured on serve --stdio only.
- Text the session read from the editor is never replaced from the disk: a
  client that does not give it again, or refuses the write, refuses the
  call; a write nobody confirmed is not repeated on the disk. Only the
  read tool and a write that ran count as reading (kind buffer).
- Rewrites: at most editor.rewrite.concurrent_max at once, all stopped with
  their client, a cancel taken at any time.
- The editor block: a closing tag inside a selection or a diagnostic cannot
  end it; a typed message that begins like the block is shown as typed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 12:06:03 +00:00
HomerandClaude Fable 5.2 5be00889d1 spec 3.11.0, amended while implementing: the server's error shape, whole folders
- The HTTP API: /v1/lembas/* answers errors in OpenAI's shape
  ({ error: { message, type, code } }); the device passes message on
  unchanged. 404 with a sentence is a model that is not the account's, a
  bare 404 a server before 3.11.0; 429 and 400 said. _lembas/complete's
  reasons gain unknown_model, busy and invalid; /v1/models carries no
  autocomplete flag, what a model may be picked for is read from allowed.
- Device files: a folder that holds the CLI's own files or a protected path
  is not deleted, moved or copied whole (conformance device_files.json,
  4 cases more: 35).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 11:42:03 +00:00
HomerandClaude Fable 5.2 e427fa8ac2 spec 3.11.0: an editor as the client, device files, files that are not text shown in the chat
ci / check (push) Canceled after 0s
The harness spec for the editor round, written before the implementation.
Three capabilities, one prompt text, one tool's description; no new tool,
and nothing about permissions or the hardline changes.

acp.md, "An editor as the client" (capability editor; a client says
clientCapabilities._meta.lembas.editor: true):

- _lembas/complete: prefix and suffix in, the insertion out, through the
  server's POST /v1/lembas/complete. No session, nothing read per request;
  a newer request cancels the older, which is answered
  { text: "", cancelled: true }; _lembas/complete/cancel by the client's
  own id in the params.
- _lembas/edit: a selection and an instruction in, the replacement out. One
  model request with no tools (prompts/tasks/rewrite.md), streamed as
  _lembas/edit/delta, _lembas/edit/cancel. Nothing is written.
- _meta.lembas.editor on session/prompt: the file in front, the cursor, the
  selection, diagnostics and open files, said to the model as one <editor>
  block after the person's text.
- ACP fs/read_text_file and fs/write_text_file, where the client offers
  them: the file tools read its buffers and write through them; any failure
  falls back to the disk; permissions are judged exactly as before.
- Edits as ACP diff items on session/request_permission and on a finished
  edit's tool_call_update, for a client that said editor: true.
- _lembas/models and _lembas/editor/settings (GET/PUT /v1/lembas/editor).

acp.md, "Device files" (capability fs, on the link only): _lembas/fs/list,
stat, read, write, mkdir, move, copy, delete, search inside remote.roots.
Symlinks followed before a path is judged; never the CLI's own files or a
protected path; read-only where the device allows plan mode only; a write
checked against the hash the client last saw; a delete goes to the trash
or is refused until the client says permanent.

acp.md, _lembas/show (capability media): to a client that said media: true
the show tool hands over a file that is not text by a handle the client
fetches with _lembas/show/read while the request is open. The kind sent is
a hint from the name; the client decides from the bytes.

The HTTP API gains POST /v1/lembas/complete and GET/PUT /v1/lembas/editor.
loop.json: editor, files. Conformance: editor.json (39), device_files.json
(31), show.json (18) - skipped here until their runners exist.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 11:10:44 +00:00
HomerandClaude Fable 5.2 0ea110c1d3 A steered message is given to the model once; a prompt's turn carries its late steers too
ci / check (push) Canceled after 0s
Spec (3.10.0, unreleased; part of capability harness_turns), acp.md
_lembas/steer:

- A session/prompt whose turnId is the messageId of a steered message the
  device still knows does not run. It is answered at once, stopReason
  "end_turn", with _meta.lembas.steered: "taken" (the model has been given
  it), "carried" (it waits for the next turn's first step) or "waiting" (it
  is in the running turn's queue). A client that lost the link and cannot
  tell what became of a message can send it again safely. An id handed back
  as unsent is the client's again and runs. The ids of the last 200 messages
  taken in are kept with the session, across a restart.
- A prompt's turn that ends with no link up carries its too-late steers to
  the next turn's first step, as a turn the harness started does: unsent in
  an answer nobody reads was a message lost. With a client there, unsent as
  before.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 17:43:12 +00:00
HomerandClaude Fable 5.2 9f26316a49 session/cancel may name its turn: a queued prompt is taken back, the running turn left alone
ci / check (push) Canceled after 0s
A prompt can wait behind a turn its client did not start, and ACP's cancel
names no turn: a client stopping a reply whose prompt still waited stopped
whatever ran instead, and its own prompt ran later with nobody following.

Spec (3.10.0, unreleased; part of capability harness_turns): an optional
_meta.lembas.turnId on session/cancel. Running: stopped. Queued: taken out
of the queue, its session/prompt answered stopReason "cancelled" at once (a
scheduled one with scheduled.status "cancelled"), the running turn not
touched, the id still known. Neither: nothing. Without the id: the running
turn, as before. Sent as a request, the cancel is answered
{ cancelled: "running" | "queued" | "none" }. conformance/cancel.json, 7
cases (acp/turns.ts cancelOf).

Device: acp/agent.ts (a prompt that waits can be withdrawn), and for a
session a terminal runs acp/share.ts (hub/cancel as a request with the
turn; a web prompt not yet started there is withdrawn, and nothing is sent
when its place comes). A terminal of a build without that request is not
told to stop whatever runs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 16:09:21 +00:00
HomerandClaude Fable 5.2 1f3eb92666 spec 3.10.0, amended: a run waits for its subagents; a session with work out; Stop and steer said whole
Amended before any release carried 3.10.0, after a review of the implementation.
No capability, field or method is added.

- acp.md, Scheduled work: a scheduled turn does not end while a subagent it
  started is still out. The turn stays open (waiting_for_subagents), each
  report comes into the same turn, the answer's text and report are from the
  last reply. Background commands are not waited for. Stop on a scheduled
  turn, and any other end with subagents still out, stops them.
- acp.md, A session that still has work out: with no turn running, a working
  or waiting subagent, a report about to wake the main agent, or a background
  command makes the session not idle for the device: the link is not closed
  for a change of limits, a service does not start again for an update, and
  a terminal that opens the session is refused in words.
- acp.md, session/cancel and A turn the harness starts: Stop stops the turn
  and no subagent; a turn stopped while it waited for a slot is in the
  history like any stopped turn; undelivered notes are kept with the session.
  A steer nobody could be handed is kept with the session and taken in at the
  next turn's first step, never also handed back; the task end that carries
  unsent comes before the inbox event that empties the queue. A wake that may
  not start a turn leaves the session idle and the note kept.
- reports.md §2: the run is the schedule's turn, whole.
- conformance/outstanding.json (8 cases) and its runner,
  src/session/outstanding.ts.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 15:26:31 +00:00
HomerandClaude Fable 5.2 2469709dc0 spec 3.10.0: a turn the harness starts is a turn like any other over the link
A note that wakes an idle session (a finished job, a subagent's or a team's
report) already had an id of its own on its task and prompt events. The spec
did not say what a client may ask about such a turn. acp.md now does, in a
section of its own and on each method:

- capability `harness_turns`;
- status: busy, the turn named, then lastTurnId;
- steer: accepted; what the turn ended before taking in comes back as
  `unsent` on its `task` end event;
- cancel stops it; a prompt waits behind it; compact and rewind are refused;
- history: its user turn carries `machine`, its turnId and the whole note;
- the order of its events, that turns never overlap, and what two notes in a
  row are;
- the client never sends such a row to the device as a prompt.

conformance/reattach.json (9 cases) is the client's decision for a row after a
restart, for a person's turn and for the harness's; the CLI keeps that rule in
acp/turns.ts for the cases, as it keeps the client's model rule.

blocks/team_lead.md, one bullet more: a report starts the main agent's next
turn by itself; it answers the person then, unasked, and never tells the
person to ask again.

Clarified, not changed: on a machine turn's prompt event, `text` is the line a
transcript shows, not the whole note.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 12:52:17 +00:00
HomerandClaude Fable 5.2 55706542a4 Review of spec 3.9.0: a schedule's run is never a person's turn
ci / check (push) Canceled after 0s
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>
2026-11-18 00:45:03 +00:00
HomerandClaude Fable 5.2 18e9117ed3 A subagent's own automatic compaction is background work too
ci / check (push) Canceled after 0s
Spec 3.9.0, interactive.md §1 and §3: when a subagent's model is
interactive-only, the summary of its conversation is asked of that model's
twin, else of a default that is not interactive-only, else it is skipped —
said once, to the session the subagent works for — and the subagent goes on.
Before, only the session's own compaction went elsewhere.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-18 00:27:54 +00:00
HomerandClaude Fable 5.2 90cccac8bc spec 3.9.0: interactive-only models
ci / check (push) Canceled after 0s
Still 3.9.0, unreleased. A model served through a connection its provider
sells for a person's own turns only says interactive_only: true.

- interactive.md: what is interactive and what is not; scheduled work never
  runs on such a model (a schedule may not name one, a run fails with the
  sentence, a device refuses the scheduled turn itself and its subagents, a
  one-shot run with no terminal ends at once); a session's background calls
  — its title, its compaction — go to the model's twin, else to a default
  that is not interactive-only, else are skipped or refused in words.
- models/schema.json: interactive_only. loop.json: interactive (the field,
  the reason, the two sentences, what each background call does).
- acp.md: the field on /v1/models, data.reason interactive_only, the run's
  model.
- conformance: interactive.json (twin, background, scheduled); three cases
  in last_model.json.

The rules as functions, for the cases; the CLI's wiring follows.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-18 00:14:12 +00:00
HomerandClaude Fable 5.2 2add5695a6 spec 3.9.0: the model last used in a directory; Chat and Agentic schedules
ci / check (push) Canceled after 0s
The harness spec, written ahead of both implementations.

- acp.md: a new section, "The model last used in a directory" — what the
  device remembers and when, how a session of its own starts, what
  _lembas/directories says (model on a Dir, list: false, capability
  directory_model) and the client's rule. Scheduled work: the two types of
  schedule, the run's model, and that a run never becomes the directory's.
- permission/rules.md §2: a narrower rule that a later one narrows again is
  set aside, so .env.example is read after a broad allow as before it.
- conformance: last_model.json (start, record, client), six cases in
  rules.json.

The CLI's side so far: the rule lookup, and the three rules of the new area
as functions; the memory itself and the link follow.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-17 22:45:26 +00:00
HomerandClaude Fable 5.2 89e9e47ecc spec 3.8.1: a page for what is to be seen, a shown file for what has to run
ci / check (push) Canceled after 0s
The pages block now says that something the person asks to see in the answer
is written as a page, not as an HTML file opened with `show`, and that a page
is static: what has to run is said to be beyond a page and, where the model has
`write` and `show`, written as a file and shown. A text; nothing else moves.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-13 14:25:25 +00:00
HomerandClaude Fable 5.2 ca849facb2 spec 3.8.0: pages are static
ci / check (push) Canceled after 0s
A scripted page in a sealed frame can still send data out (a WebRTC
datagram), and a document without script can make the browser resolve a
chosen name (link rel=dns-prefetch, preconnect, prefetch). So a page is
static everywhere: HTML, CSS and inline SVG. pages.md §6, the prompt block
and loop.json pages.static say what it may hold — the listed elements and
attributes, no script or event handler, no link, meta, base, frames,
media, canvas or forms, no address but #fragment and an inline data:image,
no @import or url() that fetches — and what a client that shows pages
does: rebuild the document from the allow-list, a frame with scripts off,
fixed height with its own scrolling, Open larger in place; a client that
cannot guarantee it shows the note. Charts are inline SVG the model writes
out. conformance/pages.json gains the static cases (src/pages/static.ts
answers them); the fence, title, note and projection are as they were.

reports.md: the creator of a schedule that runs once may store always
(scheduled.notify.one_shot_default); a device without the reports
capability is never sent an instruction naming report_write — it gets the
3.5.0 prompt (the [SILENT] hint for `when`, none otherwise).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-13 10:47:07 +00:00
HomerandClaude Fable 5.2 97fb03210a Harness spec 3.8.0: reports, HTML pages in answers, which permission rule decides
ci / check (push) Canceled after 0s
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>
2026-11-13 09:17:49 +00:00
HomerandClaude Fable 5.2 8ad31deaa8 Review of the round: placeholders over a selection, the kitty read, titles, the stored end
ci / check (push) Canceled after 0s
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>
2026-11-12 10:32:04 +00:00
HomerandClaude Fable 5.2 495f89006c Review fixes: a refused call is announced over ACP; dictation keeps a placeholder
ci / check (push) Canceled after 0s
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>
2026-11-12 10:10:51 +00:00
HomerandClaude Fable 5.2 14a35d04b6 Harness spec 3.7.0: python says why it could not run
ci / check (push) Canceled after 0s
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>
2026-11-12 09:42:10 +00:00
HomerandClaude Fable 5.2 bf44371841 Harness spec 3.7.0: one display in every client
ci / check (push) Canceled after 0s
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>
2026-11-12 09:39:32 +00:00
HomerandClaude Opus 5.5 38a52d2e7f Harness 3.6.0: phone conformance uses fictional places
ci / check (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 16:48:19 +00:00
HomerandClaude Opus 5.5 6da9c7fcd0 Harness spec 3.6.0: phone_action, done on the person's phone and confirmed there
ci / check (push) Canceled after 0s
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>
2026-11-10 16:32:15 +00:00
HomerandClaude Opus 5.5 788db0ff4d Harness spec 3.5.0: the watch command's hash puts the exit status after the bytes, so the output is hashed as it streams
ci / check (push) Canceled after 0s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 12:13:38 +00:00