mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-07-09 17:28:45 +00:00
Auth helpers in src/auth/helpers.ts: envApiKeyAuth() (stored key wins, then env vars in order, with secret-prompt login) and lazyOAuth() (flow loads on first use through bundler-opaque dynamic imports in utils/oauth/load.ts; the OAuthAuth flow exports land in phase 4). There is no OAuth factory toggle: providers that support OAuth always attach it, advertising costs nothing until login/refresh runs. createProvider() in models.ts builds providers from parts: single API implementation or a map dispatched on model.api (mixed-API providers like opencode and github-copilot); unknown api yields a stream error. generate-models.ts now emits one providers/<id>.models.ts catalog per provider (35 files, biome-excluded like models.generated.ts) and models.generated.ts becomes a generated aggregator, so importing one provider factory pulls one catalog. Typed getModel globals unchanged. One factory per built-in provider under src/providers/: envApiKeyAuth for standard providers, OAuth for anthropic/openai-codex/github-copilot, ambient ApiKeyAuth for amazon-bedrock (AWS env/profile/IAM) and google-vertex (explicit key or ADC+project+location). providers/all.ts: builtinProviders(), builtinModels(), getBuiltin* re-exports. fauxProvider() factory returns a real Provider for tests; legacy registerFauxProvider() unchanged.
39 lines
810 B
JSON
39 lines
810 B
JSON
{
|
|
"$schema": "https://biomejs.dev/schemas/2.3.5/schema.json",
|
|
"linter": {
|
|
"enabled": true,
|
|
"rules": {
|
|
"recommended": true,
|
|
"style": {
|
|
"noNonNullAssertion": "off",
|
|
"useConst": "error",
|
|
"useNodejsImportProtocol": "off"
|
|
},
|
|
"suspicious": {
|
|
"noExplicitAny": "off",
|
|
"noControlCharactersInRegex": "off",
|
|
"noEmptyInterface": "off"
|
|
}
|
|
}
|
|
},
|
|
"formatter": {
|
|
"enabled": true,
|
|
"formatWithErrors": false,
|
|
"indentStyle": "tab",
|
|
"indentWidth": 3,
|
|
"lineWidth": 120
|
|
},
|
|
"files": {
|
|
"includes": [
|
|
"packages/*/src/**/*.ts",
|
|
"packages/*/test/**/*.ts",
|
|
"packages/coding-agent/examples/**/*.ts",
|
|
"!**/node_modules/**/*",
|
|
"!**/test-sessions.ts",
|
|
"!**/models.generated.ts",
|
|
"!**/*.models.ts",
|
|
"!packages/mom/data/**/*",
|
|
"!!**/node_modules"
|
|
]
|
|
}
|
|
}
|