Core tools now properly use the cwd passed to createAgentSession().
Added tool factory functions for SDK users who specify custom cwd with explicit tools.
Fixes#279
- createAgentSession() factory with full control
- SessionManager/SettingsManager static factories
- Project-specific settings support
- 12 examples and comprehensive docs
Fixes#272
- SettingsManager now loads .pi/settings.json from cwd (project settings)
- Project settings merge with global settings (deep merge for objects)
- Setters only modify global settings, project settings are read-only
- Add static factories: SettingsManager.create(cwd?, agentDir?), SettingsManager.inMemory(settings?)
- Add applyOverrides() for programmatic overrides
- Replace 'settings' option with 'settingsManager' in CreateAgentSessionOptions
- Update examples to use new pattern
Incorporates PR #276 approach
- SessionManager: add flushed flag, _persist() flushes all entries when first assistant seen
- SessionManager: reset() now creates session header
- MomSessionManager: same pattern, remove pendingEntries/sessionInitialized/startSession/shouldInitializeSession
- Use default params instead of resolvedAgentDir pattern in loaders
- Remove unused DiscoverAndLoadHooksOptions interface
- Remove redundant github-copilot special casing in getAvailableModels
- 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
- Add factory methods: create(cwd), open(path), continueRecent(cwd), inMemory()
- Add static list(cwd) for session listing
- Make constructor private, pass cwd explicitly
- Update SDK to take sessionManager instead of sessionFile options
- Update main.ts to create SessionManager based on CLI flags
- Update SessionSelectorComponent to take sessions[] instead of SessionManager
- Update tests to use factory methods
- Add continueSession, restoreFromSession, additionalHookPaths,
additionalCustomToolPaths, scopedModels to CreateAgentSessionOptions
- Return CreateAgentSessionResult with session, customToolsResult,
and modelFallbackMessage
- main.ts now focuses on CLI arg parsing and mode routing
- Reduced main.ts from ~490 to ~340 lines
Adds glob pattern support for skill filtering:
- --skills <patterns> CLI flag (comma-separated glob patterns)
- includeSkills setting in settings.json
- ignoredSkills now supports glob patterns
- ignoredSkills takes precedence over includeSkills and --skills
Closes#268
- Event-based architecture: agent forwards AgentSessionEvent to adapters
- Multi-adapter support via single config.json
- Access control: admins, DM permissions per adapter
- Channel namespacing by adapter name
- Channel isolation via bubblewrap in Linux/Docker environments
- Simplified directory structure and interfaces
- Fix //tmp issue: distinguish slash commands from file paths by checking if anything precedes the /
- Fix symlinks to directories (like /tmp) not getting trailing slash