From 2ba0e2de28046071d91beb3801f524fd6785cb0b Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 8 Nov 2026 02:17:11 +0000 Subject: [PATCH] CLAUDE.md: move the merged history to docs/HISTORY.md Every session loads CLAUDE.md whole, and 79% of it (6,108 lines) was a "Current step" made of entries for branches that have all merged, the last six (#74, #75, #77, #78, #79, #80) by 2026-10-16. Their entries, with Milestones 1 and 2, move word for word to docs/HISTORY.md. CLAUDE.md keeps a Current step that says nothing is open, and a Working rules section with the standing rules those entries held, unchanged: the shared encoder, the host code and modal-loop rules, TCC, build facts, SCStream, and the known limitations. 1,288 lines. Also: the Layout's list of checks gains away-copy, away-quality, away-wire, keychain and link-judge, which exist; the threading convention and the Bonjour decision no longer describe the spike. Comments and docs that cited a moved section now cite docs/HISTORY.md (no-device.sh cites the Working rules, where its rule stayed). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01729cLkuzcW2pBzdtsstEY3 --- CLAUDE.md | 4850 +-------------------- Scripts/encoder-check/hbparse.py | 2 +- Scripts/encoder-check/no-device.sh | 2 +- Scripts/encoder-check/verify-hardware.sh | 2 +- Sources/SillHost/EncoderMailbox.swift | 2 +- Sources/SillHost/EncoderSlowState.swift | 2 +- Sources/SillHost/HEVCEncoder.swift | 8 +- Sources/SillHost/HostConfig.swift | 2 +- Sources/SillHost/VirtualStage.swift | 2 +- Sources/SillHostCLI/main.swift | 2 +- Tests/checks/README.md | 2 +- Tests/checks/key-strokes/main.swift | 2 +- Tests/checks/key-strokes/run.sh | 2 +- docs/DEVELOPMENT.md | 3 +- docs/HISTORY.md | 4883 ++++++++++++++++++++++ docs/release-checklist.md | 2 +- iOSClient/DiscoveryPolicy.swift | 2 +- iOSClient/StreamClient.swift | 2 +- 18 files changed, 4918 insertions(+), 4854 deletions(-) create mode 100644 docs/HISTORY.md diff --git a/CLAUDE.md b/CLAUDE.md index b97bcc2c4..e5f95702c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -8,3655 +8,14 @@ Formerly winstream; the folder still carries the old name. ## Current step -**The clipboard both ways (2026-10-14, branch `clipboard` from main at 985a733; issue #64; PR #78; -the plan, its open questions with the default taken for each, the results and the review's fixes are -in `docs/clipboard-plan.md`).** Noah: work on the clipboard (after #67/#68, #69, #59, #57, #58), text -first. Wire, host and device; additive. -- Wire: kind 32 `clipboard`, both ways, JSON `Clipboard {text, image, stop}` (Clipboard.swift): pull - request #66's number and shape (`image` reserved for a later generation; `stop`, a device's switch - going off, is this change's); `WindowList.clipboard: Int?` (1: text), so #66's `Bool` becomes an - Int as it rebases (a Bool does not decode). A device sends kind 32 only to a host that says 1 or - more; any kind 32 subscribes, and `{}` is text alone: a host sends `image` only to a subscription - that says it takes images (the floor; #66's host sends one to every subscriber). Text at most - 256 KB of UTF-8, the JSON at most 1 MiB either way. Kinds 29–31 stay free (audio, #66's). -- Rules, pure, both ends: `ClipboardPolicy` (StreamProtocol). Never sent: an item a password manager - or another app marks `org.nspasteboard.ConcealedType` or `org.nspasteboard.TransientType` (and - three older markers), one from another device through Universal Clipboard - (`com.apple.is-remote-clipboard`: reading it fetches it from there, found while building), the - host's own write; types are judged before any data is read. A device's subscriptions and texts are - rated 4 a second, its stop never (`hostReceives`). -- Host: `HostClipboard` (main actor; the pasteboard read and written on a queue of its own, - `Board`, so a slow read never holds up input): the look at the change count four times a second - while a device subscribes (Task.sleep, not a RunLoop timer), and only while macOS allows every read - (`MacClipboard.access`, NSPasteboard's `accessBehavior`, macOS 15.4 and later: while it would ask, - an alert at every copy, or denies, nothing is read, nothing copied meanwhile is sent, one line when - that changes); an empty pasteboard waits up to a second for its contents (`hostWaits`: found live, - 9 of 12 slow copies lost before, none now); what was on the clipboard when the first subscribed is - never sent; a device's text written `.currentHostOnly` with this launch's marker and passed to the - other subscribers; one line per subscription or stop ("Clipboard: iPad (iPad14,1) shares the - clipboard."), none per copy, never contents; `clip.sent`/`clip.recv`. `HostConfig.shareClipboard` - (on): Settings › General's `ClipboardSection`, "Share clipboard with devices" (`shareClipboard`), - and while macOS asks or denies, why and "Allow in System Settings…" (Paste from Other Apps, - `Privacy_Pasteboard`; one read on that click first while macOS has not asked about Sill, so it is - listed); the CLI's `--no-clipboard`; the Mac's alone, applied at once by `setTarget`. A synthetic - host shares a pasteboard of its own (TEST ONLY `SILL_TEST_PASTEBOARD`, `SILL_TEST_CLIPBOARD_LOG=1`, - `SILL_TEST_CLIPBOARD_ACCESS`), never this Mac's clipboard. -- Device: `StreamClient+Clipboard` (subscription, `stop`, the Mac's text written `.localOnly` with a - 10-minute expiration, the handled change count `Sill.clipboardHandled`) and `ClipboardChip`: when - Sill becomes active (or a session starts within 15 s after) with new text on the clipboard - (`changeCount`, `hasStrings`: no prompt), "Paste on ‹Mac›" / "Then press ⌘V there." with the - system's Paste control (`PasteButton`, UIPasteControl) and Dismiss; its 20 s run only while it - shows with Sill active, never under VoiceOver, which is told when it first shows (`chipCounts`); - under the bar sideways (bottom corner while the link's line shows), above the window bar or row 1 - upright. A Paste is "Sent to ‹Mac›’s clipboard" only once a ping sent after the text comes back (a - 16-byte random payload, the receipt; none in max(4 s, 4 × the worst round trip): "Didn’t reach - ‹Mac›. Try Paste again." and the chip again). Settings › This iPad: Share Clipboard - (`Sill.shareClipboard`, on) and Paste on ‹Mac›, while the Mac says it. Harness: - `-SillClipboardChip 1`, `-SillClipboardNote sent|long|notsent`; live, `-SillSettingsScript ' paste - TEXT'` and `-SillSettingsCloseAt `. -- The review (2026-10-14, eight findings, all taken; the plan's "The review"): the stop lost to the rate - and macOS's paste privacy (the two should-fixes), the floor's image rule, "Sent" before the Mac had it, - the chip unannounced and running out unseen, the Mac's footnote and the support page's sentence, the - site's words marked `