@pi-ko/permissions

Independent pi extension: permissions

Packages

Package details

extension

Install @pi-ko/permissions from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@pi-ko/permissions
Package
@pi-ko/permissions
Version
0.6.8
Published
Nov 23, 2026
Downloads
447/mo · 447/wk
Author
rkabaev
License
unknown
Types
extension
Size
23.3 KB
Dependencies
1 dependency · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@pi-ko/permissions

Independently installable pi extension: permissions.

This extension depends on @pi-ko/core@0.6.0; it does not require any other extension.

For a release, publish @pi-ko/core first, then this package. Install this package through pi's package manager; its npm dependencies provide the shared core automatically. For local development, use the parent npm workspace and build core before running this extension. To distribute before publication, provide both core and extension tarballs.

Feature code and resources live here. Shared runtime, prompt assets, and compatibility profile live in @pi-ko/core. Existing compatibility identifiers and saved-state paths remain unchanged.

Publishing to npm

The .github/workflows/publish.yml workflow publishes this package to the public npm registry when a tag is pushed. It authenticates with the repository secret NPM_TOKEN, an npm automation or granular token that may publish the @pi-ko scope. Enable GitHub Actions in this repository.

Update package.json to the release version, commit it, then push a matching tag:

git tag v0.6.0
git push origin v0.6.0

Tags must equal the package version, optionally prefixed with v. The workflow installs dependencies, builds if needed, typechecks, and runs available tests before publishing. Stable versions use latest; prereleases use next. Each version can only be published once.

Publish matching dependency versions in order: @pi-ko/core, then the individual extensions, then @pi-ko/bundle. Packages are published with public access, so dependents install from the public registry without cross-repository access setup.

Installing from npm

The committed .npmrc routes @pi-ko packages to the public npm registry and leaves other packages on the default registry. The packages are public, so installing them needs no authentication. Install using the full scoped package name.

Permission modes

Run /permissions or /permissions mode to open the mode picker:

  • Safe (safe): automatically allows workspace reads, read-only agents, and workflow tools. File edits, shell commands, and other operations require approval unless allowed by a policy rule.
  • Ask Everything (ask): asks before every tool call, including reads and calls covered by allow rules. Session approvals are not reused.
  • Full Access (fullAccess): allows operations without approval, including those covered by ask rules. Explicit deny rules still apply.

Select directly with /permissions mode safe, /permissions mode ask, or /permissions mode fullAccess. The choice is saved with the session. To set a default for new sessions, set permissions.defaultMode in your .claude/settings.json (project settings require project trust).

Allow routine shell commands without prompts

Switch from Full Access to Safe mode so unlisted shell commands still require approval. In a trusted project, run:

/permissions mode safe
/permissions allow Bash(ls)
/permissions allow Bash(git diff:*)
  • Bash(ls) allows bare ls, which lists the shell's working directory. ls ., ls -l, and ls .. are different commands and are not covered by this rule.
  • Use Bash(ls:*) instead to allow ls with any literal arguments, including options and paths outside the project. Shell expansions such as ls * and compound commands are not covered by prefix rules. These rules are not a filesystem sandbox.
  • Bash(git diff:*) allows git diff with or without arguments. Use Bash(git diff) if you want to allow only the plain command.

You can also choose Save … for this project when approving a simple Bash command. Both methods write to the trusted project's .claude/settings.local.json for future sessions. For rules across projects, put the rules in permissions.allow in ~/.claude/settings.json. Explicit deny and ask rules take precedence over saved allow rules in Safe mode.

Use /permissions status to inspect the current mode and policy. Existing default, acceptEdits, dontAsk, and bypassPermissions modes remain supported. Planning restrictions still apply; exit planning through ExitPlanMode before changing permission modes. Full Access does not grant operating-system privileges or bypass external sandboxes.