Commit Graph

154 Commits

Author SHA1 Message Date
Benoît Cortier d1d8e4fd13 chore(agents): adopt shared Rust style and test skills (#2131)
AGENTS.md now holds only policy that no tool enforces and that an agent
would not find on its own path. The first pass dropped content
discoverable from the tree or covered by a skill or `STYLE.md`: the role
preamble, the generic workflow, file and directory listings, xtask
command lists, the copy of the style rules, and a stale list of crates
missing from `ARCHITECTURE.md`. A review pass then moved rules to where
they trigger. Comment wrapping and test-module placement went to
`rust-style`. The dependency policies went to `public-dependency`. The
`iron-remote-desktop` base-API rule went to nested `AGENTS.md` files
next to its TypeScript and Rust definitions. It dropped rules already
stated by `ARCHITECTURE.md`, `protocol-reviewer`, or root `Cargo.toml`
comments. It also added a pointer to the testsuite crates and a warning
that synced skills are overwritten from Devolutions Gateway. The file
goes from 155 to 35 lines.

`STYLE.md` now extends the sentence-per-line rule to code comments and
doc comments. Devolutions Gateway and picky-rs vendor this file and will
re-sync it.

New skills, mirrored from Devolutions Gateway and added to the weekly
sync list:

- `rust-style`: everyday Rust rules from `STYLE.md`.
- `rust-style-reviewer`: fresh-context style review of changed Rust
lines, now run by `code-review`.
- `test-oracle-reviewer`: checks that a test's expected value is
independent of the code under test.
- `test-pruner`: prunes and strengthens tests with oracle classification
and cargo-mutants evidence.

The sync list also gains the remaining generic Devolutions Gateway
skills. `tdd` and its closure (`grill-intent`, `intent-files`,
`variants`) are dependencies of the synced `test-writer`,
`test-reviewer`, and `test-pruner`. The `contribute` flow brings `lead`,
`orchestrate-effort`, `review-feedback-loop`, `blind-testsuite`,
`contract-review`, `dependency-pruner`, `dependency-reviewer`,
`intent-drift-audit`, and `intent-review`. Intent and skill authoring
brings `agents-md`, `agents-md-review`, `contract-authoring`, and
`skill-discipline`. `code-review` now runs `intent-drift-audit`,
`intent-review`, `contract-review`, `test-reviewer`, and
`dependency-reviewer` when their conditions apply.

Claude Code discovers project skills only under `.claude/skills` and
reads only `CLAUDE.md`, so `.claude/skills` links to `.agents/skills`
and `CLAUDE.md` links sit beside both nested `AGENTS.md` files, as the
root one already does.

`AGENTS.md` now tells agents to start a work session with `/contribute`,
which picks the delivery flow by scale and the skills each step needs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
2026-10-21 14:47:46 -04:00
MuNeNiCK 860cf6ccb1 feat(web): support WebSocket subprotocols (#1970) 2026-10-21 07:36:37 +00:00
Jérémie Laval 27d1571a01 feat(web): expose Standard RDP Security to web clients using trusted RDCleanPath transports (#2004) 2026-10-08 20:22:24 +09:00
meanaverage e258f6a06b fix(web): dispatch the ready event after clipboard initialization (#2018)
`<iron-remote-desktop>` dispatches `ready` at the end of `initcanvas()`,
but `onMount` only then runs `await clipboardService.initClipboard()`.
That awaits `navigator.permissions.query({ name: 'clipboard-read' })`
before installing the clipboard callbacks, and
`RemoteDesktopService.connect()` only registers
`remoteClipboardChangedCallback` / `forceClipboardUpdateCallback` on the
session builder when those callbacks are installed.

So a host that connects as soon as `ready` fires gets a session with no
CLIPRDR channel, and the clipboard silently doesn't work.
iron-svelte-client connects after the user clicks, which hides the race.

With this commit:
- `ready` is dispatched from `onMount` after `initClipboard()` settles.
If clipboard initialization throws, the error is logged and `ready`
still fires.
- Test setup: mounting a Svelte component under vitest needs Svelte's
browser build, so `vite.config.ts` sets `resolve.conditions:
['browser']` when `VITEST` is set. It also skips vite-plugin-svelte's
style preprocessing in that case: the plugin (5.x, for Vite 6) crashes
in `preprocessCSS` under vitest 2's bundled Vite 5. The component's
styles are plain CSS. Builds are unchanged.

Co-authored-by: meanaverage <18336095+meanaverage@users.noreply.github.com>
2026-10-01 08:31:05 +00:00
Sébastien Duquette 819b7ade82 chore(web): set a 24h npm dependency cooldown (#1984) 2026-09-30 23:32:06 +09:00
ZERO 9bbd48fe02 feat(web): expose enable_server_pointer from the WASM module (#1914)
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-08 00:56:25 +00:00
Marc-André Moreau 40b4aa4a2a fix(web): add legacy_graphics session extension for Win7 servers (#1859)
Extracted from cxxzhang's #1408.

Win7-class servers reject the web client's enhanced graphics path.
The JS `legacy_graphics` SessionBuilder extension, default false,
switches BitmapConfig to 32-bpp lossless bitmaps, empty codecs, and
no bulk compression. Empty codecs are the BitmapConfig option that
lets the connector skip SurfaceCommands once that gating lands.

This is one of three independent follow-ups from #1408. It pairs
with the connector surface-capability gating PR but does not depend
on that PR being merged first.

The default enhanced web path is unchanged: 16-bpp, lossy codecs,
and compression_type None.

Co-authored-by: zhangshuangjun <zhangshuangjun@leagsoft.com>

Co-authored-by: zhangshuangjun <zhangshuangjun@leagsoft.com>
2026-09-01 09:15:05 -04:00
irvingouj@Devolutions 5c1816244e feat(rdcleanpath): support Hyper-V connection ordering (#1505)
Hyper-V over RDCleanPath needs PCB → TLS on the proxy, then CredSSP →
X.224 on the client. Ordinary RDCleanPath stays X.224-first.

Still VERSION_1 with the same DER fields. An explicit VMConnect request
carries a Unicode PCB payload in `preconnection_blob` with no X.224; the
proxy encodes the binary PCB. Generic PCB requests keep their existing
X.224-first behavior.

Gateway reference implementation:
[Devolutions/devolutions-gateway#1372](https://github.com/Devolutions/devolutions-gateway/pull/1372)

Checked locally: Rust builds, formatting, Svelte typecheck, and .NET
build. Real nested Hyper-V E2E through Gateway: Native rendered 18
frames, Avalonia connected and rendered its first frame, and Web
rendered a non-empty 1280×720 canvas.

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Marc-André Moreau <mamoreau@devolutions.net>
2026-08-11 11:42:17 -04:00
Gabriel Bauman af2706d093 feat(web): add pluggable storage backends for RDP file downloads (#1221)
Adds a pluggable download storage layer to `iron-remote-desktop-rdp` so large RDP file downloads can stream to persistent storage (OPFS) instead of buffering all chunks in RAM, while keeping a universal in-memory Blob fallback.
2026-06-23 18:52:05 +00:00
Yuval Marcus f12bbce550 feat(web): supersede a stuck upload and complete zero-byte files (#1381)
Updates the web `RdpFileTransferProvider` (in `iron-remote-desktop-rdp`) to make uploads more resilient: starting a new upload now supersedes any in-progress batch, and empty (0-byte) files can complete without ever receiving a RANGE request, preventing the provider’s `uploadState` from becoming stuck.
2026-06-23 18:22:54 +00:00
Yuval Marcus 356d06e52a fix(web): recover file-upload state when a paste is interrupted or never pulled (#1372) 2026-06-24 00:56:39 +09:00
Benoît Cortier e45f68c7e5 fix(web-client): add repository metadata to published package.json (#1323)
npm's sigstore provenance verification rejected publishing with:

    E422 Unprocessable Entity - Error verifying sigstore provenance
    bundle: "repository.url" is "", expected to match
    "https://github.com/Devolutions/IronRDP" from provenance

Add `repository`, `homepage`, `bugs`, and `license` fields to the
`public/package.json` of both `iron-remote-desktop` and
`iron-remote-desktop-rdp` so the published tarballs satisfy npm's
provenance checks.
2026-05-27 12:22:19 +00:00
Benoît Cortier 1f39e3540d chore(release): prepare web packages for publishing (#1312)
* iron-remote-desktop v0.11.0
* iron-remote-desktop-rdp v0.7.0
2026-05-26 14:38:42 +00:00
Eitvilas 0bbffcd0ec fix(web): include Meta keys in WebKit scancode dispatch (#1304) 2026-05-25 11:27:04 +00:00
Krista House c56ea16d05 fix(remote-desktop): resolve Firefox stuck right-click via mouse state reconciliation (#1297)
### Summary

Fixed a Firefox-specific issue where right-clicking inside the remote
desktop canvas could leave the server-side right mouse button state
stuck as pressed.

### Changes
**Input cleanup**
- `onmouseleave` now releases all active inputs through `mouseOut()`
- Added `focusLost()` handling for:
  - window `blur`
  - document `visibilitychange`
- This ensures inputs are released when the user leaves the canvas,
switches tabs, or the browser loses focus

**Mouse state reconciliation**
Updated `mouseIn()` to compare e`vent.buttons` against tracked
server-side button state.
If the browser no longer reports a button as held, the service releases
it server-side.

This covers:
1. left button
2. right button
3. middle button

Releases are batched into a single `applyInputs` call.

**Listener cleanup**
- Hoisted `captureKeys` so it can be properly removed
- `onDestroy` now removes:
  - keydown
  - keyup
  - blur
  - visibilitychange

**Tests**
Added `mouseInput.test.ts` covering:
- `mouseOut`
- `focusLost`
- `mouseIn` reconciliation
- missing-session guards
- release batching
- no-op behavior when no release is required
2026-05-22 16:21:37 -04:00
Matthew Johnson 14b1cef9cb feat(rdpdr): add Web RDPDR virtual printer support (#1230)
Adds RDPDR virtual printer redirection for web sessions, enabling the web client to announce a redirected printer, receive server print jobs over RDPDR, and deliver completed PostScript jobs to a browser callback.
2026-05-04 06:51:59 +00:00
Gabriel Bauman c98a8fb774 feat(cliprdr,web,ffi): implement clipboard file transfer support (#1166)
Add end-to-end clipboard file transfer (upload and download) across the
CLIPRDR channel per MS-RDPECLIP.
2026-04-09 14:53:39 +09:00
Benoît Cortier 9bb909eca2 docs: document iron-remote-desktop API design philosophy (#1192)
The core rule is: a method belongs in the base API (UserInteraction /
Session / SessionBuilder) if the web component itself needs to call it
for transparent behaviour, or if the feature is universal across all
remote protocol backends. Protocol-specific concepts must go through the
extension mechanism instead.
2026-03-31 14:35:13 +00:00
Yuval Marcus 9a1ac3092e fix(web): disable clipboard polling loop on Firefox v127+ (#1162) 2026-03-12 00:47:40 +09:00
Gabriel Bauman 2911124e8f feat(web): expose granular RDCleanPath error details (#1117)
Add RDCleanPathDetails struct to provide detailed error information for
RDCleanPath errors, including HTTP status codes, WSA error codes, and
TLS alert codes.

Allows the web client to distinguish between different types of network
errors (say, WSAEACCES/10013) instead of showing a generic RDCleanpath
error message.
2026-02-22 17:03:59 +09:00
Alex Yusiuk cca53fd79b chore(web): bump iron-remote-desktop to 0.10.1 (#1011) 2025-10-07 06:47:11 -04:00
Alex Yusiuk da38fa20a3 chore(web): bump iron-remote-desktop-rdp to 0.6.1 (#1012) 2025-10-07 06:46:35 -04:00
Alex Yusiuk 6127e13c83 fix(web): fix this.lastSentClipboardData being nulled (#992)
```js
await this.remoteDesktopService.onClipboardChanged(...)
```
Consumes the clipboard data we pass, so we need to clone the data to
prevent `this.lastSentClipboardData` from being null.
2025-09-24 08:49:32 +00:00
Alex Yusiuk ac2964d406 fix(web): send first clipboard only after the connection is established (#996)
Fix a bug where, when the clipboard is in automatic mode,
`iron-remote-desktop` could send the first clipboard PDU to
the server before the connection is established.
This packet was ignored, and the clipboard on the server
not synced with the current host's clipboard.
2025-09-24 02:02:21 -04:00
Alex Yusiuk c1fcf7a0c3 chore(release): prepare for iron-remote-desktop v0.10.0 (#991) 2025-09-19 11:53:55 +00:00
Alex Yusiuk 6c0014d5b3 fix(web)!: rework error handling (#975)
Improves the error handling in _iron-remote-desktop_ by
replacing the session events with throwing errors for terminated and
error events and callbacks for warnings and the clipboard remote update
event.
2025-09-19 11:05:20 +00:00
Alex Yusiuk 729ecf965e feat(web): add warning for clipboard unavailability in non-secure context (#959) 2025-09-02 07:15:43 -04:00
Alex Yusiuk cd2f25f97a chore(release): release iron-remote-desktop 0.9.0 (#957) 2025-09-01 06:55:27 -04:00
Alex Yusiuk 6b626d4fca fix(web): implement text-only clipboard for outdated versions of Firefox browser (#951)
Firefox versions before v127 do not support the write() method - only
writeText(). Therefore, the Extended Clipboard checkbox must be
automatically disabled.
2025-09-01 09:46:24 +00:00
Alex Yusiuk d31291362c style(web): follow-up to PR #935 (#955) 2025-08-29 14:46:10 +00:00
Alex Yusiuk 23c0cc2c36 feat(web)!: extend DeviceEvent.wheelRotations event to support passing rotation units other than pixels (#952) 2025-08-29 14:10:22 +00:00
Benoît Cortier 5d0c74df91 chore(release): prepare web packages for publishing (#950)
* iron-remote-desktop v0.8.0
* iron-remote-desktop-rdp v0.5.0
2025-08-29 07:30:03 +03:00
Alex Yusiuk 5b948e2161 fix(web)!: replace current clipboard logic with auto and manual clipboard modes (#935)
Adds:
- auto clipboard mode. 
  When it's enabled, the clipboard will be automatically monitored for
  changes, and updates from the server will be automatically saved to the
  local clipboard (this is the old logic; nothing has changed).
- manual clipboard mode. 
  One calls dedicated functions to interact with the clipboard.
2025-08-28 22:07:58 -04:00
Alex Yusiuk cec3fa70fc refactor(web): raise TERMINATED event on connection error (#944)
This PR changes the session to not return an error on the connection
stage. The `iron-remote-desktop` raises `TERMINATED` instead of `ERROR`,
because `ERROR` is now handled as non-critical and does not close the
session.
2025-08-28 06:33:31 -04:00
Alex Yusiuk a996d02a66 fix(web): remove contenteditable=true from top level element (#922)
Setting `contenteditable=true` causes spurious edits of that element
(when pressing dead keys using the BEPO or AZERTY keyboard).
2025-08-26 18:19:20 -04:00
Alex Yusiuk dc6fd0433d fix(web): make check for isUnicodeCharacter in sendKeyboard more strict (#927)
This resolves an issue with Unicode input that happens under Chrome.
where entering `Alt` codes results in broken modifier state and broken
input in general.

This happens because of how _Chrome_ handles `KeyboardEvent` key and
code in this particular case. For example, holding `Alt`, pressing 1, 2,
3 on a numpad, then releasing `Alt` will result in events with the
following key/code values being passed to `sendKeyboard`:
`{ "key": "Alt", "code": "AltLeft" ,"type": "keydown" }`
`{ "key": "1", "code": "Numpad1" ,"type": "keydown" }`
`{ "key": "1", "code": "Numpad1" ,"type": "keyup" }`
`{ "key": "2", "code": "Numpad2" ,"type": "keydown" }`
`{ "key": "2", "code": "Numpad2" ,"type": "keyup" }`
`{ "key": "3", "code": "Numpad3" ,"type": "keydown" }`
`{ "key": "3", "code": "Numpad3" ,"type": "keyup" }`
`{ "key": "{", "code": "AltLeft" ,"type": "keyup" }`

Without this fix, this will send Unicode `{` instead of plain `Alt` to
the RDP server, messing up the `Alt` code sequence and leaving `Al` in
pressed state.

For comparison, in _Firefox_ last event looks like this: `{ "key":
"Alt", "code": "AltLeft","type": "keyup" }`
2025-08-22 03:39:55 -04:00
Gabriel Bauman ac291423de refactor(web): add NegotiationFailure to IronErrorKind (#905)
Adds a general NegotiationFailure to IronErrorKind so that web embedders
can handle failures that occur during protocol negotiation, before
authentication.

Changes:
- RDP errors during the negotiation phase become
IronErrorKind.NegotiationError
- User-friendly RDP negotiation error messages to ironrdp-connector
- Update TypeScript definitions
2025-08-08 04:52:28 -04:00
Benoît Cortier 424e46d225 chore(release): prepare for iron-remote-desktop-rdp v0.5.2 (#901) 2025-07-31 08:23:29 -04:00
Gabriel Bauman 100765f98f feat(web): add outbound WebSocket message size limit extension (#889)
Add support for chunking outbound WebSocket messages when they exceed a
configurable size limit. This helps avoid browser- or proxy-specific
WebSocket message size restrictions while maintaining wire
compatibility.

Changes:
- Add outbound_message_size_limit field to SessionBuilderInner
- Implement extension handler with safe f64->u32 casting and validation
- Update writer_task to chunk large messages when limit is set
- Add outboundMessageSizeLimit() helper function to JavaScript API

---------

Co-authored-by: Benoît Cortier <3809077+CBenoit@users.noreply.github.com>
2025-07-31 11:18:36 +00:00
Benoît Cortier 555894ecc8 chore(release): prepare iron-remote-desktop-rdp v0.5.1 (#883) 2025-07-24 04:23:05 +00:00
Gabriel Bauman 7a0fcce203 feat(web): add enableCredssp extension (#878)
Allows users to disable CredSSP/NLA, which is otherwise enabled by default.
This is necessary to connect to target hosts bound to AzureAD/Entra domains.
In this case, user authentication is handled in the interactive session.
2025-07-23 23:31:11 -04:00
Benoît Cortier 4fc295db4c chore(release): prepare iron-remote-desktop-rdp v0.5.0 (#879) 2025-07-23 08:54:46 +03:00
Alex Yusiuk f7cbb08e2e feat(web): add RdpFile helper to parse RDP configs (#877) 2025-07-22 20:33:37 -04:00
Alex Yusiuk f6fb3a41b3 fix(web): apply correct key codes to scan codes mapping (#866)
The root cause of the bug is the incorrect keycodes-to-scancodes
mappings. These mappings translated the browser's key codes (like
"KeyA") to OS-specific scancode (OS where the browser runs). However,
that's not exactly what we need to do. We need to map the browser's key
codes to _Windows_ scancodes - the only format that is accepted by _VNC_
and _RDP_) modules.
Let's look at an example for a better understanding. _Safari_ browser
used _Linux_'s _Gecko) mappings as a fallback (because there were no
MacOS-specific mappings). For a given key, _iron-remote-desktop_ was
providing a scancode that did not correspond to the _Windows_ scancode
for that same key. As a result, the `IronVNC` module incorrectly mapped
this scancode to a `KeySym`, which resulted in an incorrect `KeySym` or
`NO_SYMBOL`.
2025-07-11 15:08:53 +00:00
Alex Yusiuk 067d80314a chore(release): prepare web packages for publishing (#865)
* iron-remote-desktop v0.7.0
* iron-remote-desktop-rdp v0.4.0
2025-07-11 07:53:22 -04:00
Alex Yusiuk 4dc5945019 fix(web): run navigator.clipboard.write only when window has focus (#858)
When we receive clipboard update from the server and the browser window
is not in focus (for example, when the user copies some text directly on
the machine, not via the browser's VNC viewer), we got an error that
`navigator.clipboard.write` is not allowed when window is not in focus.
This PR adds a window check that the window has focus, and now
`clipboard.write` runs only when the window is in focus.
2025-07-04 11:21:52 +00:00
Alex Yusiuk a84a5c0571 fix(web): prevent onMonitorClipboard from re-scheduling after iron-remote-desktop component destroys (#856) 2025-07-04 05:59:33 -04:00
Alex Yusiuk b0e87a3776 fix(web): fix issue when clipboard monitoring treats clipboard update from server as the local update (#857)
When the server sends the clipboard update, we write it to our
clipboard. But this new clipboard data was then processed as a new one,
so we sent it back to the server. This commit fixes this behavior by
tracking the data that we received from the server.
2025-07-04 05:58:45 -04:00
Benoît Cortier 8bcf362102 chore(release): prepare web packages for publishing (#843)
- iron-remote-desktop v0.6.0
- iron-remote-desktop-rdp v0.3.0
2025-06-27 11:09:06 +03:00
Alex Yusiuk f6285c5989 feat(web): add canvasResizedCallback method to SessionBuilder (#842)
Co-authored-by: Benoît Cortier <3809077+CBenoit@users.noreply.github.com>
2025-06-27 07:55:26 +00:00