Add agentDir parameter to model config functions and OAuth storage

- loadAndMergeModels(agentDir) - loads models.json from agentDir
- getAvailableModels(agentDir) - uses agentDir for model discovery
- findModel(provider, id, agentDir) - uses agentDir for model lookup
- configureOAuthStorage(agentDir) - configures OAuth to use agentDir/oauth.json
- createAgentSession calls configureOAuthStorage with options.agentDir
- Export configureOAuthStorage from SDK
This commit is contained in:
Mario Zechner 2025-12-22 01:42:27 +01:00
parent 6d4ff74430
commit b168a6cae3
4 changed files with 69 additions and 52 deletions

View file

@ -85,11 +85,12 @@ export {
} from "./core/oauth/index.js";
// SDK for programmatic usage
export {
allBuiltInTools,
type BuildSystemPromptOptions,
buildSystemPrompt,
type CreateAgentSessionOptions,
type CreateAgentSessionResult,
// Configuration
configureOAuthStorage,
// Factory
createAgentSession,
// Helpers