Skip to content

Remove requests; offer host operations as answers to Asks - #1327

Merged
max-sixty merged 5 commits into
mainfrom
agent-a5200a394455b790a
Sep 27, 2026
Merged

max-sixty merged 5 commits into
mainfrom
agent-a5200a394455b790a

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Removes requests from Leaf: x-request, leaf experimental receipt, and the request and receipt events. Nothing executed a request except an agent reading it and writing a receipt, which is the loop an Ask already runs: the user's answer reaches the agent, and the agent acts and writes the result into the page. Every shipped request holder already stood inside an lf-ask.

Owner. The Ask (asks.py, x-awaits) is now the one way a page asks the user to decide something, including an operation the host runs. Before, requests were a second Ask source with their own seat lifecycle (requests.py), restated in the browser by application.ts, widget-controller.js, application.js and request-elements.js. Host operations are now ordinary lf-options choose groups in their lf-ask; the agent reads the pick and runs it.

Deleted

  • requests.py, the x-request schema and registry checks, request offer validation, request admission and meaning, the receipt answer in workflows and activity, the request path through Asks, history and gesture words, the failed-receipt branch of thread.fail_answer, request outcomes news, and leaf experimental receipt.
  • The request and receipt event kinds, their $events handling and answering clauses, and the x-request key (docs/registry.html regenerated).
  • The browser's request reading in application.ts, widgetController's request(unit) and request dispatch, dispatchWidget's request branch, the dead pendingRequests readings, request-elements.js, and the descriptor's captured offers and bindings, so a descriptor now matches by id and tag. Bundles rebuilt.
  • lf-operations (Command Hub), lf-release-actions (monitoring, now a guidance-only package) and the developer gallery's lf-job-requests, with their registry entries and theme rules.
  • The data argument threaded through read_document, browser_document, browser_thread and browser_state, which only request seats read.

Recast

Command Hub's three operation sets and the release page's rollback are lf-options choose groups in their lf-ask, and each Command Hub option names the worker and worktree it acts on. Command Hub's author guidance says to offer an operation that way. Its coordinator guidance says to act only on the pick that still stands in leaf page state (a later pick replaces an earlier one, which the delivery still carries), to verify it against host state, and to check for an earlier run before acting. Monitoring's guidance says the same for rollback.

Behaviour that moved

  • A host operation is the user's answer to an Ask. It can be undone like any pick until the agent acts, and the agent reports the outcome in the page rather than in a receipt.
  • The release rollback is an Ask; before, it was an optional control outside the Asks list.
  • The Codex and website hosts' give-up path writes a failure reply or a failed pickup; there is no failed receipt.

Tests

Request lifecycle, admission, receipt and news tests are deleted. Rewritten where the behaviour survives: typed references (via lf-agent on and lf-command-readings for), the long-thread delivery that keeps a sent widget's message (now an action), eight-character ids, the offline export, the release rollback (now an Ask), and the spent-press cue.

Startup

Served examples, three loads each, resource requests / encoded bytes:

Page Base This branch
command-hub 201 / 3,830,458 199 / 3,788,650
live-progress 201 / 6,122,340 202 / 6,120,170

live-progress now loads lf-options in place of lf-release-actions and request-elements.

This was written by Claude Code on behalf of max-sixty

🤖 Generated with Claude Code

max-sixty and others added 2 commits September 27, 2026 11:29
A request (`x-request`, `leaf experimental receipt`, and the `request` and
`receipt` events) was a one-shot instruction to the host with its own seat
lifecycle. Nothing executed one except an agent reading it and writing a
receipt, which is the loop an Ask already runs: the user's answer reaches the
agent, and the agent acts and writes the result into the page. Every shipped
request holder already stood inside an `lf-ask`.

Owner now: the Ask (`asks.py`, `x-awaits`) is the one way a page asks the
user to decide something, including an operation the host runs. The
operations are ordinary `lf-options choose` groups; the agent reads the pick
and runs it.

Deleted:
- `requests.py`, the `x-request` schema and registry checks, request offer
  validation, request admission and meaning, the `receipt` answer in
  workflows and activity, the request path through Asks, history and gesture
  words, the failed-receipt branch of `thread.fail_answer`, request outcomes
  news, and `leaf experimental receipt`;
- the `request` and `receipt` event kinds and their handling and answering
  clauses in `$events`, and the `x-request` key;
- the browser's request reading in `application.ts`, `widgetController`'s
  `request(unit)` and request dispatch, `dispatchWidget`'s request branch,
  the dead `pendingRequests` readings, `request-elements.js`, and the
  descriptor's captured offers and bindings, so a descriptor matches by id
  and tag;
- `lf-operations` (Command Hub), `lf-release-actions` (monitoring, now a
  guidance-only package) and the developer gallery's `lf-job-requests`.

Recast: Command Hub's three operation sets and the release page's rollback
are `lf-options choose` groups in their `lf-ask`. The package guidance tells
the author to offer an operation as an option and the coordinator to verify
and run the pick.

Behaviour that moved:
- a host operation is the user's answer to an Ask: it can be undone until
  the agent acts, and the agent reports the outcome in the page rather than
  in a receipt;
- the release rollback is now an Ask (it used to be an optional control
  outside the Asks list);
- the Codex and website hosts' give-up path writes a failure reply or a
  failed pickup; there is no failed receipt.

Tests: request lifecycle, admission, receipt, and news tests are deleted.
Rewritten where the behaviour survives: typed references (via
`lf-agent on` and `lf-command-readings for`), the long-thread delivery that
keeps a sent widget's message (now an action), eight-character ids, the
offline export, the release rollback (now an Ask), and the spent-press cue.

Startup (served examples, three loads each, requests / encoded bytes):
command-hub 201 / 3,830,458 → 199 / 3,788,650; live-progress 201 /
6,122,340 → 202 / 6,120,170 (the page loads `lf-options` in place of
`lf-release-actions` and `request-elements`).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new host-operation path needs to preserve the user’s current choice and carry the exact operation subject in the choice itself. Both decide what the coordinator is authorized to run.

Comment thread examples/command-hub.html Resolved
…ng pick

A single-choice pick is replaceable while the delivery still carries every
pick, so the coordinator guidance for Command Hub and monitoring now reads the
group's current answer before acting. The Command Hub options name the exact
worker and worktree they act on, since the option's words are what the user
approves.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Sep 27, 2026
# Conflicts:
#	skills/leaf/references/serving-pages.md
#	tests/test_interact_product.py
#	tests/test_render_projection.py
leaf-agent
leaf-agent previously approved these changes Sep 27, 2026
# Conflicts:
#	skills/leaf/scripts/leaf/document_reading.py
#	skills/leaf/scripts/leaf/event_meaning.py
#	skills/leaf/scripts/leaf/served_state/browser.py
#	skills/leaf/scripts/leaf/thread.py
#	skills/leaf/scripts/leaf/validation/compatibility.py
@max-sixty
max-sixty merged commit fa91246 into main Sep 27, 2026
5 checks passed
@max-sixty
max-sixty deleted the agent-a5200a394455b790a branch September 27, 2026 20:29
max-sixty added a commit that referenced this pull request Oct 21, 2026
…side it (#3396)

A survey of `notes/` against the code and history at d91b67b. Where a
note's design has landed, its contract moves beside the code if it
wasn't already there, and the note or section goes; what is still
unresolved stays.

- **Deleted:** `floating-panel/GOAL.md` (every departure is now recorded
in `floating-panel.js` and `styles/floating-panel.css`; #3392 moved the
last one, the draft posture, beside `drafted`, and this adds the
no-key-hints decision to the header), `browser-reactivity.md` (its
design is in module headers; why paints that must land in the turn use
`render` moves to `assets/AGENTS.md`, and the margin's double draw
becomes a TODO implementation candidate) and `chrome-and-covers.md`
(`page-layout.md` holds the workspace decision; the `layouts.css`
Workspace comment now records the rejected main-region-scrolls design).
- **Trimmed:** `agent-usability-evals.md` drops the findings through
2026-10-12, which have landed. `comparisons.md` drops the phone-pin
finding (#2680), the 4 October follow-up proposals and two landed
lessons. `user-feedback-responsiveness.md` narrows delegated work to
Codex and Pi (#3370) and drops "Explicit stdin" (#3375). `threads.md`
drops request buttons (#1327), placement (#2134) and notification
transitions. `shared-decisions.md` points at the recorded owner
contract. `browser-support.md` drops two fixed entries and owners #3100
removed.
- **TODO.md** follows each: #28 points at the module header, #25 asks
for the board's write rather than an owner, the annotation-placement
item loses its landed phone half, and the delegated-work and
reply-budget items lose what #3370 and #3372 settled.
- Smaller corrections in `shift-watch-cost`, `undo-reach` (#3271),
`named-widget-interfaces`, `codex-integration` (`codex_tool.py`), the
long-read eval's provenance comment, and `motion.js`'s fold comment. The
runtime comment edits rebuild `kernel.json` only.

No behavior changes.

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants