Repository navigation
Pendant app shell: agents on nsh (read path) - #10
Merged
Merged
Conversation
seed.sh starts a named session with one workspace, four panes in a 2x2 split, a made-up marker line per pane, and four reported agents with one blocked. Each pane re-reports its lifecycle state so the reported agents stay registered while the pane is open. teardown.sh stops and deletes the session. Only fixture content; no live session and no notes.
herdr 0.9.5 answers `session.snapshot` with `{type, snapshot}`, so the agents
and workspaces sat one level below where the parser looked and every snapshot
came back empty. Descend when the reply carries a snapshot object; keep the
flat fixture shape working. Adds a test for the live envelope.
The app becomes an nsh v0.5.0 Rust app. lib.rs is the library root and
holds the navigation stack (agents, agent detail, inbox); nsh.json names
App as the root and limits the network to *.ts.net hosts.
net/ reads the bridge with nsh's fetch: typed snapshot, agent, workspace,
agent detail, inbox and error bodies, and the /v1/ws version 1 envelope
(watch, unwatch, resync up; frame, scrollback, refused down) with a seq
tracker. The bridge origin is not in the source: it is read from
PENDANT_BRIDGE_URL at build time and must be an https origin.
agents/mod.rs and theme.rs are placeholders for the screens and colours.
The notes store and its Lapis link are built on the host only, so its
tests and pendant_app::{Config, Store} are unchanged, and the iOS and
Android builds carry no Lapis. On those targets lib.rs mounts the device
keystore directly. rust-version rises to 1.97, nsh's minimum.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both scripts now resolve the name through lib.sh, which refuses an empty name and anything not starting with pendant-scratch or pendant-shell, prints the refusal and exits 1 before any herdr call. teardown stops and deletes sessions, so a typo must not be able to reach a live one.
net/live.rs keeps one shared live state for the screens, started by the root and read with net::live::live(): - link: Connecting, Open, Closed(why) or Unconfigured(why) - snapshot and inbox, fetched with nsh's fetch every 3 s; error holds the last HTTP failure - panes: per watched pane, the frames seen, the highest seq and any that did not rise, full frames, the last frame, the scrollback and the last refused operation; watch(pane) and unwatch(pane) drive it nsh 0.5.0 exposes its WebSocket to TSX only, so one worker thread holds wss://<bridge>/v1/ws with blocking tungstenite 0.28 (the line nsh-core already uses) over rustls with ring and the webpki roots. It sends the Serve origin the bridge requires, re-sends watches after a reconnect, backs off up to 30 s, and hands messages to the engine thread through a channel drained every 100 ms. Frames are logged with their seq. deny.toml allows ISC and CDLA-Permissive-2.0 (ring, untrusted, rustls-webpki, webpki-roots) and ignores two unmaintained notices that come only through nsh 0.5.0: RUSTSEC-2025-0141 (bincode 1.3.3) and RUSTSEC-2026-0192 (ttf-parser), to be reviewed at the next nsh upgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
herdr only emits frames when pane output changes, so the seeded session was static after the first full frame. Pane 1 now prints PENDANT-SCRATCH-TICK-<n> every 2 s inside its reporter loop, after the marker line, so the marker stays in scrollback and frames keep rising. Made-up content only; pane 2 stays the blocked one.
live_socket_sees_rising_frames drives the worker against a running bridge named by PENDANT_BRIDGE_URL at run time, watches one pane (PENDANT_WATCH_PANE) and passes when the link opens and the pane's frames arrive with a rising seq. It is ignored by default, so CI and plain test runs never dial out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PENDANT_START=inbox or agent:<id>, read at run time, opens that page over the agent list. A simulator launch passes it as SIMCTL_CHILD_PENDANT_START, so the shell checks can open detail and the inbox without taps; without it the app opens on the list as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The panes started the operator's interactive shell, so their scrollback held the login prompt, the typed reporter loop and job-control noise. Each pane now starts pane.sh through env -i and bash --noprofile --norc; it erases the prompt, the command echo and startup noise before printing, and never returns to a shell. Pane text is only PENDANT-SCRATCH-MARKER-<n> plus the pane-1 ticker. Fixture content unchanged; the name guard still applies.
The live link now logs each watch and unwatch it sends, and the root logs a page leaving the stack natively, next to the frame lines, so a device log shows whether a pane is released when its page goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Pendant app shell, read path (pack 2a, G1): an nsh v0.5.0 Rust app in
app/that shows the agents from a bridge behind the tailnet proxy, on the iOS simulator and the Android emulator.app/nsh.jsonandapp/src/lib.rshold the navigation between the list, detail and inbox screens, plus aPENDANT_STARTlaunch hook for tap-free checks. The bridge URL comes fromPENDANT_BRIDGE_URLat build time and is never committed.app/src/net/. HTTP goes through nsh fetch. The WebSocket runs on atungstenite0.28 worker thread, because nsh 0.5.0's WebSocket client is JS-only. That is the same tungstenite that nsh-core already pulls in. The client tracksseqand resends watches after a reconnect.app/src/agents/holds the agent list (link state, count), the detail screen (marker, latestseq, unwatch on dismiss) and the inbox with the blocked state. The theme is inapp/src/theme.rs.crates/pendant-herdr/src/snapshot.rsreads the snapshot inside herdr's{type, snapshot}reply envelope. Before this, every live snapshot read as empty. It has a test for the live shape.scripts/scratch/seeds a named four-pane session that shows only made-up content: four markers, one ticking pane, one blocked agent. The scripts refuse any session name outside the scratch prefixes.Not in the app
app/src. tokio arrives only through nsh-core, which depends on it unconditionally. reqwest is absent from the tree.Test plan
/v1/snapshot, the blocked agent reads blocked, detail shows the seeded marker, the inbox shows the blocked event, andseqrises over the WebSocket🤖 Generated with Claude Code