Skip to content

feat(examples): allow disabling the pi extension via GONDOLIN_DISABLED - #172

Open
ColonelPanics wants to merge 1 commit into
earendil-works:mainfrom
ColonelPanics:feat/pi-extension-disable-env
Open

ColonelPanics wants to merge 1 commit into
earendil-works:mainfrom
ColonelPanics:feat/pi-extension-disable-env

Conversation

@ColonelPanics

Copy link
Copy Markdown

Summary

  • Adds a lightweight escape hatch to the pi-gondolin.ts example extension: when GONDOLIN_DISABLED=1 is set, the extension default-export returns early, so pi falls back to its normal host tools while the extension itself stays loaded.
  • Documents the flag in the file header notes.

Motivation

Since the example overrides pi's built-in read/write/edit/bash tools, the only way to run pi without the sandbox while keeping other extensions, skills, and MCP servers intact is to launch with --no-extensions (-ne) — which disables everything else too, or to edit settings to remove the extension.

A common workflow is:

alias pi-host='GONDOLIN_DISABLED=1 pi'

pi runs sandboxed in the VM as usual; pi-host runs with real host access and all other extensions enabled. Because the VM is started lazily and the early return prevents all tool re-registration and the session_start/user_bash hooks from doing anything, this adds no overhead or behavior change when unset.

The env var name follows the existing GONDOLIN_* convention (GONDOLIN_CPU, GONDOLIN_KRUN_RUNNER, GONDOLIN_START_TIMEOUT_MS, …).

Test plan

  • Verified locally against a personal install of the extension: pi runs as before (VM routing active), GONDOLIN_DISABLED=1 pi uses host tools with the extension loaded but inert.

Note: open PR #125 restructures where the pi extension lives (host/extensions/). If that lands first I'm happy to rebase this onto it.

Running 'pi' with GONDOLIN_DISABLED=1 keeps the extension loaded but
skips VM tool routing, so pi falls back to its normal host tools. This
provides an escape hatch for running with full system access (e.g. via
an alias like 'alias pi-host="GONDOLIN_DISABLED=1 pi"') without having
to remove or special-case the extension.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant