Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
bump: patch
---

### Fixed

- **The notes host is offered only on a single-user machine.** `/prototype:explore-directions` now says why: the host hands its per-run token to any local process that asks the loopback port.
- **`playwright-cli` is declared as an optional prerequisite**, and the `node` row names note relocation, so `/harness-ops:prerequisites` reports what relocating a note needs and what happens without it.
- **The `ed-notes-tracer` eval's serve grader now requires `--page explore-directions.html`.** An `ensure-running` on the default page, which the scaffold never writes, no longer passes.
8 changes: 6 additions & 2 deletions docs/contracts/ui-feedback/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ The canonical files live in `lib/ui-feedback/`:

| Path | Holds |
|---|---|
| `lib/ui-feedback/host.html` | The host page: a checked-in page the notes bridge serves. It frames the model-written page in a sandbox, shows the notes panel, validates every message from the frame, and sends notes to the session |
| `lib/ui-feedback/host.html` | The host page: a checked-in page the notes bridge serves. It frames the model-written page through `srcdoc` in a sandbox, shows the notes panel, validates every message from the frame, and sends notes to the session |
| `lib/ui-feedback/proto-pin.js` | The frame helper, inlined into the framed page. It picks elements, text and regions, sets the controls through the controls runtime, holds the state-snapshot function, and talks to the host page only by `postMessage` |
| `lib/ui-feedback/controls.js` | The controls runtime: the control-type registry. The framed page inlines it, and the host page loads the same file to render its Controls tab |
| `lib/ui-feedback/note.schema.json` | The note contract |
| `lib/ui-feedback/note-model.mjs` | The host page's validator of notes and controls manifests, which the relocation script also uses. It reads every limit from the schema it is handed; `notes_bridge.py` holds the bridge's validator over the same subset |
| `lib/ui-feedback/controls.schema.json` | The controls manifest contract: what a page may declare as a control, and the `snapshot` of control values a note carries |
| `lib/ui-feedback/fixtures/` | Valid and invalid notes and manifests |
| `lib/ui-feedback/relocate-note.mjs` | The relocation script: finds a note's element again in a fresh page and shoots it (see [Re-locating a note](#re-locating-a-note)) |
| `lib/ui-feedback/notes_bridge.py`, `notes-bridge.sh` | The notes bridge app on the session bridge's loopback adapter, shaped like the view app ([`lib/session-bridge/README.md`](../../../lib/session-bridge/README.md#the-view-app), "The view app") |
| `lib/session-bridge/view_bridge.py` | The view app the notes bridge builds on: its hub, handler, token route, replies and idle expiry. Its copy sits beside each copy of `notes_bridge.py` |

Each consumer takes generated copies through [`scripts/shared-copies.txt`](../../../scripts/shared-copies.txt)
and `scripts/sync-shared-copies.sh`, whose `--check` and `--check-bump` modes are the sync gate
Expand Down Expand Up @@ -102,7 +104,9 @@ the host page reach the frame only by message.
- **Notes leave through the host page.** The host page frames the page with `sandbox="allow-scripts"` and
never `allow-same-origin`, in the pattern of the planning shared page
([`plugins/planning/shared/README.md`](../../../plugins/planning/shared/README.md#prototype-page),
"Sandbox"). It checks each message's source frame and shape, then posts the note on the session
"Sandbox"). The bridge sends `X-Frame-Options: DENY` on every response, so the host page fetches
the page as text from `/api/page`, with the mockup policy put first, and frames it through
`srcdoc`. It checks each message's source frame and shape, then posts the note on the session
bridge, whose Host, Origin and token checks are in
[The loopback adapter](../../../lib/session-bridge/README.md#the-loopback-adapter).
- **From `file://`, copy-out only.** A page opened from `file://` has no host page and no bridge:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
type: tool_used
tool: Bash
input_match: '"command":"(?:[^"\\]|\\.)*?notes-bridge\.sh(?:[^"\\]|\\.)*?--dir(?:[^"\\]|\\.)*?mockup-run(?:[^"\\]|\\.)*?ensure-running'
input_match: '"command":"(?:[^"\\]|\\.)*?notes-bridge\.sh(?:[^"\\]|\\.)*?--dir(?:[^"\\]|\\.)*?mockup-run(?:[^"\\]|\\.)*?ensure-running(?:[^"\\]|\\.)*?--page(?:=|\s+)(?:\\")?explore-directions\.html'
min: 1
arm: both
---
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"pass": [
{
"answer": [{"tool": "Bash", "input": {"command": "bash \"/plugins/prototype/notes-bridge/notes-bridge.sh\" --dir \"mockup-run\" ensure-running --page explore-directions.html", "description": "x"}}],
"why": "relative run dir, quoted"
"why": "relative run dir, quoted, names the scaffold's page"
},
{
"answer": [{"tool": "Bash", "input": {"command": "bash /p/notes-bridge/notes-bridge.sh --dir /work/space/mockup-run ensure-running", "description": "x"}}],
"why": "absolute run dir, default page"
"answer": [{"tool": "Bash", "input": {"command": "bash /p/notes-bridge/notes-bridge.sh --dir /work/space/mockup-run ensure-running --idle-seconds 900 --page=\"explore-directions.html\"", "description": "x"}}],
"why": "absolute run dir, --page= form with a quoted name after another option"
}
],
"fail": [
Expand All @@ -19,7 +19,15 @@
"why": "status only, never serves"
},
{
"answer": [{"tool": "Bash", "input": {"command": "bash /p/notes-bridge/notes-bridge.sh --dir /tmp/other ensure-running", "description": "serve mockup-run"}}],
"answer": [{"tool": "Bash", "input": {"command": "bash /p/notes-bridge/notes-bridge.sh --dir /work/space/mockup-run ensure-running", "description": "x"}}],
"why": "default page.html, which the scaffold never writes, so the host frames nothing"
},
{
"answer": [{"tool": "Bash", "input": {"command": "bash /p/notes-bridge/notes-bridge.sh --dir mockup-run ensure-running --page page.html", "description": "serve explore-directions.html"}}],
"why": "another page; the scaffold's page only in the description"
},
{
"answer": [{"tool": "Bash", "input": {"command": "bash /p/notes-bridge/notes-bridge.sh --dir /tmp/other ensure-running --page explore-directions.html", "description": "serve mockup-run"}}],
"why": "another directory; the run dir only in the description"
}
]
Expand Down
14 changes: 13 additions & 1 deletion plugins/prototype/prerequisites.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"need": "optional",
"for": ["skill:explore-directions", "skill:pressure-test"],
"detect": { "any": ["node"] },
"degrade": "Without node, /prototype:explore-directions and /prototype:pressure-test cannot run the medium resolver: each says so in one line and keeps its shipped default, and pressure-test's audience routing still picks the shell.",
"degrade": "Without node, /prototype:explore-directions and /prototype:pressure-test cannot run the medium resolver: each says so in one line and keeps its shipped default, and pressure-test's audience routing still picks the shell. Without node, explore-directions also cannot write a note's relocation script, so it reads the mockup file to say whether a note's element is still there.",
"install": {
"docs": "https://nodejs.org/en/download",
"brew": "node",
Expand Down Expand Up @@ -44,6 +44,18 @@
"apt": "curl"
},
"check": "/harness-ops:prerequisites"
},
{
"id": "playwright-cli",
"kind": "cli",
"need": "optional",
"for": ["skill:explore-directions"],
"detect": { "any": ["playwright-cli"] },
"degrade": "Without playwright-cli, /prototype:explore-directions cannot run a note's relocation script, so it takes no screenshot of the noted element and reads the mockup file to say whether the element is still there.",
"install": {
"npm": "npm install -g @playwright/cli"
},
"check": "/harness-ops:prerequisites"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ mockup through the notes host. The parts, their trust rules and the note contrac
copies in `<plugin-root>/notes-bridge/`. The `file://` page stays the default and keeps its copy-out
terminator: opened from `file://`, no notes reach the session.

Only with the person at this machine and python3 and curl present; without them, say so in one
line and hand over the `file://` page as usual.
Only with the person at this machine, on a single-user machine, and python3 and curl present;
without them, say so in one line and hand over the `file://` page as usual. The notes host hands
its per-run token to any local process that asks the loopback port, so another OS user on the
machine could read it and post notes.

1. Serve the run directory the mockup is in, naming the page:

Expand Down
Loading