forked from AutoMaker-Org/automaker
-
Notifications
You must be signed in to change notification settings - Fork 0
feat(machine-integration): Implement Milestone 1 - Foundation layer #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
874bfa0
fix(beads): Fix TypeScript type errors and improve type safety
0xtsotsi ed1f76a
feat(machine-integration): Implement Milestone 1 - Foundation layer
0xtsotsi d6e1e6e
fix: address PR review comments from automated review
0xtsotsi 64dbd82
Merge main into vk/1e60-machine-integrat - resolve claude-provider co…
0xtsotsi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,164 @@ | ||
| name: Provider Integration Check | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'apps/server/src/providers/**' | ||
| - 'apps/server/src/lib/telemetry*.ts' | ||
| - 'apps/server/src/services/agent-monitor.ts' | ||
| - 'apps/server/src/routes/providers/**' | ||
| push: | ||
| branches: | ||
| - main | ||
| - master | ||
| paths: | ||
| - 'apps/server/src/providers/**' | ||
| - 'apps/server/src/lib/telemetry*.ts' | ||
| - 'apps/server/src/services/agent-monitor.ts' | ||
| - 'apps/server/src/routes/providers/**' | ||
|
|
||
| jobs: | ||
| provider-validation: | ||
| name: Validate Provider Infrastructure | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup project | ||
| uses: ./.github/actions/setup-project | ||
| with: | ||
| check-lockfile: 'true' | ||
|
|
||
| - name: Build shared packages | ||
| run: npm run build:packages | ||
|
|
||
| - name: Build server for type checking | ||
| run: npm run build --workspace=apps/server | ||
|
|
||
| - name: Verify provider exports | ||
| shell: bash | ||
| run: | | ||
| # Verify provider index exports are accessible | ||
| node -e " | ||
| import('./apps/server/src/providers/index.js').then(m => { | ||
| console.log('✓ Provider module exports:', Object.keys(m)); | ||
| if (!m.EngineRegistry) throw new Error('EngineRegistry not exported'); | ||
| if (!m.ClaudeProvider) throw new Error('ClaudeProvider not exported'); | ||
| if (!m.CursorProvider) throw new Error('CursorProvider not exported'); | ||
| console.log('✓ All expected exports found'); | ||
| }).catch(e => { | ||
| console.error('✗ Provider export check failed:', e.message); | ||
| process.exit(1); | ||
| }); | ||
| " | ||
|
|
||
| - name: Verify telemetry parsers | ||
| shell: bash | ||
| run: | | ||
| # Verify telemetry modules are accessible | ||
| node -e " | ||
| import('./apps/server/src/lib/telemetry.js').then(m => { | ||
| console.log('✓ Telemetry exports:', Object.keys(m)); | ||
| if (!m.calculateCost) throw new Error('calculateCost not exported'); | ||
| if (!m.createTelemetryCapture) throw new Error('createTelemetryCapture not exported'); | ||
| console.log('✓ Telemetry module validated'); | ||
| }).catch(e => { | ||
| console.error('✗ Telemetry module check failed:', e.message); | ||
| process.exit(1); | ||
| }); | ||
| " | ||
|
|
||
| agent-monitor-validation: | ||
| name: Validate Agent Monitor Service | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup project | ||
| uses: ./.github/actions/setup-project | ||
| with: | ||
| check-lockfile: 'true' | ||
|
|
||
| - name: Build shared packages | ||
| run: npm run build:packages | ||
|
|
||
| - name: Verify better-sqlite3 compatibility | ||
| shell: bash | ||
| run: | | ||
| # Check that better-sqlite3 is properly installed | ||
| node -e " | ||
| const Database = require('better-sqlite3'); | ||
| const db = new Database(':memory:'); | ||
| db.exec('CREATE TABLE test (id INTEGER)'); | ||
| console.log('✓ better-sqlite3 is working correctly'); | ||
| db.close(); | ||
| " | ||
|
|
||
| - name: Verify agent monitor exports | ||
| shell: bash | ||
| run: | | ||
| node -e " | ||
| import('./apps/server/src/services/agent-monitor.js').then(m => { | ||
| console.log('✓ AgentMonitor exports:', Object.keys(m)); | ||
| if (!m.AgentMonitorService) throw new Error('AgentMonitorService not exported'); | ||
| if (!m.getAgentMonitor) throw new Error('getAgentMonitor not exported'); | ||
| console.log('✓ Agent monitor module validated'); | ||
| }).catch(e => { | ||
| console.error('✗ Agent monitor check failed:', e.message); | ||
| process.exit(1); | ||
| }); | ||
| " | ||
|
|
||
| integration-test: | ||
| name: Provider Integration Tests | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup project | ||
| uses: ./.github/actions/setup-project | ||
| with: | ||
| check-lockfile: 'true' | ||
|
|
||
| - name: Build shared packages | ||
| run: npm run build:packages | ||
|
|
||
| - name: Run server tests | ||
| run: npm run test:server | ||
| env: | ||
| NODE_ENV: test | ||
|
|
||
| - name: Test provider registry operations | ||
| shell: bash | ||
| run: | | ||
| node --run << 'EOF' | ||
| import { EngineRegistry } from './apps/server/src/providers/registry.js'; | ||
| import { ClaudeProvider } from './apps/server/src/providers/claude-provider.js'; | ||
|
|
||
| // Test registration | ||
| const claude = new ClaudeProvider(); | ||
| const metadata = EngineRegistry.register('test-claude', claude, {}); | ||
|
|
||
| console.log('✓ Provider registered:', metadata.id); | ||
|
|
||
| // Test retrieval | ||
| const retrieved = EngineRegistry.get('test-claude'); | ||
| if (!retrieved || retrieved.id !== 'test-claude') { | ||
| throw new Error('Provider retrieval failed'); | ||
| } | ||
| console.log('✓ Provider retrieved successfully'); | ||
|
|
||
| // Test getAll | ||
| const all = EngineRegistry.getAll(); | ||
| console.log('✓ Total providers registered:', all.length); | ||
|
|
||
| // Cleanup | ||
| EngineRegistry.unregister('test-claude'); | ||
| console.log('✓ Provider registry integration test passed'); | ||
| EOF | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid
node --runsyntax will cause CI failure.The
node --runflag is used to execute scripts defined inpackage.json, not to run inline JavaScript code. This integration test step will fail.🔎 Proposed fix using proper ESM execution
- name: Test provider registry operations shell: bash run: | - node --run << 'EOF' - import { EngineRegistry } from './apps/server/src/providers/registry.js'; - import { ClaudeProvider } from './apps/server/src/providers/claude-provider.js'; - - // Test registration - const claude = new ClaudeProvider(); - const metadata = EngineRegistry.register('test-claude', claude, {}); - - console.log('✓ Provider registered:', metadata.id); - - // Test retrieval - const retrieved = EngineRegistry.get('test-claude'); - if (!retrieved || retrieved.id !== 'test-claude') { - throw new Error('Provider retrieval failed'); - } - console.log('✓ Provider retrieved successfully'); - - // Test getAll - const all = EngineRegistry.getAll(); - console.log('✓ Total providers registered:', all.length); - - // Cleanup - EngineRegistry.unregister('test-claude'); - console.log('✓ Provider registry integration test passed'); - EOF + node --input-type=module -e " + import { EngineRegistry } from './apps/server/src/providers/registry.js'; + import { ClaudeProvider } from './apps/server/src/providers/claude-provider.js'; + + // Test registration + const claude = new ClaudeProvider(); + const metadata = EngineRegistry.register('test-claude', claude, {}); + + console.log('✓ Provider registered:', metadata.id); + + // Test retrieval + const retrieved = EngineRegistry.get('test-claude'); + if (!retrieved || retrieved.id !== 'test-claude') { + throw new Error('Provider retrieval failed'); + } + console.log('✓ Provider retrieved successfully'); + + // Test getAll + const all = EngineRegistry.getAll(); + console.log('✓ Total providers registered:', all.length); + + // Cleanup + EngineRegistry.unregister('test-claude'); + console.log('✓ Provider registry integration test passed'); + "📝 Committable suggestion
🤖 Prompt for AI Agents