Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
c1288ab
Add video effects to the own camera: colour filters, a mirror choice,…
James-Chapman Nov 26, 2026
67ffffa
Keep video effects asked during a join, start camera tests with the e…
James-Chapman Nov 26, 2026
5583f13
Pin the blur bounds of the contract, the call protocol and the page t…
James-Chapman Nov 26, 2026
7881271
Compare the contract's and the protocol's blur checks for every value
James-Chapman Nov 26, 2026
c0ac4fd
Keep a camera test's effect change until the worker takes it, and sta…
James-Chapman Nov 26, 2026
86b5291
Say that a camera test's first picture has its effect only when the w…
James-Chapman Nov 26, 2026
13fc6fc
Qualify the last two first picture claims for an accepted effect
James-Chapman Nov 26, 2026
54c48ba
Describe the camera test effect as the one asked for
James-Chapman Nov 26, 2026
89a4ffc
Say that a camera test shows its pictures only locally
James-Chapman Nov 26, 2026
a1b2f6a
Record the owner's choice for a refused camera test
James-Chapman Nov 26, 2026
770041d
Keep a video effect for a retry when the worker queue is full
James-Chapman Nov 26, 2026
3c302a5
Send an unread video effect before a camera-on
James-Chapman Nov 26, 2026
7c9de1a
Keep the mask scaling columns between pictures
James-Chapman Nov 26, 2026
eab26b3
Send only the changed part of the video effect controls
James-Chapman Nov 26, 2026
cee2849
Keep the call after a portal refusal, and track each effect part
James-Chapman Nov 26, 2026
ac4989a
Send a picture with no effect as it is, and note the one-field rule
James-Chapman Nov 26, 2026
4a13515
Merge main into claude/video-effects
James-Chapman Nov 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/call-protocol/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ This crate defines the bounded binary messages between the key-holding core and
- Microphone settings (ADR-0062): wire version 11 added `ToWorker::SetMicrophone { auto_level, mic_gain }` (tag 16, no answer), and `Join` ends with `auto_level` and `mic_gain` (two bytes). `Reader::mic_gain` refuses a gain over `MAX_MIC_GAIN_PERCENT` (400) or off the step of `MIC_GAIN_STEP_PERCENT` (5); use `valid_mic_gain` wherever a gain is used.
- Screen targets (ADR-0053 amendment of 25 November 2026, ADR-0064): wire version 12 changed `SetScreen`'s `ScreenTarget::Monitor` (tag 2) from a list index to the Windows GDI device name (`MonitorName`: a length byte, then 1 to `MAX_MONITOR_NAME` (32) printable ASCII bytes other than space: 0x21 to 0x7E, `u8::is_ascii_graphic`; a name with a space is an invalid value), the width and height, and the monitor's rectangle (`DesktopRect`: four big-endian `i32` edges, each side 1 to `MAX_MONITOR_SIDE`, each edge within `MAX_DESKTOP_COORDINATE` of 0), and added `ScreenTarget::Display { id, width, height }` (tag 3, the macOS CoreGraphics display ID, never 0). `Reader::monitor_size` refuses a side outside 1 to `MAX_MONITOR_SIDE`. Tag 1 (`Portal { node }`) is unchanged.
- Call statistics (ADR-0066): wire version 13 added `ToWorker::SetStats { on }` (tag 17) and `FromWorker::Stats(CallStats)` (`src/stats.rs`). The message is closed and numeric: integers with a unit and a bound that the reader checks (`MAX_STATS_*`), `Option` for a value that is not known yet, at most `MAX_PARTICIPANTS` remote entries and `MAX_STATS_CONNECTIONS` connection entries, each participant (connection and identity) and each connection at most once. It carries no address, port, candidate type, SSRC, codec or other text beyond the already validated identities. The writer cuts each list to its limit and writes every entry as given; the caller (`mapping::stats` in the worker) leaves out an entry that the reader would refuse and clamps the numbers, because the reader refuses the whole message for one such entry. Tag 16 and wire version 11 are the microphone settings above (ADR-0062). The `MAX_STATS_*` bounds are repeated as `CALL_STATS_*` in `crates/contracts`; `crates/core/src/calls/stats.rs` checks at compile time that they match.
- Windows screen frames (ADR-0067, wire version 14): `ToWorker::ScreenFrames { share, handle }` (tag 18, `handle` never 0, a 32-bit handle value valid inside the worker) names the read end of the capture helper's frame pipe, directly before the `SetScreen` of the same share. `screen_frame.rs` is the pipe's own format, shared by the helper (writer) and the worker (reader): a media-protocol `Control` frame with a 23-byte frame message or a 7-byte end message, then, for a picture, one `RgbaPixels` frame that holds BGRA bytes. `read_item` checks the share number, the format, the size (`screen_capture_size_ok`), the stride (exactly `width * 4`, no padding) and the body length (`height * stride`, at most `MAX_FRAME_BYTES`) before it allocates the body, and `write_picture` refuses what the reader would refuse. `ScreenEnd` is a closed set (stopped, not found, unavailable). Change the reader and the writer together. The next wire change takes tag 19 and the next free version.
- Windows screen frames (ADR-0067, wire version 14): `ToWorker::ScreenFrames { share, handle }` (tag 18, `handle` never 0, a 32-bit handle value valid inside the worker) names the read end of the capture helper's frame pipe, directly before the `SetScreen` of the same share. `screen_frame.rs` is the pipe's own format, shared by the helper (writer) and the worker (reader): a media-protocol `Control` frame with a 23-byte frame message or a 7-byte end message, then, for a picture, one `RgbaPixels` frame that holds BGRA bytes. `read_item` checks the share number, the format, the size (`screen_capture_size_ok`), the stride (exactly `width * 4`, no padding) and the body length (`height * stride`, at most `MAX_FRAME_BYTES`) before it allocates the body, and `write_picture` refuses what the reader would refuse. `ScreenEnd` is a closed set (stopped, not found, unavailable). Change the reader and the writer together.
- Video effects (ADR-0068, proposed, wire version 15): `ToWorker::SetVideoEffect { effect }` (tag 19, during a call and during a camera test), `FromWorker::VideoEffect { effect, refused }` (tag 24, the effect in use), `CameraState::EffectUnavailable` (4), `Join` ends with the effect, `TestDevice` ends with the effect that a camera test starts with (a sound test must send `VideoEffect::NONE`; decoding refuses another), and `Devices` ends with the `background_effects` flag (one byte, 0 or 1). The effect is three bytes: the background kind (0 none, 1 blur, 2 picture), its value (0 for none, the blur strength `BlurStrength` of 10 to 100 percent in steps of 10, or the `BackgroundPicture` 1 to 4), and the `ColourFilter` 0 to 4. `VideoEffect::from_bytes` refuses any other combination; `to_bytes` writes only what it accepts. The blur bounds (`MIN_BLUR_PERCENT`, `MAX_BLUR_PERCENT`, `BLUR_STEP_PERCENT`, `DEFAULT_BLUR_PERCENT`) are repeated by the contracts' `CALL_BLUR_*`; the core asserts the match, so change both. The sets are closed: no image, path or URL crosses. The next wire change takes tag 20 to the worker, tag 25 from the worker, and version 16.
- Coordinate wire changes with `crates/core` and `crates/call-worker` (planned), and bump the version byte.

## Checks
Expand Down
Loading