Skip to content

13. Plugin Permissions Matrix ​

1. Goals ​

Provide a permission–capability–risk–default-policy reference table for reuse by UI copy and validation.

2. Matrix ​

PermissionRiskAllowed API / capabilityDefault policyNotes
ui.panellowOpen the plugin panelGranted at installNeeded by almost all UI plugins
ui.viewlowcontributes.views are listed in the work panel and may be openedGranted at installSame isolation as a panel window: sandboxed page, per-plugin partition, net.domains egress. Filtered by activation scope
ui.themelowcontributes.themes CSS is loaded and offered in Settings; runtime pi.themes.upsert / remove / list and pi.app.setTheme (ADR 0260)Granted at installCSS is sanitized by the host; it cannot script. Declared assets are served over the host's read-only plugin-asset: scheme. setTheme may only select a built-in preference or a currently registered plugin theme. There is no per-plugin theme count cap
ui.settingslowcontributes.scenicThemes adds a host-rendered data-only Settings entryGranted at installAlso needs ui.theme; no plugin Settings HTML, CSS, JavaScript, or bridge (ADR 0287)
ui.window.appearancelowcontributes.windowAppearance sets the native window background and Windows main-window corner request while one of the plugin's themes is selectedGranted at install#rrggbb / #rrggbbaa background and integer cornerRadius 0..24 DIP; restores host background and the 12 DIP default request when the theme is gone. Windows 11 maps 0 to square and positive values to the system-rounded preference (not exact DIP radii); alpha is composited over the built-in theme color on its opaque window. Earlier Windows builds retain the requested DIP radius. macOS keeps native corners; its default translucent vibrancy surface ignores the colour, and the Translucent window switch turned off applies it to the opaque native surface (ADR 0332)
clipboard.readmediumclipboard.readText, clipboard.getHistoryConfirm on first useMay read sensitive information and retained clipboard history
clipboard.writemediumclipboard.writeTextConfirm on first usePrevents clipboard pollution
notifylowui.notify, ui.getNotificationPermission, ui.requestNotificationPermission, ui.showNativeNotificationCan be granted by defaultNative delivery is OS-controlled; avoid notification-spam abuse
fs.readmediumfs.readText / fs.stat / fs.readRange / fs.readPreview / fs.openDefault / fs.openInBrowser / fs.reveal / fs.glob / fs.list / fs.requestDirectory / dropped-file grantGranted at install, bounded by manifest.fs.readfs.stat and fs.readRange share the read gate; Browser open accepts HTML only and creates a resource tab without granting CDP; a dropped-file grant is one-file, read-only, memory-only, and gesture-bound; all file calls remain root- and deny-list-checked
fs.writehighfs.writeTextGranted at install, bounded by manifest.fs.writeScope is required; a whole-tree pattern fails validation. Out of scope asks the user
fs.deletehighfs.removeGranted at install, bounded by manifest.fs.deleteTwo tiers (own / scope), always via the OS trash, non-recursive, rate-braked (§2B)
fs.read.workspacemedium—Downgraded on load to fs.read with a whole-tree scopeLegacy name; predates scopes
fs.write.workspacehigh—Downgraded on load to fs.write with no scopeLegacy name; every write asks the user until the manifest declares scope
fs.delete.workspacehigh—Downgraded on load to fs.delete with own: trueLegacy name; only the plugin's own output goes without asking
agent.tool.registerhighRegister an agent toolConfirm at installTool execution is audited separately
agent.prompt.injecthighActivate the catalog and on-demand bodies from contributes.skillsDeny by default / strong confirmationEasily leads to behavior hijacking
composer.transformmediumcontributes.composerTransforms and onComposerTransformConfirm at installRuns only after an explicit Composer action. Receives the draft and optional model key, not session history or separate attachment/file-reference metadata; request and result are capped at 100,000 characters and audited
composer.suggestmediumpi.composer.suggest / pi.composer.clearSuggestionConfirm at installWrites one dismissible line into the placeholder layer of the Composer for the session on screen, only while the draft is empty and only for the turn the plugin names. The user takes it with Tab, drops it with Esc, and typing, sending, a session switch, a new turn, the plugin stopping, a reload or a window close all end it. The plugin never sends it and never reads the draft. Text is folded to one line and cut at 200 characters; the lifetime defaults to 120 s and is capped at 10 minutes. Audited; a place that will not show it answers { shown: false, reason } instead of throwing
agent.extensionhighRun contributes.agentExtensions modules inside the agent processExplicit confirmation; local imports and development plugins only in v1.1Same access as the agent's own tools; the plugin sandbox does not apply (spec 16)
renderer.extensionhighmanifest.renderer is evaluated inside the host renderer to mount UI slots; rendererActions and rendererCallMethods open the actions and onRendererCall methods that module may useExplicit confirmation; local imports and development plugins only in v1.1, matching agent.extensionThe module shares the host's own document, so a slot is a contract rather than a sandbox. A component may dispatch only the reviewed vocabulary (plugin.call, composer.insertText, composer.readDraft, composer.replaceDraft, attachments.add / list / remove), capped at 16, and plugin.call reaches only the calling plugin's own onRendererCall methods, capped at 32. Registrations are withdrawn when the plugin unloads; a self-drawn dialog lives in a layer the plugin opened itself
provider.registerhighcontributes.providers become rows in the native provider list, owned by the plugin and refreshed from the manifest on load; unconfigured API-key rows with an endpoint also appear in Add Service, grouped by optional category and with optional hover/focus descriptionExplicit confirmation; local imports and development plugins only in v1.1, matching agent.extensionThe user path refuses edits to the row (PROVIDER_OWNED_BY_PLUGIN); Add Service saves the key through the existing Host secret path. Only loaded plugins with this grant contribute entries; the chooser does not expose secrets or run plugin code. An empty API-key model list discovers models after key save.
provider.oauthhighonProviderOAuth; host-rendered pi.providers.oauth.prompt / notify for a declared OAuth providerExplicit confirmationRequired with provider.register for authKind: "oauth". The callback can read and refresh only that contribution's encrypted credential. The Host keeps refresh tokens out of the renderer and Agent Runtime. Host-mediated callback egress still needs net.fetch and manifest.net.domains; plugin entry code itself is not an OS sandbox. One account is stored per provider contribution; sign out clears it
net.fetchhighnet.fetchDeny by defaultConfined to manifest.net.domains; an empty or malformed list means no egress (§2A)
net.websockethighpi.net.websocket.connect / send / close (host-owned sockets; at most 4 per plugin, 1 MiB frames)Deny by defaultConfined to manifest.net.domains like net.fetch; a refused host never reaches the transport, and every socket is closed when the plugin unloads, is disabled, or crashes
net.anyHosthighAny host-owned egress path (net.fetch, net.websocket, panel session, remote HTTP MCP)Confirm at installLifts the manifest.net.domains allowlist for user-typed endpoints (self-hosted servers); cloud metadata endpoints stay refused; nothing prompts at request time
shell.openExternalmediumOpen external linkConfirm on first usePrevents phishing links
mcp.server.localhighSpawn a transport: "stdio" MCP server declared in the manifestDeny by defaultRuns a local executable; its tools reach the agent
mcp.server.remotehighConnect a transport: "http" MCP serverDeny by defaultSends tool arguments to a third-party endpoint; non-loopback HTTP is unencrypted
background.servicemediumStart contributes.services and keep the plugin process residentConfirm at installSupervised with backoff; visible on the Plugins page
bus.publishmediumbus.publish to declared topicsConfirm at installOther plugins can act on the message
bus.subscribemediumbus.subscribe to declared patternsConfirm at installCan observe another plugin's messages
browser.cdphighpi.browser.* against the host work-panel guestConfirm at installGuest bounds are clamped to the calling plugin view; CDP is allowlisted
desktop.controlhighpi.desktop.listOperations, pi.desktop.invoke, including the reviewed session/collaboration/* operationsConfirm at installShared with the local MCP control plane's reviewed operation catalog, except for operations marked plugin-only: the six session/collaboration/* operations reach the plugin gateway but are deliberately absent from the MCP-visible catalog and have no renderer mutation channel; collaboration spawn/send additionally require an active plugin Agent tool invocation, whose source Session/turn/invocation identity is injected by the host; panel cancellation is limited to that plugin's own deliveries; a dangerous operation needs confirm: true from the plugin and the user's answer to a host-owned native dialog that names the catalog operation; the MCP bearer token and Electron channel names are never exposed
ui.microphonemediumnavigator.mediaDevices.getUserMedia({ audio: true }) inside the plugin's isolated panelConfirm at installAudio only; camera and every other device permission stay denied; no native handle or host secret reaches the plugin
audio.capture.backgroundhighpi.audio.getInputDevices, openInput, closeInput, getCaptureState, onInputFrame / offInputFrame (registered in the plugin API and gated by this permission; the two synchronous registration helpers throw the coded refusal)Deny by defaultHost owns the device; PCM16 frames only, no device handle or MediaStream. The host has no device backend yet, so an authorized call is refused with a coded UNSUPPORTED (audited); no device is opened
audio.playback.backgroundmediumpi.audio.openOutput, writeOutput, stopOutput, closeOutput (registered in the plugin API and gated by this permission)Confirm at installHost-owned playback queue, PCM16 only. The host has no device backend yet, so an authorized call is refused with a coded UNSUPPORTED (audited); no device is opened
keyboard.globalShortcutmediumpi.keyboard.registerGlobalShortcut, unregisterGlobalShortcut, listGlobalShortcuts; contributes.globalShortcutsConfirm at installHost owns Electron globalShortcut; a shortcut only runs the plugin's own command; conflicts are refused (SHORTCUT_CONFLICT / SHORTCUT_UNAVAILABLE / INVALID_ACCELERATOR / LIMIT_EXCEEDED, max 8 per plugin); released on unload/disable/crash
models.listmediumpi.models.listConfirm at installReady provider/model rows only; no secrets
project.createhighpi.project.create and explicit projectId on session importConfirm at installCreates or reuses a durable project row without activating the workspace; imported sessions remain unbound unless the id is supplied
session.readhighpi.session.getLlmContextConfirm at installIn-flight tool session only; compaction-aware projection (D019 / D336)
session.autoTitlehighpi.session.getAutoTitleContext, pi.session.setAutoTitleConfirm at installFirst user prompt (≤1,000 chars) and first assistant reply (≤500 chars) only, for default-titled sessions; title writes are compare-and-set. It does not grant transcript reads
session.importhighpi.session.import, pi.session.importBatchConfirm at installImports only into the calling plugin's declared session sources; bounded and rate-limited
session.read.ownmediumpi.session.list, pi.session.get, pi.session.listMessagesConfirm at installReads only sessions imported by the calling plugin; no cross-plugin access
session.update.ownmediumpi.session.renameConfirm at installRenames only the calling plugin's active imported sessions
session.delete.ownhighpi.session.deleteConfirm at installTrash/purge only the calling plugin's imported sessions; rate-limited
usage.readmediumpi.usage.listTurnsConfirm at installRead-only listing of completed-turn facts (per-turn token counters and identifiers, keyset-paginated); no message body and no write path
agent.completehighpi.agent.completeConfirm at installHost-owned one-shot; spends user quota; includeSessionContext also needs session.read
speech.adapter.registerhighpi.speech.registerAdapter / unregisterAdapterConfirm at installRegisters a speech protocol. Handles stay in the guest; HTTP plans are executed by the host with the bound provider key and must stay on that origin. Built-in protocol ids are reserved

2A. A permission is the switch; the manifest carries the range ​

Two capabilities are too coarse to be answered by a name alone, so the name says whether the plugin may act and a manifest field says how far. Both fields are enforced by the host, shown to the user next to the permissions, and validated at install time.

FieldBoundsAbsent or empty means
net.domainsEvery host-owned egress path: the panel session, pi.net.fetch, remote HTTP MCP endpointsNo egress at all, whatever net.fetch says
fs.read / fs.write / fs.deleteWhich paths that file mode may touchNo standing reach; every access falls to a confirmation

Failing closed on an absent field is what makes the two safe to omit: a manifest that says nothing grants nothing. See 04-plugin-security.md §6 and §8.1, and ADR 0088.

The two are also linked. fs.read may declare the whole tree because a read only becomes a leak when the bytes can leave, and net.domains closes that half. fs.write and fs.delete are dangerous on their own, so a whole-tree pattern (**, **/*, */**, ./*) fails manifest validation for those modes.

2B. Deletion ​

fs.delete is the one file mode whose damage is not undoable by re-running the plugin, so it carries three bounds the other modes do not:

  1. Two tiers. own: true lets a plugin remove files it wrote itself — the host keeps a write ledger in the plugin's data directory — with no scope and no prompt; a file the user has modified since drops out of the ledger. Deleting anything else needs a declared scope, and out-of-scope paths ask the user.
  2. The OS trash. Removal goes through shell.trashItem, never rm, and never recursively: a non-empty directory is refused rather than emptied. The host keeps no copy of the user's data to provide this.
  3. A rate brake. 50 deletes per rolling 60s per plugin. Past it the user is asked once with the reason given as rate rather than path, because recursive: false bounds one call and not a glob plus a loop.

3. Permission dependencies ​

  • ui.panel is required to load a panel entry
  • ui.view is required to contribute work panel views; it is independent of ui.panel, so a plugin may ship docked views without a detached window
  • ui.view also covers pi.ui.revealView, which shows one of the plugin's own views in a session's work panel; following the selected session (pi.session.getActive, session:activated) needs no permission
  • agent.tool.register is required to contribute agentTools
  • When fs.write is present, it is recommended to also declare fs.read
  • manifest.fs.<mode> requires the matching fs.<mode> permission; a scope nobody can use fails validation rather than being silently ignored
  • fs.requestDirectory (the userSelected root) is gated on fs.read; writing or deleting inside the chosen directory still needs fs.write / fs.delete
  • A contribution whose permission is missing fails manifest validation (themes, mcpServers, services, bus); skills is the exception and is skipped at load time instead (see 02-plugin-manifest-schema.md §7)
  • Lifecycle and state events need no permission: workspace:changed, session:modelChanged, session:turnEnded, and plugin:settingsChanged arrive on the existing plugin event channel, and subscribing to an unknown event name does not error

3A. Plan operating-state rule ​

Plugin tools are hidden and denied in Plan/Goal by default. A runtime tool registration may opt in with non-empty planSafeActions; only an args.action in that list may execute in those modes. The list is checked against the schema's action enum when present. Keep the manifest descriptor and runtime registration in sync: the runtime registration drives the executable tool. Risk low, session grants, and auto do not substitute for the declaration. Host policy and the plugin runner both check it; a disallowed runner action is PERMISSION_DENIED. The declaration is an author assertion of read-only behavior, not a side-effect sandbox (ADR 0211).

4. Permission display copy ​

English is the primary copy. The zh-CN column holds the localized example strings. A file permission is never shown alone: the declared scope is rendered beside it, so "Modify the files it lists" is followed by the list.

PermissionEnglish copyzh-CN example
fs.readRead the files it lists读取它列出的文件
clipboard.readRead the current clipboard and retained history读取当前剪贴板和保留的历史
fs.writeModify the files it lists修改它列出的文件
fs.deleteDelete the files it lists, to the trash删除它列出的文件(进回收站)
notifyShow in-app and native notifications显示应用内和系统通知
agent.tool.registerProvide executable tools to the AI Agent向 AI Agent 提供可执行工具
agent.prompt.injectAdjust agent instructions调整智能体指令
agent.extensionRun code inside the agent在 agent 内运行代码
renderer.extensionDraw UI in chat slots在聊天插槽绘制界面
net.fetchAccess the network访问网络
shell.openExternalOpen external links打开外部链接
ui.themeProvide a theme提供主题
ui.settingsAdd a sandboxed Settings entry in Extensions在“扩展”中添加沙盒设置项
ui.window.appearanceCustomize window appearance自定义窗口外观
mcp.server.localRun a local MCP server运行本地 MCP 服务
mcp.server.remoteReach a remote MCP server连接远端 MCP 服务
background.serviceKeep a background service running保持后台服务运行
bus.publishSend messages to other plugins向其他插件发送消息
bus.subscribeReceive messages from other plugins接收其他插件的消息
browser.cdpControl the work-panel browser控制工作面板浏览器
models.listList authenticated models列出已登录的模型
session.readRead the current conversation sent to the model读取当前发给模型的对话
session.importImport bounded session history into your declared sources导入受限的会话历史到已声明的数据源
session.read.ownRead sessions imported by this plugin读取此插件导入的会话
session.update.ownRename sessions imported by this plugin重命名此插件导入的会话
session.delete.ownTrash or purge sessions imported by this plugin将此插件导入的会话移入回收站或清除
usage.readRead usage statistics读取用量统计
agent.completeRun a one-shot completion with your models用你的模型发起一次补全
composer.transformTransform text in the Composer转换输入框中的文本
composer.suggestOffer a suggestion in the Composer在输入框中给出建议
speech.adapter.registerRegister a speech adapter注册语音适配器
audio.capture.backgroundUse the microphone in the background后台使用麦克风
audio.playback.backgroundPlay audio in the background后台播放声音
keyboard.globalShortcutRegister system-wide shortcuts注册系统级快捷键
net.websocketOpen real-time connections建立实时双向连接

5. Adding permissions on upgrade ​

If new permissions appear on upgrade:

  1. Compute the diff
  2. Force user confirmation
  3. If not confirmed, cancel the upgrade or disable the new capabilities (canceling the upgrade is recommended)

6. Runtime check pseudocode ​

ts
assertPermission(pluginId, perm) {
 if (!granted(pluginId, perm)) throw ERROR_PERMISSION_DENIED
}

Every Host API entry point must assert first. A file entry point then passes three more gates, in this order — a later gate can only refuse, never widen:

ts
assertFsAccess(pluginId, mode, requestedPath, sessionId) {
 assertPermission(pluginId, `fs.${mode}`)              // declared AND granted
 full = realpathWithinRoot(root(pluginId, mode, sessionId), requestedPath)
 if (!full) throw NOT_FOUND | INVALID_ARGUMENT         // symlinks resolved first
 if (isDenied(full) || isHostReserved(full)) throw ERROR_PERMISSION_DENIED
 if (!inScope(full, declaredScope(pluginId, mode))) await confirmWithUser(...)
}

The workspace root is the invoking tool session's project, falling back to the visible workspace for a panel call (ADR 0266).

7. Acceptance ​

  1. Unauthorized API calls fail
  2. Permission copy is visible in the install UI, and a file permission shows its declared scope alongside
  3. Upgrades that add permissions prompt the user
  4. A write or delete outside the declared scope prompts, and a denial is audited as PERMISSION_DENIED
  5. .env and .git/** stay unreadable under a whole-tree read scope, and do not appear in fs.glob results either
  6. A symlink inside the root pointing outside it does not carry an access out
  7. A delete lands in the OS trash, refuses a non-empty directory, and is interrupted past 50 removals in a rolling minute
  8. A plugin declaring only the legacy fs.*.workspace names loses write and delete reach, and the Plugins page says so

Local-first · Model-agnostic · Plugin-powered. nib.am