@trusty-squire/mcp 0.7.4 → 0.7.6

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.
@@ -29,17 +29,7 @@
29
29
  flex: none; }
30
30
  #dot.ok { background: #3fb950; }
31
31
  #dot.err { background: #f85149; }
32
- /* overflow:hidden + width:100%+min-width:0 are load-bearing for
33
- scaleViewport. noVNC measures the screen DIV via
34
- getBoundingClientRect to decide the scale factor; without
35
- overflow:hidden the canvas it appends as a child grows the
36
- parent to its natural framebuffer size, making the bounding
37
- rect report "no need to scale". min-width:0 prevents a flex
38
- child from staying at its content's intrinsic width. */
39
- #screen { flex: 1; position: relative; background: #0f1115;
40
- min-height: 0; min-width: 0; width: 100%;
41
- overflow: hidden; }
42
- #screen > canvas { max-width: 100%; max-height: 100%; }
32
+ #screen { flex: 1; position: relative; background: #0f1115; min-height: 0; }
43
33
  /* Overlay siblings of #screen — `position: fixed` against the
44
34
  viewport, NOT positioned inside #screen. RFB appends a <canvas>
45
35
  child to #screen at connect time, and that canvas can cover any
@@ -99,12 +89,12 @@
99
89
  <script type="module">
100
90
  import RFB from "./core/rfb.js";
101
91
 
102
- // The VNC password rides in the URL fragment (#p=...), never
92
+ // The VNC password rides in the URL fragment (#password=...), never
103
93
  // the query string — a fragment is never sent to the server, so the
104
94
  // secret stays out of the cloudflared edge logs and any proxy.
105
- // Accept the legacy `password=` key too in case any old bookmark
106
- // outlived the rename.
107
95
  const params = new URLSearchParams(location.hash.replace(/^#/, ""));
96
+ // Accept both `p=` (current, short) and `password=` (legacy) so any
97
+ // saved URL keeps working.
108
98
  const password = params.get("p") || params.get("password") || "";
109
99
  const dot = document.getElementById("dot");
110
100
  const msg = document.getElementById("msg");
@@ -120,29 +110,8 @@
120
110
  let rfb;
121
111
  try {
122
112
  rfb = new RFB(screen, wsUrl, { credentials: { password }, shared: true });
123
- // Mobile-friendly geometry. scaleViewport CSS-scales the canvas
124
- // to fit the screen DIV — works whether or not the server
125
- // supports remote resize. resizeSession ALSO asks the X server
126
- // to reshape its desktop to the canvas size, which avoids the
127
- // tiny-text problem when the framebuffer is much larger than
128
- // the phone. We turn both on; if remote resize succeeds the
129
- // canvas redraws at native resolution, otherwise scaleViewport
130
- // shrinks the original.
131
113
  rfb.scaleViewport = true;
132
- rfb.resizeSession = true;
133
-
134
- // Re-apply the scale on any layout change (window resize,
135
- // soft-keyboard pop, orientation flip). noVNC also does this
136
- // internally on `connect`, but on at least one Android+noVNC-1.x
137
- // combo the first scale fires before the flex layout finalizes,
138
- // leaving the canvas at framebuffer-native size until something
139
- // triggers a re-measure. A no-op assignment runs the setter,
140
- // which re-reads the screen DIV's bounding rect and re-scales.
141
- const reapplyScale = () => {
142
- if (rfb) rfb.scaleViewport = true;
143
- };
144
- window.addEventListener("resize", reapplyScale);
145
- window.addEventListener("orientationchange", reapplyScale);
114
+ rfb.resizeSession = false;
146
115
  } catch (err) {
147
116
  dot.className = "err";
148
117
  msg.textContent = "Could not start the login window: " + err;
@@ -152,10 +121,6 @@
152
121
  rfb.addEventListener("connect", () => {
153
122
  dot.className = "ok";
154
123
  msg.style.display = "none";
155
- // Re-fire the scale after the canvas has actually been added
156
- // to the DOM by RFB — the property assigned at construction
157
- // time may have run against an empty container.
158
- reapplyScale();
159
124
  });
160
125
  rfb.addEventListener("disconnect", () => {
161
126
  dot.className = "err";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusty-squire/mcp",
3
- "version": "0.7.4",
3
+ "version": "0.7.6",
4
4
  "mcpName": "io.github.Trusty-Squire/mcp",
5
5
  "type": "module",
6
6
  "description": "Local MCP server vibe coding agents install. Thin relay to the Trusty Squire API, with the bundled universal signup bot.",