From 14a35d04b68087ff1be96a687c836159f866ee3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Bene=C5=A1?= Date: Thu, 12 Nov 2026 09:42:10 +0000 Subject: [PATCH] Harness spec 3.7.0: python says why it could not run 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 --- CHANGELOG.md | 3 +++ harness/README.md | 6 +++++- harness/conformance/python.json | 27 +++++++++++++++++++++++++++ harness/tools/python.json | 6 +++++- src/harness.ts | 2 ++ 5 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 harness/conformance/python.json diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e469b8..9fa2734 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,9 @@ Harness spec 3.7.0: one display in every client. −removed` for an edit, and the kinds of block. A reply that was stopped or failed keeps the spec's line (`Stopped: by you`, `Failed: …`) on it. The approval, question and plan cards offer the same actions everywhere, and numbers are written in the client's locale format. +- **Harness spec 3.7.0: `python` says why it could not run.** The server's `python` tool had one + answer for three situations; the spec now has one each — no page of the chat is open (and where + to open it), the page did not answer, the run took too long. ## [2.0.0-beta.8] — 2026-11-10 diff --git a/harness/README.md b/harness/README.md index 552cb1b..ba3550f 100644 --- a/harness/README.md +++ b/harness/README.md @@ -15,7 +15,7 @@ page *Harness-parity* in LLeMbas CLI's wiki. |---|---| | `VERSION` | The spec's own version, apart from LLeMbas CLI's | | `purpose.json` | The `purpose` argument added to a tool whose calls say what they are for | -| `tools/.json` | One tool each: name, `scope`, `sessions`, `risk`, `exclusive`, `block` (how a call is shown: `shell`, `edit`, `read`, `search`, `web`, `task`, `plan` — not drawn, the plan card refreshes — `hidden`, `tool`), `purpose`, former names (`aliases`, per project), renamed arguments, `variables`, what a project offers of the parameters (`narrow`, per project), `offered` (`subagent`: given to subagents only, never to the main agent — `report`, `team_finish`, `team_request`; `main`, spec 3.4.0: given to the main agent only, never to a subagent — `team_add`, `team_assign`, `team_replace`, `team_stop`, `team_decide`), `requires` and `unavailable` (when it can be offered, and what a call answers when that has gone), `confirm` (`always`: the person is asked in every mode), the description and the JSON Schema of its parameters — exactly what a model is sent | +| `tools/.json` | One tool each: name, `scope`, `sessions`, `risk`, `exclusive`, `block` (how a call is shown: `shell`, `edit`, `read`, `search`, `web`, `task`, `plan` — not drawn, the plan card refreshes — `hidden`, `tool`), `purpose`, former names (`aliases`, per project), renamed arguments, `variables`, what a project offers of the parameters (`narrow`, per project), `offered` (`subagent`: given to subagents only, never to the main agent — `report`, `team_finish`, `team_request`; `main`, spec 3.4.0: given to the main agent only, never to a subagent — `team_add`, `team_assign`, `team_replace`, `team_stop`, `team_decide`), `requires` and `unavailable` (when it can be offered, and what a call answers when that has gone), `texts` (3.7.0: a tool's other fixed answers by key — `python`'s `no_answer` and `timeout`), `confirm` (`always`: the person is asked in every mode), the description and the JSON Schema of its parameters — exactly what a model is sent | | `prompts/` | The prompt texts; `prompts/index.json` says which are shared, which LLeMbas fragment each one is, and what each `{{variable}}` in a text means. `prompts/personality/` holds the personality presets both offer | | `permission/hardline.json` | The floor: commands refused in every mode, protected paths, and how a command is spelled plainly before it is checked again | | `permission/arity.json` | How much of a command an "always allow" covers | @@ -101,6 +101,10 @@ Written ahead of the implementations; the CLI carries it in the same round (`dis with the mode to continue in, and Revise (`loop.json` `display.actions`). - **Numbers in the client's locale format**; durations, ids, exit codes and line numbers never. Conformance texts are in the plain format. +- **`python` says why it could not run** (`tools/python.json`): one text used to answer three + situations. `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; `texts.timeout` — the run passed + its `{{seconds}}`. Conformance area **`python`** (the server's). - Conformance area **`display`** (titles, durations, hunk counts, facts, the end line, drawn blocks); `progress` gains the `budget` stop. diff --git a/harness/conformance/python.json b/harness/conformance/python.json new file mode 100644 index 0000000..375b23d --- /dev/null +++ b/harness/conformance/python.json @@ -0,0 +1,27 @@ +{ + "about": "Spec 3.7.0: what a `python` call answers when it could not run, word for word (tools/python.json). `situation`: `no_page` — no page of this chat is open in the web or desktop app (the tool's `unavailable`); `no_answer` — a page is open and attached but did not answer the run request; `timeout` — the run began and passed the call's limit of `seconds` (texts.timeout, `{{seconds}}` filled). Three situations, three texts: never one for another. The server's alone (scope llembas).", + "cases": [ + { + "about": "No page of this chat is open anywhere.", + "situation": "no_page", + "expect": { + "text": "Python cannot run now: no page of this chat is open. Python runs in the person's browser — ask them to open this chat in the LLeMbas web or desktop app and keep it open, then call python again." + } + }, + { + "about": "A page is attached but does not answer.", + "situation": "no_answer", + "expect": { + "text": "Python did not run: a page of this chat is open, but it did not answer. It may still be loading Python, or be asleep in a background tab — ask the person to bring this chat to the front (or reload it), then call python again." + } + }, + { + "about": "The run passed its time limit.", + "situation": "timeout", + "seconds": 30, + "expect": { + "text": "Python stopped: the run took longer than 30 seconds, and nothing it wrote was saved. Do less in one call, or split the work over several calls." + } + } + ] +} diff --git a/harness/tools/python.json b/harness/tools/python.json index 829cd81..b8479dd 100644 --- a/harness/tools/python.json +++ b/harness/tools/python.json @@ -9,7 +9,11 @@ "requires": [ "page" ], - "unavailable": "Python cannot run now: no open browser page is attached to this chat.", + "unavailable": "Python cannot run now: no page of this chat is open. Python runs in the person's browser — ask them to open this chat in the LLeMbas web or desktop app and keep it open, then call python again.", + "texts": { + "no_answer": "Python did not run: a page of this chat is open, but it did not answer. It may still be loading Python, or be asleep in a background tab — ask the person to bring this chat to the front (or reload it), then call python again.", + "timeout": "Python stopped: the run took longer than {{seconds}} seconds, and nothing it wrote was saved. Do less in one call, or split the work over several calls." + }, "aliases": { "cli": [], "llembas": [] diff --git a/src/harness.ts b/src/harness.ts index 6289140..30b5c05 100644 --- a/src/harness.ts +++ b/src/harness.ts @@ -98,6 +98,8 @@ export interface ToolSpecDef { requires?: ("display" | "page" | "forge" | "plan" | "team" | "phone")[] /** What a call answers, word for word, when a requirement went away after the offer. */ unavailable?: string + /** Spec 3.7.0: a tool's other fixed answers, by key (python: no_answer, timeout). */ + texts?: Record /** `always`: put to the person in every mode, auto included; never remembered. */ confirm?: "always" /** `{{name}}` in the description: a fact the projects differ in, filled in by each (fillDescription). */