fix: resolve critical package issues and update imports

CRITICAL FIXES:
- Fix dependency-resolver ES module failure by reverting to CommonJS
  - Removed "type": "module" from package.json
  - Changed tsconfig.json module from "ESNext" to "commonjs"
  - Added exports field for better module resolution
  - Package now works correctly at runtime

- Fix Feature type incompatibility between server and UI
  - Added FeatureImagePath interface to @automaker/types
  - Made imagePaths property accept multiple formats
  - Added index signature for backward compatibility

HIGH PRIORITY FIXES:
- Remove duplicate model-resolver.ts from apps/server/src/lib/
  - Update sdk-options.ts to import from @automaker/model-resolver
  - Use @automaker/types for CLAUDE_MODEL_MAP and DEFAULT_MODELS

- Remove duplicate session types from apps/ui/src/types/
  - Deleted identical session.ts file
  - Use @automaker/types for session type definitions

- Update source file Feature imports
  - Fix create.ts and update.ts to import Feature from @automaker/types
  - Separate Feature type import from FeatureLoader class import

MEDIUM PRIORITY FIXES:
- Remove unused imports
  - Remove unused AbortError from agent-service.ts
  - Remove unused MessageSquare icon from kanban-card.tsx
  - Consolidate duplicate React imports in hotkey-button.tsx

- Update test file imports to use @automaker/* packages
  - Update 12 test files to import from @automaker/utils
  - Update 2 test files to import from @automaker/platform
  - Update 1 test file to import from @automaker/model-resolver
  - Update dependency-resolver.test.ts imports
  - Update providers/types imports to @automaker/types

VERIFICATION:
- Server builds successfully ✓
- All 6 shared packages build correctly ✓
- Test imports updated and verified ✓

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Kacper
2025-12-20 00:16:00 +01:00
parent 7ad7b63da2
commit dd58b70730
26 changed files with 44 additions and 155 deletions

6
package-lock.json generated
View File

@@ -10972,7 +10972,6 @@
"libs/dependency-resolver": {
"name": "@automaker/dependency-resolver",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@automaker/types": "^1.0.0"
},
@@ -10994,7 +10993,6 @@
"libs/git-utils": {
"name": "@automaker/git-utils",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@automaker/types": "^1.0.0",
"@automaker/utils": "^1.0.0"
@@ -11017,7 +11015,6 @@
"libs/model-resolver": {
"name": "@automaker/model-resolver",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@automaker/types": "^1.0.0"
},
@@ -11039,7 +11036,6 @@
"libs/platform": {
"name": "@automaker/platform",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@automaker/types": "^1.0.0"
},
@@ -11061,7 +11057,6 @@
"libs/types": {
"name": "@automaker/types",
"version": "1.0.0",
"license": "MIT",
"devDependencies": {
"@types/node": "^22.10.5",
"typescript": "^5.7.3"
@@ -11080,7 +11075,6 @@
"libs/utils": {
"name": "@automaker/utils",
"version": "1.0.0",
"license": "MIT",
"dependencies": {
"@automaker/types": "^1.0.0"
},