diff --git a/Architecture.md b/Architecture.md index 0d9e78a..56d1c20 100644 --- a/Architecture.md +++ b/Architecture.md @@ -258,7 +258,11 @@ renderer and gives the terminal back before any fatal error; `app.tsx` is `Root` permission, question and plan cards, the spinner, the status bar, the todo list, the first-run and setup screens; `commands.ts` the built-in slash commands; `palette.ts` and `theme.ts` every colour; `clipboard.ts` copies by OSC 52 and the -system clipboard. **Jobs**: `state.ts` keeps the session's jobs from the `job` events (running +system clipboard; `paste.ts` keeps the prompt box's paste placeholders (`[Pasted text 40 lines]`, +`[Image 1]`: OpenTUI extmarks over the label, the content beside them, sent in full); +`kitty-clipboard.ts` asks a kitty terminal for the image on its clipboard (OSC 5522), which is how +one crosses SSH; `project/image.ts` reads the machine's own clipboard and recognises an image +pasted as a data URL; `locale.ts` writes numbers as the terminal's locale does. **Jobs**: `state.ts` keeps the session's jobs from the `job` events (running first, an `unseen` flag per job); the status bar counts them; `/jobs` (`commands.ts`) is a live picker — `Enter` opens, `k` stops; `components/jobview.tsx` is a command's output following its tail; `components/subagent.tsx` is an *entered* subagent: the child's own `createView(bus)` inside diff --git a/Harness-parity.md b/Harness-parity.md index 6ec03e7..304de5e 100644 --- a/Harness-parity.md +++ b/Harness-parity.md @@ -70,6 +70,8 @@ describes `dev` (2.0); where 1.x on `main` differs, the row says so. | `paths` | `prompt/assemble.ts` `envLines`, `tool/tool.ts` `absPath` | not run — a chat's paths are the server's tree's | | `team` | `team/team.ts` `Team` (the app drives it from real turns: `team/runtime.ts` `TeamRuntime`) | `services/team.py` (the server drives it from real turns: `services/team_run.py`) | | `progress` | `session/progress.ts` `progressText`, `progressLine` | `services/progress.py` `text`, `line` | +| `display` | `session/display.ts` `callTitle`, `callDuration`, `diffCounts`, `callFacts`, `drawnBlock`; `session/progress.ts` `endLine` | **to do** (spec 3.7.0): `services/display.py` — today `services/tool_blocks.py` `block_for`, `diff_counts` and `services/progress.py` `what_of` | +| `python` | not run — the server's tool | **to do** (spec 3.7.0): the three texts of `tools/python.json` | | `delegation` | `team/delegation.ts` `checkMode`, `whoDecides`, `tighten` | `services/team.py` `check_mode`, `who_decides` (judged by `spec_evaluate`), `tighten` | | `subagents` | `team/subagents.ts` `subagentModel`, `offer` (the app: `app.ts` `spawn` and the team's `resolve`; the offer and its note through `team/team.ts` `Team.couldServe`) | **to do** (spec 3.3.0): `services/subagents.py` | @@ -277,6 +279,20 @@ for the conformance area `phone`, which is skipped there by name. | A call checked; what the phone is sent | `phone.md` §2, `conformance/phone.json` `check` | — | done: `services/phone.py` `check` | | The card, the wait, the answer as the result | `phone.md` §3, `conformance/phone.json` `result` | — | done: `interaction.phone_card`, `generation._settle_phone`, the interactions route's `result`, `services/phone.py` `result_text`; the app (LLeMbas for Android) carries it out | +## Spec 3.7.0 — CLI side done on `dev`, LLeMbas to do + +`harness/VERSION` is `3.7.0`: one display in every client (`harness/display.md`, `loop.json` +`display`), and `python`'s three refusal texts. + +| Concept | Spec | LLeMbas CLI | LLeMbas | +|---|---|---|---| +| A call's one short title, in the transcript, as `running_tool`'s `what` and over the link | `display.md` §1, `loop.json` `display.title` | done: `session/display.ts` `callTitle`; said once on the `tool_start` event (`session/engine.ts`) and read by the transcript (`tui/state.ts`), the tracker (`session/progress.ts`), `lembas run` (`headless.ts`) and the link (`acp/agent.ts`) | to do: `tool_blocks.block_for` titles by kind and `progress.what_of` by another key order — both become the one rule (pattern and query before path) | +| States running / done / failed / denied, the duration, the facts | `display.md` §2 | done: `tui/components/messages.tsx` `ToolLine`, `session/display.ts` `resultFacts` | to do: a running state on the card; `diff_counts` counts by line prefix (a header without `a/` `b/` is counted, as the CLI's own patches are written) — the spec counts by hunks | +| `stopped` / `failed` stay on the reply | `display.md` §4 | done: the `end` item (`tui/state.ts`, `EndLine`), kept in the session's meta `ended` (`session/engine.ts` `storedEnd`) | to do | +| The cards' actions | `display.md` §5, `loop.json` `display.actions` | had them: `tui/components/permission.tsx`, `question.tsx`, `plancard.tsx` | web has them; Desktop to do | +| Numbers in the client's locale | `display.md` §6 | done: `tui/locale.ts` (`LC_ALL`, `LC_NUMERIC`, `LANG`) | to do | +| A refused call over the link | `acp.md` `session/update` | done: one `tool_call`, `failed`, `_meta.lembas.denied` | reads `_lembas/event` `tool_denied`; `tool_start` now carries `title` | + ## Open items 1. **Prompt-injection checks on what is saved** — the CLI refuses memory entries and skills that diff --git a/Working-notes.md b/Working-notes.md index ca41219..67de81b 100644 --- a/Working-notes.md +++ b/Working-notes.md @@ -307,6 +307,14 @@ when `tail` succeeds. Take the run's status on its own: - **A markdown box eats `[t1] [ ]`** as link syntax. The plan card draws its lines as plain coloured text (`plancard.tsx` `planLines`), not through the markdown renderer, or the ids and marks vanish. +- **Offsets in the textarea are columns, not string indices** (a CJK character or an emoji is + two). Never slice `plainText` by `cursorOffset`: take text with `getTextRange(from, to)`. +- **`setText` drops every extmark.** A paste placeholder is an extmark, so anything that changes + part of the box inserts or replaces a selection (`setSelection` + `insertText`); what must put + the whole box back uses `Placeholders.snapshot` / `restore` (`tui/paste.ts`). +- **A tool call has one title** (`session/display.ts` `callTitle`, harness `display.md`), made + when the call starts and carried on the `tool_start` event. Nothing else derives one: a second + function is how the transcript, the progress line and the link came to say three things. - **The default theme is Moria** (since 1.3.0), the look the web UI, the desktop app and the website share; `lembas`, `shire` and the rest stay selectable.