Commit Graph

7 Commits

  • fix(ai,coding-agent): make pi-ai browser-safe and move OAuth runtime exports
    - add browser smoke bundling check to root check + pre-commit
    
    - lazy-load Bedrock provider registration to avoid browser graph traversal
    
    - remove top-level OAuth runtime exports from @mariozechner/pi-ai
    
    - add @mariozechner/pi-ai/oauth subpath export and update coding-agent imports
    
    - move proxy dispatcher init to coding-agent CLI (Node-only)
    
    - document Bedrock/OAuth browser limitations
    
    closes #1814
  • feat(coding-agent): package deduplication and collision detection
    - Package deduplication: same package in global+project, project wins
    - Collision detection for skills, prompts, and themes with ResourceCollision type
    - PathMetadata tracking with parent directory lookup for file paths
    - Display improvements: section headers, sorted groups, accent colors for packages
    - pi list shows full paths below package names
    - Extension loader discovers files in directories without index.ts
    - In-memory SettingsManager properly tracks project settings
    
    fixes #645
  • feat(coding-agent): ResourceLoader, package management, and /reload command (#645)
    - Add ResourceLoader interface and DefaultResourceLoader implementation
    - Add PackageManager for npm/git extension sources with install/remove/update
    - Add session.reload() and session.bindExtensions() APIs
    - Add /reload command in interactive mode
    - Add CLI flags: --skill, --theme, --prompt-template, --no-themes, --no-prompt-templates
    - Add pi install/remove/update commands for extension management
    - Refactor settings.json to use arrays for skills, prompts, themes
    - Remove legacy SkillsSettings source flags and filters
    - Update SDK examples and documentation for ResourceLoader pattern
    - Add theme registration and loadThemeFromPath for dynamic themes
    - Add getShellEnv to include bin dir in PATH for bash commands
  • fix(ai): ensure maxTokens > thinkingBudget for Claude thinking models
    Claude requires max_tokens > thinking.budget_tokens. When caller specifies
    a small maxTokens (e.g. compaction with ~13k tokens) and reasoning is enabled
    with high budget (16k tokens), the constraint was violated.
    
    Fix: In mapOptionsForApi, add thinkingBudget on top of caller's maxTokens
    (capped at model.maxTokens). If still not enough room, reduce thinkingBudget
    to leave space for output.
    
    Applied to both anthropic-messages and google-gemini-cli APIs.
    
    Also adds test utilities for OAuth credential resolution and tests for
    compaction with thinking models.
    
    fixes #413
  • Add tree navigation tests and shared test utilities
    - Add test/utilities.ts with shared helpers (API_KEY, userMsg, assistantMsg, createTestSession)
    - Add agent-session-tree-navigation.test.ts with e2e tests for tree navigation
    - Add getChildren() method to SessionManager
    - Add summaryEntry to navigateTree return type
    - Update existing tests to use shared utilities