Extensions
Permissions
Extensions run in a Starlark sandbox. By default an extension can do nothing except return results. Anything else needs a permission that it declares in its manifest, in the style of Android: Zagros shows a consent dialog when you install the extension, and you can review or revoke grants later.
The model #
- Declared up front. Permissions live in the extension manifest, so the marketplace can show them before you install.
- Granted by you. Install shows each permission in plain language. Declining installs nothing.
- Enforced by the host. The host API checks the grant on every call. A call without a grant fails with an error the extension can catch; it is never silently allowed.
- Re-asked on change. If an update adds a permission, you are asked again before the update applies.
What needs no permission #
Interface mechanisms stay inside the launcher and need no permission: results (item), scopes (the Tab sub-context), Tab completion, alternate actions, settings, storage, log, json, time and crypto. A host feature that reaches outside the sandbox always gets its own permission, listed in the stubs (permissions.pyi) and in the extensions guide. Coding agents can read the full list in the API stubs.
Files, downloads and archives #
fs.readandfs.writeare scoped to a folder, for examplefs.write:~/Documents. The host resolves symlinks and..before it checks the folder, so a link inside a granted folder cannot lead out of it. Reading, listing, searching (fs.glob,fs.walk), copying and archiving needfs.read; writing, appending, creating folders, renaming, deleting and copying into a place needfs.write. Deleting or moving the granted folder itself, your home folder or a drive root is refused.http.downloadand the file parts ofhttp.requestuse both permissions:networkfor the host andfs.writeorfs.readfor the file.compress.create,compress.extractandcompress.listwork on files, so they needfs.readfor the archive or sources andfs.writefor what they create. Archive entries that try to leave the destination are rejected, and extraction stops at fixed size and entry limits.sqlitegives each extension its own database file under its data folder. It needs only the always-grantedstoragepermission because the extension cannot name another path;ATTACHand similar statements are blocked.- Byte helpers (
binary, the in-memorycompress.gzipfamily) andattempttouch nothing outside the sandbox and need no permission.
Secrets and system information #
secretslets an extension keep tokens and passwords in Windows Credential Manager. Each extension only sees its own entries.registry.readlets an extension read the registry (HKCUandHKLMonly). It is scoped to a key prefix, for exampleregistry.read:HKCU\Software\Vendor, and the consent dialog shows that prefix.system.readlets an extension list services, running processes, open window titles and the paths of known folders such as Downloads. It cannot start, stop or change anything. Window titles and process names can show what you are working on, so grant it only to extensions that need it.
Database and directory servers #
sqllets an extension connect to a PostgreSQL or MySQL/MariaDB server and run any SQL on it, including statements that change or delete data. It is scoped to a host and optionally a port, for examplesql:db.example.com:5432, and the consent dialog shows that scope. Connections use TLS and verify the server certificate. A database password can be kept insecrets(which also needs that permission) instead of in the extension's files.ldaplets an extension connect to a directory server (LDAP, Active Directory) and search it, and check whether a user's password is right. It is scoped to a host, for exampleldap:ldap.corp.example.com. Directory entries can hold names, mail addresses and group memberships, so grant it only to extensions that need it.ldap.writelets an extension add, change and delete directory entries on that host. It is separate fromldapso a lookup extension never gets write access.- Passwords are never sent over an unencrypted connection to another machine, and the server certificate is always checked.
AI providers #
ailets an extension send text to a language model you configured inzagros.tomland use its tokens. It is scoped by provider name, for exampleai:claudeorai:local, so you can allow a local model and refuse a cloud one. The dialog shows the daily token limit the extension declares (ai_budget_tokens, default 50000); calls fail with a clear error when it is used up.- API keys are never in the config file or visible to extensions. You store them with
zagros ai key set <name>and they live in Windows Credential Manager. Error messages and logs have them removed. - Tools a model calls through
ai.runare the extension's own functions and run with the permissions you granted that extension, no more. Text sent to a provider leaves your computer, unless the provider is a local server.
Network sockets and SSH #
networkalso covers rawtcp,udpandtlsconnections anddnslookups, not only HTTP. It is scoped to a host (network:mail.example.com) or a host and port (network:mail.example.com:25). A host given by name that resolves to a loopback, private or link-local address is refused, so a granted name cannot be pointed at services on your own machine or network; grant the IP address itself to allow that. Connections close when the call ends and are capped in time and size.sshlets an extension log in to a server over SSH, run commands and copy files, with the rights of the account it logs in as. It is scoped touser@hostand optionally a port, for examplessh:deploy@build.example.com, and the consent dialog shows the scope. Server keys are checked: the first key is remembered, a changed key is refused, and verification cannot be turned off. Passwords and keys can be kept insecrets(which also needs that permission).
Consent dialog #
The dialog lists the extension name, its author, the install source (github:owner/repo or a registry id), and each requested permission with a short explanation. Dangerous permissions, such as running programs, are marked with a warning.
See the extensions guide for the exact permission names and the host API they unlock, and marketplace for how permissions are shown before install.