cubefarm 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,17 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>cubefarm</title>
7
+ <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><path d='M50 6 92 30 50 54 8 30z' fill='%23ffc2a6'/><path d='M8 30 50 54v42L8 72z' fill='%23ff8a5b'/><path d='M92 30 50 54v42l42-24z' fill='%23d9602f'/></svg>" />
8
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
9
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10
+ <link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap" rel="stylesheet" />
11
+ <script type="module" crossorigin src="/assets/index-uo74me0U.js"></script>
12
+ <link rel="stylesheet" crossorigin href="/assets/index-8tdBZH9c.css">
13
+ </head>
14
+ <body>
15
+ <div id="root"></div>
16
+ </body>
17
+ </html>
@@ -0,0 +1,24 @@
1
+ // Runs in every page of the agents' test browsers, before the page's own scripts (Playwright MCP --init-script).
2
+ //
3
+ // The agents' browser is headless, but on Windows headless Chrome still applies pointer lock to the real mouse: a
4
+ // page that locks the pointer (any 3D app, including the office itself) traps the manager's cursor in an invisible
5
+ // window and keeps snapping it to that window's centre. So pages get an in-page stand-in instead. The page sees the
6
+ // lock granted and released as usual and keeps receiving mouse events, but the real cursor is never touched.
7
+ (() => {
8
+ let locked = null;
9
+ const changed = () => queueMicrotask(() => document.dispatchEvent(new Event('pointerlockchange')));
10
+ Object.defineProperty(Document.prototype, 'pointerLockElement', {
11
+ configurable: true,
12
+ get: () => (locked && locked.isConnected ? locked : null),
13
+ });
14
+ Element.prototype.requestPointerLock = function () {
15
+ locked = this;
16
+ changed();
17
+ return Promise.resolve();
18
+ };
19
+ Document.prototype.exitPointerLock = function () {
20
+ if (!locked) return;
21
+ locked = null;
22
+ changed();
23
+ };
24
+ })();