Files
zeekay 672590c8bb desktop: each window calls only the commands its capability grants
Tauri v2 lets every window call every command in invoke_handler unless
the app declares them as permissions, and the main capability also named
the spotlight window, so spotlight held all of main's: shell open,
updater install, process restart, notifications, reads of ~/.claude,
~/.codex and ~/.hanzo, and all 85 commands.

build.rs now reads generate_handler! in src/main.rs and registers each
command as an app permission (allow-<command>). main grants all of them,
and the build refuses a main capability that misses one or any grant no
handler serves. Spotlight, coordinator and node-manager grant the
commands and plugin calls their own bundles make, read from the build's
module graph: spotlight keeps 21 commands, a save dialog, http fetch,
open-path, relaunch and its events. The main capability no longer names
spotlight. Measured in the running app over WebDriver: from spotlight and
coordinator, mining_get_state and register_server_in_claude are refused;
from main they reach the command.

Claude-Session: https://claude.ai/code/session_01M8RoubcPN71KgJuZ8LdBUL
2026-10-15 09:39:14 -07:00

69 lines
1.8 KiB
JSON

{
"identifier": "spotlight",
"description": "The spotlight window: the plugin calls and commands its own bundle makes, measured from the build, and nothing of the main window's.",
"local": true,
"windows": [
"spotlight"
],
"permissions": [
"core:default",
"core:event:allow-listen",
"core:event:allow-unlisten",
"core:event:allow-emit",
"core:window:allow-start-dragging",
"dialog:allow-save",
{
"identifier": "opener:allow-open-path",
"allow": [
{
"path": "$HOME/Downloads/*"
}
]
},
{
"identifier": "http:default",
"allow": [
{
"url": "https://mcp.composio.dev"
},
{
"url": "https://chatgpt.com/*"
},
{
"url": "https://api.anthropic.com/*"
},
{
"url": "https://claude.ai/*"
},
{
"url": "https://api.hanzo.ai/*"
}
],
"deny": []
},
"process:allow-restart",
"log:default",
"allow-download-logs",
"allow-get-request",
"allow-hanzo-node-get-default-model",
"allow-hanzo-node-get-options",
"allow-hanzo-node-is-running",
"allow-hanzo-node-kill",
"allow-hanzo-node-open-chat-folder",
"allow-hanzo-node-open-storage-location-with-path",
"allow-hanzo-node-remove-storage",
"allow-hanzo-node-set-default-options",
"allow-hanzo-node-set-options",
"allow-hanzo-node-spawn",
"allow-hide-spotlight-window-app",
"allow-open-main-window-with-path-app",
"allow-post-request",
"allow-retrieve-logs",
"allow-secure-storage-delete",
"allow-secure-storage-get",
"allow-secure-storage-set",
"allow-show-hanzo-node-manager-window",
"allow-show-spotlight-window-app"
]
}