Repository navigation
feat(mouserecorder): upload your own mouse and game-key input to your Microbot account - #2264
Merged
Merged
Conversation
… Microbot account The Mouse Macro Recorder now records every mouse move, button, scroll and game key (typed characters are never stored, player names in menu targets become <player>), with game context: ticks, position and instance template, camera, hovered and opened menus, menu actions marked human or not, the player's animations, XP and the content being done (Tithe Farm, combat by NPC, skilling). It records only real input: events dispatched by scripts (BotEventGuard) are dropped, and recording pauses while any script runs, on the login screen, the bank PIN, a chatbox prompt or without focus. Chunks of 30 s are gzipped off the client thread and uploaded to /api/input with the client link token; nothing is written to disk any more. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2jMX72L53891CRTE9AXZp
Contributor
|
Caution Review failedThe pull request is closed.
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. |
…ear status Review fixes for the Input Recorder: - Upload needs the new "Upload my input" switch (off by default), so users of the old local recorder never start uploading without opting in. - Bot activity pauses recording for 30 s: any script input (BotEventGuard now stamps its last dispatch, which also covers Quest Helper, the walker and the agent server), a menu action not preceded by the user's own click or key, a script start, or a running Hub script. Enabled but idle plugins (Break Handler, utilities) no longer pause it. Microbot.targetMenu is read before MicrobotPlugin clears it. - Menu targets keep their name only for NPC, object, ground-item and item entries; friends, chat, clan and lookup names are blanked. Non-game keys are not sent at all, and recording pauses while chat input is non-empty or a RuneLite chatbox input or prompt is open. Pause checks run every client tick. - Content segments end on pause; content names are cleaned to the API's characters and length. - Uploader: sessions are bound to the token that created them (no upload into another account), refused chunks are removed by identity, chunks are gzipped as soon as they are queued, a malformed 201 backs off, close without parts sends no finalSeq, a 401 rejects the shared link token, the daily limit is retried every 30 minutes, and stopping the plugin never blocks the UI thread (the client's exit waits for the last upload). - Overlay tells the player what to do: where to link, telemetry off, link removed, retrying, the limit retry time, which script pauses it, and lost input in minutes. The plugin is now listed as "Input Recorder" (2.0.0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2jMX72L53891CRTE9AXZp
…link, keep sessions over loading screens Second review: a refused link stays "Link removed" instead of falling back to "Not linked"; a session only starts when recording would not be paused, so a hopping bot creates no sessions; each session is bound to the link token it started with, so relinking before the first upload never sends it to the new account; loading screens skip the tick instead of ending the session (only the login screen and world hops end it); a real mouse release counts as the user's input (hold-and-release menu picks); upload being switched off is re-checked inside session start, the due chunk is drained under the lock, and the not-uploaded counter resets per session. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2jMX72L53891CRTE9AXZp
The EventBus requires subscriber methods to be named on<Event>, so a second MenuOptionClicked handler on the plugin stopped it from starting. The priority-1 check now lives in a small inner subscriber registered next to the plugin, and a test registers both on a real EventBus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2jMX72L53891CRTE9AXZp
Typing, a chatbox prompt, the bank PIN or losing focus split one Tithe Farm run into six segments. Only a script pause ends the segment now; the other pauses stay visible as pause and resume events inside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X2jMX72L53891CRTE9AXZp
The plugin now runs idle for everyone and asks GET /api/input/access once per link (again every 6 hours or when the link changes). It appears in the Microbot plugin list and records only after a yes, remembered between restarts, and hides itself again when the API answers 403 not-available for the check or for an upload. The API enforces the same rule on every input route, so a modified client still cannot upload or read anything. Plugins can now hide themselves from the Microbot plugin list by implementing ConditionallyListed and posting PluginListingChanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XwwsPumKzuGjss5QHRrRfC
- Always on: the plugin only checks access and stays idle until "Upload my input" is on, so an old "off" setting from Mouse Macro Recorder can no longer hide it from an admin for good. - Notice a new link within 10 s instead of 60. - Show the pause reason when a session cannot start yet (script running, window not focused) instead of showing nothing. - Recover from "Link removed" once the client is linked again. - Turning upload off drops what was recorded but not sent yet. - Skip the Hub script scan while not recording; clamp event times at 0. - Break Handler V2 lists the plugin as Input Recorder. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XwwsPumKzuGjss5QHRrRfC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the Mouse Macro Recorder with Input Recorder. Instead of writing JSONL files locally, it uploads the player's own mouse and game-key input to their Microbot account (
/api/input, chsami/Microbot-Api #72 and #73, both deployed).Who can use it: only accounts microbot.cloud allows (Admin role,
Input:Audienceon the API).GET /api/input/accessonce per link (and again every 6 h or when the link changes) and appears in the Microbot plugin list only after a 204. The answer is remembered between restarts.not-availablefrom that check or from an upload hides the plugin again.ConditionallyListedand postingPluginListingChanged.What it records while upload is on, the client is linked and the player is logged in:
Combat: <npc>,Skilling: <skill>.Human input only:
BotEventGuard) are dropped.Upload: 30 s chunks, gzipped off the client thread, a bounded queue of 40, retries with backoff. Uploading stops on a refused token or the daily limit and is flushed on client exit. The overlay shows the status, the pause reason and the current content.
Tests:
InputPrivacyTest,ContentDetectorTest,InputUploaderTest,InputAccessCheckTest,MouseMacroRecorderPluginEventsTest(EventBus registration) andClientThreadGuardrailTestare green.Live checks, 2026-11-14:
Draft until the owner approves the merge.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XwwsPumKzuGjss5QHRrRfC