Stu Mason
Stu Mason

Activity

Pull Request Opened

PR #85 opened: chore: release v2.5.0 - type safety improvements

Summary

Eliminates all 5 as any type casts in MCP tool handlers, replacing them with explicit typed object construction. This prevents bugs like #76 where MCP-internal fields leaked to the API.

Version bump: 2.4.0 → 2.5.0 (will release on merge)

Changes

HandlerBeforeAfter
application create_publicapiData as anyExplicit typed object
application create_githubapiData as anyExplicit typed object
application create_keyapiData as anyExplicit typed object
application create_dockerimageapiData as anyExplicit typed object
service createapiData as anyExplicit typed object

Type Fixes

Fixed CreateApplicationPrivateGHRequest and CreateApplicationPrivateKeyRequest:

  • build_pack and ports_exposes are now optional (verified against Coolify API)
  • Used Omit<> to properly exclude required fields from base type

Live API Testing

Tested against real Coolify v4.0.0-beta.460 instance:

build_packResult
nixpacks✅ Works
dockerfile✅ Works
static✅ Works
dockercompose✅ Works
invalid_buildpack❌ Clear error from Coolify API

Decision: Keep build_pack as z.string() (not enum) - let Coolify API validate. This ensures future build packs work without MCP updates.

Test Plan

  • npm test - 199 tests pass
  • npm run build - TypeScript compiles
  • Live API testing against Coolify v4.0.0-beta.460
  • Version bumped to 2.5.0

Closes #81

Stu Mason + AI [email protected]

+100
additions
-21
deletions
6
files changed