Skip to content

MasuRii/pi-multi-auth

Repository files navigation

pi-multi-auth

npm version GitHub

image

pi-multi-auth is a Pi extension for multi-provider credential management, OAuth login, and quota-aware account rotation.

Repository structure

This package now follows a conventional src/ layout. The published entrypoint stays at the repository root as index.ts, runtime implementation lives under src/, and targeted compatibility shims remain at the package root for stable balancer subpaths.

pi-multi-auth/
├── index.ts
├── balancer/
│   ├── index.ts
│   └── credential-backoff.ts
├── src/
│   ├── index.ts
│   ├── balancer/
│   ├── formatters/
│   ├── usage/
│   └── *.ts
├── tests/
├── package.json
├── tsconfig.json
├── tsconfig.test.json
├── README.md
├── CHANGELOG.md
└── LICENSE

Local usage

Place this folder in one of Pi's extension discovery paths:

Scope Path
Global ~/.pi/agent/extensions/pi-multi-auth
Project .pi/extensions/pi-multi-auth

Pi discovers the extension through the root index.ts entry listed in package.json, which forwards to src/index.ts.

Configuration

Runtime configuration lives in config.json at the extension root. The extension creates the file automatically with defaults on first load if it does not already exist.

Key Type Default Purpose
debugLog boolean false Enables JSONL debug logging under debug/pi-multi-auth-debug.jsonl
excludeProviders string[] [] Prevents selected providers from being wrapped by multi-auth
cascade object built-in defaults Tunes retry backoff and retained failure history
health object built-in defaults Tunes rolling health windows and scoring weights
oauthRefresh object built-in defaults Controls proactive OAuth token refresh scheduling

The published package intentionally excludes config.json and debug/; both are created locally as needed by the running extension.

Validation

npm run build
npm run lint
npm run test
npm run check

Related Pi Extensions

License

MIT

About

Pi extension for multi-provider credential management, OAuth login, and account rotation

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors