@tinfoilsh/pi-provider

Verifiably-private models from Tinfoil secure enclaves, for the pi coding agent

Packages

Package details

extension

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

$ pi install npm:@tinfoilsh/pi-provider
Package
@tinfoilsh/pi-provider
Version
0.1.2
Published
Aug 24, 2026
Downloads
497/mo · 15/wk
Author
milesdai
License
Apache-2.0
Types
extension
Size
32.5 KB
Dependencies
2 dependencies · 3 peers
Pi manifest JSON
{
  "extensions": [
    "./tinfoil.ts"
  ]
}

Security note

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

README

Tinfoil provider for pi

Use Tinfoil's verifiably-private open models from the pi coding agent. Inference runs inside hardware secure enclaves that even Tinfoil cannot read into.

Setup

  1. Install the extension:

    pi install npm:@tinfoilsh/pi-provider
    
  2. Start pi and set your API key:

    /login tinfoil
    
  3. Pick a Tinfoil model with /model.

How verification works

When pi starts, the extension uses the tinfoil SDK to verify the inference enclave: it checks the enclave's attestation, confirms the running code against the release digest signed in Sigstore, and binds the attested key to the live connection. Every request body is then encrypted end-to-end with HPKE, so only the verified enclave can read it.

While a Tinfoil model is active, the footer shows: Tinfoil verified or Tinfoil unverified. Run /tinfoil at any time to re-run the verification from scratch and print the verification document. If verification fails, the extension fails closed: requests are blocked until /tinfoil succeeds. A failed verification cannot send your prompts anywhere.

Settings

Variable Default Purpose
TINFOIL_API_KEY (none) Your tk_… key, for headless workflows. Does not need to be set if using /login tinfoil, the preferred login for everyday operation.