Skip to content

fix: resolve compatibility issues with photon-core 1.2.0 and AI APIs#12

Merged
Arul- merged 1 commit intoportel-dev:mainfrom
hubo1989:main
Jan 17, 2026
Merged

fix: resolve compatibility issues with photon-core 1.2.0 and AI APIs#12
Arul- merged 1 commit intoportel-dev:mainfrom
hubo1989:main

Conversation

@hubo1989
Copy link
Copy Markdown
Contributor

@hubo1989 hubo1989 commented Jan 8, 2026

Summary

  • Fix depth parameter enum compatibility issue for Gemini and other AI APIs
  • Fix @portel/photon-core@1.2.0 breaking changes
  • Enhance CLAUDE.md with development documentation

Changes

1. Fix AI API Compatibility Issue

  • Problem: Gemini and other AI APIs expect enum values to be strings, but the depth parameter had type: 'number' with enum: [0, 1, 2]
  • Solution: Remove enum constraint, keep type: 'number' and clear description
  • File: src/server/mcp-server.ts

2. Fix @portel/photon-core@1.2.0 Breaking Changes

  • Problem: @portel/photon-core@1.2.0 removed MCP client-related types to separate concerns
  • Solution: Localize the removed types in mcp-client-factory.ts
    • Add MCPClientFactory, MCPClient, MCPTransport interfaces
    • Add MCPClientImpl class implementation
    • Update imports in photon-adapter.ts and photon-loader.ts
  • Files:
    • src/internal-mcps/mcp-client-factory.ts
    • src/internal-mcps/photon-adapter.ts
    • src/internal-mcps/photon-loader.ts

3. Enhance Development Documentation

  • Add quick reference for common commands
  • Document dual entry point architecture (CLI vs DXT)
  • Add core component relationship diagram
  • Add directory structure overview
  • Document Photon runtime workflow
  • File: CLAUDE.md

Test Results

✅ Build successful
✅ All TypeScript compilation errors resolved
✅ Local testing with npm link working

Checklist

  • Did I run the test suite? (npm run test)
  • Did I test both CLI and DXT entry points? (npm run test:integration AND npm run test:integration:dxt)
  • Did all integration tests pass?
  • Did I run the comprehensive DXT test? (npm run build && node tests/integration/comprehensive-dxt-test.cjs)
  • Did all 5 comprehensive tests pass?
  • If I added a feature, did I add tests for it?
  • If I'm touching src/index-mcp.ts, did I verify await server.run() is present?
  • If I'm adding MCP protocol handlers, did I test with notifications/initialized?

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

- Fix depth parameter enum compatibility issue for Gemini and other AI APIs
  - Remove enum constraint from number type parameter
  - Keep type: 'number' and clear description for valid values
- Fix @portel/photon-core@1.2.0 breaking changes
  - Localize MCP client types removed from photon-core
  - Add MCPClientFactory, MCPClient, MCPTransport interfaces locally
  - Add MCPClientImpl class implementation
  - Update imports in photon-adapter.ts and photon-loader.ts
- Enhance CLAUDE.md with development documentation
  - Add quick reference for common commands
  - Document dual entry point architecture
  - Add core component relationship diagram
  - Add directory structure overview
  - Document Photon runtime workflow

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@Arul-
Copy link
Copy Markdown
Contributor

Arul- commented Jan 17, 2026

LGTM! This PR fixes the build failures caused by @portel/photon-core@1.2.0 removing the MCP client types.

The localized type definitions look correct and match the expected interfaces. Merging to unblock CI.

@Arul- Arul- merged commit 60d8ab4 into portel-dev:main Jan 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants