# Kazuo Remote Desktop

> Google Remote Desktop embedded in a widget with a Chrome user-agent and persistent login

| | |
|---|---|
| Version | 1.0.0 |
| Category | Networking |
| Permissions | network.remote |
| Depends on | ai-chat |

# Kazuo Remote Desktop

Embeds Google Remote Desktop (`https://remotedesktop.google.com/`) inside a Kazuo
widget. Ported from the standalone **ChromeRemote** Electron project — it keeps that
project's core trick (a `<webview>` with a faked Chrome user-agent + a persistent
partition so the Google login sticks) and its toolbar/status-bar shell, but drops the
parts that don't fit the plugin sandbox (native keyboard hook, CDP-embedded chrome.exe,
OS-level tab manager).

**Type:** `ui-settings` — see `.claude/skills/kazuo-create-plugin/references/plugin-examples.md`

## How it works

- `js/widget.js` builds a nested `<webview>` inside `#view-host` with:
  - `useragent` = Chrome 131 (Google refuses webview logins that advertise Electron)
  - `partition` = `persist:kazuo-grd` (dedicated persistent session; login survives restarts)
  - `allowpopups` = true (Google auth sometimes opens a popup)
- Toolbar wires Back / Forward / Reload / Home + an address bar (Enter to navigate).
- Status bar shows loading state + current URL.

### Host requirement

A guest `<webview>` cannot embed another `<webview>` unless the host opts in. Two host
files set `webpreferences="webviewTag"` on the plugin webview so this plugin can nest one:
`src/components/PluginWidget.svelte` (docked widget) and
`src/components/PluginWindowApp.svelte` (popped-out window).

## Files

- `manifest.json` — metadata, `defaultSettings`, `defaultWidgetConfig`
- `widget.html` / `js/widget.js` / `css/widget.css` — toolbar + nested webview + status bar
  - has its own "⚙" button + settings overlay built into widget.html/widget.js
- `settings.html` / `js/settings.js` / `css/settings.css` — same field as the widget overlay
  (intentionally duplicated), used by the Plugin Manager screen and the pop-out window
- `locales/en.json5` / `locales/vi.json5` — UI strings, `widget.*`/`settings.*` namespaces

## Default settings

- `homeUrl` — default: `"https://remotedesktop.google.com/"` — page opened on load and on Home

## Test

Open Kazuo AI → Plugin Manager — this plugin appears automatically (the host scans
`plugins-library/` on its own, no registration needed) → Install → Enable. The widget
should load the Google Remote Desktop sign-in page. Log in once; the session persists.

> If Google still blocks sign-in ("this browser may not be secure"), that is the same
> limitation the original ChromeRemote project worked around with the Chrome UA — no
> further workaround is available from inside the plugin sandbox.
