Commit Graph

5 Commits

  • fix(coding-agent,ai): fallback to /proc/self/environ in Bun sandbox (#3801)
    Bun compiled binaries have an empty process.env when running inside
    sandbox environments (e.g. nono on Linux/macOS). This broke API key
    detection and model discovery because all process.env.* lookups returned
    undefined.
    
    - Add restoreSandboxEnv() helper that reads /proc/self/environ when Bun
      is detected and process.env is empty, populating process.env before
      any other code runs (coding-agent/src/bun/cli.ts entry point)
    - Add getProcEnv() fallback in env-api-keys.ts for direct @mariozechner/pi-ai
      consumers that may not go through the coding-agent entry point
    - Add unit tests for restoreSandboxEnv
  • fix(coding-agent): route remaining hardcoded pi branding through APP_NAME (#3583)
    Swaps hardcoded "pi" / ".pi" / "π" for the existing APP_NAME and
    CONFIG_DIR_NAME extension points at four sites the original APP_NAME
    rollout missed:
    
    - /quit slash-command description
    - process.title (cli.ts and bun/cli.ts)
    - project-local extensions dir in loader.ts
    
    For the terminal title, adds an APP_TITLE export in config.ts that
    keeps pi's "π" glyph when piConfig.name is unset and falls back to
    APP_NAME otherwise. Presence of piConfig.name acts as the "has been
    rebranded" signal, so pi's own package.json drops the redundant
    "name": "pi" (the existing `|| "pi"` fallback in config.ts makes this
    a no-op for APP_NAME).
    
    No behavior change for pi itself: process.title, /quit description,
    terminal title prefix, and project-local extensions dir all resolve
    to the same values as before.
    
    closes #3476
  • fix(coding-agent): use setBedrockProviderModule in Bun entrypoint closes #2349 (#2350)
    `registerApiProvider()` gets wiped by `resetApiProviders()` during
    session reload, replacing the Bun-bundled Bedrock provider with the
    opaque lazy loader that cannot resolve inside the binary.
    `setBedrockProviderModule()` sets an override that survives resets.