@rubytech/create-realagent 1.0.425 → 1.0.429

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.
Files changed (40) hide show
  1. package/dist/index.js +87 -42
  2. package/package.json +3 -3
  3. package/payload/maxy/package.json +1 -1
  4. package/payload/maxy/public/assets/{admin-h_MCGiva.js → admin-CvVTy3NI.js} +1 -1
  5. package/payload/maxy/public/brand/favicon.ico +0 -0
  6. package/payload/maxy/public/brand-constants.json +6 -6
  7. package/payload/maxy/public/brand-defaults.css +5 -5
  8. package/payload/maxy/public/index.html +2 -2
  9. package/payload/maxy/public/public.html +1 -1
  10. package/payload/maxy/server.js +29 -9
  11. package/payload/platform/config/brand.json +20 -22
  12. package/payload/platform/plugins/telegram/PLUGIN.md +34 -0
  13. package/payload/platform/plugins/telegram/mcp/dist/index.d.ts +2 -0
  14. package/payload/platform/plugins/telegram/mcp/dist/index.d.ts.map +1 -0
  15. package/payload/platform/plugins/telegram/mcp/dist/index.js +101 -0
  16. package/payload/platform/plugins/telegram/mcp/dist/index.js.map +1 -0
  17. package/payload/platform/plugins/telegram/mcp/dist/lib/telegram.d.ts +27 -0
  18. package/payload/platform/plugins/telegram/mcp/dist/lib/telegram.d.ts.map +1 -0
  19. package/payload/platform/plugins/telegram/mcp/dist/lib/telegram.js +41 -0
  20. package/payload/platform/plugins/telegram/mcp/dist/lib/telegram.js.map +1 -0
  21. package/payload/platform/plugins/telegram/mcp/dist/tools/message-history.d.ts +16 -0
  22. package/payload/platform/plugins/telegram/mcp/dist/tools/message-history.d.ts.map +1 -0
  23. package/payload/platform/plugins/telegram/mcp/dist/tools/message-history.js +62 -0
  24. package/payload/platform/plugins/telegram/mcp/dist/tools/message-history.js.map +1 -0
  25. package/payload/platform/plugins/telegram/mcp/dist/tools/message.d.ts +20 -0
  26. package/payload/platform/plugins/telegram/mcp/dist/tools/message.d.ts.map +1 -0
  27. package/payload/platform/plugins/telegram/mcp/dist/tools/message.js +34 -0
  28. package/payload/platform/plugins/telegram/mcp/dist/tools/message.js.map +1 -0
  29. package/payload/platform/plugins/telegram/mcp/package.json +19 -0
  30. package/payload/platform/plugins/telegram/references/setup-guide.md +50 -0
  31. package/payload/platform/scripts/vnc.sh +20 -1
  32. package/payload/maxy/public/brand/demo-9pm-enquiry.svg +0 -95
  33. package/payload/maxy/public/brand/demo-create-agent.svg +0 -110
  34. package/payload/maxy/public/brand/demo-morning-briefing.svg +0 -83
  35. package/payload/maxy/public/brand/demo-post-viewing.svg +0 -107
  36. package/payload/maxy/public/brand/how-it-works.svg +0 -152
  37. package/payload/maxy/public/brand/realagent-favicon-dark-32.png +0 -0
  38. package/payload/maxy/public/brand/realagent-icon-dark-round-web.png +0 -0
  39. package/payload/maxy/public/brand/realagent-icon-dark-web.png +0 -0
  40. package/payload/maxy/public/brand/realagent-icon-web.png +0 -0
package/dist/index.js CHANGED
@@ -225,7 +225,7 @@ function installSystemDeps() {
225
225
  <name replace-wildcards="yes">${BRAND.productName} on %h</name>
226
226
  <service>
227
227
  <type>_http._tcp</type>
228
- <port>19200</port>
228
+ <port>${BRAND.port ?? 19200}</port>
229
229
  <txt-record>role=${BRAND.hostname}</txt-record>
230
230
  </service>
231
231
  </service-group>`;
@@ -252,7 +252,7 @@ function installSystemDeps() {
252
252
  }
253
253
  }
254
254
  catch { /* not critical — wired connections unaffected */ }
255
- console.log(` Device reachable at http://${BRAND.hostname}.local:19200`);
255
+ console.log(` Device reachable at http://${BRAND.hostname}.local:${BRAND.port ?? 19200}`);
256
256
  }
257
257
  function installNodejs() {
258
258
  if (commandExists("node") && nodeVersion() >= 20) {
@@ -610,7 +610,7 @@ function setupVncViewer() {
610
610
  if (existsSync(vendorSrc)) {
611
611
  cpSync(vendorSrc, join(novncDest, "vendor"), { recursive: true, force: true });
612
612
  }
613
- // Custom viewer: no toolbar, scales to fit, auto-connects
613
+ // Custom viewer: no toolbar, scales to fit, auto-connects with retry
614
614
  const html = `<!DOCTYPE html>
615
615
  <html>
616
616
  <head>
@@ -621,56 +621,101 @@ function setupVncViewer() {
621
621
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
622
622
  html, body { width: 100%; height: 100%; background: #111; overflow: hidden; }
623
623
  #screen { position: relative; width: 100%; height: 100%; }
624
+ #status {
625
+ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
626
+ color: #888; font-family: -apple-system, BlinkMacSystemFont, sans-serif;
627
+ font-size: 14px; text-align: center; z-index: 10;
628
+ transition: opacity 0.3s;
629
+ }
630
+ #status.hidden { opacity: 0; pointer-events: none; }
631
+ .status-spinner {
632
+ display: inline-block; width: 20px; height: 20px;
633
+ border: 2px solid #444; border-top-color: #888; border-radius: 50%;
634
+ animation: spin 0.8s linear infinite; margin-bottom: 8px;
635
+ }
636
+ @keyframes spin { to { transform: rotate(360deg); } }
624
637
  </style>
625
638
  </head>
626
639
  <body>
627
640
  <div id="screen"></div>
641
+ <div id="status">
642
+ <div class="status-spinner"></div>
643
+ <div>Connecting to browser…</div>
644
+ </div>
628
645
  <script type="module">
629
646
  import RFB from '/novnc/core/rfb.js';
630
647
  const p = new URLSearchParams(location.search);
631
648
  const host = p.get('host') || location.hostname;
632
649
  const port = p.get('port') || '6080';
633
650
  const screen = document.getElementById('screen');
634
- const rfb = new RFB(screen, 'ws://' + host + ':' + port + '/websockify');
635
- rfb.scaleViewport = true;
636
- rfb.clipViewport = true;
637
- rfb.resizeSession = false;
638
- rfb.addEventListener('disconnect', () => { setTimeout(() => location.reload(), 2000); });
651
+ const status = document.getElementById('status');
652
+ let retryCount = 0;
653
+ const MAX_RETRIES = 30;
639
654
 
640
- // --- Clipboard bridge (local ↔ remote) ---
641
- window.rfb = rfb;
655
+ function connect() {
656
+ status.classList.remove('hidden');
657
+ status.querySelector('div:last-child').textContent =
658
+ retryCount > 0 ? 'Reconnecting… (' + retryCount + ')' : 'Connecting to browser…';
642
659
 
643
- // Paste bridge: patch noVNC keyboard handler to not intercept Ctrl/Cmd+V.
644
- // Without this patch, noVNC calls preventDefault() on every keydown,
645
- // which suppresses the browser paste event. By skipping Ctrl+V, the
646
- // browser fires a paste event with clipboardData — works even on HTTP.
647
- if (rfb._keyboard && rfb._keyboard._handleKeyDown) {
648
- const orig = rfb._keyboard._handleKeyDown.bind(rfb._keyboard);
649
- rfb._keyboard._handleKeyDown = function(e) {
650
- if ((e.ctrlKey || e.metaKey) && (e.key === 'v' || e.key === 'V')) return;
651
- return orig(e);
652
- };
653
- }
660
+ const rfb = new RFB(screen, 'ws://' + host + ':' + port + '/websockify');
661
+ rfb.scaleViewport = true;
662
+ rfb.clipViewport = true;
663
+ rfb.resizeSession = false;
664
+ window.rfb = rfb;
654
665
 
655
- // Catch the paste event, sync text to VNC server clipboard, then
656
- // send Ctrl+V keystrokes so the remote app pastes the synced content.
657
- document.addEventListener('paste', (e) => {
658
- e.preventDefault();
659
- const text = (e.clipboardData || window.clipboardData)?.getData('text');
660
- if (!text || !window.rfb) return;
661
- window.rfb.clipboardPasteFrom(text);
662
- setTimeout(() => {
663
- window.rfb.sendKey(0xFFE3, 'ControlLeft', true);
664
- window.rfb.sendKey(0x0076, 'v', true);
665
- window.rfb.sendKey(0x0076, 'v', false);
666
- window.rfb.sendKey(0xFFE3, 'ControlLeft', false);
667
- }, 50);
668
- });
666
+ rfb.addEventListener('connect', () => {
667
+ status.classList.add('hidden');
668
+ retryCount = 0;
669
+ });
669
670
 
670
- // Copy bridge: when the remote clipboard changes, notify the parent frame.
671
- rfb.addEventListener('clipboard', (e) => {
672
- window.parent.postMessage({ type: 'vnc-clipboard', text: e.detail.text }, '*');
673
- });
671
+ rfb.addEventListener('disconnect', (e) => {
672
+ status.classList.remove('hidden');
673
+ if (retryCount < MAX_RETRIES) {
674
+ retryCount++;
675
+ const delay = Math.min(1000 * retryCount, 5000);
676
+ status.querySelector('div:last-child').textContent = 'Reconnecting in ' + Math.ceil(delay/1000) + 's…';
677
+ setTimeout(connect, delay);
678
+ } else {
679
+ status.querySelector('div:last-child').textContent = 'Connection lost. Reload the page to retry.';
680
+ }
681
+ });
682
+
683
+ // --- Clipboard bridge (local ↔ remote) ---
684
+
685
+ // Paste bridge: patch noVNC keyboard handler to not intercept Ctrl/Cmd+V.
686
+ // Without this patch, noVNC calls preventDefault() on every keydown,
687
+ // which suppresses the browser paste event. By skipping Ctrl+V, the
688
+ // browser fires a paste event with clipboardData — works even on HTTP.
689
+ if (rfb._keyboard && rfb._keyboard._handleKeyDown) {
690
+ const orig = rfb._keyboard._handleKeyDown.bind(rfb._keyboard);
691
+ rfb._keyboard._handleKeyDown = function(e) {
692
+ if ((e.ctrlKey || e.metaKey) && (e.key === 'v' || e.key === 'V')) return;
693
+ return orig(e);
694
+ };
695
+ }
696
+
697
+ // Catch the paste event, sync text to VNC server clipboard, then
698
+ // send Ctrl+V keystrokes so the remote app pastes the synced content.
699
+ document.addEventListener('paste', (e) => {
700
+ e.preventDefault();
701
+ const text = (e.clipboardData || window.clipboardData)?.getData('text');
702
+ if (!text || !window.rfb) return;
703
+ window.rfb.clipboardPasteFrom(text);
704
+ setTimeout(() => {
705
+ window.rfb.sendKey(0xFFE3, 'ControlLeft', true);
706
+ window.rfb.sendKey(0x0076, 'v', true);
707
+ window.rfb.sendKey(0x0076, 'v', false);
708
+ window.rfb.sendKey(0xFFE3, 'ControlLeft', false);
709
+ }, 50);
710
+ });
711
+
712
+ // Copy bridge: when the remote clipboard changes, notify the parent frame.
713
+ rfb.addEventListener('clipboard', (e) => {
714
+ window.parent.postMessage({ type: 'vnc-clipboard', text: e.detail.text }, '*');
715
+ });
716
+ }
717
+
718
+ connect();
674
719
  </script>
675
720
  </body>
676
721
  </html>`;
@@ -824,7 +869,7 @@ WantedBy=default.target
824
869
  let webServerUp = false;
825
870
  for (let i = 0; i < 20; i++) {
826
871
  try {
827
- execFileSync("curl", ["-sf", "http://localhost:19200", "-o", "/dev/null"], { timeout: 3000 });
872
+ execFileSync("curl", ["-sf", `http://localhost:${BRAND.port ?? 19200}`, "-o", "/dev/null"], { timeout: 3000 });
828
873
  webServerUp = true;
829
874
  break;
830
875
  }
@@ -833,7 +878,7 @@ WantedBy=default.target
833
878
  }
834
879
  }
835
880
  if (!webServerUp) {
836
- console.log(` Server may still be starting. Check http://${BRAND.hostname}.local:19200 in a moment.`);
881
+ console.log(` Server may still be starting. Check http://${BRAND.hostname}.local:${BRAND.port ?? 19200} in a moment.`);
837
882
  }
838
883
  // Validate CDP: the programmatic Playwright MCP server connects to Chromium
839
884
  // via --cdp-endpoint http://127.0.0.1:9222. Chromium is started by vnc.sh
@@ -907,7 +952,7 @@ try {
907
952
  console.log("");
908
953
  console.log("================================================================");
909
954
  console.log("");
910
- console.log(` Open in your browser: http://${BRAND.hostname}.local:19200`);
955
+ console.log(` Open in your browser: http://${BRAND.hostname}.local:${BRAND.port ?? 19200}`);
911
956
  console.log("");
912
957
  console.log("================================================================");
913
958
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rubytech/create-realagent",
3
- "version": "1.0.425",
4
- "description": "Install Real Agent Built for agents. By agents.",
3
+ "version": "1.0.429",
4
+ "description": "Install MaxyAI for Productive People",
5
5
  "bin": {
6
6
  "create-realagent": "./dist/index.js"
7
7
  },
@@ -16,7 +16,7 @@
16
16
  "payload"
17
17
  ],
18
18
  "keywords": [
19
- "realagent",
19
+ "maxy",
20
20
  "ai",
21
21
  "assistant",
22
22
  "raspberry-pi",
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "realagent-server-deps",
2
+ "name": "maxy-server-deps",
3
3
  "private": true,
4
4
  "type": "module",
5
5
  "dependencies": {