Files
zeekay aa4130fab1 feat(desktop): @hanzo/desktop — the ambient omnipresence layer (Tauri v2)
A cross-platform (macOS/Windows/Linux) menubar/tray app with a global hotkey
(Cmd/Ctrl+Shift+Space) that pops a Hanzo assistant over any app. Ask, summarize
the clipboard, rewrite, explain, translate, fix grammar — streamed over
api.hanzo.ai via the published @hanzo/ai. Built on Tauri v2 (Rust shell + web
frontend), not Electron.

Reuses the raycast/office design one-to-one: pure host-agnostic action catalog
(actions.ts — prompts, clipboard-context assembly/truncation, message shaping,
reply parsing), a thin @hanzo/ai wrapper (hanzo.ts — run/stream/list), a local
settings store (store.ts — hk- key + model, parse/merge/serialize), and the only
Tauri-touching module (clipboard.ts). app.ts is glue with one run path serving the
panel, the tray quick actions, and the hotkey.

Rust shell (src-tauri): tray + menu, global-shortcut toggle, spotlight window
(small, always-on-top, hidden-on-blur), and hide_window/paste commands (enigo
synthesizes Cmd/Ctrl+V so rewrite/translate/fix land over the frontmost app).

The hk- key lives only in the webview's local store and is validated before use;
CSP allows connecting only to api.hanzo.ai. Frontend builds with esbuild + tsc
clean; 66 vitest tests green. Native installers (.dmg/.msi/.AppImage) are a
per-OS CI job (tauri build) — never built locally.

Registers packages/desktop in pnpm-workspace.yaml.
2026-07-03 21:45:49 -07:00

67 lines
1.7 KiB
JSON

{
"$schema": "https://schema.tauri.app/config/2",
"productName": "Hanzo",
"version": "0.1.0",
"identifier": "ai.hanzo.desktop",
"build": {
"frontendDist": "../dist",
"beforeDevCommand": "node build.js --watch",
"beforeBuildCommand": "node build.js"
},
"app": {
"withGlobalTauri": false,
"windows": [
{
"label": "main",
"title": "Hanzo",
"url": "index.html",
"width": 560,
"height": 440,
"minWidth": 420,
"minHeight": 120,
"center": true,
"resizable": true,
"decorations": false,
"transparent": true,
"alwaysOnTop": true,
"skipTaskbar": true,
"visible": false
}
],
"trayIcon": {
"id": "hanzo-tray",
"iconPath": "icons/icon.png",
"iconAsTemplate": true,
"tooltip": "Hanzo"
},
"macOSPrivateApi": true,
"security": {
"csp": {
"default-src": "'self'",
"connect-src": "'self' https://api.hanzo.ai",
"style-src": "'self' 'unsafe-inline'",
"script-src": "'self'",
"img-src": "'self' data:"
}
}
},
"bundle": {
"active": true,
"targets": ["dmg", "app", "msi", "nsis", "appimage", "deb"],
"category": "Productivity",
"shortDescription": "Hanzo AI, over any app.",
"longDescription": "The Hanzo assistant, one hotkey away over any app. Ask, summarize the clipboard, rewrite, explain, translate, and fix grammar — wired to api.hanzo.ai via @hanzo/ai.",
"icon": [
"icons/32x32.png",
"icons/128x128.png",
"icons/[email protected]",
"icons/icon.icns",
"icons/icon.ico"
],
"macOS": {
"entitlements": "entitlements.plist",
"minimumSystemVersion": "10.15"
}
}
}