main

Extension Testing

After /reload, test these commands:

host-context.ts

/host
# Should show:
# - Name: kyushu
# - Environment: development
# - System: Linux 6.18.8
# - NixOS: 26.05.20260202.cb369ef (Yarara)  ← Should now appear

/hosts
# Should list all hosts from globals.nix

build-validator.ts

/builds
# Should show: "No build history" with instructions

# Then run a build
make dry-build

# Then check again
/builds
# Should show: ✓ current (0m ago)

deployment-guard.ts

# Try to deploy
make switch
# Should prompt for confirmation if uncommitted changes

# Try production deploy (will be blocked in interactive)
make host/rhea/switch
# Should show production warning and require confirmation

secrets-validator.ts

/scan-secrets
# Should scan repository for secrets

Debugging

If commands don’t work:

  1. Check extension is loaded:

    # Should list: deployment-guard, secrets-validator, build-validator, host-context
    ls .pi/extensions/
    
  2. Check for errors in pi startup:

    • Look for “Failed to load extension” messages
  3. Reload extensions:

    /reload
    
  4. Check if bash tool is working:

    # Should execute
    ! echo "test"