Skip to content

Release v0.1.0-beta - #1

Merged
tis24dev merged 47 commits into
mainfrom
dev
Jul 9, 2026
Merged

tis24dev merged 47 commits into
mainfrom
dev

Conversation

@tis24dev

@tis24dev tis24dev commented Jul 9, 2026 •

Copy link
Copy Markdown
Owner

Automated release PR for v0.1.0-beta.

Summary by CodeRabbit

  • New Features

    • Added terminal sharing and joining in Tabby and a browser client for remote viewing.
    • Added account sign-in, registration, email verification, password reset, and 2FA support.
    • Added a settings page to manage server URL and view active sessions.
  • Bug Fixes

    • Improved session reliability, reconnect behavior, and guest/host handoff.
    • Added safer validation for room codes, tokens, and shared tunnel paths.
  • Documentation

    • Added full user, protocol, and project setup guides.

tis24dev added 30 commits July 7, 2026 21:39
- shared/ @peershell/protocol: wire protocol (binary framing with peerId,
  control messages), SessionTransport interface, PIN challenge-response,
  UTF-8 splitter, room-code/token/tunnel-path validators. Builds via tsc.
- clients/tabby (tabby-peershell): self-contained Angular 15 / webpack build
  (externalizes Angular/RxJS/tabby-*, bundles @peershell/protocol), Stage 0
  NgModule skeleton + Node smoke-load test (loads/constructs as Tabby would).
- clients/web + server: placeholders (Stage 4 / Stage 5).
- PROTOCOL.md spec, README (no-E2E disclaimer + dev workflow), build:all
  pipeline, copy-web-asset / publish-plugins scripts, .gitignore.

build:all green; `npm test` smoke-load PASS.
- root jest (ts-jest, node env) with jest.setup providing Web Crypto for Node 18
- shared tests: binary frame round-trip (peerId/tag/payload, uint32, empty,
  short-frame throw), control encode/decode + version stamp, PIN challenge-
  response (deterministic hash, nonce-varies, PIN-not-in-hash, verify ok/ko),
  UTF-8 splitter reassembly of split multibyte, room-code + tunnel-path validators
- root scripts: `test` -> jest, `test:smoke` -> plugin bundle load check

15/15 tests green.
- shared/websocketTransport.ts: SessionTransport over WebSocket (global by
  default, injectable impl for Node), text=control / binary=framed data
- server/dev-relay.cjs: throwaway rendezvous + blind relay (pairs host/guest
  by room/token, forwards every frame), runnable standalone; @peershell/server
  precursor
- shared/test/transport.integration.test.ts: two transports through the relay
  do hello -> create/join -> PIN challenge-response -> snapshot-ack barrier ->
  output/input frames; plus wrong-PIN -> pin-fail

17/17 tests green; build:all green.
- host/shareController.ts: Tabby-agnostic host controller (HostTerminal port +
  SessionTransport). Creates session, snapshot-ack barrier, mirrors output,
  injects guest input, forwards resize, tears down on tab close. Unit-tested
  with mock transport + mock tab.
- services/peershell.service.ts: adapts a real BaseTerminalTabComponent to
  HostTerminal, owns active shares, gates on configured server URL.
- providers: toolbar "Share terminal" + tab context-menu Share/Stop.
- config.ts: PeershellConfigProvider (peershell.serverUrl, magicLinkTtl).
- types/tabby.d.ts: minimal ambient shims so the plugin builds decoupled from
  Tabby's source tree (real impls come from Tabby at runtime as webpack externals).
- shared/base64.ts (snapshot payload). Generic-stub smoke-load resilient to
  future externals.

19/19 tests green; build:all green; smoke-load PASS.
- guest/mirrorController.ts: Tabby-agnostic guest controller (SessionTransport +
  MirrorSink port). join, render+ack snapshot (barrier), render live output,
  forward keystrokes, surface host resize + session end. Unit-tested with mocks.
- test/hostGuest.integration.test.ts: real ShareController (mock host tab) <->
  dev relay <-> real MirrorController (mock sink); asserts snapshot, live output
  host->guest, input guest->host, host resize.
- jest forceExit (integration tests use real sockets).

22/22 tests green; build:all green; smoke-load PASS.
- guest/mirrorSession.ts: MirrorSession extends BaseSession (7 abstract members;
  UTF8SplitterMiddleware; delegates wire logic to MirrorController; exposes
  hostResize$). write()->input frame, resize() no-op (tmate), emitOutput from frames.
- guest/mirrorTab.component.ts: MirrorTabComponent extends BaseTerminalTabComponent
  (reuses base template; onFrontendReady creates MirrorSession + adopts host size
  via hostResize$; no frontend.resize$ subscription -> no resize loop).
- peershell.service.ts: joinShared() (prompt room-code, connect, open mirror tab).
- toolbar: "Join shared terminal" button. index.ts: full NgModule (Common/Forms/Ngb/
  Toastr/TabbyCore/TabbyTerminal imports + MirrorTabComponent declaration).
- expanded tabby.d.ts shim (BaseSession, UTF8SplitterMiddleware, BaseTerminalTabComponent
  members, LogService, PromptModalComponent, openNewTab, module default exports).

build:all green; 22/22 tests green; smoke-load PASS. GUI wiring/profile of the mirror
tab needs validation in a real Tabby.
- shared/pinAuth: generatePin (local per-session PIN). websocketTransport:
  keepalive (ping every 20s, unref'd timer, pong-on-ping handled below the app,
  cleared on close) + tests.
- ShareController: on peer-joined issue pin-challenge (fresh nonce/attempt);
  verify pin-response; pin-ok -> snapshot/stream; wrong -> pin-fail + re-challenge,
  rate-limited to 5 then kick (peer-left). Input frames rejected until authenticated.
- MirrorController: PinProvider callback; answer pin-challenge with H(pin,nonce);
  pin-fail(0) -> end. Tests + host<->guest integration now cover PIN (happy + wrong).
- Tabby glue: PeershellService generates + shows the PIN (with magic-link) on share;
  joinShared threads a PIN prompt (PromptModalComponent password) through
  MirrorTabComponent -> MirrorSession -> MirrorController.

29/29 tests green; build:all green; smoke-load PASS. (magic-link TTL/revocation is
server-side, Stage 5; client sends session-close on stop.)
- Move MirrorController (+ MirrorSink/PinProvider) into @peershell/protocol so it
  is reused by the Tabby plugin (MirrorSession) and the coming web-client. Update
  plugin imports + relocate its unit test to shared/.
- shared/httpTunnelHandler.ts: answers tunneled http-get by serving the embedded
  web-client HTML; strict path whitelist (only '/'), 403 on traversal/SSRF. Unit-tested.
- dev-relay: reverse HTTP tunnel — GET /s/<token> forwards http-get to the host and
  returns the host's http-response body (intercepted, not forwarded to a peer).
- shared/test/tunnel.integration.test.ts: Node HTTP GET of the magic-link returns the
  host-served page over the tunnel.

32/32 tests green; build:all green; smoke-load PASS.
- clients/web: webpack (target web) -> single self-contained dist/index.html
  (JS + xterm CSS inlined via HtmlInlineScriptPlugin + style-loader). Reuses
  WebSocketTransport + MirrorController + Utf8Splitter from @peershell/protocol.
- reads the magic-link token from /s/<token> (or ?token=), PIN overlay prompt,
  term.onData -> input, adopts host size (tmate), UTF-8 splitter before term.write.
- MirrorController.join now takes { room | token } so the browser can join by token;
  desktop still joins by room. Updated call sites/tests.
- build:web output is embedded into the plugin (copy-web-asset) for the host to serve.

32/32 tests green; build:all green (web-client embedded, 307 KB). Browser E2E is
validated in a real browser; the guest logic is covered by @peershell/protocol tests.
- PeershellService.startSharing attaches an HttpTunnelHandler to the host transport,
  serving the embedded web-client.html (asset/source import) on tunneled http-get.
- shim: declare '*.html' module for the asset import.

build:all green (plugin bundle embeds the 307 KB web-client); smoke-load PASS.
- server/src/index.cjs (was dev-relay.cjs): rendezvous + blind relay + reverse HTTP
  tunnel, now with magic-link TTL (15m, link-expired on join / 410 on GET), env config
  (PORT/BIND/PUBLIC_URL/TOKEN_TTL_MS), GET /health, keepalive (pong reply + idle reaper),
  host-close tears down the session while guest-close frees the slot for a retry.
- env-driven standalone runner + startup log.
- repoint the three integration tests to server/src/index.cjs; server/package.json
  (start=node src/index.cjs, dep ws).

32/32 tests green (integration tests run against the productionized server).
- Accounts in server/src/index.cjs (still single CJS file, stdlib only): atomic JSON store
  (data/accounts.json, mode 0600, ephemeral fallback), pbkdf2 password hashing w/ timingSafeEqual,
  opaque bearer tokens (sha256-stored, 24h TTL, logout/refresh revocation), inline RFC-6238 TOTP.
- REST: POST /register (+ mock-logged email verify code), /verify-email, /login (needsTotp branch),
  /2fa/{setup,verify,enable,disable}, /logout, /session/refresh; GET /sessions dashboard.
- Security: WS create-session GATED on a valid account token (?token= on the upgrade URL) via
  requireAuth (default ON); anti-enumeration login, rate-limits (login lockout, register/IP, 2FA
  attempts), body-size cap. Rooms tagged w/ accountId for the dashboard. Guests unchanged (PIN).
- Tests: new auth.integration suite (register/verify/login/enum+ratelimit/gate/TOTP/logout);
  existing relay/tunnel/hostGuest integration tests pass { requireAuth: false }. 38 tests green.
- AccountService (clients/tabby): fetch-based REST client (register/verify-email/login/verify2fa/
  logout), bearer token kept in the Tabby config store (getToken/persist/clearLocal); REST base
  derived from the ws(s):// server URL. (Vault storage is the documented follow-up hardening.)
- LoginModalComponent: inline-template modal with login/register/verify-email/2FA/logout modes,
  friendly error mapping; resolves with the token on a successful login.
- PeershellService.startSharing() now gates on a logged-in account: opens the login modal when there
  is no token, passes the account token to ShareController.start -> transport ?token=; on an
  'unauthorized' error it clears the stale token and asks the user to log in again.
- Toolbar gains a "peershell account (log in / out)" button (opens the modal); index.ts declares
  LoginModalComponent. Webpack build + smoke-load green; 38 tests still pass.
- server/src/index.cjs: deliverVerifyCode() posts the code through the Brevo transactional API
  (stdlib https, zero deps) when BREVO_API_KEY is set; falls back to logging the code when no key
  is configured, and to logging on a send failure (registration never blocks on email). Config via
  env: BREVO_API_KEY, EMAIL_FROM (default noreply@peershell.dev), EMAIL_FROM_NAME. brevoSend takes an
  injectable sendFn for tests. Relaying through Brevo keeps the VM IP out of the sending path (no
  blacklist risk) and lets DKIM/SPF authorise the domain.
- Wired into POST /register (new + resend paths); exports deliverVerifyCode/brevoSend.
- Unit test (email.test.ts): log fallback, injected-mailer send, send-failure fallback. 41 tests green.
- PeershellService.confirmDisclaimer(): one-time warning before the first share (via
  PlatformService.showMessageBox) that guests get a read-write shell and the relay sees traffic in
  clear text; acknowledged once (config peershell.disclaimerAck). Blocks the share on Cancel.
- tabby.d.ts: shim PlatformService/showMessageBox; config defaults gain disclaimerAck + account.
- README: document server env (PORT/PUBLIC_URL/PEERSHELL_DATA/TOKEN_TTL_MS/BREVO_API_KEY/EMAIL_FROM),
  Brevo relay rationale and the DNS to authorise the domain. Build + smoke green.
- PeershellSettingsTabComponent (+ provider): configure the server URL, log in/out, and see the
  account's live shares (room / guest connected / magic-link) via GET /sessions. Prominent no-E2E
  security note at the top. Reachable from Tabby's Settings.
- AccountService.getSessions(): GET /sessions (dashboard), clears the local token on 401.
- tabby.d.ts: shim tabby-settings (SettingsTabProvider); index.ts wires the provider + declares the
  component. Webpack build + smoke-load green; 41 tests still pass.
- One toolbar button ("peershell"); click opens a native popup menu (PlatformService.popupContextMenu)
  with Share this terminal / Join a shared terminal / Account (label reflects login state). The toolbar
  renders provider buttons as Commands and only calls run() on click — it does not open a ToolbarButton
  submenu — so the dropdown is built via popupContextMenu instead. tabby.d.ts shims popupContextMenu.
The account endpoints are called cross-origin from the Tabby/Electron renderer (and the browser
web-client), so without CORS headers Chromium blocks the fetch ("cannot reach the server"). Add
Access-Control-Allow-Origin: * (+ allow headers authorization/content-type, methods GET/POST/OPTIONS)
to every response and answer preflight OPTIONS with 204. No cookies are used (bearer token in a
header), so '*' is safe. Verified: OPTIONS -> 204 + headers; POST -> 400 with the CORS header.
On the login form, "Create account" now calls register() with the entered email/password instead of
switching to a separate register mode that required a second button press. Drops the standalone
register mode; on success it goes straight to the email-verification step.
Ship a working default so the plugin reaches the hosted server out of the box (no manual setup); the
empty `peershell: {}` config now inherits this default. Overridable in Settings for self-hosting.
…ogout menu, password reset

- Server: registration is adaptive — if the verification email cannot be delivered (no SMTP configured
  or send fails), the account is auto-verified and a token is returned immediately, so users aren't
  stranded behind a code they can't receive; when email works, the verify-then-login flow is kept.
  Existing verified email -> { alreadyRegistered }. New endpoints POST /request-password-reset +
  /reset-password (code via the same email/log path, 15-min TTL, timing-safe). deliverVerifyCode gains
  a 'reset' kind for the message.
- Client: "Create account" now closes the modal and logs in on auto-verify, or goes to verify only when
  a code was emailed; "Forgot password?" link + reset-request/reset modes. Toolbar menu shows "Log out
  (email)" when signed in and "Log in" otherwise (direct logout); PeershellService.logout() added.
- Tests: auth suite injects a mailer stub (keeps the verify flow) + a new auto-verify-without-email
  case. 42 tests green. Live-verified on the box: register -> { token, autoVerified: true }.
tis24dev and others added 17 commits July 9, 2026 11:12
- Server: persist a per-account share history (store.shares, capped) — a record on create-session,
  closed (endedAt) when the host disconnects. GET /sessions now returns live AND closed/expired shares
  with createdAt/endedAt/live. Serve a minimal account dashboard at GET / (same-origin, no CORS):
  email/password with entra/registra/recupera (prompt() for verify/2FA/reset codes), then a top bar
  (email + logout) and a table of the account's sessions (viva/morta, opened/closed time, open link if live).
- Plugin settings tab now filters to live shares only (GET /sessions includes ended ones).
- Verified live: dashboard served; session history tracks live -> ended on host disconnect. 42 tests green.
… plaintext

Passwords were already salted-hashed (pbkdf2), never plaintext. Upgrade to scrypt (memory-hard,
Node stdlib) stored as a self-describing scrypt$N$r$p$salt$hash string; verification is constant-time
(timingSafeEqual). Legacy pbkdf2 accounts still verify and are transparently re-hashed to scrypt on
their next successful login (WordPress-style upgrade-on-login). Verified live: the stored account holds
only `pwhash` (scrypt$...) — no plaintext / salt / hash fields, the password appears nowhere in the
store, and login succeeds. 42 tests green.
…change-password endpoint

- Server: POST /change-password (auth): verify current password, set a new scrypt hash.
- Dashboard: a "settings" button in the top bar opens a Settings view — change password, and enable
  2FA (setup shows the authenticator key + otpauth URL, confirm with a code) or disable it (password).
  2FA state comes from GET /sessions (account.totpEnabled).
- Plugin login already handles the 2FA prompt (login -> needsTotp -> verify2fa); now reachable once 2FA
  is enabled from the dashboard. Verified end-to-end live: change-password + 2FA setup/enable/login. 42 tests green.
…R for 2FA setup

- Settings now has two buttons: "Change password" (reveals the password form) and "2FA" (shows the
  two-factor status and enable/disable). Enabling shows a scannable QR code (plus the text key).
- QR is generated in the browser from the otpauth URL using qrcode-generator (MIT, zero-dep), vendored
  as server/src/qrcode.js and served at GET /qrcode.js — the TOTP secret never goes to a third party.
- USER_GUIDE updated. Verified live: /qrcode.js served (200, 56 KB), lib produces a valid img tag,
  dashboard wired. 42 tests green.
…tifacts)

Port the addhOn/proxsave release pipeline to this Node monorepo:
- .github/scripts/release-policy.sh: shared gate helpers; version helpers adapted to the 4 workspace
  package.json in lockstep (the "hybrid version-file", canonical = clients/tabby), via node.
- Workflows: ci (lint/build/test/smoke/version-lockstep/audit), codeql (best-effort on private repo),
  release-intake (pr-v* -> version bump + PR dev->main with marker), release-guard (validate PR),
  post-merge-release (squash gate -> fast-forward dev -> create immutable v* tag + Release),
  release (build:all -> package-plugin.mjs zip -> SHA256SUMS -> ECDSA sign+verify against pinned pubkey
  -> upload -> npm publish tabby-peershell + @peershell/protocol). Secrets: PEERSHELL_RELEASE_BOT_TOKEN,
  PEERSHELL_NPM_TOKEN, PEERSHELL_KEY_SIGNATURE. Pinned pubkey at .github/keys/peershell_release.pub.
- scripts/package-plugin.mjs (stage plugin + zip via python3), scripts/check-version-lockstep.mjs.
- ESLint (@typescript-eslint) config + root lint script; lint is clean.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @tis24dev, your pull request is larger than the review limit of 150000 diff characters

@coderabbitai

coderabbitai Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR establishes the peershell monorepo end-to-end: a shared protocol/transport/auth library, a Tabby desktop plugin (host sharing and guest mirroring), a browser client, a Node relay/account server with a bundled QR generator, extensive unit/integration tests, CI/CodeQL/release-automation workflows, packaging scripts, and project documentation.

Changes

Shared protocol library

Layer / File(s) Summary
Protocol framing, control messages, PIN auth
shared/src/protocol.ts, shared/src/pinAuth.ts, shared/src/api.ts, shared/src/base64.ts, shared/src/utf8Splitter.ts, shared/src/index.ts, shared/package.json, shared/tsconfig.json, shared/test/protocol.test.ts, shared/test/pinAuth.test.ts, shared/test/utf8Splitter.test.ts
Defines binary/control frame encode/decode, room/token/tunnel-path validators, PIN nonce/hash/verify utilities, and Base64/UTF-8 helpers, all covered by unit tests.
WebSocket transport and HTTP tunnel handler
shared/src/websocketTransport.ts, shared/src/httpTunnelHandler.ts, shared/test/websocketTransport.test.ts, shared/test/httpTunnelHandler.test.ts, shared/test/transport.integration.test.ts, shared/test/tunnel.integration.test.ts
Implements a SessionTransport over WebSockets with keepalive/state handling and a reverse HTTP tunnel frame handler with path whitelisting.
Guest MirrorController
shared/src/mirrorController.ts, shared/test/mirrorController.test.ts
Implements guest-side join/PIN-answer/snapshot/resize/end lifecycle bridging transport to a sink.

Relay/account server

Layer / File(s) Summary
Server bootstrap, crypto, email
server/package.json, server/src/README.md, server/src/index.cjs (top sections)
Adds package metadata, token/crypto helpers, Brevo email delivery with log fallback, password (scrypt/PBKDF2) and TOTP utilities.
Relay startup and REST/WS handlers
server/src/index.cjs
Implements startRelay, account persistence, REST endpoints, HTTP routing/tunnel resolution, WebSocket lifecycle/signal handling, reaping, and shutdown.
Bundled QR generator
server/src/qrcode.js
Vendors a full QR code generator for TOTP setup rendering.
Server tests
shared/test/auth.integration.test.ts, shared/test/email.test.ts
Integration/unit tests for account auth flows and email delivery.

Tabby desktop client

Layer / File(s) Summary
Config, account service, login modal
clients/tabby/src/config.ts, .../account/account.service.ts, .../account/login-modal.component.ts
Adds default config, REST account client with token persistence, and the modal covering login/register/verify/2FA/reset/logout.
Host share controller and modal
.../host/shareController.ts, .../host/share-info-modal.component.ts, test/shareController.test.ts
Implements PIN-gated share/snapshot/stream/stop logic and the share-info modal, with unit tests.
Guest mirror session/tab
.../guest/mirrorSession.ts, .../guest/mirrorTab.component.ts, test/hostGuest.integration.test.ts
Bridges guest session to a terminal tab and validates end-to-end host/guest interop including wrong-PIN handling.
Service, providers, module wiring, settings
.../services/peershell.service.ts, .../providers/*, .../index.ts, .../types/tabby.d.ts, .../settings/*
Orchestrates share/join/menu flows, registers toolbar/context-menu/settings providers, module entrypoint, and ambient Tabby type shims.
Build config and smoke test
clients/tabby/package.json, tsconfig.json, webpack.config.mjs, test/smoke-load.cjs
Configures the plugin build/bundle and validates the built UMD bundle loads and instantiates.

Web browser client

Layer / File(s) Summary
Browser terminal UI
clients/web/src/index.html, index.ts, package.json, tsconfig.json, webpack.config.mjs
Implements the magic-link based browser terminal with xterm, PIN overlay, mobile keybar, and reconnect logic.

Infrastructure

Layer / File(s) Summary
Root config, lint, test tooling
package.json, .eslintrc.cjs, jest.config.cjs, jest.setup.cjs, tsconfig.jest.json, .gitignore
Sets up workspaces, ESLint, Jest, and ignore rules.
Build/packaging/publish scripts
scripts/*.mjs
Copies web assets, checks version lockstep, packages the plugin zip, and publishes npm workspaces.
CI/release workflows
.github/scripts/release-policy.sh, .github/workflows/*.yml
Adds CI, CodeQL, release-guard, release-intake, post-merge-release, and release workflows built on shared release-policy helpers.
Documentation
PROTOCOL.md, README.md, USER_GUIDE.md
Documents the wire protocol, project setup, and end-user behavior/security model.

Estimated code review effort: 4 (Complex) | ~75 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Host
  participant Relay
  participant Guest
  Host->>Relay: create-session
  Relay-->>Host: session-created (room, magicLink)
  Guest->>Relay: join(room)
  Relay-->>Host: peer-joined
  Host->>Guest: pin-challenge(nonce)
  Guest->>Host: pin-response(hash)
  Host->>Guest: pin-ok + snapshot
  Guest->>Host: snapshot-ack
  Host->>Guest: stream terminal output
  Guest->>Host: forward keystrokes
Loading
sequenceDiagram
  participant DevBranch
  participant ReleaseIntake
  participant ReleaseGuard
  participant PostMergeRelease
  participant ReleaseWorkflow
  DevBranch->>ReleaseIntake: push pr-vX.Y.Z tag
  ReleaseIntake->>ReleaseGuard: open PR dev->main
  ReleaseGuard->>PostMergeRelease: PR merged
  PostMergeRelease->>ReleaseWorkflow: gh release create
  ReleaseWorkflow->>ReleaseWorkflow: build, sign, publish npm
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 31.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the release PR and identifies the target version being merged.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread server/src/index.cjs
const bytes = crypto.randomBytes(n)
let out = ''
for (let i = 0; i < n; i++) {
out += CODE_ALPHABET[bytes[i] % CODE_ALPHABET.length]
Comment thread server/src/index.cjs
}
function base32Decode(str) {
let bits = ''
for (const c of String(str).toUpperCase().replace(/=+$/, '')) {
@tis24dev
tis24dev merged commit 5c371bf into main Jul 9, 2026
7 of 9 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 15

🧹 Nitpick comments (3)
.github/workflows/release.yml (1)

35-36: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Avoid the npm install fallback in the release/publish pipeline.

npm ci || npm install silently falls back to npm install when npm ci fails (e.g. a lockfile mismatch), which can resolve different dependency versions than package-lock.json. Since this job produces the signed tabby-peershell.zip and the packages published to npm, a fallback would compromise build reproducibility and the integrity guarantee behind the checksum/signature. Prefer failing hard here so a bad lockfile blocks the release rather than mutating the dependency tree.

♻️ Suggested change
-      - name: Install
-        run: npm ci || npm install
+      - name: Install
+        run: npm ci
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 35 - 36, The release pipeline’s
Install step currently falls back from npm ci to npm install, which can change
resolved dependencies and break release reproducibility. Update the workflow
step in release.yml so the release/publish job uses only npm ci and fails hard
on lockfile or install mismatches. Keep the change localized to the Install step
in the release workflow to preserve the integrity of the tabby-peershell.zip
artifact and npm publish output.
.github/workflows/ci.yml (1)

29-32: 🔒 Security & Privacy | 🔵 Trivial | ⚖️ Poor tradeoff

Optional: pin actions/setup-node (and other actions) to a commit SHA.

actions/checkout is SHA-pinned, but setup-node@v4 (and github/codeql-action@v3 in codeql.yml) use mutable tags. Pinning all actions to a full commit SHA gives consistent supply-chain hardening across the workflows.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 29 - 32, The workflow currently uses a
mutable tag for actions/setup-node, so pin it to a full commit SHA to match the
existing supply-chain hardening approach used for actions/checkout. Update the
setup-node step in the CI workflow to reference the specific commit SHA, and
apply the same treatment to any other unpinned actions such as
github/codeql-action in the CodeQL workflow.
clients/tabby/src/account/account.service.ts (1)

49-74: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

Add a timeout to fetch calls to prevent UI freeze.

The fetch on line 59 has no timeout. If the server accepts the connection but never responds, the await never settles, busy stays true, and the modal's Close button remains disabled. While ng-bootstrap allows Escape-dismiss, the UX is poor. Consider wiring an AbortController with a reasonable timeout (e.g., 15–30 s).

⏱️ Proposed timeout wrapper
     private async api(method: string, path: string, body?: unknown, auth = false): Promise<AccountApiResult> {
         const headers: Record<string, string> = { 'content-type': 'application/json' }
         if (auth) {
             const t = this.getToken()
             if (t) {
                 headers.authorization = `Bearer ${t}`
             }
         }
+        const controller = new AbortController()
+        const timeout = setTimeout(() => controller.abort(), 20000)
         let res: Response
         try {
             res = await fetch(this.base() + path, {
                 method,
                 headers,
                 body: body === undefined ? undefined : JSON.stringify(body),
+                signal: controller.signal,
             })
         } catch (err) {
             // eslint-disable-next-line no-console
             console.error('[peershell] fetch failed:', method, this.base() + path, err)
-            return { status: 0, error: 'network-error', detail: String((err as any)?.message ?? err) }
+            const aborted = (err as Error)?.name === 'AbortError'
+            return { status: 0, error: aborted ? 'timeout' : 'network-error', detail: String((err as any)?.message ?? err) }
+        } finally {
+            clearTimeout(timeout)
         }
         let json: Record<string, unknown> = {}
         try {
             json = await res.json()
         } catch { /* empty/non-json body */ }
         return { ...json, status: res.status }
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@clients/tabby/src/account/account.service.ts` around lines 49 - 74, The
AccountService.api fetch path can hang indefinitely because it currently awaits
fetch without any timeout, which leaves callers stuck in a busy state. Update
api in account.service.ts to use an AbortController (or equivalent timeout
wrapper) around the fetch call, pass the abort signal into fetch, and abort
after a reasonable duration such as 15–30 seconds. Make sure the timeout is
cleaned up after completion and that the existing error handling in api still
returns a network-error result when the request is aborted.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@clients/tabby/src/account/account.service.ts`:
- Line 73: The object spread in account.service’s response mapping allows the
server JSON to overwrite the HTTP status, so reverse the merge order in the
return inside the account service response handling to ensure res.status always
takes precedence over any status field from json. Update the return in the
relevant account service method so callers relying on r.status see the actual
HTTP status, regardless of response body contents.

In `@clients/tabby/src/account/login-modal.component.ts`:
- Around line 176-244: The remaining handlers in LoginModalComponent are missing
the same error handling pattern used by submitLogin and submitRegister, so
unexpected throws can bypass user-facing feedback. Update submitVerify,
submit2fa, submitResetRequest, submitReset, and doLogout to use
try/catch/finally, set this.error from the caught exception, and keep the
existing busy reset/flow behavior intact. Make the change in the corresponding
methods of LoginModalComponent so all submit paths fail consistently and surface
errors through the modal.

In `@clients/tabby/src/host/shareController.ts`:
- Around line 93-97: Reset the streaming subscriptions when handling `peer-left`
in `ShareController` so old `beginStream()` listeners do not survive a
reconnection. Clean up the `output$` and `resize$` subscriptions stored in
`this.subs` when the peer disconnects, then reinitialize them on the next
successful join/auth flow. Also make the `resize$` handler in `beginStream()`
respect the same streaming/authenticated guard as `output$` so it does not emit
during the PIN challenge or after a disconnect.
- Around line 58-71: Both start() and verifyResponse() can resume after an await
even if stop() already ran, which can trigger side effects on a closed session.
In shareController.ts, add a this.stopped check immediately after await
transport.connect() in start(), and after await verifyPin() in verifyResponse(),
then return early if the controller has been stopped. This prevents sending
hello/create-session or pin-ok/snapshot and avoids calling onAuthenticated for a
dead session.

In `@PROTOCOL.md`:
- Around line 43-44: The spec currently promises rejecting unknown protocol
versions with error{code:"bad-version"}, but the runtime path does not enforce
this yet. Update the implementation in shared/src/protocol.ts and
decodeControl()/WebSocketTransport so decoded control messages are validated
against PROTOCOL_VERSION before being forwarded, and emit the bad-version error
on mismatch; if you are not adding that gate now, soften the wording in
PROTOCOL.md to match the current behavior.

In `@README.md`:
- Around line 23-28: The README fenced examples are missing language
identifiers, which triggers markdownlint MD040 and reduces readability. Update
each fenced block in the README sections referenced here to use an explicit
fence language such as text or sh, and keep the existing content unchanged. Use
the markdown fences around the project layout and related examples as the
targets for this cleanup.

In `@server/src/index.cjs`:
- Around line 805-807: The dashboard response in the GET handler for '/' and
'/index.html' is missing iframe protection, so update the response headers in
this branch to prevent framing. Add an X-Frame-Options header (for example DENY
or SAMEORIGIN) and, if this is handled elsewhere in the server, ensure the same
protection is applied via a frame-ancestors CSP for the dashboard served by the
index.cjs GET route.
- Around line 548-557: The re-registration flow in findAccount/email handling
leaves an unverified account’s password unchanged, allowing the original
registrant to keep control. In the branch where existing is found and
existing.verified is false, update the stored password to the new registration
password before calling saveStore() and deliverVerifyCode(), so the account
state reflects the latest re-registration attempt.
- Around line 307-308: The startRelay Promise only captures resolve, so listen
failures on server.listen are not surfaced to callers and can crash the process;
update startRelay to accept reject in the Promise executor and add an error
handler on the server instance so listen errors are passed to reject instead of
being uncaught.
- Line 282: The dashboard row rendering in the load path is inserting
s.magicLink directly into innerHTML, which can break the href attribute if
PUBLIC_URL contains quotes or HTML characters. Add a small escape helper near
the dashboard script setup and use it when building the anchor in the load
function so the magicLink value is HTML-escaped before concatenation. Focus on
the logic around load, fmt, and the tr.innerHTML construction that emits the
open link.

In `@shared/src/httpTunnelHandler.ts`:
- Around line 24-35: The http-get handler in HttpTunnelHandler.handle should
guard the serveHtml() call with try-catch so exceptions don’t escape the
transport callback and crash the WebSocket. On failure, return a 500
http-response with a plain-text error body instead of letting the error
propagate, while keeping the existing allowed/forbidden path handling unchanged.

In `@shared/src/mirrorController.ts`:
- Around line 57-62: The wrong-PIN retry path in MirrorController still reuses a
cached PIN value, so the next challenge can resend the same bad input instead of
prompting again. Update the retry flow in MirrorController.pin-fail handling and
the web client cache in clients/web/src/index.ts so that when pin-fail reports
retries left, the cached PIN is cleared or invalidated before the next
challenge; use the existing answerPin and PinProvider flow to ensure the
provider is invoked again on retry.

In `@shared/src/protocol.ts`:
- Around line 53-55: `encodeControl` is allowing a caller-provided `v` to
override the protocol version stamp. Update the object construction in
`encodeControl` so the stamped `PROTOCOL_VERSION` wins by placing `v` after the
spread from `msg`, ensuring the serialized control message always carries the
authoritative version.

In `@shared/src/websocketTransport.ts`:
- Line 80: The connect() promise can hang when ws.onclose fires during the
connecting state without a prior onerror. Update websocketTransport’s connection
lifecycle so ws.onclose checks whether the instance is still connecting and, if
so, rejects the pending connect() promise before setting the state to closed;
keep the existing closed-state transition for non-connecting cases. Use the
connect() logic and ws.onclose handler in websocketTransport to locate the fix,
and make sure the fake WS close path is covered.

In `@USER_GUIDE.md`:
- Around line 85-99: The Tabby install instructions in USER_GUIDE.md conflict
with the README about whether tabby-peershell is manually copied or installed
from npm. Update the plugin setup section so it matches the supported install
flow described by the README and the package location under clients/tabby/, and
make sure the wording in the installation steps and publishing note are
consistent. Refer to the Tabby plugin install/verify section and the
tabby-peershell package name when editing.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 29-32: The workflow currently uses a mutable tag for
actions/setup-node, so pin it to a full commit SHA to match the existing
supply-chain hardening approach used for actions/checkout. Update the setup-node
step in the CI workflow to reference the specific commit SHA, and apply the same
treatment to any other unpinned actions such as github/codeql-action in the
CodeQL workflow.

In @.github/workflows/release.yml:
- Around line 35-36: The release pipeline’s Install step currently falls back
from npm ci to npm install, which can change resolved dependencies and break
release reproducibility. Update the workflow step in release.yml so the
release/publish job uses only npm ci and fails hard on lockfile or install
mismatches. Keep the change localized to the Install step in the release
workflow to preserve the integrity of the tabby-peershell.zip artifact and npm
publish output.

In `@clients/tabby/src/account/account.service.ts`:
- Around line 49-74: The AccountService.api fetch path can hang indefinitely
because it currently awaits fetch without any timeout, which leaves callers
stuck in a busy state. Update api in account.service.ts to use an
AbortController (or equivalent timeout wrapper) around the fetch call, pass the
abort signal into fetch, and abort after a reasonable duration such as 15–30
seconds. Make sure the timeout is cleaned up after completion and that the
existing error handling in api still returns a network-error result when the
request is aborted.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a4928c80-7662-4852-a868-290bc55823b6

📥 Commits

Reviewing files that changed from the base of the PR and between ce67703 and 5260710.

⛔ Files ignored due to path filters (2)
  • .github/keys/peershell_release.pub is excluded by !**/*.pub
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (70)
  • .eslintrc.cjs
  • .github/scripts/release-policy.sh
  • .github/workflows/ci.yml
  • .github/workflows/codeql.yml
  • .github/workflows/post-merge-release.yml
  • .github/workflows/release-guard.yml
  • .github/workflows/release-intake.yml
  • .github/workflows/release.yml
  • .gitignore
  • PROTOCOL.md
  • README.md
  • USER_GUIDE.md
  • clients/tabby/package.json
  • clients/tabby/src/account/account.service.ts
  • clients/tabby/src/account/login-modal.component.ts
  • clients/tabby/src/config.ts
  • clients/tabby/src/guest/mirrorSession.ts
  • clients/tabby/src/guest/mirrorTab.component.ts
  • clients/tabby/src/host/share-info-modal.component.ts
  • clients/tabby/src/host/shareController.ts
  • clients/tabby/src/index.ts
  • clients/tabby/src/providers/tabContextMenu.ts
  • clients/tabby/src/providers/toolbarButtonProvider.ts
  • clients/tabby/src/services/peershell.service.ts
  • clients/tabby/src/settings/settings-tab.component.ts
  • clients/tabby/src/settings/settings-tab.provider.ts
  • clients/tabby/src/types/tabby.d.ts
  • clients/tabby/test/hostGuest.integration.test.ts
  • clients/tabby/test/shareController.test.ts
  • clients/tabby/test/smoke-load.cjs
  • clients/tabby/tsconfig.json
  • clients/tabby/webpack.config.mjs
  • clients/web/package.json
  • clients/web/src/index.html
  • clients/web/src/index.ts
  • clients/web/tsconfig.json
  • clients/web/webpack.config.mjs
  • jest.config.cjs
  • jest.setup.cjs
  • package.json
  • scripts/check-version-lockstep.mjs
  • scripts/copy-web-asset.mjs
  • scripts/package-plugin.mjs
  • scripts/publish-plugins.mjs
  • server/package.json
  • server/src/README.md
  • server/src/index.cjs
  • server/src/qrcode.js
  • shared/package.json
  • shared/src/api.ts
  • shared/src/base64.ts
  • shared/src/httpTunnelHandler.ts
  • shared/src/index.ts
  • shared/src/mirrorController.ts
  • shared/src/pinAuth.ts
  • shared/src/protocol.ts
  • shared/src/utf8Splitter.ts
  • shared/src/websocketTransport.ts
  • shared/test/auth.integration.test.ts
  • shared/test/email.test.ts
  • shared/test/httpTunnelHandler.test.ts
  • shared/test/mirrorController.test.ts
  • shared/test/pinAuth.test.ts
  • shared/test/protocol.test.ts
  • shared/test/transport.integration.test.ts
  • shared/test/tunnel.integration.test.ts
  • shared/test/utf8Splitter.test.ts
  • shared/test/websocketTransport.test.ts
  • shared/tsconfig.json
  • tsconfig.jest.json

try {
json = await res.json()
} catch { /* empty/non-json body */ }
return { status: res.status, ...json }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Spread order lets server JSON overwrite the HTTP status.

{ status: res.status, ...json } — if the server response body ever includes a status key, it silently overwrites the HTTP status code. Downstream callers (e.g., r.status === 200 checks in the login modal) would then see the wrong value. Reverse the spread so the HTTP status always wins.

🐛 Proposed fix
-        return { status: res.status, ...json }
+        return { ...json, status: res.status }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
return { status: res.status, ...json }
return { ...json, status: res.status }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@clients/tabby/src/account/account.service.ts` at line 73, The object spread
in account.service’s response mapping allows the server JSON to overwrite the
HTTP status, so reverse the merge order in the return inside the account service
response handling to ensure res.status always takes precedence over any status
field from json. Update the return in the relevant account service method so
callers relying on r.status see the actual HTTP status, regardless of response
body contents.

Comment on lines +176 to +244
async submitVerify(): Promise<void> {
this.busy = true
this.error = ''
try {
const r = await this.account.verifyEmail(this.normEmail, this.code.trim())
if (r.status === 200) {
this.switch('login')
this.info = 'Email verified. You can log in now.'
} else {
this.fail(r)
}
} finally {
this.busy = false
}
}

async submit2fa(): Promise<void> {
this.busy = true
this.error = ''
try {
const r = await this.account.verify2fa(this.sessionKey, this.code.trim())
if (r.status === 200 && r.token) {
await this.account.persist(this.normEmail, r.token, r.expiresAt)
this.modal.close(r.token)
return
}
this.fail(r)
} finally {
this.busy = false
}
}

async submitResetRequest(): Promise<void> {
this.busy = true
this.error = ''
try {
await this.account.requestPasswordReset(this.normEmail)
this.switch('reset')
this.info = 'If that email exists, a reset code was sent (check your email or the server log).'
} finally {
this.busy = false
}
}

async submitReset(): Promise<void> {
this.busy = true
this.error = ''
try {
const r = await this.account.resetPassword(this.normEmail, this.code.trim(), this.newPassword)
if (r.status === 200) {
this.switch('login')
this.info = 'Password changed. Please log in.'
} else {
this.fail(r)
}
} finally {
this.busy = false
}
}

async doLogout(): Promise<void> {
this.busy = true
try {
await this.account.logout()
this.modal.close(null)
} finally {
this.busy = false
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Add catch blocks to remaining submit handlers for consistency.

submitLogin and submitRegister wrap their API calls in try/catch/finally, surfacing unexpected errors via this.error. The other handlers (submitVerify, submit2fa, submitResetRequest, submitReset, doLogout) only use try/finally — an unexpected throw would propagate as an unhandled rejection with no user feedback. While AccountService.api() catches fetch errors internally, non-network exceptions (e.g., JSON.stringify on a circular body, or a future code change) would escape silently.

🛡️ Proposed fix — add catch to submitVerify (repeat for others)
     async submitVerify(): Promise<void> {
         this.busy = true
         this.error = ''
         try {
             const r = await this.account.verifyEmail(this.normEmail, this.code.trim())
             if (r.status === 200) {
                 this.switch('login')
                 this.info = 'Email verified. You can log in now.'
             } else {
                 this.fail(r)
             }
+        } catch (e) {
+            this.error = `Unexpected error: ${String((e as { message?: string })?.message ?? e)}`
         } finally {
             this.busy = false
         }
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@clients/tabby/src/account/login-modal.component.ts` around lines 176 - 244,
The remaining handlers in LoginModalComponent are missing the same error
handling pattern used by submitLogin and submitRegister, so unexpected throws
can bypass user-facing feedback. Update submitVerify, submit2fa,
submitResetRequest, submitReset, and doLogout to use try/catch/finally, set
this.error from the caught exception, and keep the existing busy reset/flow
behavior intact. Make the change in the corresponding methods of
LoginModalComponent so all submit paths fail consistently and surface errors
through the modal.

Comment on lines +58 to +71
async start(serverUrl: string, token?: string): Promise<void> {
this.transport.onControl(m => this.onControl(m))
this.transport.onBinary(f => {
// Reject any input until the guest has passed the PIN.
if (f.channel === Channel.Input && this.authenticated) {
this.tab.sendInput(f.data)
}
})
this.subs.add(this.tab.closed$.subscribe(() => this.stop('host-ended')))

await this.transport.connect(serverUrl, token)
this.transport.sendControl({ t: 'hello', role: 'host', kind: 'desktop', client: 'tabby-peershell' })
this.transport.sendControl({ t: 'create-session' })
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Async methods don't check this.stopped after await, allowing post-stop side effects.

verifyResponse() (line 112) awaits verifyPin(). If stop() fires during that await (e.g., tab closed), the method resumes and sends pin-ok/snapshot on a closed transport and invokes onAuthenticated for a dead session. Similarly, start() (line 68) awaits transport.connect() — if stop() fires during connect (via the closed$ subscription wired on line 66), hello and create-session are sent on a closing transport.

🔒 Fix: guard after each await
     async start(serverUrl: string, token?: string): Promise<void> {
         this.transport.onControl(m => this.onControl(m))
         this.transport.onBinary(f => {
             if (f.channel === Channel.Input && this.authenticated) {
                 this.tab.sendInput(f.data)
             }
         })
         this.subs.add(this.tab.closed$.subscribe(() => this.stop('host-ended')))

         await this.transport.connect(serverUrl, token)
+        if (this.stopped) return
         this.transport.sendControl({ t: 'hello', role: 'host', kind: 'desktop', client: 'tabby-peershell' })
         this.transport.sendControl({ t: 'create-session' })
     }
     private async verifyResponse(hash: string): Promise<void> {
         const ok = await verifyPin(this.pin, this.nonce, hash)
+        if (this.stopped) return
         if (ok) {
             this.authenticated = true
             this.transport.sendControl({ t: 'pin-ok' })
             this.hooks.onAuthenticated?.()
             this.sendSnapshot()
             return
         }

Also applies to: 111-128

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@clients/tabby/src/host/shareController.ts` around lines 58 - 71, Both start()
and verifyResponse() can resume after an await even if stop() already ran, which
can trigger side effects on a closed session. In shareController.ts, add a
this.stopped check immediately after await transport.connect() in start(), and
after await verifyPin() in verifyResponse(), then return early if the controller
has been stopped. This prevents sending hello/create-session or pin-ok/snapshot
and avoids calling onAuthenticated for a dead session.

Comment on lines +93 to +97
case 'peer-left':
this.streaming = false
this.authenticated = false
this.hooks.onPeerLeft?.(m.reason)
break

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Streaming subscriptions leak across peer reconnections, causing duplicate output and resize messages.

When peer-left is received (line 93-97), streaming and authenticated are reset but the output$/resize$ subscriptions added by beginStream() remain in this.subs. When a new guest joins and authenticates, beginStream() passes its guard (since streaming was set to false) and adds new subscriptions on top of the old ones. Both old and new output$ subscriptions fire and call sendData → duplicate output. The resize$ subscription (line 150-152) lacks a this.streaming guard entirely, so it sends resize messages even during the PIN challenge phase of the new peer.

This is a real reconnection scenario — PeershellService has a 10s grace window for guest reconnects (see peershell.service.ts onPeerLeft/onPeerJoined), so a peer leaving and rejoining is expected behavior.

🔧 Fix: separate streaming subscriptions and clean them up on peer-left
 export class ShareController {
     room: string | null = null
     magicLink: string | null = null

     private subs = new Subscription()
+    private streamSubs = new Subscription()
     private streaming = false
     private authenticated = false
     private peerId = SINGLE_PEER
     private stopped = false
     private nonce = ''
     private attemptsLeft = MAX_PIN_ATTEMPTS

     constructor(
         private readonly transport: SessionTransport,
         private readonly tab: HostTerminal,
         private readonly pin: string,
         private readonly hooks: ShareHooks = {},
     ) {}

     async start(serverUrl: string, token?: string): Promise<void> {
         this.transport.onControl(m => this.onControl(m))
         this.transport.onBinary(f => {
             if (f.channel === Channel.Input && this.authenticated) {
                 this.tab.sendInput(f.data)
             }
         })
         this.subs.add(this.tab.closed$.subscribe(() => this.stop('host-ended')))

         await this.transport.connect(serverUrl, token)
         this.transport.sendControl({ t: 'hello', role: 'host', kind: 'desktop', client: 'tabby-peershell' })
         this.transport.sendControl({ t: 'create-session' })
     }

     private onControl(m: ControlMessage): void {
         switch (m.t) {
             case 'session-created':
                 this.room = m.room
                 this.magicLink = m.magicLink
                 this.hooks.onSession?.({ room: m.room, magicLink: m.magicLink })
                 break
             case 'peer-joined':
                 this.peerId = m.peerId ?? SINGLE_PEER
                 this.authenticated = false
                 this.attemptsLeft = MAX_PIN_ATTEMPTS
                 this.hooks.onPeerJoined?.()
                 this.challenge()
                 break
             case 'pin-response':
                 void this.verifyResponse(m.hash)
                 break
             case 'snapshot-ack':
                 this.beginStream()
                 break
             case 'peer-left':
                 this.streaming = false
                 this.authenticated = false
+                this.streamSubs.unsubscribe()
+                this.streamSubs = new Subscription()
                 this.hooks.onPeerLeft?.(m.reason)
                 break
             case 'error':
                 this.hooks.onError?.(m.code, m.message)
                 break
             default:
                 break
         }
     }

     private beginStream(): void {
         if (this.streaming || this.stopped || !this.authenticated) {
             return
         }
         this.streaming = true
-        this.subs.add(this.tab.output$.subscribe(data => {
+        this.streamSubs.add(this.tab.output$.subscribe(data => {
             if (this.streaming) {
                 this.transport.sendData(this.peerId, Channel.Output, data)
             }
         }))
-        this.subs.add(this.tab.resize$.subscribe(sz => {
+        this.streamSubs.add(this.tab.resize$.subscribe(sz => {
             this.transport.sendControl({ t: 'resize', cols: sz.cols, rows: sz.rows })
         }))
     }

     stop(reason = 'stopped'): void {
         if (this.stopped) {
             return
         }
         this.stopped = true
         if (this.room !== null) {
             this.transport.sendControl({ t: 'peer-left', reason })
             this.transport.sendControl({ t: 'session-close' })
         }
         this.streaming = false
         this.authenticated = false
         this.subs.unsubscribe()
+        this.streamSubs.unsubscribe()
         this.transport.close(1000, reason)
     }
 }

Also applies to: 140-153

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@clients/tabby/src/host/shareController.ts` around lines 93 - 97, Reset the
streaming subscriptions when handling `peer-left` in `ShareController` so old
`beginStream()` listeners do not survive a reconnection. Clean up the `output$`
and `resize$` subscriptions stored in `this.subs` when the peer disconnects,
then reinitialize them on the next successful join/auth flow. Also make the
`resize$` handler in `beginStream()` respect the same streaming/authenticated
guard as `output$` so it does not emit during the PIN challenge or after a
disconnect.

Comment thread PROTOCOL.md
Comment on lines +43 to +44
`v` is `PROTOCOL_VERSION` (currently 1). Unknown/incompatible `v` -> `error{code:"bad-version"}`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Reject the version promise until the runtime enforces it.

shared/src/protocol.ts stamps v, but decodeControl() only checks t, and WebSocketTransport forwards the decoded message without rejecting mismatched versions. This spec currently promises error{code:"bad-version"} that the implementation path does not emit. Either add the version gate or soften the spec before freezing it.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@PROTOCOL.md` around lines 43 - 44, The spec currently promises rejecting
unknown protocol versions with error{code:"bad-version"}, but the runtime path
does not enforce this yet. Update the implementation in shared/src/protocol.ts
and decodeControl()/WebSocketTransport so decoded control messages are validated
against PROTOCOL_VERSION before being forwarded, and emit the bad-version error
on mismatch; if you are not adding that gate now, soften the wording in
PROTOCOL.md to match the current behavior.

Comment on lines +24 to +35
private handle(m: Extract<ControlMessage, { t: 'http-get' }>): void {
const allowed = isAllowedTunnelPath(m.path)
const body = allowed ? this.serveHtml() : 'Forbidden'
this.transport.sendControl({
t: 'http-response',
peerId: m.peerId,
reqId: m.reqId,
status: allowed ? 200 : 403,
headers: { 'content-type': allowed ? 'text/html; charset=utf-8' : 'text/plain; charset=utf-8' },
bodyBase64: utf8ToBase64(body),
})
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Wrap serveHtml() in try-catch to prevent unhandled errors from crashing the WebSocket.

If serveHtml() throws, the error propagates unhandled through the transport's onControl callback dispatch (which has no try-catch around callback invocation), potentially crashing the WebSocket connection. A 500 response with an error body would be a safe fallback.

🔒 Proposed fix
 private handle(m: Extract<ControlMessage, { t: 'http-get' }>): void {
     const allowed = isAllowedTunnelPath(m.path)
-    const body = allowed ? this.serveHtml() : 'Forbidden'
-    this.transport.sendControl({
-        t: 'http-response',
-        peerId: m.peerId,
-        reqId: m.reqId,
-        status: allowed ? 200 : 403,
-        headers: { 'content-type': allowed ? 'text/html; charset=utf-8' : 'text/plain; charset=utf-8' },
-        bodyBase64: utf8ToBase64(body),
-    })
+    try {
+        const body = allowed ? this.serveHtml() : 'Forbidden'
+        this.transport.sendControl({
+            t: 'http-response',
+            peerId: m.peerId,
+            reqId: m.reqId,
+            status: allowed ? 200 : 403,
+            headers: { 'content-type': allowed ? 'text/html; charset=utf-8' : 'text/plain; charset=utf-8' },
+            bodyBase64: utf8ToBase64(body),
+        })
+    } catch {
+        this.transport.sendControl({
+            t: 'http-response',
+            peerId: m.peerId,
+            reqId: m.reqId,
+            status: 500,
+            headers: { 'content-type': 'text/plain; charset=utf-8' },
+            bodyBase64: utf8ToBase64('Internal Error'),
+        })
+    }
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
private handle(m: Extract<ControlMessage, { t: 'http-get' }>): void {
const allowed = isAllowedTunnelPath(m.path)
const body = allowed ? this.serveHtml() : 'Forbidden'
this.transport.sendControl({
t: 'http-response',
peerId: m.peerId,
reqId: m.reqId,
status: allowed ? 200 : 403,
headers: { 'content-type': allowed ? 'text/html; charset=utf-8' : 'text/plain; charset=utf-8' },
bodyBase64: utf8ToBase64(body),
})
}
private handle(m: Extract<ControlMessage, { t: 'http-get' }>): void {
const allowed = isAllowedTunnelPath(m.path)
try {
const body = allowed ? this.serveHtml() : 'Forbidden'
this.transport.sendControl({
t: 'http-response',
peerId: m.peerId,
reqId: m.reqId,
status: allowed ? 200 : 403,
headers: { 'content-type': allowed ? 'text/html; charset=utf-8' : 'text/plain; charset=utf-8' },
bodyBase64: utf8ToBase64(body),
})
} catch {
this.transport.sendControl({
t: 'http-response',
peerId: m.peerId,
reqId: m.reqId,
status: 500,
headers: { 'content-type': 'text/plain; charset=utf-8' },
bodyBase64: utf8ToBase64('Internal Error'),
})
}
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shared/src/httpTunnelHandler.ts` around lines 24 - 35, The http-get handler
in HttpTunnelHandler.handle should guard the serveHtml() call with try-catch so
exceptions don’t escape the transport callback and crash the WebSocket. On
failure, return a 500 http-response with a plain-text error body instead of
letting the error propagate, while keeping the existing allowed/forbidden path
handling unchanged.

Comment on lines +57 to +62
case 'pin-fail':
if (m.left <= 0) {
this.end('wrong PIN')
}
// left > 0: the host re-challenges, which re-prompts.
break

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Inspect all PinProvider implementations to confirm caching behavior on retry
rg -nP -C6 'PinProvider|cachedPin|askPin' --type=ts

Repository: tis24dev/peershell

Length of output: 156


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Map relevant files and inspect the controller plus web pin provider
git ls-files 'shared/src/mirrorController.ts' 'clients/web/src/index.ts' '*PinProvider*' '*pin*' | sed 's#^`#FILE` #'
echo '--- mirrorController outline ---'
ast-grep outline shared/src/mirrorController.ts --view expanded || true
echo '--- clients/web/src/index.ts outline ---'
ast-grep outline clients/web/src/index.ts --view expanded || true
echo '--- pin-related search ---'
rg -n -C 4 'pinProvider|PinProvider|cachedPin|askPin|pin-fail|answerPin|re-challenge|wrong PIN' shared clients --glob '!**/dist/**' --glob '!**/build/**'

Repository: tis24dev/peershell

Length of output: 24216


🏁 Script executed:

#!/bin/bash
set -euo pipefail

git ls-files 'shared/src/mirrorController.ts' 'clients/web/src/index.ts' '*PinProvider*' '*pin*' | sed 's#^`#FILE` #'
echo '--- mirrorController outline ---'
ast-grep outline shared/src/mirrorController.ts --view expanded || true
echo '--- clients/web/src/index.ts outline ---'
ast-grep outline clients/web/src/index.ts --view expanded || true
echo '--- pin-related search ---'
rg -n -C 4 'pinProvider|PinProvider|cachedPin|askPin|pin-fail|answerPin|re-challenge|wrong PIN' shared clients --glob '!**/dist/**' --glob '!**/build/**'

Repository: tis24dev/peershell

Length of output: 24216


Wrong-PIN retries reuse the cached value

pin-fail with left > 0 only helps if the next challenge prompts again. MirrorController.answerPin() calls PinProvider on every challenge, but the web client caches the first PIN in clients/web/src/index.ts:95-102, so the same wrong PIN is resent until attempts run out. Clear that cache on pin-fail or make the provider prompt again on retry.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shared/src/mirrorController.ts` around lines 57 - 62, The wrong-PIN retry
path in MirrorController still reuses a cached PIN value, so the next challenge
can resend the same bad input instead of prompting again. Update the retry flow
in MirrorController.pin-fail handling and the web client cache in
clients/web/src/index.ts so that when pin-fail reports retries left, the cached
PIN is cleared or invalidated before the next challenge; use the existing
answerPin and PinProvider flow to ensure the provider is invoked again on retry.

Comment thread shared/src/protocol.ts
Comment on lines +53 to +55
export function encodeControl(msg: ControlMessage): string {
return JSON.stringify({ v: PROTOCOL_VERSION, ...msg })
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Fix encodeControl spread order to guarantee version stamping.

The spread { v: PROTOCOL_VERSION, ...msg } allows a caller-supplied v field (present in the Base interface as v?: number) to override the stamped protocol version. The function's documented purpose is to stamp the version, so v should come last to be authoritative.

🐛 Proposed fix
 export function encodeControl(msg: ControlMessage): string {
-    return JSON.stringify({ v: PROTOCOL_VERSION, ...msg })
+    return JSON.stringify({ ...msg, v: PROTOCOL_VERSION })
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export function encodeControl(msg: ControlMessage): string {
return JSON.stringify({ v: PROTOCOL_VERSION, ...msg })
}
export function encodeControl(msg: ControlMessage): string {
return JSON.stringify({ ...msg, v: PROTOCOL_VERSION })
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shared/src/protocol.ts` around lines 53 - 55, `encodeControl` is allowing a
caller-provided `v` to override the protocol version stamp. Update the object
construction in `encodeControl` so the stamped `PROTOCOL_VERSION` wins by
placing `v` after the spread from `msg`, ensuring the serialized control message
always carries the authoritative version.

reject(new Error('peershell: WebSocket connection failed'))
}
}
ws.onclose = () => this.setState('closed')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Connect promise can hang if onclose fires without onerror during connecting.

ws.onclose only calls setState('closed') — it never rejects the promise from connect(). If the WebSocket closes while state === 'connecting' and onerror does not fire first (server closes during handshake, application calls close() mid-connect, or certain ws package behaviors), the promise hangs indefinitely, stalling the caller.

The test double FakeWS.close() confirms this is reachable: it fires onclose without onerror.

🔧 Proposed fix
-            ws.onclose = () => this.setState('closed')
+            ws.onclose = () => {
+                if (this.state === 'connecting') {
+                    reject(new Error('peershell: WebSocket closed during connect'))
+                }
+                this.setState('closed')
+            }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ws.onclose = () => this.setState('closed')
ws.onclose = () => {
if (this.state === 'connecting') {
reject(new Error('peershell: WebSocket closed during connect'))
}
this.setState('closed')
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shared/src/websocketTransport.ts` at line 80, The connect() promise can hang
when ws.onclose fires during the connecting state without a prior onerror.
Update websocketTransport’s connection lifecycle so ws.onclose checks whether
the instance is still connecting and, if so, rejects the pending connect()
promise before setting the state to closed; keep the existing closed-state
transition for non-connecting cases. Use the connect() logic and ws.onclose
handler in websocketTransport to locate the fix, and make sure the fake WS close
path is covered.

Comment thread USER_GUIDE.md
Comment on lines +85 to +99
The plugin adds peershell to **Tabby** (desktop terminal). Publishing to npm is planned; for now it is
installed manually.

**Where Tabby keeps plugins:** its user data folder, under `plugins/node_modules/`. On Windows this is
`%APPDATA%\tabby\plugins\node_modules\`. (In Tabby: **Settings → Plugins** links to the folder.)

**Install:**
1. Put the `tabby-peershell` folder (containing `package.json` and `dist/index.js`) into
`…\plugins\node_modules\tabby-peershell\`.
2. **Fully quit Tabby**, including from the system tray (right‑click the tray icon → Quit), then reopen.
Tabby only loads plugins at startup, so a full restart is required after installing or updating.

**Verify it loaded:** you should see a **peershell** button in the toolbar and a **peershell** tab under
Settings. The server is preconfigured to `wss://panel.peershell.dev`; you can change it in
**Settings → peershell** if you self‑host.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Align the plugin install flow with README.md.

This section says npm publishing is still planned and that users must install manually, but README.md says tabby-peershell is published to npm from clients/tabby/. Please make both docs agree on the supported install path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@USER_GUIDE.md` around lines 85 - 99, The Tabby install instructions in
USER_GUIDE.md conflict with the README about whether tabby-peershell is manually
copied or installed from npm. Update the plugin setup section so it matches the
supported install flow described by the README and the package location under
clients/tabby/, and make sure the wording in the installation steps and
publishing note are consistent. Refer to the Tabby plugin install/verify section
and the tabby-peershell package name when editing.

tis24dev added a commit that referenced this pull request Jul 9, 2026
…d error

Scope beginStream()'s output$/resize$ forwarders in a per-session Subscription
torn down on peer-left, so a re-joining guest no longer stacks duplicate
forwarders (also closes the guard-less resize$ leak) (#1). Route pin-response
verification failures through onError instead of an unhandled rejection (#6). On
an unauthorized onError, clear establishTimer and stopSharing immediately instead
of leaving a dead session up until the 5-min timer (#10).
@coderabbitai coderabbitai Bot mentioned this pull request Jul 9, 2026
tis24dev added a commit that referenced this pull request Jul 9, 2026
* Stage 0: scaffold peershell monorepo (npm workspaces)

- shared/ @peershell/protocol: wire protocol (binary framing with peerId,
  control messages), SessionTransport interface, PIN challenge-response,
  UTF-8 splitter, room-code/token/tunnel-path validators. Builds via tsc.
- clients/tabby (tabby-peershell): self-contained Angular 15 / webpack build
  (externalizes Angular/RxJS/tabby-*, bundles @peershell/protocol), Stage 0
  NgModule skeleton + Node smoke-load test (loads/constructs as Tabby would).
- clients/web + server: placeholders (Stage 4 / Stage 5).
- PROTOCOL.md spec, README (no-E2E disclaimer + dev workflow), build:all
  pipeline, copy-web-asset / publish-plugins scripts, .gitignore.

build:all green; `npm test` smoke-load PASS.

* Stage 1: jest+ts-jest test foundation + @peershell/protocol unit tests

- root jest (ts-jest, node env) with jest.setup providing Web Crypto for Node 18
- shared tests: binary frame round-trip (peerId/tag/payload, uint32, empty,
  short-frame throw), control encode/decode + version stamp, PIN challenge-
  response (deterministic hash, nonce-varies, PIN-not-in-hash, verify ok/ko),
  UTF-8 splitter reassembly of split multibyte, room-code + tunnel-path validators
- root scripts: `test` -> jest, `test:smoke` -> plugin bundle load check

15/15 tests green.

* Stage 1: shared WebSocketTransport + dev relay + end-to-end wire test

- shared/websocketTransport.ts: SessionTransport over WebSocket (global by
  default, injectable impl for Node), text=control / binary=framed data
- server/dev-relay.cjs: throwaway rendezvous + blind relay (pairs host/guest
  by room/token, forwards every frame), runnable standalone; @peershell/server
  precursor
- shared/test/transport.integration.test.ts: two transports through the relay
  do hello -> create/join -> PIN challenge-response -> snapshot-ack barrier ->
  output/input frames; plus wrong-PIN -> pin-fail

17/17 tests green; build:all green.

* Stage 1: Tabby host glue — ShareController, providers, service

- host/shareController.ts: Tabby-agnostic host controller (HostTerminal port +
  SessionTransport). Creates session, snapshot-ack barrier, mirrors output,
  injects guest input, forwards resize, tears down on tab close. Unit-tested
  with mock transport + mock tab.
- services/peershell.service.ts: adapts a real BaseTerminalTabComponent to
  HostTerminal, owns active shares, gates on configured server URL.
- providers: toolbar "Share terminal" + tab context-menu Share/Stop.
- config.ts: PeershellConfigProvider (peershell.serverUrl, magicLinkTtl).
- types/tabby.d.ts: minimal ambient shims so the plugin builds decoupled from
  Tabby's source tree (real impls come from Tabby at runtime as webpack externals).
- shared/base64.ts (snapshot payload). Generic-stub smoke-load resilient to
  future externals.

19/19 tests green; build:all green; smoke-load PASS.

* Stage 2: MirrorController (guest logic) + host<->guest integration test

- guest/mirrorController.ts: Tabby-agnostic guest controller (SessionTransport +
  MirrorSink port). join, render+ack snapshot (barrier), render live output,
  forward keystrokes, surface host resize + session end. Unit-tested with mocks.
- test/hostGuest.integration.test.ts: real ShareController (mock host tab) <->
  dev relay <-> real MirrorController (mock sink); asserts snapshot, live output
  host->guest, input guest->host, host resize.
- jest forceExit (integration tests use real sockets).

22/22 tests green; build:all green; smoke-load PASS.

* Stage 2: MirrorSession + MirrorTabComponent + join flow

- guest/mirrorSession.ts: MirrorSession extends BaseSession (7 abstract members;
  UTF8SplitterMiddleware; delegates wire logic to MirrorController; exposes
  hostResize$). write()->input frame, resize() no-op (tmate), emitOutput from frames.
- guest/mirrorTab.component.ts: MirrorTabComponent extends BaseTerminalTabComponent
  (reuses base template; onFrontendReady creates MirrorSession + adopts host size
  via hostResize$; no frontend.resize$ subscription -> no resize loop).
- peershell.service.ts: joinShared() (prompt room-code, connect, open mirror tab).
- toolbar: "Join shared terminal" button. index.ts: full NgModule (Common/Forms/Ngb/
  Toastr/TabbyCore/TabbyTerminal imports + MirrorTabComponent declaration).
- expanded tabby.d.ts shim (BaseSession, UTF8SplitterMiddleware, BaseTerminalTabComponent
  members, LogService, PromptModalComponent, openNewTab, module default exports).

build:all green; 22/22 tests green; smoke-load PASS. GUI wiring/profile of the mirror
tab needs validation in a real Tabby.

* Stage 3: PIN challenge-response gate + keepalive + magic-link display

- shared/pinAuth: generatePin (local per-session PIN). websocketTransport:
  keepalive (ping every 20s, unref'd timer, pong-on-ping handled below the app,
  cleared on close) + tests.
- ShareController: on peer-joined issue pin-challenge (fresh nonce/attempt);
  verify pin-response; pin-ok -> snapshot/stream; wrong -> pin-fail + re-challenge,
  rate-limited to 5 then kick (peer-left). Input frames rejected until authenticated.
- MirrorController: PinProvider callback; answer pin-challenge with H(pin,nonce);
  pin-fail(0) -> end. Tests + host<->guest integration now cover PIN (happy + wrong).
- Tabby glue: PeershellService generates + shows the PIN (with magic-link) on share;
  joinShared threads a PIN prompt (PromptModalComponent password) through
  MirrorTabComponent -> MirrorSession -> MirrorController.

29/29 tests green; build:all green; smoke-load PASS. (magic-link TTL/revocation is
server-side, Stage 5; client sends session-close on stop.)

* Stage 4: promote MirrorController to shared + HTTP tunnel

- Move MirrorController (+ MirrorSink/PinProvider) into @peershell/protocol so it
  is reused by the Tabby plugin (MirrorSession) and the coming web-client. Update
  plugin imports + relocate its unit test to shared/.
- shared/httpTunnelHandler.ts: answers tunneled http-get by serving the embedded
  web-client HTML; strict path whitelist (only '/'), 403 on traversal/SSRF. Unit-tested.
- dev-relay: reverse HTTP tunnel — GET /s/<token> forwards http-get to the host and
  returns the host's http-response body (intercepted, not forwarded to a peer).
- shared/test/tunnel.integration.test.ts: Node HTTP GET of the magic-link returns the
  host-served page over the tunnel.

32/32 tests green; build:all green; smoke-load PASS.

* Stage 4: browser web-client (xterm.js) self-contained build

- clients/web: webpack (target web) -> single self-contained dist/index.html
  (JS + xterm CSS inlined via HtmlInlineScriptPlugin + style-loader). Reuses
  WebSocketTransport + MirrorController + Utf8Splitter from @peershell/protocol.
- reads the magic-link token from /s/<token> (or ?token=), PIN overlay prompt,
  term.onData -> input, adopts host size (tmate), UTF-8 splitter before term.write.
- MirrorController.join now takes { room | token } so the browser can join by token;
  desktop still joins by room. Updated call sites/tests.
- build:web output is embedded into the plugin (copy-web-asset) for the host to serve.

32/32 tests green; build:all green (web-client embedded, 307 KB). Browser E2E is
validated in a real browser; the guest logic is covered by @peershell/protocol tests.

* Stage 4: host serves the embedded web-client over the tunnel

- PeershellService.startSharing attaches an HttpTunnelHandler to the host transport,
  serving the embedded web-client.html (asset/source import) on tunneled http-get.
- shim: declare '*.html' module for the asset import.

build:all green (plugin bundle embeds the 307 KB web-client); smoke-load PASS.

* Stage 5a: productionize relay into @peershell/server

- server/src/index.cjs (was dev-relay.cjs): rendezvous + blind relay + reverse HTTP
  tunnel, now with magic-link TTL (15m, link-expired on join / 410 on GET), env config
  (PORT/BIND/PUBLIC_URL/TOKEN_TTL_MS), GET /health, keepalive (pong reply + idle reaper),
  host-close tears down the session while guest-close frees the slot for a retry.
- env-driven standalone runner + startup log.
- repoint the three integration tests to server/src/index.cjs; server/package.json
  (start=node src/index.cjs, dep ws).

32/32 tests green (integration tests run against the productionized server).

* Stage 6 server: accounts + auth-gate on create-session

- Accounts in server/src/index.cjs (still single CJS file, stdlib only): atomic JSON store
  (data/accounts.json, mode 0600, ephemeral fallback), pbkdf2 password hashing w/ timingSafeEqual,
  opaque bearer tokens (sha256-stored, 24h TTL, logout/refresh revocation), inline RFC-6238 TOTP.
- REST: POST /register (+ mock-logged email verify code), /verify-email, /login (needsTotp branch),
  /2fa/{setup,verify,enable,disable}, /logout, /session/refresh; GET /sessions dashboard.
- Security: WS create-session GATED on a valid account token (?token= on the upgrade URL) via
  requireAuth (default ON); anti-enumeration login, rate-limits (login lockout, register/IP, 2FA
  attempts), body-size cap. Rooms tagged w/ accountId for the dashboard. Guests unchanged (PIN).
- Tests: new auth.integration suite (register/verify/login/enum+ratelimit/gate/TOTP/logout);
  existing relay/tunnel/hostGuest integration tests pass { requireAuth: false }. 38 tests green.

* Stage 6 client: account modal + gate sharing behind login

- AccountService (clients/tabby): fetch-based REST client (register/verify-email/login/verify2fa/
  logout), bearer token kept in the Tabby config store (getToken/persist/clearLocal); REST base
  derived from the ws(s):// server URL. (Vault storage is the documented follow-up hardening.)
- LoginModalComponent: inline-template modal with login/register/verify-email/2FA/logout modes,
  friendly error mapping; resolves with the token on a successful login.
- PeershellService.startSharing() now gates on a logged-in account: opens the login modal when there
  is no token, passes the account token to ShareController.start -> transport ?token=; on an
  'unauthorized' error it clears the stale token and asks the user to log in again.
- Toolbar gains a "peershell account (log in / out)" button (opens the modal); index.ts declares
  LoginModalComponent. Webpack build + smoke-load green; 38 tests still pass.

* Stage 7: send verification codes via Brevo (relay, not VM SMTP)

- server/src/index.cjs: deliverVerifyCode() posts the code through the Brevo transactional API
  (stdlib https, zero deps) when BREVO_API_KEY is set; falls back to logging the code when no key
  is configured, and to logging on a send failure (registration never blocks on email). Config via
  env: BREVO_API_KEY, EMAIL_FROM (default noreply@peershell.dev), EMAIL_FROM_NAME. brevoSend takes an
  injectable sendFn for tests. Relaying through Brevo keeps the VM IP out of the sending path (no
  blacklist risk) and lets DKIM/SPF authorise the domain.
- Wired into POST /register (new + resend paths); exports deliverVerifyCode/brevoSend.
- Unit test (email.test.ts): log fallback, injected-mailer send, send-failure fallback. 41 tests green.

* Stage 7: first-run no-E2E disclaimer dialog + server env docs

- PeershellService.confirmDisclaimer(): one-time warning before the first share (via
  PlatformService.showMessageBox) that guests get a read-write shell and the relay sees traffic in
  clear text; acknowledged once (config peershell.disclaimerAck). Blocks the share on Cancel.
- tabby.d.ts: shim PlatformService/showMessageBox; config defaults gain disclaimerAck + account.
- README: document server env (PORT/PUBLIC_URL/PEERSHELL_DATA/TOKEN_TTL_MS/BREVO_API_KEY/EMAIL_FROM),
  Brevo relay rationale and the DNS to authorise the domain. Build + smoke green.

* Stage 7: settings tab with account management + live-shares dashboard

- PeershellSettingsTabComponent (+ provider): configure the server URL, log in/out, and see the
  account's live shares (room / guest connected / magic-link) via GET /sessions. Prominent no-E2E
  security note at the top. Reachable from Tabby's Settings.
- AccountService.getSessions(): GET /sessions (dashboard), clears the local token on 401.
- tabby.d.ts: shim tabby-settings (SettingsTabProvider); index.ts wires the provider + declares the
  component. Webpack build + smoke-load green; 41 tests still pass.

* Stage 7: single peershell toolbar button opening a popup menu

- One toolbar button ("peershell"); click opens a native popup menu (PlatformService.popupContextMenu)
  with Share this terminal / Join a shared terminal / Account (label reflects login state). The toolbar
  renders provider buttons as Commands and only calls run() on click — it does not open a ToolbarButton
  submenu — so the dropdown is built via popupContextMenu instead. tabby.d.ts shims popupContextMenu.

* Stage 7: CORS on the account REST API (+ OPTIONS preflight)

The account endpoints are called cross-origin from the Tabby/Electron renderer (and the browser
web-client), so without CORS headers Chromium blocks the fetch ("cannot reach the server"). Add
Access-Control-Allow-Origin: * (+ allow headers authorization/content-type, methods GET/POST/OPTIONS)
to every response and answer preflight OPTIONS with 204. No cookies are used (bearer token in a
header), so '*' is safe. Verified: OPTIONS -> 204 + headers; POST -> 400 with the CORS header.

* Stage 7: "Create account" registers directly (one less step)

On the login form, "Create account" now calls register() with the entered email/password instead of
switching to a separate register mode that required a second button press. Drops the standalone
register mode; on success it goes straight to the email-verification step.

* Stage 7: default serverUrl to wss://panel.peershell.dev

Ship a working default so the plugin reaches the hosted server out of the box (no manual setup); the
empty `peershell: {}` config now inherits this default. Overridable in Settings for self-hosting.

* Stage 7: account UX — auto-verify without email, close on register, logout menu, password reset

- Server: registration is adaptive — if the verification email cannot be delivered (no SMTP configured
  or send fails), the account is auto-verified and a token is returned immediately, so users aren't
  stranded behind a code they can't receive; when email works, the verify-then-login flow is kept.
  Existing verified email -> { alreadyRegistered }. New endpoints POST /request-password-reset +
  /reset-password (code via the same email/log path, 15-min TTL, timing-safe). deliverVerifyCode gains
  a 'reset' kind for the message.
- Client: "Create account" now closes the modal and logs in on auto-verify, or goes to verify only when
  a code was emailed; "Forgot password?" link + reset-request/reset modes. Toolbar menu shows "Log out
  (email)" when signed in and "Log in" otherwise (direct logout); PeershellService.logout() added.
- Tests: auth suite injects a mailer stub (keeps the verify flow) + a new auto-verify-without-email
  case. 42 tests green. Live-verified on the box: register -> { token, autoVerified: true }.

* chore: gitignore local plugin packaging artifacts (build/, tabby-peershell.zip)

* Stage 7: surface account request errors in the modal (network detail + unexpected-error catch)

* Stage 7: fix config write — mutate store.peershell.* instead of reassigning (getter-only)

* Stage 7: show only Log in in the menu when signed out

* Stage 7: resolve focused terminal from SplitTabComponent for Share

* Stage 7: show PIN + magic-link in a persistent copyable modal (not a toast)

* Stage 7: menu shows 'Stop sharing this terminal' when the focused tab is shared

* Stage 7: robust focused-terminal resolution (fall back to tab terminals when focus is null)

* Stage 7: end the host share when the guest disconnects (peer-left -> stop)

* Stage 7: 10s grace window before closing a share on guest disconnect

* Stage 7: web-client auto-reconnects (cached PIN, ~12s window) to survive brief drops

* Stage 7: mobile extra-keys bar in web-client (arrows/Esc/Tab/Ctrl/Alt, DECCKM-aware, keyboard-aware layout)

* Stage 7: minimal web dashboard + persistent share history

- Server: persist a per-account share history (store.shares, capped) — a record on create-session,
  closed (endedAt) when the host disconnects. GET /sessions now returns live AND closed/expired shares
  with createdAt/endedAt/live. Serve a minimal account dashboard at GET / (same-origin, no CORS):
  email/password with entra/registra/recupera (prompt() for verify/2FA/reset codes), then a top bar
  (email + logout) and a table of the account's sessions (viva/morta, opened/closed time, open link if live).
- Plugin settings tab now filters to live shares only (GET /sessions includes ended ones).
- Verified live: dashboard served; session history tracks live -> ended on host disconnect. 42 tests green.

* Stage 7: center the dashboard login block on screen

* Stage 7: dashboard UI in English

* Stage 7: store passwords as salted scrypt hashes (memory-hard), never plaintext

Passwords were already salted-hashed (pbkdf2), never plaintext. Upgrade to scrypt (memory-hard,
Node stdlib) stored as a self-describing scrypt$N$r$p$salt$hash string; verification is constant-time
(timingSafeEqual). Legacy pbkdf2 accounts still verify and are transparently re-hashed to scrypt on
their next successful login (WordPress-style upgrade-on-login). Verified live: the stored account holds
only `pwhash` (scrypt$...) — no plaintext / salt / hash fields, the password appears nowhere in the
store, and login succeeds. 42 tests green.

* docs: add USER_GUIDE.md (end-user documentation for peershell)

* Stage 7: auto-stop a share with no connected guest within 300s

* docs: note the 5-minute auto-stop for unused shares

* Stage 7: dashboard settings (change password + enable/disable 2FA) + change-password endpoint

- Server: POST /change-password (auth): verify current password, set a new scrypt hash.
- Dashboard: a "settings" button in the top bar opens a Settings view — change password, and enable
  2FA (setup shows the authenticator key + otpauth URL, confirm with a code) or disable it (password).
  2FA state comes from GET /sessions (account.totpEnabled).
- Plugin login already handles the 2FA prompt (login -> needsTotp -> verify2fa); now reachable once 2FA
  is enabled from the dashboard. Verified end-to-end live: change-password + 2FA setup/enable/login. 42 tests green.

* Stage 7: dashboard Settings split (Change password / 2FA buttons) + QR for 2FA setup

- Settings now has two buttons: "Change password" (reveals the password form) and "2FA" (shows the
  two-factor status and enable/disable). Enabling shows a scannable QR code (plus the text key).
- QR is generated in the browser from the otpauth URL using qrcode-generator (MIT, zero-dep), vendored
  as server/src/qrcode.js and served at GET /qrcode.js — the TOTP secret never goes to a third party.
- USER_GUIDE updated. Verified live: /qrcode.js served (200, 56 KB), lib produces a valid img tag,
  dashboard wired. 42 tests green.

* chore: gitignore server/data runtime store

* Stage 7: settings as flat navigation (menu -> section -> back), no stacked panels

* Stage 7: 2FA section shows status + activation date; button toggles enable/disable

* ci/release: align to sibling repos (tag pipeline, main protection, artifacts)

Port the addhOn/proxsave release pipeline to this Node monorepo:
- .github/scripts/release-policy.sh: shared gate helpers; version helpers adapted to the 4 workspace
  package.json in lockstep (the "hybrid version-file", canonical = clients/tabby), via node.
- Workflows: ci (lint/build/test/smoke/version-lockstep/audit), codeql (best-effort on private repo),
  release-intake (pr-v* -> version bump + PR dev->main with marker), release-guard (validate PR),
  post-merge-release (squash gate -> fast-forward dev -> create immutable v* tag + Release),
  release (build:all -> package-plugin.mjs zip -> SHA256SUMS -> ECDSA sign+verify against pinned pubkey
  -> upload -> npm publish tabby-peershell + @peershell/protocol). Secrets: PEERSHELL_RELEASE_BOT_TOKEN,
  PEERSHELL_NPM_TOKEN, PEERSHELL_KEY_SIGNATURE. Pinned pubkey at .github/keys/peershell_release.pub.
- scripts/package-plugin.mjs (stage plugin + zip via python3), scripts/check-version-lockstep.mjs.
- ESLint (@typescript-eslint) config + root lint script; lint is clean.

* chore: set version 0.1.0-beta

* server: fix CodeQL high alerts (biased-random + polynomial-redos)

- genCode: use crypto.randomInt (unbiased rejection sampling) instead of randomBytes % length,
  which biased the room-code/magic-link alphabet (js/biased-cryptographic-random).
- base32Decode: drop the redundant `.replace(/=+$/, '')` — non-base32 chars (including '=') are
  already skipped by the decode loop, and the regex was flagged as polynomial ReDoS
  (js/polynomial-redos). Behavior unchanged; TOTP round-trip verified. 42 tests green, lint clean.

* ci: bump actions to Node24-compatible versions

Silence the runner deprecation warnings: actions/checkout v4.3.1 -> v5, actions/setup-node v4 -> v5
(both run on Node 24), and github/codeql-action init+analyze v3 -> v4.

* tabby: allow a user-set fixed session PIN in plugin settings

The per-session PIN that authorizes incoming connections lives only on the
host. Add an optional 'Fixed session PIN' field in the plugin settings: when
set (>= 6 chars) every share reuses it, otherwise a fresh random PIN is
generated per session as before. The PIN is never sent to the server in
cleartext (challenge-response only).

* server/pin: address Greptile review (rate-limit code endpoints, unbiased PIN)

- Rate-limit /verify-email and /reset-password with the same per-email
  exponential lockout as /login: a 6-digit code (10^6 space) must not be
  brute-forceable within the expiry window. Adds a regression test on an
  isolated relay.
- generatePin: rejection sampling to remove the tiny modulo bias of plain
  '% max' (same class as the CodeQL genCode fix).
- Legacy hash upgrade guard: check the pwhash is a real scrypt string
  (typeof/startsWith) instead of a falsy check, so an empty pwhash cannot
  trigger a silent re-hash.

* ws-auth: carry the credential in Sec-WebSocket-Protocol, not the URL (+ Origin allowlist)

Finding 4 (Greptile P2): the account bearer (host) and the magic-link token
(web guest) rode on the WS upgrade URL as ?token=, where reverse-proxy/access
logs capture them.

- Client (WebSocketTransport): send the credential as a base64url subprotocol
  peershell.bearer.<...> alongside the non-secret sentinel peershell.v1,
  instead of appending ?token= to the URL. Widen the injected ctor to
  (url, protocols?) (satisfied by DOM WebSocket and the ws package).
- Web guest: connect without a handshake credential; the magic-link token is
  already delivered in the join control frame (WS payload, never logged).
- Server (ws): read the token from the Sec-WebSocket-Protocol header first,
  fall back to the legacy ?token= for one release; handleProtocols echoes ONLY
  the sentinel (never the token); verifyClient adds an Origin allowlist (CSWSH)
  that permits no-Origin/file:// clients (Node, Electron host) and the
  publicUrl origin (web guest), with '*' as an escape hatch.
- Tests: account token via subprotocol authenticates create-session and the
  echoed subprotocol is the sentinel; cross-origin upgrade is rejected while
  the configured origin and no-Origin clients are allowed.

Rollout is server-first (backward-compatible), then client.

* fix(mirror): tear down transport on session end and route PIN-cancel through end()

end() now closes the transport after notifying the sink so the web client's
WebSocket + keepalive no longer leak until the server reaper reclaims them (#9).
answerPin's cancel branch goes through end('guest-closed') so sink.ended fires
(stops the web re-prompt loop, destroys the Tabby tab) while still closing the
transport (#8). close() is unchanged and remains the Tabby kill() teardown entry.

* fix(web): re-prompt PIN on re-challenge and guard malformed magic-link token

Gate the cached PIN on a sessionEstablished flag so a wrong PIN is re-prompted on
the host's re-challenge instead of silently replayed until retries run out (#12);
the cache is still reused for a genuine reconnect. Wrap decodeURIComponent in
getToken so a malformed %-escape falls through to the missing-token path (#29).

* fix(tabby): tear down host share on peer-left re-join and unauthorized error

Scope beginStream()'s output$/resize$ forwarders in a per-session Subscription
torn down on peer-left, so a re-joining guest no longer stacks duplicate
forwarders (also closes the guard-less resize$ leak) (#1). Route pin-response
verification failures through onError instead of an unhandled rejection (#6). On
an unauthorized onError, clear establishTimer and stopSharing immediately instead
of leaving a dead session up until the 5-min timer (#10).

* fix(server): revoke tokens on password reset/change and reap idle rate-limit maps

Password reset revokes all of the account's bearer tokens; password change revokes
every token except the caller's current one, so other sessions are invalidated
while the active session stays logged in (#21). The reaper now prunes loginFails
and regByIp so they cannot grow unbounded (incl. a bogus-email flood), evicting a
loginFails entry only when it has no active lock AND has been idle past 4x the lock
window, so an in-progress bruteforce and the blocks escalation are never reset (#19).

* ci: harden CI/release workflows

Use lockfile-strict 'npm ci' (drop the '|| npm install' fallback) in ci and release
so lockfile drift fails fast on a signed/published artifact (#15, #16). Add
persist-credentials: false to the read-only release-guard checkout (#14). Source the
release policy in post-merge-release from the pre-merge parent (MERGE_SHA^), the
trusted ancestor, with a bootstrap fallback (#17). Validate the release tag and
workspace version-lockstep before publishing (#18). CodeQL: the repo is public and
code scanning runs, so keep analyze strict and correct the stale 'private' comment (#31).

* fix(resilience): bound WS connect() and account fetch() with a deadline

connect() now settles exactly once and rejects on a pre-open close or a 15s
connection timeout instead of hanging forever (#7). account.service fetch() uses an
AbortController with a 20s timeout and returns a distinct 'timeout' error so the
login modal recovers instead of staying stuck busy; add the matching ERRORS entry (#5).

* docs(protocol): align REST auth examples with the needsTotp/sessionKey flow (#4)

* fix(protocol): stamp PROTOCOL_VERSION authoritatively in encodeControl (#22)

* test(tabby): clear the pump interval on waitFor timeout (#24)

* fix(tabby): show the copied indicator only when the clipboard write succeeds (#25)

* test(auth): extract shared postTo() helper for isolated-relay requests

The two isolated-relay test sections each re-implemented the same POST-JSON
request logic; consolidate them into a single postTo(base, path, body) so future
relay tests reuse it instead of copying. Behavior unchanged.

* fix(transport): sever a superseded socket on reconnect to stop stale state

The web guest reuses one WebSocketTransport across reconnects; connect() overwrote
this.ws without unbinding the previous socket, so a stale onclose/onmessage (e.g.
the async close that follows a connect-timeout ws.close()) kept driving setState()/
dispatch() on the new connection. Add teardownSocket() (detach handlers, then close,
then null this.ws), call it at connect() start and in the timeout branch, and add a
this.ws===ws identity guard on every socket handler. This also removes the duplicate
setState('closed') the timeout branch used to emit. Addresses code-review finding D.

* fix(server): terminate live host WS sessions on password reset/change

Revoking bearer tokens only blocks FUTURE handshakes; a host WebSocket bound its
account at connect time and kept streaming after a security-motivated password
reset. Bind the authorizing token hash per socket (sock._tokenHash) and add
terminateAccountSessions(): /reset-password drops ALL of the account's live host
sessions (a reset is a lockout), /change-password drops all except the caller's
current one. The socket's close handler notifies the guest and dropRoom()s.
Addresses code-review finding A.

* fix(tabby): give stopSharing ownership of the per-share grace/establish timers

The grace and establish timers were local closures, so any teardown that removed a
share from the map (onError unauthorized, or either timer firing) could leave the
sibling timer armed. Since startSharing() bails while shares.has(tab), the host can
re-share the tab and the stale timer then fires stopSharing() on the NEW share. Store
both timers per-tab in shareTimers and cancel them via clearShareTimers() from every
teardown path (stopSharing, destroyed$, connect-failure catch), so no timer outlives
its share. Addresses code-review finding C (and the scattered-timer-ownership nit).

* fix(tabby): bound the account request body read with the deadline, not just the fetch

The AbortController timeout was cleared in a finally wrapping only fetch(), so a
server that streamed headers then stalled the body hung forever at res.json(),
leaving the login modal stuck with busy=true and its Close button disabled. Move
res.json() inside the timed try (a single finally clears the timer) so the signal
bounds the body read too, and rethrow an AbortError from the body read as a timeout
while still tolerating empty/non-json bodies. Addresses code-review finding B.

* docs(server): make the loginFails reaper comment honest about blocks escalation

The comment claimed pruning cannot reset the blocks escalation; that only holds for
an actively-guessing attacker (r.at refreshed). An entry left idle past the TTL is
dropped and its escalation resets, an acceptable bound since the base 5-fail lock
re-applies to any renewed attack. Comment only; no behavior change. (review nit E)

* fix(mirror): mark the session ended in close() so a late frame cannot re-enter end()

close() (the Tabby tab-kill path) now sets endedFlag before tearing down the
transport, so a control frame racing the kill cannot re-enter end() and drive
sink.ended() on an already-destroyed guest. Addresses code-review finding F (#11).

* fix(tabby): treat a PIN-verify crash as a failed attempt, not a stranded session

verifyResponse wraps verifyPin in try/catch so a verify error (e.g. crypto
unavailable) counts as a failed attempt: the guest is told via pin-fail and
eventually kicked instead of hanging on a silently un-joinable session, and the
host is not stranded until the 5-min timer. Addresses code-review finding G.

* fix(transport): route every connect() failure through failConnect to sever the socket

onerror, the reject-before-open onclose, and the connect timeout now all funnel
through a single failConnect() that teardownSocket()s the failed socket (detach
handlers, close, null this.ws). Previously only the timeout severed it, so a socket
rejected before open stayed attached and a late onmessage could still reach
dispatch(). Closes the code-review D nit; adds a regression test.

* fix(tabby): unsubscribe tab.destroyed$ on share teardown

The destroyed$ subscription was created on every startSharing without being stored
or unsubscribed, so re-sharing a tab accumulated stale subscribers on its Subject.
Store it in the per-tab shareTimers record and unsubscribe it in clearShareTimers,
so exactly one live subscription exists per active share. Closes the code-review C nit.

* refactor(server): drop the legacy ?token= WS-upgrade fallback (subprotocol only)

The account token now rides ONLY in the Sec-WebSocket-Protocol subprotocol, never
the URL, so it stays out of reverse-proxy/access logs. No client used the URL
fallback (the host sends the token in the subprotocol; the web guest sends no token
on the handshake and delivers its magic-link token in the join frame). The gate test
is migrated to the subprotocol and asserts a token in the URL is now rejected.
Closes CodeRabbit #20 (removed after the one-release compat window).

* style: remove em/en dashes from UI strings, logs and comments

Per the project no-em-dash convention, replace every em/en dash in source
(notifications, modal/settings/login UI text, the plugin-loaded log line, and code
comments) with plain punctuation. Display/comment-only; no behavior change.

* style(docs): remove em/en dashes and non-breaking hyphens from docs and package metadata

Complete the no-em-dash sweep beyond source: README, PROTOCOL, USER_GUIDE, the three
published package.json descriptions, and the version-lockstep script message. Replace
em dashes with plain punctuation (colon/comma/semicolon) and non-breaking hyphens with
regular hyphens; arrows (->) left as-is. The repo is now free of em/en/nb dashes.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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