feat(integration-router-v2): Management UI enhancements and CLI improvements#522
Open
seanspeaks wants to merge 153 commits intonextfrom
Open
feat(integration-router-v2): Management UI enhancements and CLI improvements#522seanspeaks wants to merge 153 commits intonextfrom
seanspeaks wants to merge 153 commits intonextfrom
Conversation
- Add loadUser middleware using GetUserFromBearerToken use case - Add requireLoggedInUser middleware for protected routes - Integrate with NEW TokenRepository (Prisma-based) - Remove OLD Mongoose Token/State models (replaced by Prisma) - Follow DDD architecture: Handlers → Use Cases → Repositories
…cture BREAKING CHANGE: Replaced use-case and repository patterns with simplified factory approach - Add create-frigg-backend.js for backend initialization - Add integration-factory.js for dynamic integration loading - Add integration-mapping.js for integration type registry - Add integration-model.js for Mongoose schema - Add integration-user.js for user-integration associations - Refactor module-plugin with auther, entity-manager, manager classes - Update integration router with cleaner API separation - Add admin routes with requireAdmin middleware - Add integration base test file - Update auth and user routers for new architecture - Update package.json with new dependencies
Replace OLD factory pattern with NEW DDD/hexagonal architecture patterns from feat/general-code-improvements base branch. BREAKING CHANGE: Replaces factory approach with use-case/repository patterns Changes: - Replace IntegrationFactory with use case classes (CreateIntegration, GetIntegrationsForUser, DeleteIntegrationForUser, etc.) - Replace ModuleFactory (module-plugin) with ModuleFactory (modules) - Restore integration-router.js to use NEW DDD architecture with dependency injection and use cases - Restore integration-base.js to use repositories and use cases - Remove OLD factory files: integration-factory.js, integration-model.js, integration-user.js, integration-mapping.js, create-frigg-backend.js - Remove OLD module-plugin files: auther.js, entity-manager.js, manager.js, module-factory.js - Update index.js exports to export NEW DDD components (repositories, use cases, command factories) - Update backend-utils.js to use IntegrationEventDispatcher - Update auth.js to use simplified NEW pattern Stack 2 now properly builds on the DDD/hexagonal architecture from the base branch instead of introducing the OLD factory pattern. 🤖 Generated with Claude Code
Port NEW business logic from original Stack 2 commit to DDD/hexagonal
architecture while maintaining use cases and repositories pattern.
Changes:
- Add admin router (admin.js) with DDD-compatible user and global entity
management endpoints using user and module repositories
- Add requireAdmin middleware for admin API key authentication
- Add integration settings endpoint to auth.js (/config/integration-settings)
- Add RESTful /users endpoints to user.js (POST /users, POST /users/login)
using LoginUser, CreateIndividualUser, and CreateTokenForUserId use cases
- Port Global Entities feature to CreateIntegration use case:
* Auto-include global entities marked with `global: true` in integration
Definition.entities
* Find and attach global entities using module repository
* Throw error if required global entity is missing
Admin Endpoints:
- GET /api/admin/users - List all users with pagination
- GET /api/admin/users/search - Search users by username/email
- GET /api/admin/users/:userId - Get specific user
- GET /api/admin/entities - List all global entities
- GET /api/admin/entities/:entityId - Get specific global entity
- POST /api/admin/entities - Create global entity
- PUT /api/admin/entities/:entityId - Update global entity
- DELETE /api/admin/entities/:entityId - Delete global entity
- POST /api/admin/entities/:entityId/test - Test global entity connection
All NEW functionality uses proper DDD patterns:
- Handlers call use cases (not repositories directly)
- Use cases contain business logic and orchestration
- Repositories handle data access
- Dependency injection throughout
🤖 Generated with Claude Code
Implements clean architecture with domain, application, infrastructure, and presentation layers Domain Layer: - Entities: Project, Integration, APIModule, Connection, GitRepository, GitBranch, AppDefinition - Value Objects: ProjectId, ProjectStatus, IntegrationStatus, ConnectionStatus, Credentials - Services: GitService, ProcessManager, BackendDefinitionService - Errors: EntityValidationError, ProcessConflictError Application Layer: - Services: ProjectService, IntegrationService, APIModuleService, GitService - Use Cases: 18 use cases covering project management, integrations, git operations Infrastructure Layer: - Adapters: FriggCliAdapter, GitAdapter, ProcessManager, ConfigValidator - Repositories: FileSystemProjectRepository, FileSystemIntegrationRepository, FileSystemAPIModuleRepository - Persistence: SimpleGitAdapter Presentation Layer: - Controllers: ProjectController, IntegrationController, APIModuleController, GitController - Routes: projectRoutes, integrationRoutes, apiModuleRoutes, gitRoutes, testAreaRoutes Dependency Injection: - container.js for DI configuration - app.js for Express app initialization Documentation: - Complete architecture documentation - API structure guide - Holistic DDD architecture overview
Implements clean architecture with domain, application, infrastructure, and presentation layers Domain Layer: - Entities: User, AdminUser, Project, Integration, APIModule, Environment, GlobalEntity - Interfaces: Repository interfaces, SocketService interface - Value Objects: IntegrationStatus, ServiceStatus Application Layer: - Services: UserService, AdminService, ProjectService, IntegrationService, EnvironmentService - Use Cases: GetProjectStatus, InstallIntegration, ListIntegrations, StartProject, StopProject, SwitchRepository Infrastructure Layer: - Adapters: Repository adapters for all domains, SocketServiceAdapter - HTTP Client: api-client.js with request/response handling - WebSocket: websocket-handlers.js for real-time updates - NPM Registry: npm-registry-client.js for package management Presentation Layer: - App: Main App.jsx with routing - Components: * Admin: AdminViewContainer, UserManagement, GlobalEntityManagement, CreateUserModal * Common: IDESelector, LiveLogPanel, OpenInIDEButton, RepositoryPicker, SearchBar, SettingsButton, SettingsModal, ZoneNavigation * Integrations: IntegrationGallery * Layout: AppRouter, ErrorBoundary, Layout * Theme: ThemeProvider * UI: badge, button, card, dialog, dropdown-menu, input, select, skeleton * Zones: DefinitionsZone, TestAreaContainer, TestAreaUserSelection, TestAreaWelcome, TestingZone - Hooks: useFrigg, useIDE, useIntegrations, useRepositories, useSocket - Pages: Settings Dependency Injection: - container.js for client-side DI configuration - main.jsx as application entry point
Migration: - Add Jest configuration for server and client testing - Configure Jest for ESM and Node environment - Add test setup files for both server and client Server Tests (13 files): - Unit tests: ProjectController, GitService, ProcessManager, StartProjectUseCase - Integration tests: Project endpoints end-to-end flow - API tests: Connections, integrations, project endpoints - Test environment configuration and setup utilities Client Tests (34 files): - Component tests: OpenInIDEButton, SettingsModal, TestAreaContainer, ThemeProvider, ZoneNavigation, button - Integration tests: Complete workflow, zone navigation flow, DDD end-to-end flow - Domain tests: Integration, Project entities, AdminUser, GlobalEntity - Application tests: IntegrationService, ProjectService, AdminService - Infrastructure tests: Repository adapters, container, performance - Hook tests: useFrigg zones, useIDE - Specialized tests: * Accessibility: Component accessibility testing * Security: Security vulnerability testing * Responsive: Viewport and responsive design tests * Edge cases: Browser compatibility testing Test Infrastructure: - test-runner.js: Coordinated test execution across suites - testHelpers.js: Shared testing utilities and fixtures - setup.js: Test environment configuration - mocks/ideApi.js: IDE integration API mocking - README.md: Test strategy and organization documentation - legacy-cleanup-analysis.md: Analysis of legacy test cleanup Configuration: - server/jest.config.js: Server-side Jest configuration - server/tests/.env.test: Test environment variables - src/test/setup.js: Client test setup (Vitest compatibility) - src/tests/setup.js: Jest test setup
Domain Layer: - Entities: Integration, Entity, IntegrationOption - Domain models with business logic and validation - Domain index for centralized exports Application Layer: - Services: IntegrationService, EntityService for business orchestration - Use Cases: InstallIntegrationUseCase, SelectEntitiesUseCase, ConnectEntityUseCase - Application index for use case exports Infrastructure Layer: - Adapters: IntegrationRepositoryAdapter, EntityRepositoryAdapter, FriggApiAdapter - Storage: OAuthStateStorage for OAuth flow state management - Infrastructure index for adapter exports Presentation Layer: - Hooks: useIntegrationLogic for business logic encapsulation - Layouts: IntegrationHorizontalLayout, IntegrationVerticalLayout for display separation Testing: - Domain tests: Entity, Integration, IntegrationOption - Application tests: InstallIntegrationUseCase, SelectEntitiesUseCase - Infrastructure tests: OAuthStateStorage Enhancements: - Update API client with better error handling and request management - Export new DDD components from integration index - Separate business logic from presentation components - Implement repository pattern for data access abstraction
Installation Wizard: - InstallationWizardModal: Main orchestrator for multi-step installation flow - EntityConnectionModal: Modal for connecting/creating entities - EntitySelector: Component for selecting entities during setup - EntityCard: Reusable card component for entity display - IntegrationCard: Card component for integration display - RedirectHandler: OAuth redirect handling component Entity Management: - EntityManager: Comprehensive CRUD operations for entities - IntegrationBuilder: Build and configure integration definitions Documentation: - INSTALLATION_WIZARD_IMPLEMENTATION.md: Complete implementation guide Integration: - Wire wizard to DDD use cases and services - Implement step-by-step installation process - Handle OAuth flows and entity selection - Support both horizontal and vertical layout integration
…ation CLI Specifications: - CLI_SPECIFICATION.md: Complete CLI command structure and API reference - CLI_DDD_ARCHITECTURE.md: Domain-driven design architecture for CLI - CLI_CREATE_COMMANDS_SPEC.md: Detailed `frigg create` command specifications - CLI_FILE_OPERATIONS_SPEC.md: File operation patterns and best practices - CLI_GIT_INTEGRATION_SPEC.md: Git workflow integration specifications - CLI_GIT_SAFETY_SPEC.md: Git safety protocols and conflict resolution - CLI_IMPLEMENTATION_ROADMAP.md: Implementation phases and milestones CLI Updates: - Update ui-command/index.js with improved command handling - Update infrastructure creation utilities with better error handling Management-UI Documentation: - PRD.md: Product requirements document with feature specifications - FIXES_APPLIED.md: Comprehensive fix documentation and change log - RELOAD_FIX.md: Hot reload fix documentation and troubleshooting - TDD_IMPLEMENTATION_SUMMARY.md: Test-driven development implementation summary Archived Documentation: - API.md: Legacy API documentation (archived) - DDD_REFACTOR_PLAN.md: Original DDD refactoring plan (archived) - DDD_VALIDATION_REPORT.md: DDD implementation validation (archived) - LEARNINGS_SERVERLESS_ROUTES.md: Serverless routing learnings (archived) - PRD_PROGRESS.md: Historical PRD progress tracking (archived) - TESTING_REPORT.md: Original testing report (archived)
Domain Layer: - Entities: ApiModule, AppDefinition, Integration - Value Objects: SemanticVersion, IntegrationName, IntegrationStatus - Exceptions: DomainException for domain rule violations - Ports: Repository interfaces for dependency inversion Application Layer: - Use Cases: CreateIntegrationUseCase, CreateApiModuleUseCase, AddApiModuleToIntegrationUseCase - Command orchestration for CLI operations - Business logic for integration and API module management Infrastructure Layer: - Repositories: FileSystemAppDefinitionRepository, FileSystemIntegrationRepository, FileSystemApiModuleRepository - Adapters: IntegrationJsUpdater for code file modifications - File system operations and persistence Dependency Injection: - container.js: DI configuration for CLI components - Wires use cases with repositories and adapters Testing: - Domain tests: ApiModule, AppDefinition, IntegrationName, IntegrationValidator - Application tests: Use case testing with mocks - Infrastructure tests: Repository and adapter testing Benefits: - Cleaner separation of concerns in CLI - Testable business logic independent of file system - Easier to extend with new commands - Better error handling with domain exceptions
Complete technical specification for three interconnected features: 1. Multi-Step Authentication Flow: - Support for OAuth flows requiring multiple user decisions - State management across authentication steps - User choice persistence and validation - Error handling and rollback mechanisms 2. Shared Entity Management: - Cross-integration entity sharing and reuse - Entity ownership and access control - Entity lifecycle management (create, update, delete) - Relationship mapping between integrations and entities 3. Installation Wizard Integration: - Unified installation experience for complex integrations - Step-by-step guidance for configuration - Entity selection and creation workflow - Progress tracking and state persistence Technical Details: - Database schema for multi-step auth state - API endpoints for authentication flows - Frontend component specifications - Security considerations and best practices - Migration path from current single-step authentication
- Resolved merge conflicts in frigg CLI ui-command - Updated package-lock.json dependencies - Removed old non-DDD API handlers (integrations.js, project.js) - Cleaned up error handler middleware - Aligned frontend components with new DDD structure - Updated hooks and pages to use new architecture 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Removed old CLI specification documents that were consolidated - Deleted backup CLAUDE.md file - Updated main CLI_SPECIFICATION.md with consolidated content - Streamlined MULTI_STEP_AUTH_AND_SHARED_ENTITIES_SPEC.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added repository interfaces and implementations for user management - Implemented module repository with DDD patterns - Created use cases for module entity operations (get, update, delete) - Updated handlers and routers to use new repository pattern - Enhanced integration router with better error handling - Improved middleware for user context loading 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…hitecture - Removed old non-DDD API handlers and services - Deleted legacy integration and API module management code - Cleaned up process manager and old server implementation - Removed obsolete services (AWS monitor, npm registry, template engine) - Updated server to use new DDD-based architecture - Streamlined container with proper dependency injection - Updated README with new architecture documentation - Improved frigg CLI with better repo detection - Enhanced serverless template generation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Moved components to presentation layer following DDD architecture - Removed duplicate and legacy UI components - Deleted obsolete domain/application layer code from frontend - Reorganized integration components into proper structure - Cleaned up old codegen, monitoring, and connection components - Removed unused UI library components (shadcn duplicates) - Updated imports and dependencies throughout frontend - Improved test utilities and component tests - Enhanced UI package integration components 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Removed remaining obsolete CLI specification documents - Added comprehensive TESTING_GUIDE for new architecture - Updated MULTI_STEP_AUTH_AND_SHARED_ENTITIES_SPEC - Added CLEANUP_SUMMARY documenting refactor changes - Fixed middleware import paths - Updated vite config for new structure - Removed misplaced duplicate frigg-cli file 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…degen directory Later roadmap item
…vironment directory Later roadmap item
…nnections directory Handled by Frigg UI Library
…tegrations directory Handled by Frigg UI LIbrary
…nitoring directory Roadmap Item
…grations.js handled by Frigg UI Library
Major refactor to create self-contained integration management: - Add IntegrationHub: Drop-in component wrapping entire integration UX - Add IntegrationTabs: Tab orchestration for gallery/accounts/builder - Add UserActionTester: Dev mode component for testing user actions - Update IntegrationBuilder: Support two flows (gallery install + entity build) - Update EntityManager: Use context for friggBaseUrl/authToken - Update IntegrationList: Extract baseUrl/authToken from context - Update IntegrationDataContext: Centralize API calls and state - Fix createIntegration signature to accept entities array (0-N) Features added: - View mode toggle (grid/list) in gallery - Builder hidden from nav, triggered by Install button - Context-based prop passing via FriggProvider - Better empty states with "Connect Account" guidance - Integration-specific entity selection messaging Known issues to address: - OAuth flow not yet implemented (shows alerts) - Need to implement entity connection dropdowns - Build integration entity selection needs refinement 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Implements dual authentication support in IntegrationBuilder: - Add AuthModal component with smart auth type detection - OAuth flow: Redirects to external authorization URL - Form-based flow: Renders JSONForms with schema/uischema - Refactor entity selection to row-based layout with dropdowns - Add per-module Connect buttons when no accounts exist - Add getAuthorizationRequirements API method Entity Selection UX Improvements: - Each required module gets dedicated row with dropdown - Shows account name and external ID in dropdown options - Connect buttons trigger AuthModal for OAuth or form auth - Auto-refresh entity list after successful connection - Green checkmark indicator for selected accounts AuthModal Features: - Detects auth type from authorization requirements response - JSONForms integration for credential collection - Handles form submission to /api/authorize endpoint - Shows context-appropriate messaging for each flow - Clean modal UI with proper error handling Dependencies: Uses existing @jsonforms packages 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…l architecture Adds support for multi-step authentication flows (e.g., email → OTP) while maintaining 100% backward compatibility with existing single-step modules. Implements clean DDD/hexagonal architecture with separation of concerns. Backend (Core): - AuthorizationSession domain entity with validation and state transitions - Repository pattern with MongoDB and PostgreSQL implementations - Three use cases: StartAuthorizationSession, ProcessAuthorizationStep, GetAuthorizationRequirements - Updated integration router to handle multi-step flows automatically - Prisma schema update with AuthorizationSession model - 15-minute session expiry with auto-cleanup - Comprehensive test suite: 275+ tests with 95% coverage Frontend (UI): - Unified AuthorizationWizard component treating all auth as multi-step - Single-step flows are simply totalSteps: 1 (no conditional logic) - Automatic progress bar, step counter, and button text adaptation - Simplified EntityConnectionModal (60% code reduction) - Updated API client with step and sessionId support - Zero breaking changes to existing components Security: - Cryptographically secure session IDs (crypto.randomUUID) - User ID validation on every operation - Step sequence enforcement (prevents step skipping) - Session expiry and auto-cleanup Documentation: - Complete migration guide with deployment steps - UI library update guide with examples - Nagaris OTP module implementation example - Comprehensive test documentation This enables modules like Nagaris to implement OTP flows without modifying the UI layer, as the wizard automatically adapts based on getAuthStepCount(). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove commented-out domain model placeholders (not needed with repository pattern) - Remove commented-out factory function placeholder - Clarify EventBridge Scheduler integration comments as optional enhancement
- Integrate createSchedulerAdapter into PUT /schedule endpoint - Provision EventBridge rule when schedule is enabled with cron expression - Delete EventBridge rule when schedule is disabled or deleted - Store AWS rule ARN/name in database for tracking - Handle scheduler errors gracefully (non-fatal, with warning in response) - Add 6 new tests for scheduler integration
Align naming with AWS EventBridge Scheduler terminology: - awsRuleArn → awsScheduleArn - awsRuleName → awsScheduleName - updateScheduleAwsRule → updateScheduleAwsInfo - ruleArn → scheduleArn (adapter return values) - ruleName → scheduleName (adapter return values) This reflects that we use EventBridge Scheduler (the newer service), not EventBridge Rules (the older approach).
Document the design decisions for the Admin Script Runner: - Entry point via appDefinition.adminScripts - Script base class pattern following IntegrationBase - Infrastructure components (builder, repositories, handlers) - Execution modes (sync/async) - Hybrid scheduling with EventBridge Scheduler - Dry-run mode for safe testing - Security model with admin API keys Also update README to include ADR-004 and ADR-005.
The admin-script-router requires express and serverless-http but they were not declared in package.json, causing the release to fail.
The @unique constraint on keyHash already creates an index, so the explicit @@index([keyHash]) was causing a "Index already exists" error.
Replace global parseInt/isNaN with Number.parseInt/Number.isNaN to follow JavaScript best practices and pass SonarCloud analysis.
- Extract ScheduleManagementUseCase from admin-script-router - Encapsulates schedule business logic (get/upsert/delete) - Handles EventBridge sync with graceful error handling - 14 unit tests with full coverage - Refactor oauth-token-refresh.js - Extract _checkRefreshPrerequisites() for token validation - Extract _performTokenRefresh() for actual refresh logic - Extract _createResult() helper for consistent response format - Refactor integration-health-check.js - Extract _createCheckResult() for initial result structure - Extract _runChecks() to orchestrate all checks - Extract _addCheckResult() to track issues - Extract _determineOverallStatus() for status logic - Extract _handleCheckError() for error handling All 297 tests passing.
- Add id-token: write permission for OIDC authentication - Add contents: write permission for release commits - Upgrade npm to latest for trusted publishing support (requires 11.5.1+) - Remove NPM_TOKEN/NODE_AUTH_TOKEN (OIDC replaces token auth) Requires configuring trusted publishers on npmjs.com for each package.
Keep both OIDC permissions and NPM_TOKEN for flexibility: - Packages with trusted publisher configured → use OIDC - New packages (e.g., admin-scripts) → fall back to token This allows gradual migration to OIDC while supporting new package publishes.
Phase 1 of admin refactoring based on Daniel's PR review: 1. Auth simplification (ENV-based like db-migrate): - Add shared validateAdminApiKey middleware in core/handlers/middleware - Delete AdminApiKey model, repositories, and tests - Remove API key commands from admin-script-commands.js 2. Schema changes: - Replace AdminApiKey + ScriptExecution with AdminProcess model - AdminProcess mirrors Process but without user/integration FK - Supports hierarchy (parentProcessId, childProcesses) - Used for: admin scripts, db migrations, system tasks 3. Files deleted: - admin-api-key-repository-*.js (all variants) - admin-api-key tests Next steps: Create AdminProcess repository, refactor routes to /admin/scripts/:name convention, unify db-migrate under /admin.
…r /admin Major refactoring based on PR feedback: 1. AdminProcess Repository (replaces ScriptExecution): - New: admin-process-repository-interface.js - New: admin-process-repository-mongo.js - New: admin-process-repository-postgres.js - New: admin-process-repository-documentdb.js - New: admin-process-repository-factory.js - Deleted: All script-execution-repository-* files 2. Updated admin-scripts package: - All files now use AdminProcess methods - Updated: admin-script-base.js, admin-frigg-commands.js, script-runner.js - Updated: admin-script-router.js, script-executor-handler.js - Fixed export: validateAdminApiKey (not adminAuthMiddleware) 3. Moved db-migrate under /admin path: - Routes: /admin/db-migrate/* - Uses shared validateAdminApiKey middleware - Updated use-cases and tests 4. Cleaned up obsolete code: - Removed AdminApiKey tests from admin-script-commands.test.js - Updated all tests for AdminProcess methods All 295 tests passing.
Address PR feedback from Daniel: 1. Simplified dry-run implementation: - Deleted over-engineered dry-run-repository-wrapper.js (262 lines) - Deleted over-engineered dry-run-http-interceptor.js (297 lines) - New dry-run validates inputs and returns preview without executing - Added JSON schema validation for script parameters - Net reduction: ~990 lines removed 2. Cleaned up package.json: - Removed unused mongoose dependency - Removed unused chai devDependency - Kept supertest for Express route testing (different from nock) 3. Documented admin-script-commands architecture: - Explained why separate from integration-commands - integration-commands: user-context operations (requires integrationClass) - admin-script-commands: system operations (no user context) - Separation follows SRP and avoids coupling Tests: 262 passing
…Runner Changes: - Rename requiresIntegrationFactory to requireIntegrationInstance (PR feedback) - Add JSDoc documentation for executionId parameter - Split schedule-management-use-case.js into 3 separate use cases following SRP: - GetEffectiveScheduleUseCase - UpsertScheduleUseCase - DeleteScheduleUseCase - Abstract AWS-specific naming to generic external scheduler terminology: - awsScheduleArn → externalScheduleId - awsScheduleName → externalScheduleName - updateScheduleAwsInfo → updateScheduleExternalInfo - Remove sinon dependency, use Jest mocks instead - Update Prisma schemas for both MongoDB and PostgreSQL - Update ADR documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ename context - Rename AdminFriggCommands → AdminScriptContext (facade pattern) - Refactor to constructor injection (context via constructor, not execute) - Remove logging from AdminScriptBase (use context.log instead) - Clean up display object - only UI-specific overrides - Strip verbose JSDoc comments (keep code sparse) - Update all tests for new API - Add PR review tracker for remaining items 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…leanup - Remove hardcoded defaults and env var auto-detection from scheduler adapters; require explicit config from appDefinition pattern - Region inherits from AWS_REGION (Lambda runtime), not per-adapter config - Make trigger required in ScriptRunner.execute() - Fix status->state bug in script-executor-handler error path - Remove PR_517_REVIEW_TRACKER.md from repo - Regenerate package-lock.json (remove stale mongoose/chai/sinon) - Remove detectSchedulerAdapterType and its export Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… handler - Extract dry-run validation from ScriptRunner into standalone validateScriptInput() with dedicated POST /scripts/:name/validate route - Simplify script-executor-handler to thin SQS adapter; runner handles all error recording and status updates - Change async execution response status from PENDING to QUEUED - Remove dryRun param from execute endpoint (separate concerns) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Resolve conflicts accepting next's changes:
- userId standardization: drop legacy 'user' field in credential repos
- Entity data field: use ...(entity.data || {}) spread pattern
- OAuth2: preserve refresh_token during token refresh
- CLI: replace validate command with auth command
- Infrastructure: replace AdminScriptBuilder with SchedulerBuilder
- Add createSchedulerCommands export from core
https://claude.ai/code/session_01KuCsKujN4vYQMjWmnyQaEN
Both commands are useful — keep createValidateCommand from the feature branch and authCommand from next. https://claude.ai/code/session_01KuCsKujN4vYQMjWmnyQaEN
…d SQS validation - Remove 12 thin wrapper methods from AdminScriptContext; scripts now access repos directly via context.integrationRepository, etc. - Remove DB log persistence from log(); in-memory only now - Remove adminProcessRepository lazy getter (no longer needed) - Add JSDoc documenting AdminScriptContext's unique value - Remove 5 static helpers from AdminScriptBase (getName, getDefinition, etc.) - Update builtin scripts to use repos directly - Add scriptName/executionId validation in SQS handler - Update all tests (-529/+149 lines) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create devtools jest.config.js with projects for frigg-cli + infrastructure - Create infrastructure jest.config.js excluding fixtures/helpers - Remove missing logger import from index.test.js (suite is skipped) - Fix output.test.js: table() emits two args (icon + message) - Fix dependencies.test.js: check peerDependencies for devtools - Remove _parseStaticDefinition tests (method never implemented) - Fix FileSystemAppDefinitionRepository.test.js constructor path - Fix install.test.js mock path to @friggframework/core/utils https://claude.ai/code/session_01KuCsKujN4vYQMjWmnyQaEN
…2kYX1 Add Frigg Authenticator CLI tool and scheduler infrastructure
…, queue validation, unused deps - Pass scheduler config from env vars to createSchedulerAdapter() instead of empty call - Validate ADMIN_SCRIPT_QUEUE_URL before async execution, return 503 if not configured - Remove unused bcryptjs, lodash, uuid dependencies Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…racking, adapter format - AWS scheduler createSchedule now uses upsert pattern: tries CreateScheduleCommand first, falls back to UpdateScheduleCommand on ConflictException, preventing stale schedules when cron expressions are edited - SQS handler catch block now calls completeAdminProcess with state: 'FAILED' when executionId is available, preventing orphaned execution records stuck in non-terminal state - LocalSchedulerAdapter.listSchedules() now returns normalized format matching AWS adapter contract (Name, State, ScheduleExpression, ScheduleExpressionTimezone) https://claude.ai/code/session_01BRAKMNfvY2Fpnwac7gbuq3
Resolves merge conflicts by taking the admin-script-runner branch's versions for admin-scripts models (AdminProcess pattern), /admin/ route prefixes, admin auth middleware, and vendor-agnostic scheduler naming. https://claude.ai/code/session_01UTMSBwVwDXaGTmtnNJ8VX6
… exports - Fix method name mismatch in admin-script-commands.js: commands now call repository interface methods (createProcess, findProcessById, etc.) instead of non-existent domain-specific names (createAdminProcess, etc.) - Translate command params to repository format (scriptName→name, type→ADMIN_SCRIPT, context object for scriptVersion/trigger/mode/input/audit) - Consolidate completeAdminProcess to use single updateProcessResults call instead of separate updateOutput/updateError/updateMetrics methods - Export createAdminScriptCommands from application/index.js and core/index.js - Standardize requireAdmin middleware to use x-frigg-admin-api-key header (consistent with validateAdminApiKey middleware) - Add missing mock for script-schedule-repository-factory in tests - Update all test assertions to match new repository interface contract https://claude.ai/code/session_01UTMSBwVwDXaGTmtnNJ8VX6
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.




Summary
This PR includes significant enhancements to the Management UI and Frigg CLI:
Management UI
Frigg CLI
frigg startCore
Documentation
Test Plan
🤖 Generated with Claude Code
📦 Published PR as canary version:
2.0.0--canary.522.923dfae.0✨ Test out this PR locally via:
npm install @friggframework/admin-scripts@2.0.0--canary.522.923dfae.0 npm install @friggframework/ai-agents@2.0.0--canary.522.923dfae.0 npm install @friggframework/core@2.0.0--canary.522.923dfae.0 npm install @friggframework/devtools@2.0.0--canary.522.923dfae.0 npm install @friggframework/e2e@2.0.0--canary.522.923dfae.0 npm install @friggframework/eslint-config@2.0.0--canary.522.923dfae.0 npm install @friggframework/prettier-config@2.0.0--canary.522.923dfae.0 npm install @friggframework/schemas@2.0.0--canary.522.923dfae.0 npm install @friggframework/serverless-plugin@2.0.0--canary.522.923dfae.0 npm install @friggframework/test@2.0.0--canary.522.923dfae.0 npm install @friggframework/ui@2.0.0--canary.522.923dfae.0 # or yarn add @friggframework/admin-scripts@2.0.0--canary.522.923dfae.0 yarn add @friggframework/ai-agents@2.0.0--canary.522.923dfae.0 yarn add @friggframework/core@2.0.0--canary.522.923dfae.0 yarn add @friggframework/devtools@2.0.0--canary.522.923dfae.0 yarn add @friggframework/e2e@2.0.0--canary.522.923dfae.0 yarn add @friggframework/eslint-config@2.0.0--canary.522.923dfae.0 yarn add @friggframework/prettier-config@2.0.0--canary.522.923dfae.0 yarn add @friggframework/schemas@2.0.0--canary.522.923dfae.0 yarn add @friggframework/serverless-plugin@2.0.0--canary.522.923dfae.0 yarn add @friggframework/test@2.0.0--canary.522.923dfae.0 yarn add @friggframework/ui@2.0.0--canary.522.923dfae.0