@agentlang/agentmanager 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apps/monolith/apps/agentcraft/src/agentcraft-core.module.d.ts +4 -0
- package/dist/apps/monolith/apps/agentcraft/src/agentcraft-core.module.js +49 -0
- package/dist/apps/monolith/apps/agentcraft/src/agentcraft-core.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/architect.controller.d.ts +17 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/architect.controller.js +87 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/architect.controller.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/architect.module.d.ts +2 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/architect.module.js +24 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/architect.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/architect.service.d.ts +34 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/architect.service.js +170 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/architect.service.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/architect.store.d.ts +25 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/architect.store.js +50 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/architect.store.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/dto/ingest-signal.dto.d.ts +40 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/dto/ingest-signal.dto.js +24 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/dto/ingest-signal.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/interfaces/architect.interfaces.d.ts +21 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/interfaces/architect.interfaces.js +3 -0
- package/dist/apps/monolith/apps/agentcraft/src/architect/interfaces/architect.interfaces.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/autonomous.controller.d.ts +17 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/autonomous.controller.js +117 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/autonomous.controller.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/autonomous.module.d.ts +2 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/autonomous.module.js +22 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/autonomous.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/autonomous.service.d.ts +48 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/autonomous.service.js +121 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/autonomous.service.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/dto/run-autonomous.dto.d.ts +26 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/dto/run-autonomous.dto.js +20 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/dto/run-autonomous.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/dto/watch-kb.dto.d.ts +18 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/dto/watch-kb.dto.js +20 -0
- package/dist/apps/monolith/apps/agentcraft/src/autonomous/dto/watch-kb.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/health/health.controller.d.ts +7 -0
- package/dist/apps/monolith/apps/agentcraft/src/health/health.controller.js +41 -0
- package/dist/apps/monolith/apps/agentcraft/src/health/health.controller.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/health/health.module.d.ts +2 -0
- package/dist/apps/monolith/apps/agentcraft/src/health/health.module.js +22 -0
- package/dist/apps/monolith/apps/agentcraft/src/health/health.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/dto/create-resolver.dto.d.ts +22 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/dto/create-resolver.dto.js +18 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/dto/create-resolver.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/dto/install-registry.dto.d.ts +14 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/dto/install-registry.dto.js +14 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/dto/install-registry.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/dto/search-registry-query.dto.d.ts +10 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/dto/search-registry-query.dto.js +12 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/dto/search-registry-query.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/dto/submit-action.dto.d.ts +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/dto/submit-action.dto.js +7 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/dto/submit-action.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/resolver-session.store.d.ts +19 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/resolver-session.store.js +39 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/resolver-session.store.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/resolver.controller.d.ts +36 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/resolver.controller.js +121 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/resolver.controller.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/resolver.module.d.ts +2 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/resolver.module.js +23 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/resolver.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/resolver.service.d.ts +42 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/resolver.service.js +101 -0
- package/dist/apps/monolith/apps/agentcraft/src/resolver/resolver.service.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/dto/create-session.dto.d.ts +18 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/dto/create-session.dto.js +16 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/dto/create-session.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/dto/submit-action.dto.d.ts +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/dto/submit-action.dto.js +7 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/dto/submit-action.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/dto/submit-idea.dto.d.ts +10 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/dto/submit-idea.dto.js +12 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/dto/submit-idea.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/session.store.d.ts +19 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/session.store.js +39 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/session.store.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/sessions.controller.d.ts +47 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/sessions.controller.js +139 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/sessions.controller.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/sessions.module.d.ts +2 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/sessions.module.js +23 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/sessions.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/sessions.service.d.ts +60 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/sessions.service.js +203 -0
- package/dist/apps/monolith/apps/agentcraft/src/sessions/sessions.service.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/agentmanager-core.module.d.ts +4 -0
- package/dist/apps/monolith/apps/agentmanager/src/agentmanager-core.module.js +54 -0
- package/dist/apps/monolith/apps/agentmanager/src/agentmanager-core.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/deployments.controller.d.ts +9 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/deployments.controller.js +50 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/deployments.controller.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/deployments.module.d.ts +2 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/deployments.module.js +23 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/deployments.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/deployments.service.d.ts +17 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/deployments.service.js +169 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/deployments.service.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/errors/deployment.errors.d.ts +7 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/errors/deployment.errors.js +17 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/errors/deployment.errors.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/interfaces/deployment.interfaces.d.ts +22 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/interfaces/deployment.interfaces.js +3 -0
- package/dist/apps/monolith/apps/agentmanager/src/deployments/interfaces/deployment.interfaces.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/discovery.controller.d.ts +7 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/discovery.controller.js +41 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/discovery.controller.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/discovery.module.d.ts +2 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/discovery.module.js +41 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/discovery.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/discovery.service.d.ts +17 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/discovery.service.js +160 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/discovery.service.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/dto/discover.dto.d.ts +10 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/dto/discover.dto.js +12 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/dto/discover.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/interfaces/discovery.interfaces.d.ts +21 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/interfaces/discovery.interfaces.js +3 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/interfaces/discovery.interfaces.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/llm/anthropic-llm.service.d.ts +8 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/llm/anthropic-llm.service.js +67 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/llm/anthropic-llm.service.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/llm/llm-provider.interface.d.ts +14 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/llm/llm-provider.interface.js +5 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/llm/llm-provider.interface.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/llm/llm.errors.d.ts +4 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/llm/llm.errors.js +11 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/llm/llm.errors.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/llm/openai-llm.service.d.ts +8 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/llm/openai-llm.service.js +69 -0
- package/dist/apps/monolith/apps/agentmanager/src/discovery/llm/openai-llm.service.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/dto/put-config.dto.d.ts +10 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/dto/put-config.dto.js +12 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/dto/put-config.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/dto/put-module.dto.d.ts +10 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/dto/put-module.dto.js +12 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/dto/put-module.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/dto/put-package.dto.d.ts +16 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/dto/put-package.dto.js +17 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/dto/put-package.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/employee-code.controller.d.ts +20 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/employee-code.controller.js +130 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/employee-code.controller.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/employee-code.module.d.ts +2 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/employee-code.module.js +23 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/employee-code.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/employee-code.service.d.ts +13 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/employee-code.service.js +54 -0
- package/dist/apps/monolith/apps/agentmanager/src/employee-code/employee-code.service.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/employees/dto/register-employee.dto.d.ts +12 -0
- package/dist/apps/monolith/apps/agentmanager/src/employees/dto/register-employee.dto.js +13 -0
- package/dist/apps/monolith/apps/agentmanager/src/employees/dto/register-employee.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/employees/employees.controller.d.ts +12 -0
- package/dist/apps/monolith/apps/agentmanager/src/employees/employees.controller.js +76 -0
- package/dist/apps/monolith/apps/agentmanager/src/employees/employees.controller.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/employees/employees.module.d.ts +2 -0
- package/dist/apps/monolith/apps/agentmanager/src/employees/employees.module.js +23 -0
- package/dist/apps/monolith/apps/agentmanager/src/employees/employees.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/employees/employees.service.d.ts +9 -0
- package/dist/apps/monolith/apps/agentmanager/src/employees/employees.service.js +42 -0
- package/dist/apps/monolith/apps/agentmanager/src/employees/employees.service.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/health/health.controller.d.ts +7 -0
- package/dist/apps/monolith/apps/agentmanager/src/health/health.controller.js +41 -0
- package/dist/apps/monolith/apps/agentmanager/src/health/health.controller.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/health/health.module.d.ts +2 -0
- package/dist/apps/monolith/apps/agentmanager/src/health/health.module.js +22 -0
- package/dist/apps/monolith/apps/agentmanager/src/health/health.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/dto/list-messages-query.dto.d.ts +30 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/dto/list-messages-query.dto.js +14 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/dto/list-messages-query.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/dto/push-message.dto.d.ts +80 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/dto/push-message.dto.js +49 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/dto/push-message.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/dto/respond-message.dto.d.ts +12 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/dto/respond-message.dto.js +13 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/dto/respond-message.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/inbox.controller.d.ts +15 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/inbox.controller.js +103 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/inbox.controller.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/inbox.module.d.ts +2 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/inbox.module.js +23 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/inbox.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/inbox.service.d.ts +16 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/inbox.service.js +173 -0
- package/dist/apps/monolith/apps/agentmanager/src/inbox/inbox.service.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/projects/dto/create-project.dto.d.ts +14 -0
- package/dist/apps/monolith/apps/agentmanager/src/projects/dto/create-project.dto.js +14 -0
- package/dist/apps/monolith/apps/agentmanager/src/projects/dto/create-project.dto.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/projects/projects.controller.d.ts +17 -0
- package/dist/apps/monolith/apps/agentmanager/src/projects/projects.controller.js +73 -0
- package/dist/apps/monolith/apps/agentmanager/src/projects/projects.controller.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/projects/projects.module.d.ts +2 -0
- package/dist/apps/monolith/apps/agentmanager/src/projects/projects.module.js +23 -0
- package/dist/apps/monolith/apps/agentmanager/src/projects/projects.module.js.map +1 -0
- package/dist/apps/monolith/apps/agentmanager/src/projects/projects.service.d.ts +11 -0
- package/dist/apps/monolith/apps/agentmanager/src/projects/projects.service.js +39 -0
- package/dist/apps/monolith/apps/agentmanager/src/projects/projects.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/ai-agent/ai-agent.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/ai-agent/ai-agent.module.js +82 -0
- package/dist/apps/monolith/apps/fabric/src/ai-agent/ai-agent.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/ai-agent/ai-agent.service.d.ts +63 -0
- package/dist/apps/monolith/apps/fabric/src/ai-agent/ai-agent.service.js +295 -0
- package/dist/apps/monolith/apps/fabric/src/ai-agent/ai-agent.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/ai-agent/probe-investigation.types.d.ts +19 -0
- package/dist/apps/monolith/apps/fabric/src/ai-agent/probe-investigation.types.js +3 -0
- package/dist/apps/monolith/apps/fabric/src/ai-agent/probe-investigation.types.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/auth/current-user.decorator.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/auth/current-user.decorator.js +11 -0
- package/dist/apps/monolith/apps/fabric/src/auth/current-user.decorator.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/auth/request-user.d.ts +4 -0
- package/dist/apps/monolith/apps/fabric/src/auth/request-user.js +3 -0
- package/dist/apps/monolith/apps/fabric/src/auth/request-user.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/config/configuration.d.ts +57 -0
- package/dist/apps/monolith/apps/fabric/src/config/configuration.js +185 -0
- package/dist/apps/monolith/apps/fabric/src/config/configuration.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/deployment-event.entity.d.ts +11 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/deployment-event.entity.js +67 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/deployment-event.entity.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/environment.entity.d.ts +9 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/environment.entity.js +55 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/environment.entity.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/index.d.ts +8 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/index.js +24 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/index.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/project.entity.d.ts +9 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/project.entity.js +55 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/project.entity.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/runtime.entity.d.ts +19 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/runtime.entity.js +105 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/runtime.entity.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/user-config.entity.d.ts +8 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/user-config.entity.js +50 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/user-config.entity.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/version.entity.d.ts +8 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/version.entity.js +50 -0
- package/dist/apps/monolith/apps/fabric/src/database/entities/version.entity.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.controller.d.ts +8 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.controller.js +49 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.controller.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.module.js +24 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.service.d.ts +25 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.service.js +50 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.store.d.ts +28 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.store.js +132 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.store.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.types.d.ts +12 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.types.js +3 -0
- package/dist/apps/monolith/apps/fabric/src/deployment-events/deployment-events.types.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/employees/dto/deploy.dto.d.ts +124 -0
- package/dist/apps/monolith/apps/fabric/src/employees/dto/deploy.dto.js +62 -0
- package/dist/apps/monolith/apps/fabric/src/employees/dto/deploy.dto.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/employees/employees.controller.d.ts +38 -0
- package/dist/apps/monolith/apps/fabric/src/employees/employees.controller.js +222 -0
- package/dist/apps/monolith/apps/fabric/src/employees/employees.controller.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/employees/employees.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/employees/employees.module.js +45 -0
- package/dist/apps/monolith/apps/fabric/src/employees/employees.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/employees/employees.service.d.ts +81 -0
- package/dist/apps/monolith/apps/fabric/src/employees/employees.service.js +952 -0
- package/dist/apps/monolith/apps/fabric/src/employees/employees.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/employees/employees.types.d.ts +43 -0
- package/dist/apps/monolith/apps/fabric/src/employees/employees.types.js +12 -0
- package/dist/apps/monolith/apps/fabric/src/employees/employees.types.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/employees/errors/employee-deployment.errors.d.ts +25 -0
- package/dist/apps/monolith/apps/fabric/src/employees/errors/employee-deployment.errors.js +54 -0
- package/dist/apps/monolith/apps/fabric/src/employees/errors/employee-deployment.errors.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/employees/runtime.store.d.ts +52 -0
- package/dist/apps/monolith/apps/fabric/src/employees/runtime.store.js +222 -0
- package/dist/apps/monolith/apps/fabric/src/employees/runtime.store.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/environments/dto/environment.dto.d.ts +48 -0
- package/dist/apps/monolith/apps/fabric/src/environments/dto/environment.dto.js +25 -0
- package/dist/apps/monolith/apps/fabric/src/environments/dto/environment.dto.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.controller.d.ts +13 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.controller.js +82 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.controller.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.module.js +24 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.service.d.ts +24 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.service.js +82 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.store.d.ts +22 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.store.js +131 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.store.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.types.d.ts +10 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.types.js +3 -0
- package/dist/apps/monolith/apps/fabric/src/environments/environments.types.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/environments/errors/environment.errors.d.ts +7 -0
- package/dist/apps/monolith/apps/fabric/src/environments/errors/environment.errors.js +18 -0
- package/dist/apps/monolith/apps/fabric/src/environments/errors/environment.errors.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/fabric-core.module.d.ts +4 -0
- package/dist/apps/monolith/apps/fabric/src/fabric-core.module.js +57 -0
- package/dist/apps/monolith/apps/fabric/src/fabric-core.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/health/health.controller.d.ts +8 -0
- package/dist/apps/monolith/apps/fabric/src/health/health.controller.js +42 -0
- package/dist/apps/monolith/apps/fabric/src/health/health.controller.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/health/health.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/health/health.module.js +25 -0
- package/dist/apps/monolith/apps/fabric/src/health/health.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/health/provider-health.indicator.d.ts +7 -0
- package/dist/apps/monolith/apps/fabric/src/health/provider-health.indicator.js +42 -0
- package/dist/apps/monolith/apps/fabric/src/health/provider-health.indicator.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/healthcheck/healthcheck.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/healthcheck/healthcheck.module.js +37 -0
- package/dist/apps/monolith/apps/fabric/src/healthcheck/healthcheck.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/healthcheck/healthcheck.service.d.ts +40 -0
- package/dist/apps/monolith/apps/fabric/src/healthcheck/healthcheck.service.js +392 -0
- package/dist/apps/monolith/apps/fabric/src/healthcheck/healthcheck.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/logs/logs.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/logs/logs.module.js +23 -0
- package/dist/apps/monolith/apps/fabric/src/logs/logs.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/logs/logs.service.d.ts +22 -0
- package/dist/apps/monolith/apps/fabric/src/logs/logs.service.js +167 -0
- package/dist/apps/monolith/apps/fabric/src/logs/logs.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/notifications/notifications.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/notifications/notifications.module.js +70 -0
- package/dist/apps/monolith/apps/fabric/src/notifications/notifications.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/notifications/notifications.service.d.ts +35 -0
- package/dist/apps/monolith/apps/fabric/src/notifications/notifications.service.js +122 -0
- package/dist/apps/monolith/apps/fabric/src/notifications/notifications.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/project-source/errors/project-source.errors.d.ts +4 -0
- package/dist/apps/monolith/apps/fabric/src/project-source/errors/project-source.errors.js +12 -0
- package/dist/apps/monolith/apps/fabric/src/project-source/errors/project-source.errors.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/project-source/project-source.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/project-source/project-source.module.js +21 -0
- package/dist/apps/monolith/apps/fabric/src/project-source/project-source.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/project-source/project-source.service.d.ts +12 -0
- package/dist/apps/monolith/apps/fabric/src/project-source/project-source.service.js +79 -0
- package/dist/apps/monolith/apps/fabric/src/project-source/project-source.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/project-source/project-source.types.d.ts +10 -0
- package/dist/apps/monolith/apps/fabric/src/project-source/project-source.types.js +3 -0
- package/dist/apps/monolith/apps/fabric/src/project-source/project-source.types.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/projects/dto/project.dto.d.ts +40 -0
- package/dist/apps/monolith/apps/fabric/src/projects/dto/project.dto.js +28 -0
- package/dist/apps/monolith/apps/fabric/src/projects/dto/project.dto.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/projects/errors/project.errors.d.ts +7 -0
- package/dist/apps/monolith/apps/fabric/src/projects/errors/project.errors.js +18 -0
- package/dist/apps/monolith/apps/fabric/src/projects/errors/project.errors.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects-data.service.d.ts +11 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects-data.service.js +73 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects-data.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.controller.d.ts +23 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.controller.js +130 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.controller.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.module.js +33 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.service.d.ts +39 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.service.js +245 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.store.d.ts +22 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.store.js +130 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.store.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.types.d.ts +9 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.types.js +3 -0
- package/dist/apps/monolith/apps/fabric/src/projects/projects.types.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/providers/docker-provider.d.ts +17 -0
- package/dist/apps/monolith/apps/fabric/src/providers/docker-provider.js +128 -0
- package/dist/apps/monolith/apps/fabric/src/providers/docker-provider.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/providers/eks-provider.d.ts +24 -0
- package/dist/apps/monolith/apps/fabric/src/providers/eks-provider.js +236 -0
- package/dist/apps/monolith/apps/fabric/src/providers/eks-provider.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/providers/pm2-provider.d.ts +22 -0
- package/dist/apps/monolith/apps/fabric/src/providers/pm2-provider.js +177 -0
- package/dist/apps/monolith/apps/fabric/src/providers/pm2-provider.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/providers/port-allocator.d.ts +9 -0
- package/dist/apps/monolith/apps/fabric/src/providers/port-allocator.js +62 -0
- package/dist/apps/monolith/apps/fabric/src/providers/port-allocator.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/providers/provider-factory.d.ts +10 -0
- package/dist/apps/monolith/apps/fabric/src/providers/provider-factory.js +42 -0
- package/dist/apps/monolith/apps/fabric/src/providers/provider-factory.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/providers/provider.interface.d.ts +28 -0
- package/dist/apps/monolith/apps/fabric/src/providers/provider.interface.js +5 -0
- package/dist/apps/monolith/apps/fabric/src/providers/provider.interface.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/providers/providers.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/providers/providers.module.js +35 -0
- package/dist/apps/monolith/apps/fabric/src/providers/providers.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/provisioners/cognito-provisioner.service.d.ts +33 -0
- package/dist/apps/monolith/apps/fabric/src/provisioners/cognito-provisioner.service.js +129 -0
- package/dist/apps/monolith/apps/fabric/src/provisioners/cognito-provisioner.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/provisioners/postgres-provisioner.service.d.ts +36 -0
- package/dist/apps/monolith/apps/fabric/src/provisioners/postgres-provisioner.service.js +107 -0
- package/dist/apps/monolith/apps/fabric/src/provisioners/postgres-provisioner.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/provisioners/provisioners.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/provisioners/provisioners.module.js +82 -0
- package/dist/apps/monolith/apps/fabric/src/provisioners/provisioners.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/user-config/user-config.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/user-config/user-config.module.js +22 -0
- package/dist/apps/monolith/apps/fabric/src/user-config/user-config.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/user-config/user-config.service.d.ts +17 -0
- package/dist/apps/monolith/apps/fabric/src/user-config/user-config.service.js +57 -0
- package/dist/apps/monolith/apps/fabric/src/user-config/user-config.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/user-config/user-config.store.d.ts +19 -0
- package/dist/apps/monolith/apps/fabric/src/user-config/user-config.store.js +115 -0
- package/dist/apps/monolith/apps/fabric/src/user-config/user-config.store.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/user-config/user-config.types.d.ts +10 -0
- package/dist/apps/monolith/apps/fabric/src/user-config/user-config.types.js +6 -0
- package/dist/apps/monolith/apps/fabric/src/user-config/user-config.types.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.controller.d.ts +9 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.controller.js +52 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.controller.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.module.js +24 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.service.d.ts +12 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.service.js +62 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.store.d.ts +24 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.store.js +133 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.store.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.types.d.ts +11 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.types.js +3 -0
- package/dist/apps/monolith/apps/fabric/src/versions/versions.types.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/watcher/deployment-watcher.module.d.ts +2 -0
- package/dist/apps/monolith/apps/fabric/src/watcher/deployment-watcher.module.js +35 -0
- package/dist/apps/monolith/apps/fabric/src/watcher/deployment-watcher.module.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/watcher/deployment-watcher.service.d.ts +18 -0
- package/dist/apps/monolith/apps/fabric/src/watcher/deployment-watcher.service.js +84 -0
- package/dist/apps/monolith/apps/fabric/src/watcher/deployment-watcher.service.js.map +1 -0
- package/dist/apps/monolith/apps/fabric/src/watcher/pod-probe.service.d.ts +28 -0
- package/dist/apps/monolith/apps/fabric/src/watcher/pod-probe.service.js +211 -0
- package/dist/apps/monolith/apps/fabric/src/watcher/pod-probe.service.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/config/configuration.d.ts +27 -0
- package/dist/apps/monolith/apps/integrations/src/config/configuration.js +85 -0
- package/dist/apps/monolith/apps/integrations/src/config/configuration.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/client.d.ts +9 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/client.js +46 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/client.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/commonInputTypes.d.ts +246 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/commonInputTypes.js +3 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/commonInputTypes.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/enums.d.ts +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/enums.js +3 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/enums.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/internal/class.d.ts +35 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/internal/class.js +75 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/internal/class.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/internal/prismaNamespace.d.ts +374 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/internal/prismaNamespace.js +103 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/internal/prismaNamespace.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/models/IntegrationEntity.d.ts +521 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/models/IntegrationEntity.js +3 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/models/IntegrationEntity.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/models.d.ts +2 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/models.js +3 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-postgres/models.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/client.d.ts +9 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/client.js +46 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/client.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/commonInputTypes.d.ts +227 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/commonInputTypes.js +3 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/commonInputTypes.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/enums.d.ts +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/enums.js +3 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/enums.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/internal/class.d.ts +35 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/internal/class.js +75 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/internal/class.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/internal/prismaNamespace.d.ts +368 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/internal/prismaNamespace.js +100 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/internal/prismaNamespace.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/models/IntegrationEntity.d.ts +519 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/models/IntegrationEntity.js +3 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/models/IntegrationEntity.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/models.d.ts +2 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/models.js +3 -0
- package/dist/apps/monolith/apps/integrations/src/generated/prisma-sqlite/models.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/integrations-core.module.d.ts +4 -0
- package/dist/apps/monolith/apps/integrations/src/integrations-core.module.js +61 -0
- package/dist/apps/monolith/apps/integrations/src/integrations-core.module.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/auth-flow/auth-flow.module.d.ts +2 -0
- package/dist/apps/monolith/apps/integrations/src/modules/auth-flow/auth-flow.module.js +34 -0
- package/dist/apps/monolith/apps/integrations/src/modules/auth-flow/auth-flow.module.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/auth-flow/auth-flow.service.d.ts +52 -0
- package/dist/apps/monolith/apps/integrations/src/modules/auth-flow/auth-flow.service.js +185 -0
- package/dist/apps/monolith/apps/integrations/src/modules/auth-flow/auth-flow.service.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/auth-flow/scheduler.service.d.ts +14 -0
- package/dist/apps/monolith/apps/integrations/src/modules/auth-flow/scheduler.service.js +69 -0
- package/dist/apps/monolith/apps/integrations/src/modules/auth-flow/scheduler.service.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/connections/connections.module.d.ts +2 -0
- package/dist/apps/monolith/apps/integrations/src/modules/connections/connections.module.js +24 -0
- package/dist/apps/monolith/apps/integrations/src/modules/connections/connections.module.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/connections/connections.service.d.ts +31 -0
- package/dist/apps/monolith/apps/integrations/src/modules/connections/connections.service.js +91 -0
- package/dist/apps/monolith/apps/integrations/src/modules/connections/connections.service.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/credentials/credentials.module.d.ts +2 -0
- package/dist/apps/monolith/apps/integrations/src/modules/credentials/credentials.module.js +24 -0
- package/dist/apps/monolith/apps/integrations/src/modules/credentials/credentials.module.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/credentials/encryption.service.d.ts +14 -0
- package/dist/apps/monolith/apps/integrations/src/modules/credentials/encryption.service.js +62 -0
- package/dist/apps/monolith/apps/integrations/src/modules/credentials/encryption.service.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/credentials/token-store.service.d.ts +12 -0
- package/dist/apps/monolith/apps/integrations/src/modules/credentials/token-store.service.js +70 -0
- package/dist/apps/monolith/apps/integrations/src/modules/credentials/token-store.service.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/discovery/discovery.module.d.ts +2 -0
- package/dist/apps/monolith/apps/integrations/src/modules/discovery/discovery.module.js +21 -0
- package/dist/apps/monolith/apps/integrations/src/modules/discovery/discovery.module.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/discovery/oidc-discovery.service.d.ts +25 -0
- package/dist/apps/monolith/apps/integrations/src/modules/discovery/oidc-discovery.service.js +83 -0
- package/dist/apps/monolith/apps/integrations/src/modules/discovery/oidc-discovery.service.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/platform/metadata-store.service.d.ts +31 -0
- package/dist/apps/monolith/apps/integrations/src/modules/platform/metadata-store.service.js +278 -0
- package/dist/apps/monolith/apps/integrations/src/modules/platform/metadata-store.service.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/platform/platform.module.d.ts +2 -0
- package/dist/apps/monolith/apps/integrations/src/modules/platform/platform.module.js +21 -0
- package/dist/apps/monolith/apps/integrations/src/modules/platform/platform.module.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/platform/platform.types.d.ts +9 -0
- package/dist/apps/monolith/apps/integrations/src/modules/platform/platform.types.js +3 -0
- package/dist/apps/monolith/apps/integrations/src/modules/platform/platform.types.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/platform/resilient-fetch.d.ts +6 -0
- package/dist/apps/monolith/apps/integrations/src/modules/platform/resilient-fetch.js +38 -0
- package/dist/apps/monolith/apps/integrations/src/modules/platform/resilient-fetch.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/base/api-key.provider.d.ts +9 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/base/api-key.provider.js +34 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/base/api-key.provider.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/base/basic-auth.provider.d.ts +9 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/base/basic-auth.provider.js +35 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/base/basic-auth.provider.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/base/oauth2.provider.d.ts +13 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/base/oauth2.provider.js +162 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/base/oauth2.provider.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/base/oidc.provider.d.ts +14 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/base/oidc.provider.js +55 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/base/oidc.provider.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/builtin/google-drive.provider.d.ts +3 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/builtin/google-drive.provider.js +39 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/builtin/google-drive.provider.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/provider.factory.d.ts +11 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/provider.factory.js +70 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/provider.factory.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/provider.registry.d.ts +20 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/provider.registry.js +114 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/provider.registry.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/provider.types.d.ts +160 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/provider.types.js +20 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/provider.types.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/providers.module.d.ts +2 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/providers.module.js +46 -0
- package/dist/apps/monolith/apps/integrations/src/modules/providers/providers.module.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/tenant-config/tenant-config.module.d.ts +2 -0
- package/dist/apps/monolith/apps/integrations/src/modules/tenant-config/tenant-config.module.js +24 -0
- package/dist/apps/monolith/apps/integrations/src/modules/tenant-config/tenant-config.module.js.map +1 -0
- package/dist/apps/monolith/apps/integrations/src/modules/tenant-config/tenant-config.service.d.ts +48 -0
- package/dist/apps/monolith/apps/integrations/src/modules/tenant-config/tenant-config.service.js +136 -0
- package/dist/apps/monolith/apps/integrations/src/modules/tenant-config/tenant-config.service.js.map +1 -0
- package/dist/apps/monolith/apps/monolith/src/app.module.d.ts +2 -0
- package/dist/apps/monolith/apps/monolith/src/app.module.js +73 -0
- package/dist/apps/monolith/apps/monolith/src/app.module.js.map +1 -0
- package/dist/apps/monolith/apps/monolith/src/config/configuration.d.ts +26 -0
- package/dist/apps/monolith/apps/monolith/src/config/configuration.js +82 -0
- package/dist/apps/monolith/apps/monolith/src/config/configuration.js.map +1 -0
- package/dist/apps/monolith/apps/monolith/src/health/health.controller.d.ts +7 -0
- package/dist/apps/monolith/apps/monolith/src/health/health.controller.js +41 -0
- package/dist/apps/monolith/apps/monolith/src/health/health.controller.js.map +1 -0
- package/dist/apps/monolith/apps/monolith/src/health/health.module.d.ts +2 -0
- package/dist/apps/monolith/apps/monolith/src/health/health.module.js +22 -0
- package/dist/apps/monolith/apps/monolith/src/health/health.module.js.map +1 -0
- package/dist/apps/monolith/apps/monolith/src/main.d.ts +1 -0
- package/dist/apps/monolith/apps/monolith/src/main.js +46 -0
- package/dist/apps/monolith/apps/monolith/src/main.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/agentcraft.module.d.ts +13 -0
- package/dist/apps/monolith/libs/agentcraft/src/agentcraft.module.js +137 -0
- package/dist/apps/monolith/libs/agentcraft/src/agentcraft.module.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/constants.d.ts +2 -0
- package/dist/apps/monolith/libs/agentcraft/src/constants.js +6 -0
- package/dist/apps/monolith/libs/agentcraft/src/constants.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/dto/submit-action.dto.d.ts +32 -0
- package/dist/apps/monolith/libs/agentcraft/src/dto/submit-action.dto.js +23 -0
- package/dist/apps/monolith/libs/agentcraft/src/dto/submit-action.dto.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/errors/domain.error.d.ts +8 -0
- package/dist/apps/monolith/libs/agentcraft/src/errors/domain.error.js +19 -0
- package/dist/apps/monolith/libs/agentcraft/src/errors/domain.error.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/errors/llm.errors.d.ts +10 -0
- package/dist/apps/monolith/libs/agentcraft/src/errors/llm.errors.js +23 -0
- package/dist/apps/monolith/libs/agentcraft/src/errors/llm.errors.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/index.d.ts +44 -0
- package/dist/apps/monolith/libs/agentcraft/src/index.js +91 -0
- package/dist/apps/monolith/libs/agentcraft/src/index.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/instructions/step6-data-model.d.ts +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/instructions/step6-data-model.js +185 -0
- package/dist/apps/monolith/libs/agentcraft/src/instructions/step6-data-model.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/instructions/step7-workflows.d.ts +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/instructions/step7-workflows.js +548 -0
- package/dist/apps/monolith/libs/agentcraft/src/instructions/step7-workflows.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/instructions/step8-agents.d.ts +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/instructions/step8-agents.js +118 -0
- package/dist/apps/monolith/libs/agentcraft/src/instructions/step8-agents.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/interfaces/llm-provider.interface.d.ts +8 -0
- package/dist/apps/monolith/libs/agentcraft/src/interfaces/llm-provider.interface.js +3 -0
- package/dist/apps/monolith/libs/agentcraft/src/interfaces/llm-provider.interface.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/assembly.prompt.d.ts +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/assembly.prompt.js +103 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/assembly.prompt.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/codegen.prompt.d.ts +2 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/codegen.prompt.js +80 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/codegen.prompt.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/decomposition.prompt.d.ts +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/decomposition.prompt.js +36 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/decomposition.prompt.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/examples-provider.d.ts +6 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/examples-provider.js +50 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/examples-provider.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/planning.prompt.d.ts +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/planning.prompt.js +56 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/planning.prompt.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/resolver.prompt.d.ts +9 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/resolver.prompt.js +320 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/resolver.prompt.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/semantics-guide.d.ts +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/semantics-guide.js +130 -0
- package/dist/apps/monolith/libs/agentcraft/src/prompts/semantics-guide.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/anthropic-craft-llm.service.d.ts +13 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/anthropic-craft-llm.service.js +167 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/anthropic-craft-llm.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/anthropic-llm.service.d.ts +9 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/anthropic-llm.service.js +67 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/anthropic-llm.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/api-adapter.service.d.ts +43 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/api-adapter.service.js +154 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/api-adapter.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/architect-loop.service.d.ts +36 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/architect-loop.service.js +282 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/architect-loop.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/autonomous-runner.service.d.ts +16 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/autonomous-runner.service.js +135 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/autonomous-runner.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/craft-config.service.d.ts +11 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/craft-config.service.js +91 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/craft-config.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/craft-llm-adapter.service.d.ts +9 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/craft-llm-adapter.service.js +57 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/craft-llm-adapter.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/decomposer.service.d.ts +9 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/decomposer.service.js +100 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/decomposer.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/design-generator.service.d.ts +14 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/design-generator.service.js +544 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/design-generator.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/executor.service.d.ts +17 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/executor.service.js +347 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/executor.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/kb-watcher.service.d.ts +12 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/kb-watcher.service.js +141 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/kb-watcher.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/openai-llm.service.d.ts +9 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/openai-llm.service.js +69 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/openai-llm.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/output-parser.service.d.ts +9 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/output-parser.service.js +68 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/output-parser.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/pipeline-state.service.d.ts +15 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/pipeline-state.service.js +106 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/pipeline-state.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/pipeline-steps.service.d.ts +10 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/pipeline-steps.service.js +134 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/pipeline-steps.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/planner.service.d.ts +13 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/planner.service.js +165 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/planner.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/readme-generator.service.d.ts +10 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/readme-generator.service.js +195 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/readme-generator.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/registry-client.service.d.ts +14 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/registry-client.service.js +130 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/registry-client.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/requirements-generator.service.d.ts +12 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/requirements-generator.service.js +198 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/requirements-generator.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/spec-fetcher.service.d.ts +3 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/spec-fetcher.service.js +30 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/spec-fetcher.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/ui-blueprint-generator.service.d.ts +14 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/ui-blueprint-generator.service.js +346 -0
- package/dist/apps/monolith/libs/agentcraft/src/services/ui-blueprint-generator.service.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/architect.types.d.ts +122 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/architect.types.js +3 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/architect.types.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/autonomous.types.d.ts +56 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/autonomous.types.js +3 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/autonomous.types.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/llm.types.d.ts +55 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/llm.types.js +3 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/llm.types.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/pipeline.types.d.ts +55 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/pipeline.types.js +34 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/pipeline.types.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/resolver.types.d.ts +27 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/resolver.types.js +3 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/resolver.types.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/signal.types.d.ts +11 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/signal.types.js +3 -0
- package/dist/apps/monolith/libs/agentcraft/src/types/signal.types.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/kb-loader.d.ts +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/kb-loader.js +61 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/kb-loader.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/output-writer.d.ts +6 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/output-writer.js +57 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/output-writer.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/spec-fetcher.d.ts +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/spec-fetcher.js +20 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/spec-fetcher.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/spec-trimmer.d.ts +9 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/spec-trimmer.js +235 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/spec-trimmer.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/text-utils.d.ts +5 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/text-utils.js +36 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/text-utils.js.map +1 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/validator.d.ts +8 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/validator.js +187 -0
- package/dist/apps/monolith/libs/agentcraft/src/utils/validator.js.map +1 -0
- package/dist/apps/monolith/libs/common/src/database/data-source.service.d.ts +15 -0
- package/dist/apps/monolith/libs/common/src/database/data-source.service.js +77 -0
- package/dist/apps/monolith/libs/common/src/database/data-source.service.js.map +1 -0
- package/dist/apps/monolith/libs/common/src/database/database-connection.holder.d.ts +15 -0
- package/dist/apps/monolith/libs/common/src/database/database-connection.holder.js +47 -0
- package/dist/apps/monolith/libs/common/src/database/database-connection.holder.js.map +1 -0
- package/dist/apps/monolith/libs/common/src/database/database.config.d.ts +13 -0
- package/dist/apps/monolith/libs/common/src/database/database.config.js +5 -0
- package/dist/apps/monolith/libs/common/src/database/database.config.js.map +1 -0
- package/dist/apps/monolith/libs/common/src/database/database.module.d.ts +9 -0
- package/dist/apps/monolith/libs/common/src/database/database.module.js +48 -0
- package/dist/apps/monolith/libs/common/src/database/database.module.js.map +1 -0
- package/dist/apps/monolith/libs/common/src/database/embedded-database.service.d.ts +12 -0
- package/dist/apps/monolith/libs/common/src/database/embedded-database.service.js +108 -0
- package/dist/apps/monolith/libs/common/src/database/embedded-database.service.js.map +1 -0
- package/dist/apps/monolith/libs/common/src/database/file-store.d.ts +10 -0
- package/dist/apps/monolith/libs/common/src/database/file-store.factory.d.ts +8 -0
- package/dist/apps/monolith/libs/common/src/database/file-store.factory.js +37 -0
- package/dist/apps/monolith/libs/common/src/database/file-store.factory.js.map +1 -0
- package/dist/apps/monolith/libs/common/src/database/file-store.js +52 -0
- package/dist/apps/monolith/libs/common/src/database/file-store.js.map +1 -0
- package/dist/apps/monolith/libs/common/src/errors/domain.error.d.ts +4 -0
- package/dist/apps/monolith/libs/common/src/errors/domain.error.js +12 -0
- package/dist/apps/monolith/libs/common/src/errors/domain.error.js.map +1 -0
- package/dist/apps/monolith/libs/common/src/filters/domain-exception.filter.d.ts +8 -0
- package/dist/apps/monolith/libs/common/src/filters/domain-exception.filter.js +46 -0
- package/dist/apps/monolith/libs/common/src/filters/domain-exception.filter.js.map +1 -0
- package/dist/apps/monolith/libs/common/src/index.d.ts +13 -0
- package/dist/apps/monolith/libs/common/src/index.js +24 -0
- package/dist/apps/monolith/libs/common/src/index.js.map +1 -0
- package/dist/apps/monolith/libs/common/src/interceptors/logging.interceptor.d.ts +6 -0
- package/dist/apps/monolith/libs/common/src/interceptors/logging.interceptor.js +56 -0
- package/dist/apps/monolith/libs/common/src/interceptors/logging.interceptor.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/constants.d.ts +7 -0
- package/dist/apps/monolith/libs/project-provider/src/constants.js +11 -0
- package/dist/apps/monolith/libs/project-provider/src/constants.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/errors/domain.error.d.ts +1 -0
- package/dist/apps/monolith/libs/project-provider/src/errors/domain.error.js +6 -0
- package/dist/apps/monolith/libs/project-provider/src/errors/domain.error.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/errors/employee-code.errors.d.ts +13 -0
- package/dist/apps/monolith/libs/project-provider/src/errors/employee-code.errors.js +29 -0
- package/dist/apps/monolith/libs/project-provider/src/errors/employee-code.errors.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/errors/inbox.errors.d.ts +13 -0
- package/dist/apps/monolith/libs/project-provider/src/errors/inbox.errors.js +29 -0
- package/dist/apps/monolith/libs/project-provider/src/errors/inbox.errors.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/errors/registry.errors.d.ts +16 -0
- package/dist/apps/monolith/libs/project-provider/src/errors/registry.errors.js +35 -0
- package/dist/apps/monolith/libs/project-provider/src/errors/registry.errors.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/index.d.ts +23 -0
- package/dist/apps/monolith/libs/project-provider/src/index.js +50 -0
- package/dist/apps/monolith/libs/project-provider/src/index.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/employee-code-provider.interface.d.ts +11 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/employee-code-provider.interface.js +3 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/employee-code-provider.interface.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/inbox-client.interface.d.ts +3 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/inbox-client.interface.js +3 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/inbox-client.interface.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/inbox-handler.interface.d.ts +5 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/inbox-handler.interface.js +5 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/inbox-handler.interface.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/knowledge-base.interface.d.ts +5 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/knowledge-base.interface.js +3 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/knowledge-base.interface.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/registry-provider.interface.d.ts +18 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/registry-provider.interface.js +3 -0
- package/dist/apps/monolith/libs/project-provider/src/interfaces/registry-provider.interface.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/project-provider.module.d.ts +10 -0
- package/dist/apps/monolith/libs/project-provider/src/project-provider.module.js +115 -0
- package/dist/apps/monolith/libs/project-provider/src/project-provider.module.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/services/al-parser.service.d.ts +6 -0
- package/dist/apps/monolith/libs/project-provider/src/services/al-parser.service.js +94 -0
- package/dist/apps/monolith/libs/project-provider/src/services/al-parser.service.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/services/direct-inbox-client.service.d.ts +8 -0
- package/dist/apps/monolith/libs/project-provider/src/services/direct-inbox-client.service.js +42 -0
- package/dist/apps/monolith/libs/project-provider/src/services/direct-inbox-client.service.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/services/file-knowledge-base.service.d.ts +8 -0
- package/dist/apps/monolith/libs/project-provider/src/services/file-knowledge-base.service.js +126 -0
- package/dist/apps/monolith/libs/project-provider/src/services/file-knowledge-base.service.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/services/filesystem-employee-code.service.d.ts +24 -0
- package/dist/apps/monolith/libs/project-provider/src/services/filesystem-employee-code.service.js +163 -0
- package/dist/apps/monolith/libs/project-provider/src/services/filesystem-employee-code.service.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/services/filesystem-registry.service.d.ts +27 -0
- package/dist/apps/monolith/libs/project-provider/src/services/filesystem-registry.service.js +223 -0
- package/dist/apps/monolith/libs/project-provider/src/services/filesystem-registry.service.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/services/http-inbox-client.service.d.ts +7 -0
- package/dist/apps/monolith/libs/project-provider/src/services/http-inbox-client.service.js +46 -0
- package/dist/apps/monolith/libs/project-provider/src/services/http-inbox-client.service.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/services/noop-inbox-client.service.d.ts +4 -0
- package/dist/apps/monolith/libs/project-provider/src/services/noop-inbox-client.service.js +19 -0
- package/dist/apps/monolith/libs/project-provider/src/services/noop-inbox-client.service.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/types/messaging.types.d.ts +45 -0
- package/dist/apps/monolith/libs/project-provider/src/types/messaging.types.js +11 -0
- package/dist/apps/monolith/libs/project-provider/src/types/messaging.types.js.map +1 -0
- package/dist/apps/monolith/libs/project-provider/src/types/project.types.d.ts +47 -0
- package/dist/apps/monolith/libs/project-provider/src/types/project.types.js +3 -0
- package/dist/apps/monolith/libs/project-provider/src/types/project.types.js.map +1 -0
- package/dist/apps/monolith/tsconfig.app.tsbuildinfo +1 -0
- package/package.json +3 -1
- package/scripts/agentmanager.mjs +22 -2
- package/scripts/monolith-daemon-run.mjs +3 -1
- package/scripts/monolith-daemon-run.sh +1 -1
|
@@ -0,0 +1,952 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
+
};
|
|
17
|
+
var EmployeesService_1;
|
|
18
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
+
exports.EmployeesService = void 0;
|
|
20
|
+
const common_1 = require("@nestjs/common");
|
|
21
|
+
const node_path_1 = require("node:path");
|
|
22
|
+
const configuration_1 = __importDefault(require("../config/configuration"));
|
|
23
|
+
const runtime_store_1 = require("./runtime.store");
|
|
24
|
+
const versions_service_1 = require("../versions/versions.service");
|
|
25
|
+
const provider_interface_1 = require("../providers/provider.interface");
|
|
26
|
+
const project_provider_1 = require("../../../../libs/project-provider/src");
|
|
27
|
+
const provider_factory_1 = require("../providers/provider-factory");
|
|
28
|
+
const port_allocator_1 = require("../providers/port-allocator");
|
|
29
|
+
const environments_service_1 = require("../environments/environments.service");
|
|
30
|
+
const project_source_service_1 = require("../project-source/project-source.service");
|
|
31
|
+
const deployment_events_service_1 = require("../deployment-events/deployment-events.service");
|
|
32
|
+
const logs_service_1 = require("../logs/logs.service");
|
|
33
|
+
const notifications_service_1 = require("../notifications/notifications.service");
|
|
34
|
+
const postgres_provisioner_service_1 = require("../provisioners/postgres-provisioner.service");
|
|
35
|
+
const cognito_provisioner_service_1 = require("../provisioners/cognito-provisioner.service");
|
|
36
|
+
const projects_data_service_1 = require("../projects/projects-data.service");
|
|
37
|
+
const employee_deployment_errors_1 = require("./errors/employee-deployment.errors");
|
|
38
|
+
const employees_types_1 = require("./employees.types");
|
|
39
|
+
let EmployeesService = EmployeesService_1 = class EmployeesService {
|
|
40
|
+
runtimeStore;
|
|
41
|
+
versionsService;
|
|
42
|
+
provider;
|
|
43
|
+
providerFactory;
|
|
44
|
+
portAllocator;
|
|
45
|
+
environmentsService;
|
|
46
|
+
projectSource;
|
|
47
|
+
eventsService;
|
|
48
|
+
logsService;
|
|
49
|
+
notificationsService;
|
|
50
|
+
postgresProvisioner;
|
|
51
|
+
cognitoProvisioner;
|
|
52
|
+
config;
|
|
53
|
+
projectsDataService;
|
|
54
|
+
registry;
|
|
55
|
+
registryPath;
|
|
56
|
+
logger = new common_1.Logger(EmployeesService_1.name);
|
|
57
|
+
deploying = new Set();
|
|
58
|
+
constructor(runtimeStore, versionsService, provider, providerFactory, portAllocator, environmentsService, projectSource, eventsService, logsService, notificationsService, postgresProvisioner, cognitoProvisioner, config, projectsDataService, registry, registryPath) {
|
|
59
|
+
this.runtimeStore = runtimeStore;
|
|
60
|
+
this.versionsService = versionsService;
|
|
61
|
+
this.provider = provider;
|
|
62
|
+
this.providerFactory = providerFactory;
|
|
63
|
+
this.portAllocator = portAllocator;
|
|
64
|
+
this.environmentsService = environmentsService;
|
|
65
|
+
this.projectSource = projectSource;
|
|
66
|
+
this.eventsService = eventsService;
|
|
67
|
+
this.logsService = logsService;
|
|
68
|
+
this.notificationsService = notificationsService;
|
|
69
|
+
this.postgresProvisioner = postgresProvisioner;
|
|
70
|
+
this.cognitoProvisioner = cognitoProvisioner;
|
|
71
|
+
this.config = config;
|
|
72
|
+
this.projectsDataService = projectsDataService;
|
|
73
|
+
this.registry = registry;
|
|
74
|
+
this.registryPath = registryPath;
|
|
75
|
+
}
|
|
76
|
+
async onModuleDestroy() {
|
|
77
|
+
const entries = [...this.runtimeStore.listAll()];
|
|
78
|
+
const running = entries.filter((e) => e.entry.containerId &&
|
|
79
|
+
(e.entry.runtime === 'running' || e.entry.runtime === 'paused'));
|
|
80
|
+
if (running.length === 0)
|
|
81
|
+
return;
|
|
82
|
+
this.logger.log(`Graceful shutdown: stopping ${running.length} running process(es)`);
|
|
83
|
+
await Promise.allSettled(running.map(async (e) => {
|
|
84
|
+
try {
|
|
85
|
+
const resolved = this.resolveEnvironment(e.entry.environmentId ?? undefined);
|
|
86
|
+
if (e.entry.projectPath) {
|
|
87
|
+
await this.logsService.saveStdoutLogsBeforeStop(e.entry.containerId, e.entry.projectPath, resolved.providerType);
|
|
88
|
+
}
|
|
89
|
+
await resolved.provider.stop(e.entry.containerId);
|
|
90
|
+
this.logger.log(`Stopped ${e.projectId}/${e.employeeId} (${e.env})`);
|
|
91
|
+
}
|
|
92
|
+
catch (err) {
|
|
93
|
+
this.logger.warn(`Failed to stop ${e.projectId}/${e.employeeId} (${e.env}): ${err}`);
|
|
94
|
+
}
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
processName(projectId, employeeId, env) {
|
|
98
|
+
return `fabric-${projectId}-${employeeId}-${env}`;
|
|
99
|
+
}
|
|
100
|
+
resolveEnvironment(environmentId) {
|
|
101
|
+
if (!environmentId) {
|
|
102
|
+
return {
|
|
103
|
+
provider: this.provider,
|
|
104
|
+
providerType: this.config.provider,
|
|
105
|
+
envVars: {},
|
|
106
|
+
jsonConfig: {},
|
|
107
|
+
environmentId: null,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
const env = this.environmentsService.get(environmentId);
|
|
111
|
+
return {
|
|
112
|
+
provider: this.providerFactory.get(env.providerType),
|
|
113
|
+
providerType: env.providerType,
|
|
114
|
+
envVars: env.envVars,
|
|
115
|
+
jsonConfig: env.jsonConfig,
|
|
116
|
+
environmentId: env.id,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
async deploy(projectId, employeeId, env, environmentId, source, userId) {
|
|
120
|
+
const deployKey = `${projectId}/${employeeId}/${env}`;
|
|
121
|
+
if (this.deploying.has(deployKey)) {
|
|
122
|
+
throw new employee_deployment_errors_1.AlreadyInStateError(employeeId, env, 'deploying');
|
|
123
|
+
}
|
|
124
|
+
const now = new Date().toISOString();
|
|
125
|
+
let versionId;
|
|
126
|
+
if (env === 'live') {
|
|
127
|
+
const latest = this.versionsService.getLatest(projectId, employeeId);
|
|
128
|
+
if (!latest) {
|
|
129
|
+
throw new employee_deployment_errors_1.NoLiveVersionError(projectId, employeeId);
|
|
130
|
+
}
|
|
131
|
+
versionId = latest.versionId;
|
|
132
|
+
}
|
|
133
|
+
let projectPath;
|
|
134
|
+
let storedSource = source ?? null;
|
|
135
|
+
if (source) {
|
|
136
|
+
projectPath = await this.projectSource.resolve(source);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
const existing = this.runtimeStore.get(projectId, employeeId, env);
|
|
140
|
+
if (existing?.projectPath) {
|
|
141
|
+
projectPath = existing.projectPath;
|
|
142
|
+
storedSource = existing.source;
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
const otherEnv = env === 'draft' ? 'live' : 'draft';
|
|
146
|
+
const other = this.runtimeStore.get(projectId, employeeId, otherEnv);
|
|
147
|
+
if (other?.projectPath) {
|
|
148
|
+
projectPath = other.projectPath;
|
|
149
|
+
storedSource = other.source;
|
|
150
|
+
}
|
|
151
|
+
else if (this.registry && this.registryPath) {
|
|
152
|
+
try {
|
|
153
|
+
await this.registry.getEmployee(projectId, employeeId);
|
|
154
|
+
projectPath = (0, node_path_1.join)(this.registryPath, projectId, employeeId);
|
|
155
|
+
storedSource = { type: 'local', path: projectPath };
|
|
156
|
+
}
|
|
157
|
+
catch {
|
|
158
|
+
throw new employee_deployment_errors_1.EmployeeNotFoundError(projectId, employeeId);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
throw new employee_deployment_errors_1.EmployeeNotFoundError(projectId, employeeId);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
let resolvedEnvironmentId = environmentId;
|
|
167
|
+
if (!resolvedEnvironmentId) {
|
|
168
|
+
const project = await this.projectsDataService.get(projectId);
|
|
169
|
+
if (project) {
|
|
170
|
+
resolvedEnvironmentId = project.environmentId;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const resolved = this.resolveEnvironment(resolvedEnvironmentId);
|
|
174
|
+
const port = await this.portAllocator.allocateVerified();
|
|
175
|
+
const resolvedUserId = userId ?? null;
|
|
176
|
+
this.runtimeStore.set(projectId, employeeId, env, {
|
|
177
|
+
userId: resolvedUserId,
|
|
178
|
+
runtime: 'pending',
|
|
179
|
+
deployedAt: now,
|
|
180
|
+
lastError: null,
|
|
181
|
+
versionId: versionId ?? null,
|
|
182
|
+
publishedAt: versionId ? now : null,
|
|
183
|
+
moduleCount: 0,
|
|
184
|
+
containerId: null,
|
|
185
|
+
port,
|
|
186
|
+
environmentId: resolved.environmentId,
|
|
187
|
+
projectPath,
|
|
188
|
+
source: storedSource,
|
|
189
|
+
healthcheckRetryCount: 0,
|
|
190
|
+
envVars: null,
|
|
191
|
+
});
|
|
192
|
+
this.runDeploy(projectId, employeeId, env, projectPath, port, versionId, storedSource, resolved, resolvedUserId).catch((err) => {
|
|
193
|
+
this.logger.error(`Unexpected error in runDeploy for ${deployKey}: ${err}`);
|
|
194
|
+
});
|
|
195
|
+
return {
|
|
196
|
+
projectId,
|
|
197
|
+
employeeId,
|
|
198
|
+
env,
|
|
199
|
+
runtime: 'pending',
|
|
200
|
+
deployedAt: now,
|
|
201
|
+
versionId,
|
|
202
|
+
port,
|
|
203
|
+
environmentId: resolved.environmentId ?? undefined,
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
async runDeploy(projectId, employeeId, env, projectPath, port, versionId, storedSource, resolved, userId) {
|
|
207
|
+
const deployKey = `${projectId}/${employeeId}/${env}`;
|
|
208
|
+
this.deploying.add(deployKey);
|
|
209
|
+
const now = new Date().toISOString();
|
|
210
|
+
const name = this.processName(projectId, employeeId, env);
|
|
211
|
+
try {
|
|
212
|
+
this.runtimeStore.updateField(projectId, employeeId, env, {
|
|
213
|
+
runtime: 'cloning',
|
|
214
|
+
});
|
|
215
|
+
this.runtimeStore.updateField(projectId, employeeId, env, {
|
|
216
|
+
runtime: 'building',
|
|
217
|
+
});
|
|
218
|
+
const baseAppConfig = { service: { port } };
|
|
219
|
+
let mergedConfig = {
|
|
220
|
+
...resolved.jsonConfig,
|
|
221
|
+
...baseAppConfig,
|
|
222
|
+
};
|
|
223
|
+
const envVars = {
|
|
224
|
+
...resolved.envVars,
|
|
225
|
+
PORT: String(port),
|
|
226
|
+
};
|
|
227
|
+
const storeConfig = mergedConfig.store;
|
|
228
|
+
if (storeConfig?.type === 'postgres') {
|
|
229
|
+
try {
|
|
230
|
+
let creds;
|
|
231
|
+
try {
|
|
232
|
+
const project = await this.projectsDataService.get(projectId);
|
|
233
|
+
if (project?.dbName) {
|
|
234
|
+
creds = this.postgresProvisioner.getCredentialsForExistingDb(project.dbName);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
catch {
|
|
238
|
+
}
|
|
239
|
+
if (!creds) {
|
|
240
|
+
creds = await this.postgresProvisioner.createDatabase(`${projectId}_${employeeId}_${env}`);
|
|
241
|
+
}
|
|
242
|
+
mergedConfig = {
|
|
243
|
+
...mergedConfig,
|
|
244
|
+
store: {
|
|
245
|
+
...storeConfig,
|
|
246
|
+
type: 'postgres',
|
|
247
|
+
dbname: creds.dbname,
|
|
248
|
+
host: creds.host,
|
|
249
|
+
port: creds.port,
|
|
250
|
+
username: creds.username,
|
|
251
|
+
password: creds.password,
|
|
252
|
+
},
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
catch (err) {
|
|
256
|
+
this.logger.warn(`Postgres provisioning failed: ${err}`);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
const authConfig = mergedConfig.auth;
|
|
260
|
+
if (authConfig?.enabled === true) {
|
|
261
|
+
try {
|
|
262
|
+
const cognito = await this.cognitoProvisioner.provision(`${projectId}-${employeeId}-${env}`, '', '');
|
|
263
|
+
envVars.COGNITO_USER_POOL_ID = cognito.userPoolId;
|
|
264
|
+
envVars.COGNITO_CLIENT_ID = cognito.clientId;
|
|
265
|
+
envVars.AWS_REGION = cognito.region;
|
|
266
|
+
envVars.COGNITO_DEFAULT_USER_PASSWORD = cognito.defaultPassword;
|
|
267
|
+
const awsKey = this.config.aws.accessKeyId;
|
|
268
|
+
const awsSecret = this.config.aws.secretAccessKey;
|
|
269
|
+
if (awsKey)
|
|
270
|
+
envVars.AWS_ACCESS_KEY_ID = awsKey;
|
|
271
|
+
if (awsSecret)
|
|
272
|
+
envVars.AWS_SECRET_ACCESS_KEY = awsSecret;
|
|
273
|
+
}
|
|
274
|
+
catch (err) {
|
|
275
|
+
this.logger.warn(`Cognito provisioning failed: ${err}`);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
envVars.APP_CONFIG = JSON.stringify(mergedConfig);
|
|
279
|
+
this.runtimeStore.updateField(projectId, employeeId, env, {
|
|
280
|
+
runtime: 'deploying',
|
|
281
|
+
envVars,
|
|
282
|
+
});
|
|
283
|
+
const result = await resolved.provider.deploy(name, projectPath, envVars, port, { projectId, employeeId });
|
|
284
|
+
if (!result.success) {
|
|
285
|
+
const errMsg = result.error ?? 'Deploy failed';
|
|
286
|
+
this.runtimeStore.set(projectId, employeeId, env, {
|
|
287
|
+
userId,
|
|
288
|
+
runtime: 'failed',
|
|
289
|
+
deployedAt: now,
|
|
290
|
+
lastError: errMsg,
|
|
291
|
+
versionId: versionId ?? null,
|
|
292
|
+
publishedAt: versionId ? now : null,
|
|
293
|
+
moduleCount: 0,
|
|
294
|
+
containerId: null,
|
|
295
|
+
port: null,
|
|
296
|
+
environmentId: resolved.environmentId,
|
|
297
|
+
projectPath,
|
|
298
|
+
source: storedSource,
|
|
299
|
+
healthcheckRetryCount: 0,
|
|
300
|
+
envVars,
|
|
301
|
+
});
|
|
302
|
+
this.logger.error(`Failed to deploy ${projectId}/${employeeId} (${env}): ${errMsg}`);
|
|
303
|
+
this.eventsService.create({
|
|
304
|
+
userId,
|
|
305
|
+
projectId,
|
|
306
|
+
employeeId,
|
|
307
|
+
env,
|
|
308
|
+
type: 'error',
|
|
309
|
+
message: errMsg,
|
|
310
|
+
});
|
|
311
|
+
this.notificationsService
|
|
312
|
+
.notifyOnFailure(userId ?? '__anonymous__', {
|
|
313
|
+
projectId,
|
|
314
|
+
employeeId,
|
|
315
|
+
env,
|
|
316
|
+
type: 'error',
|
|
317
|
+
message: errMsg,
|
|
318
|
+
})
|
|
319
|
+
.catch((notifyErr) => {
|
|
320
|
+
this.logger.warn(`Failed to send failure notification: ${notifyErr}`);
|
|
321
|
+
});
|
|
322
|
+
return;
|
|
323
|
+
}
|
|
324
|
+
this.runtimeStore.set(projectId, employeeId, env, {
|
|
325
|
+
userId,
|
|
326
|
+
runtime: 'running',
|
|
327
|
+
deployedAt: now,
|
|
328
|
+
lastError: null,
|
|
329
|
+
versionId: versionId ?? null,
|
|
330
|
+
publishedAt: versionId ? now : null,
|
|
331
|
+
moduleCount: 0,
|
|
332
|
+
containerId: result.containerId ?? null,
|
|
333
|
+
port,
|
|
334
|
+
environmentId: resolved.environmentId,
|
|
335
|
+
projectPath,
|
|
336
|
+
source: storedSource,
|
|
337
|
+
healthcheckRetryCount: 0,
|
|
338
|
+
envVars,
|
|
339
|
+
});
|
|
340
|
+
this.logger.log(`Deployed ${projectId}/${employeeId} (${env}) → ${result.containerId} on port ${port}`);
|
|
341
|
+
this.eventsService.create({
|
|
342
|
+
userId,
|
|
343
|
+
projectId,
|
|
344
|
+
employeeId,
|
|
345
|
+
env,
|
|
346
|
+
type: 'start',
|
|
347
|
+
message: 'Deployment started successfully',
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
catch (err) {
|
|
351
|
+
const errMsg = err instanceof Error ? err.message : String(err);
|
|
352
|
+
this.runtimeStore.updateField(projectId, employeeId, env, {
|
|
353
|
+
runtime: 'failed',
|
|
354
|
+
lastError: errMsg,
|
|
355
|
+
});
|
|
356
|
+
this.eventsService.create({
|
|
357
|
+
userId,
|
|
358
|
+
projectId,
|
|
359
|
+
employeeId,
|
|
360
|
+
env,
|
|
361
|
+
type: 'error',
|
|
362
|
+
message: errMsg,
|
|
363
|
+
});
|
|
364
|
+
this.notificationsService
|
|
365
|
+
.notifyOnFailure(userId ?? '__anonymous__', {
|
|
366
|
+
projectId,
|
|
367
|
+
employeeId,
|
|
368
|
+
env,
|
|
369
|
+
type: 'error',
|
|
370
|
+
message: errMsg,
|
|
371
|
+
})
|
|
372
|
+
.catch((notifyErr) => {
|
|
373
|
+
this.logger.warn(`Failed to send failure notification: ${notifyErr}`);
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
finally {
|
|
377
|
+
this.deploying.delete(deployKey);
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
async stop(projectId, employeeId, env) {
|
|
381
|
+
const existing = this.runtimeStore.get(projectId, employeeId, env);
|
|
382
|
+
if (existing?.runtime === 'stopped') {
|
|
383
|
+
throw new employee_deployment_errors_1.AlreadyInStateError(employeeId, env, 'stopped');
|
|
384
|
+
}
|
|
385
|
+
if (existing?.containerId) {
|
|
386
|
+
const resolved = this.resolveEnvironment(existing.environmentId ?? undefined);
|
|
387
|
+
if (existing.projectPath) {
|
|
388
|
+
await this.logsService.saveStdoutLogsBeforeStop(existing.containerId, existing.projectPath, resolved.providerType);
|
|
389
|
+
}
|
|
390
|
+
await resolved.provider.stop(existing.containerId);
|
|
391
|
+
if (existing.envVars?.COGNITO_USER_POOL_ID) {
|
|
392
|
+
try {
|
|
393
|
+
await this.cognitoProvisioner.deletePool(existing.envVars.COGNITO_USER_POOL_ID);
|
|
394
|
+
}
|
|
395
|
+
catch (err) {
|
|
396
|
+
this.logger.error(`Failed to delete Cognito pool: ${err}`);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
const appConfigStr = existing.envVars?.APP_CONFIG;
|
|
400
|
+
if (appConfigStr) {
|
|
401
|
+
try {
|
|
402
|
+
const appConfig = JSON.parse(appConfigStr);
|
|
403
|
+
const storeConfig = appConfig.store;
|
|
404
|
+
const dbname = storeConfig?.dbname;
|
|
405
|
+
if (storeConfig?.type === 'postgres' && dbname) {
|
|
406
|
+
let isSharedDb = false;
|
|
407
|
+
try {
|
|
408
|
+
const project = await this.projectsDataService.get(projectId);
|
|
409
|
+
isSharedDb = project?.dbName === dbname;
|
|
410
|
+
}
|
|
411
|
+
catch {
|
|
412
|
+
}
|
|
413
|
+
if (!isSharedDb) {
|
|
414
|
+
await this.postgresProvisioner.dropDatabase(dbname);
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
catch (err) {
|
|
419
|
+
this.logger.error(`Failed to drop database: ${err}`);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
this.runtimeStore.set(projectId, employeeId, env, {
|
|
424
|
+
userId: existing?.userId ?? null,
|
|
425
|
+
runtime: 'stopped',
|
|
426
|
+
deployedAt: existing?.deployedAt ?? null,
|
|
427
|
+
lastError: null,
|
|
428
|
+
versionId: existing?.versionId ?? null,
|
|
429
|
+
publishedAt: existing?.publishedAt ?? null,
|
|
430
|
+
moduleCount: existing?.moduleCount ?? 0,
|
|
431
|
+
containerId: null,
|
|
432
|
+
port: null,
|
|
433
|
+
environmentId: existing?.environmentId ?? null,
|
|
434
|
+
projectPath: existing?.projectPath ?? null,
|
|
435
|
+
source: existing?.source ?? null,
|
|
436
|
+
healthcheckRetryCount: 0,
|
|
437
|
+
envVars: existing?.envVars ?? null,
|
|
438
|
+
});
|
|
439
|
+
this.logger.log(`Stopped ${projectId}/${employeeId} (${env})`);
|
|
440
|
+
this.eventsService.create({
|
|
441
|
+
userId: existing?.userId,
|
|
442
|
+
projectId,
|
|
443
|
+
employeeId,
|
|
444
|
+
env,
|
|
445
|
+
type: 'stop',
|
|
446
|
+
message: 'Deployment stopped',
|
|
447
|
+
});
|
|
448
|
+
return {
|
|
449
|
+
projectId,
|
|
450
|
+
employeeId,
|
|
451
|
+
env,
|
|
452
|
+
runtime: 'stopped',
|
|
453
|
+
deployedAt: existing?.deployedAt ?? new Date().toISOString(),
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
async pause(projectId, employeeId, env) {
|
|
457
|
+
const existing = this.runtimeStore.get(projectId, employeeId, env);
|
|
458
|
+
if (!existing || existing.runtime !== 'running') {
|
|
459
|
+
throw new employee_deployment_errors_1.InvalidStateTransitionError(employeeId, env, existing?.runtime ?? 'unknown', 'paused');
|
|
460
|
+
}
|
|
461
|
+
if (existing.containerId) {
|
|
462
|
+
const resolved = this.resolveEnvironment(existing.environmentId ?? undefined);
|
|
463
|
+
if (existing.projectPath) {
|
|
464
|
+
await this.logsService.saveStdoutLogsBeforeStop(existing.containerId, existing.projectPath, resolved.providerType);
|
|
465
|
+
}
|
|
466
|
+
await resolved.provider.stop(existing.containerId);
|
|
467
|
+
}
|
|
468
|
+
this.runtimeStore.set(projectId, employeeId, env, {
|
|
469
|
+
...existing,
|
|
470
|
+
runtime: 'paused',
|
|
471
|
+
lastError: null,
|
|
472
|
+
containerId: null,
|
|
473
|
+
});
|
|
474
|
+
this.logger.log(`Paused ${projectId}/${employeeId} (${env})`);
|
|
475
|
+
this.eventsService.create({
|
|
476
|
+
userId: existing.userId,
|
|
477
|
+
projectId,
|
|
478
|
+
employeeId,
|
|
479
|
+
env,
|
|
480
|
+
type: 'stop',
|
|
481
|
+
message: 'Deployment paused',
|
|
482
|
+
});
|
|
483
|
+
return {
|
|
484
|
+
projectId,
|
|
485
|
+
employeeId,
|
|
486
|
+
env,
|
|
487
|
+
runtime: 'paused',
|
|
488
|
+
deployedAt: existing.deployedAt ?? new Date().toISOString(),
|
|
489
|
+
versionId: existing.versionId ?? undefined,
|
|
490
|
+
containerId: existing.containerId ?? undefined,
|
|
491
|
+
port: existing.port ?? undefined,
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
async resume(projectId, employeeId, env) {
|
|
495
|
+
const existing = this.runtimeStore.get(projectId, employeeId, env);
|
|
496
|
+
if (!existing ||
|
|
497
|
+
(existing.runtime !== 'paused' && existing.runtime !== 'stopped')) {
|
|
498
|
+
throw new employee_deployment_errors_1.InvalidStateTransitionError(employeeId, env, existing?.runtime ?? 'unknown', 'running');
|
|
499
|
+
}
|
|
500
|
+
if (existing.runtime === 'stopped') {
|
|
501
|
+
return this.deploy(projectId, employeeId, env, existing.environmentId ?? undefined);
|
|
502
|
+
}
|
|
503
|
+
const resolved = this.resolveEnvironment(existing.environmentId ?? undefined);
|
|
504
|
+
const name = this.processName(projectId, employeeId, env);
|
|
505
|
+
const projectPath = existing.projectPath;
|
|
506
|
+
const port = existing.port ?? this.portAllocator.allocate();
|
|
507
|
+
const now = new Date().toISOString();
|
|
508
|
+
const envVars = existing.envVars ?? resolved.envVars;
|
|
509
|
+
const result = await resolved.provider.deploy(name, projectPath, envVars, port, { projectId, employeeId });
|
|
510
|
+
if (!result.success) {
|
|
511
|
+
this.runtimeStore.set(projectId, employeeId, env, {
|
|
512
|
+
...existing,
|
|
513
|
+
runtime: 'crashed',
|
|
514
|
+
lastError: result.error ?? 'Resume failed',
|
|
515
|
+
});
|
|
516
|
+
this.logger.error(`Failed to resume ${projectId}/${employeeId} (${env}): ${result.error}`);
|
|
517
|
+
this.eventsService.create({
|
|
518
|
+
userId: existing.userId,
|
|
519
|
+
projectId,
|
|
520
|
+
employeeId,
|
|
521
|
+
env,
|
|
522
|
+
type: 'error',
|
|
523
|
+
message: result.error ?? 'Resume failed',
|
|
524
|
+
});
|
|
525
|
+
return {
|
|
526
|
+
projectId,
|
|
527
|
+
employeeId,
|
|
528
|
+
env,
|
|
529
|
+
runtime: 'crashed',
|
|
530
|
+
deployedAt: existing.deployedAt ?? now,
|
|
531
|
+
versionId: existing.versionId ?? undefined,
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
this.runtimeStore.set(projectId, employeeId, env, {
|
|
535
|
+
...existing,
|
|
536
|
+
runtime: 'running',
|
|
537
|
+
deployedAt: now,
|
|
538
|
+
lastError: null,
|
|
539
|
+
containerId: result.containerId ?? existing.containerId,
|
|
540
|
+
port,
|
|
541
|
+
});
|
|
542
|
+
this.logger.log(`Resumed ${projectId}/${employeeId} (${env})`);
|
|
543
|
+
this.eventsService.create({
|
|
544
|
+
userId: existing.userId,
|
|
545
|
+
projectId,
|
|
546
|
+
employeeId,
|
|
547
|
+
env,
|
|
548
|
+
type: 'start',
|
|
549
|
+
message: 'Deployment resumed',
|
|
550
|
+
});
|
|
551
|
+
return {
|
|
552
|
+
projectId,
|
|
553
|
+
employeeId,
|
|
554
|
+
env,
|
|
555
|
+
runtime: 'running',
|
|
556
|
+
deployedAt: now,
|
|
557
|
+
versionId: existing.versionId ?? undefined,
|
|
558
|
+
containerId: result.containerId ?? existing.containerId ?? undefined,
|
|
559
|
+
port,
|
|
560
|
+
environmentId: existing.environmentId ?? undefined,
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
async restart(projectId, employeeId, env) {
|
|
564
|
+
const existing = this.runtimeStore.get(projectId, employeeId, env);
|
|
565
|
+
if (!existing?.containerId) {
|
|
566
|
+
throw new employee_deployment_errors_1.EmployeeNotFoundError(projectId, employeeId);
|
|
567
|
+
}
|
|
568
|
+
const resolved = this.resolveEnvironment(existing.environmentId ?? undefined);
|
|
569
|
+
await resolved.provider.restart(existing.containerId);
|
|
570
|
+
const now = new Date().toISOString();
|
|
571
|
+
this.runtimeStore.set(projectId, employeeId, env, {
|
|
572
|
+
...existing,
|
|
573
|
+
runtime: 'running',
|
|
574
|
+
deployedAt: now,
|
|
575
|
+
lastError: null,
|
|
576
|
+
});
|
|
577
|
+
this.logger.log(`Restarted ${projectId}/${employeeId} (${env})`);
|
|
578
|
+
this.eventsService.create({
|
|
579
|
+
userId: existing.userId,
|
|
580
|
+
projectId,
|
|
581
|
+
employeeId,
|
|
582
|
+
env,
|
|
583
|
+
type: 'restart',
|
|
584
|
+
message: 'Deployment restarted',
|
|
585
|
+
});
|
|
586
|
+
return {
|
|
587
|
+
projectId,
|
|
588
|
+
employeeId,
|
|
589
|
+
env,
|
|
590
|
+
runtime: 'running',
|
|
591
|
+
deployedAt: now,
|
|
592
|
+
versionId: existing.versionId ?? undefined,
|
|
593
|
+
containerId: existing.containerId,
|
|
594
|
+
port: existing.port ?? undefined,
|
|
595
|
+
};
|
|
596
|
+
}
|
|
597
|
+
async publish(projectId, employeeId) {
|
|
598
|
+
const version = this.versionsService.create(projectId, employeeId);
|
|
599
|
+
this.logger.log(`Published ${projectId}/${employeeId} as ${version.versionId}`);
|
|
600
|
+
const existing = this.runtimeStore.get(projectId, employeeId, 'live');
|
|
601
|
+
return this.deploy(projectId, employeeId, 'live', existing?.environmentId ?? undefined);
|
|
602
|
+
}
|
|
603
|
+
async unpublish(projectId, employeeId) {
|
|
604
|
+
const result = await this.stop(projectId, employeeId, 'live');
|
|
605
|
+
this.runtimeStore.delete(projectId, employeeId, 'live');
|
|
606
|
+
this.logger.log(`Unpublished ${projectId}/${employeeId}`);
|
|
607
|
+
return result;
|
|
608
|
+
}
|
|
609
|
+
async rollback(projectId, employeeId, versionId) {
|
|
610
|
+
const version = versionId
|
|
611
|
+
? this.versionsService.get(projectId, employeeId, versionId)
|
|
612
|
+
: this.versionsService.getPrevious(projectId, employeeId);
|
|
613
|
+
if (!version) {
|
|
614
|
+
throw new employee_deployment_errors_1.NoLiveVersionError(projectId, employeeId);
|
|
615
|
+
}
|
|
616
|
+
const existing = this.runtimeStore.get(projectId, employeeId, 'live');
|
|
617
|
+
if (existing?.containerId) {
|
|
618
|
+
try {
|
|
619
|
+
const resolved = this.resolveEnvironment(existing.environmentId ?? undefined);
|
|
620
|
+
await resolved.provider.stop(existing.containerId);
|
|
621
|
+
}
|
|
622
|
+
catch (err) {
|
|
623
|
+
this.logger.warn(`Best-effort stop before rollback failed for ${projectId}/${employeeId}: ${err instanceof Error ? err.message : err}`);
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
return this.deploy(projectId, employeeId, 'live', existing?.environmentId ?? undefined);
|
|
627
|
+
}
|
|
628
|
+
getStatus(projectId, employeeId) {
|
|
629
|
+
const draft = this.runtimeStore.get(projectId, employeeId, 'draft');
|
|
630
|
+
const live = this.runtimeStore.get(projectId, employeeId, 'live');
|
|
631
|
+
return {
|
|
632
|
+
projectId,
|
|
633
|
+
employeeId,
|
|
634
|
+
draft: this.runtimeStore.toDraftInfo(draft),
|
|
635
|
+
live: this.runtimeStore.toLiveInfo(live),
|
|
636
|
+
draftAheadOfLive: !!draft?.deployedAt &&
|
|
637
|
+
(!live?.deployedAt || draft.deployedAt > live.deployedAt),
|
|
638
|
+
};
|
|
639
|
+
}
|
|
640
|
+
getBulkStatus(projectId) {
|
|
641
|
+
const entries = this.runtimeStore.listByProject(projectId);
|
|
642
|
+
const employeeIds = [...new Set(entries.map((e) => e.employeeId))];
|
|
643
|
+
return employeeIds.map((id) => this.getStatus(projectId, id));
|
|
644
|
+
}
|
|
645
|
+
resolve(projectId, employeeId, env) {
|
|
646
|
+
const entry = this.runtimeStore.get(projectId, employeeId, env);
|
|
647
|
+
return {
|
|
648
|
+
projectId,
|
|
649
|
+
employeeId,
|
|
650
|
+
env,
|
|
651
|
+
runtime: entry?.runtime ?? 'stopped',
|
|
652
|
+
endpoint: entry?.runtime === 'running' && entry.port
|
|
653
|
+
? `http://localhost:${entry.port}`
|
|
654
|
+
: null,
|
|
655
|
+
port: entry?.port ?? null,
|
|
656
|
+
containerId: entry?.containerId ?? null,
|
|
657
|
+
capabilities: [],
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
async recoverIfProcessMissing(projectId, employeeId, env) {
|
|
661
|
+
const existing = this.runtimeStore.get(projectId, employeeId, env);
|
|
662
|
+
if (!existing || existing.runtime !== 'running' || !existing.containerId) {
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
const deployKey = `${projectId}/${employeeId}/${env}`;
|
|
666
|
+
if (this.deploying.has(deployKey)) {
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
const resolved = this.resolveEnvironment(existing.environmentId ?? undefined);
|
|
670
|
+
const provider = resolved.provider;
|
|
671
|
+
let status;
|
|
672
|
+
try {
|
|
673
|
+
status = await provider.getStatus(existing.containerId);
|
|
674
|
+
}
|
|
675
|
+
catch (err) {
|
|
676
|
+
this.logger.warn(`Deployment watcher: getStatus failed for ${projectId}/${employeeId} (${env}): ${err instanceof Error ? err.message : err}`);
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
if (status === 'running') {
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
this.logger.warn(`Deployment watcher: ${projectId}/${employeeId} (${env}) provider status is "${status}" but Fabric state is running — recovering`);
|
|
683
|
+
if (status === 'stopped') {
|
|
684
|
+
try {
|
|
685
|
+
await provider.restart(existing.containerId);
|
|
686
|
+
const after = await provider.getStatus(existing.containerId);
|
|
687
|
+
if (after === 'running') {
|
|
688
|
+
this.eventsService.create({
|
|
689
|
+
userId: existing.userId,
|
|
690
|
+
projectId,
|
|
691
|
+
employeeId,
|
|
692
|
+
env,
|
|
693
|
+
type: 'watcher_recover',
|
|
694
|
+
message: 'Process was stopped externally; provider restart succeeded.',
|
|
695
|
+
});
|
|
696
|
+
return;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
catch (err) {
|
|
700
|
+
this.logger.warn(`Deployment watcher: restart failed for ${projectId}/${employeeId} (${env}): ${err instanceof Error ? err.message : err}`);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
try {
|
|
704
|
+
await this.deploy(projectId, employeeId, env, existing.environmentId ?? undefined, undefined, existing.userId);
|
|
705
|
+
this.eventsService.create({
|
|
706
|
+
userId: existing.userId,
|
|
707
|
+
projectId,
|
|
708
|
+
employeeId,
|
|
709
|
+
env,
|
|
710
|
+
type: 'watcher_recover',
|
|
711
|
+
message: status === 'not_found'
|
|
712
|
+
? 'Process no longer present in provider; redeploy started.'
|
|
713
|
+
: 'Restart failed or process still down; redeploy started.',
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
catch (err) {
|
|
717
|
+
if (err instanceof employee_deployment_errors_1.AlreadyInStateError) {
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
this.logger.error(`Deployment watcher: redeploy failed for ${projectId}/${employeeId} (${env}): ${err instanceof Error ? err.message : err}`);
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
async getLogs(projectId, employeeId, env, options) {
|
|
724
|
+
const entry = this.runtimeStore.get(projectId, employeeId, env);
|
|
725
|
+
const providerType = entry?.environmentId
|
|
726
|
+
? this.resolveEnvironment(entry.environmentId).providerType
|
|
727
|
+
: null;
|
|
728
|
+
return this.logsService.getDeploymentLogs(entry?.containerId ?? null, entry?.projectPath ?? null, providerType, {
|
|
729
|
+
type: options?.type ?? 'stdout',
|
|
730
|
+
date: options?.date,
|
|
731
|
+
tail: options?.tail,
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
async undeploy(projectId, employeeId, track, fabricEnvironmentId) {
|
|
735
|
+
const existing = this.runtimeStore.get(projectId, employeeId, track);
|
|
736
|
+
if (!existing) {
|
|
737
|
+
throw new employee_deployment_errors_1.EmployeeNotFoundError(projectId, employeeId);
|
|
738
|
+
}
|
|
739
|
+
const project = await this.projectsDataService.get(projectId);
|
|
740
|
+
const expectedEnvId = existing.environmentId ?? project?.environmentId ?? null;
|
|
741
|
+
const resolvedFabricEnvId = fabricEnvironmentId ?? (expectedEnvId || undefined);
|
|
742
|
+
if (!resolvedFabricEnvId) {
|
|
743
|
+
throw new employee_deployment_errors_1.UndeployEnvironmentUnresolvedError(projectId, employeeId, track);
|
|
744
|
+
}
|
|
745
|
+
if (expectedEnvId && resolvedFabricEnvId !== expectedEnvId) {
|
|
746
|
+
throw new employee_deployment_errors_1.DeploymentEnvironmentMismatchError(projectId, employeeId, track, expectedEnvId, resolvedFabricEnvId);
|
|
747
|
+
}
|
|
748
|
+
if (!expectedEnvId) {
|
|
749
|
+
this.environmentsService.get(resolvedFabricEnvId);
|
|
750
|
+
}
|
|
751
|
+
if (employees_types_1.ACTIVE_DEPLOYMENT_STATUSES.includes(existing.runtime)) {
|
|
752
|
+
await this.stop(projectId, employeeId, track);
|
|
753
|
+
}
|
|
754
|
+
const { removed } = await this.remove(projectId, employeeId, track);
|
|
755
|
+
return { removed, projectId, employeeId, env: track };
|
|
756
|
+
}
|
|
757
|
+
async remove(projectId, employeeId, env) {
|
|
758
|
+
const existing = this.runtimeStore.get(projectId, employeeId, env);
|
|
759
|
+
if (!existing) {
|
|
760
|
+
throw new employee_deployment_errors_1.EmployeeNotFoundError(projectId, employeeId);
|
|
761
|
+
}
|
|
762
|
+
if (existing.runtime !== 'stopped' &&
|
|
763
|
+
existing.runtime !== 'failed' &&
|
|
764
|
+
existing.runtime !== 'crashed') {
|
|
765
|
+
throw new employee_deployment_errors_1.CannotRemoveError(employeeId, env, existing.runtime);
|
|
766
|
+
}
|
|
767
|
+
this.runtimeStore.delete(projectId, employeeId, env);
|
|
768
|
+
this.logger.log(`Removed ${projectId}/${employeeId} (${env})`);
|
|
769
|
+
this.eventsService.create({
|
|
770
|
+
userId: existing.userId,
|
|
771
|
+
projectId,
|
|
772
|
+
employeeId,
|
|
773
|
+
env,
|
|
774
|
+
type: 'remove',
|
|
775
|
+
message: 'Deployment removed',
|
|
776
|
+
});
|
|
777
|
+
await Promise.resolve();
|
|
778
|
+
return { removed: true };
|
|
779
|
+
}
|
|
780
|
+
async reconfigureDbAndRedeploy(projectId, employeeId, env) {
|
|
781
|
+
const existing = this.runtimeStore.get(projectId, employeeId, env);
|
|
782
|
+
if (!existing?.projectPath || !existing.envVars)
|
|
783
|
+
return null;
|
|
784
|
+
const appConfigStr = existing.envVars.APP_CONFIG ?? '{}';
|
|
785
|
+
let appConfig;
|
|
786
|
+
try {
|
|
787
|
+
appConfig = JSON.parse(appConfigStr);
|
|
788
|
+
}
|
|
789
|
+
catch {
|
|
790
|
+
return null;
|
|
791
|
+
}
|
|
792
|
+
const storeConfig = appConfig.store;
|
|
793
|
+
if (storeConfig?.type !== 'postgres')
|
|
794
|
+
return null;
|
|
795
|
+
const resolved = this.resolveEnvironment(existing.environmentId ?? undefined);
|
|
796
|
+
const name = this.processName(projectId, employeeId, env);
|
|
797
|
+
try {
|
|
798
|
+
const creds = await this.postgresProvisioner.createNewDatabase(`${projectId}_${employeeId}_${env}`);
|
|
799
|
+
const newStoreConfig = {
|
|
800
|
+
...storeConfig,
|
|
801
|
+
dbname: creds.dbname,
|
|
802
|
+
host: creds.host,
|
|
803
|
+
port: creds.port,
|
|
804
|
+
username: creds.username,
|
|
805
|
+
password: creds.password,
|
|
806
|
+
};
|
|
807
|
+
const newAppConfig = { ...appConfig, store: newStoreConfig };
|
|
808
|
+
const newEnvVars = {
|
|
809
|
+
...existing.envVars,
|
|
810
|
+
APP_CONFIG: JSON.stringify(newAppConfig),
|
|
811
|
+
};
|
|
812
|
+
if (existing.containerId) {
|
|
813
|
+
if (existing.projectPath) {
|
|
814
|
+
await this.logsService.saveStdoutLogsBeforeStop(existing.containerId, existing.projectPath, resolved.providerType);
|
|
815
|
+
}
|
|
816
|
+
await resolved.provider.stop(existing.containerId);
|
|
817
|
+
}
|
|
818
|
+
const now = new Date().toISOString();
|
|
819
|
+
this.runtimeStore.set(projectId, employeeId, env, {
|
|
820
|
+
...existing,
|
|
821
|
+
envVars: newEnvVars,
|
|
822
|
+
containerId: null,
|
|
823
|
+
runtime: 'deploying',
|
|
824
|
+
lastError: null,
|
|
825
|
+
healthcheckRetryCount: 0,
|
|
826
|
+
});
|
|
827
|
+
const result = await resolved.provider.deploy(name, existing.projectPath, newEnvVars, existing.port, { projectId, employeeId });
|
|
828
|
+
if (!result.success) {
|
|
829
|
+
this.runtimeStore.updateField(projectId, employeeId, env, {
|
|
830
|
+
runtime: 'failed',
|
|
831
|
+
lastError: result.error ?? 'Reconfigure deploy failed',
|
|
832
|
+
});
|
|
833
|
+
this.eventsService.create({
|
|
834
|
+
userId: existing.userId,
|
|
835
|
+
projectId,
|
|
836
|
+
employeeId,
|
|
837
|
+
env,
|
|
838
|
+
type: 'error',
|
|
839
|
+
message: result.error ?? 'Reconfigure deploy failed',
|
|
840
|
+
});
|
|
841
|
+
return {
|
|
842
|
+
projectId,
|
|
843
|
+
employeeId,
|
|
844
|
+
env,
|
|
845
|
+
runtime: 'failed',
|
|
846
|
+
deployedAt: existing.deployedAt ?? now,
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
this.runtimeStore.set(projectId, employeeId, env, {
|
|
850
|
+
...existing,
|
|
851
|
+
runtime: 'running',
|
|
852
|
+
containerId: result.containerId ?? null,
|
|
853
|
+
envVars: newEnvVars,
|
|
854
|
+
lastError: null,
|
|
855
|
+
healthcheckRetryCount: 0,
|
|
856
|
+
});
|
|
857
|
+
this.eventsService.create({
|
|
858
|
+
userId: existing.userId,
|
|
859
|
+
projectId,
|
|
860
|
+
employeeId,
|
|
861
|
+
env,
|
|
862
|
+
type: 'restart',
|
|
863
|
+
message: 'Database reconfigured and deployment redeployed',
|
|
864
|
+
});
|
|
865
|
+
this.logger.log(`Reconfigured DB and redeployed ${projectId}/${employeeId} (${env})`);
|
|
866
|
+
return {
|
|
867
|
+
projectId,
|
|
868
|
+
employeeId,
|
|
869
|
+
env,
|
|
870
|
+
runtime: 'running',
|
|
871
|
+
deployedAt: now,
|
|
872
|
+
containerId: result.containerId ?? undefined,
|
|
873
|
+
port: existing.port ?? undefined,
|
|
874
|
+
};
|
|
875
|
+
}
|
|
876
|
+
catch (err) {
|
|
877
|
+
const errMsg = err instanceof Error ? err.message : String(err);
|
|
878
|
+
this.runtimeStore.updateField(projectId, employeeId, env, {
|
|
879
|
+
runtime: 'failed',
|
|
880
|
+
lastError: errMsg,
|
|
881
|
+
});
|
|
882
|
+
this.eventsService.create({
|
|
883
|
+
userId: existing.userId,
|
|
884
|
+
projectId,
|
|
885
|
+
employeeId,
|
|
886
|
+
env,
|
|
887
|
+
type: 'error',
|
|
888
|
+
message: errMsg,
|
|
889
|
+
});
|
|
890
|
+
return null;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
async checkHealth(projectId, employeeId, env) {
|
|
894
|
+
const entry = this.runtimeStore.get(projectId, employeeId, env);
|
|
895
|
+
if (!entry?.port || entry.runtime !== 'running') {
|
|
896
|
+
return { ok: false, error: 'Deployment not running' };
|
|
897
|
+
}
|
|
898
|
+
const url = `http://localhost:${entry.port}/health`;
|
|
899
|
+
try {
|
|
900
|
+
const controller = new AbortController();
|
|
901
|
+
const timeout = setTimeout(() => controller.abort(), 5000);
|
|
902
|
+
const res = await fetch(url, {
|
|
903
|
+
method: 'GET',
|
|
904
|
+
signal: controller.signal,
|
|
905
|
+
});
|
|
906
|
+
clearTimeout(timeout);
|
|
907
|
+
let healthData;
|
|
908
|
+
try {
|
|
909
|
+
const text = await res.text();
|
|
910
|
+
healthData = text
|
|
911
|
+
? JSON.parse(text)
|
|
912
|
+
: undefined;
|
|
913
|
+
}
|
|
914
|
+
catch {
|
|
915
|
+
}
|
|
916
|
+
if (res.ok) {
|
|
917
|
+
return { ok: true, status: res.status, healthData };
|
|
918
|
+
}
|
|
919
|
+
return {
|
|
920
|
+
ok: false,
|
|
921
|
+
status: res.status,
|
|
922
|
+
error: `HTTP ${res.status}`,
|
|
923
|
+
healthData,
|
|
924
|
+
};
|
|
925
|
+
}
|
|
926
|
+
catch (err) {
|
|
927
|
+
const error = err instanceof Error ? err.message : String(err);
|
|
928
|
+
return { ok: false, error };
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
};
|
|
932
|
+
exports.EmployeesService = EmployeesService;
|
|
933
|
+
exports.EmployeesService = EmployeesService = EmployeesService_1 = __decorate([
|
|
934
|
+
(0, common_1.Injectable)(),
|
|
935
|
+
__param(2, (0, common_1.Inject)(provider_interface_1.DEPLOYMENT_PROVIDER)),
|
|
936
|
+
__param(12, (0, common_1.Inject)(configuration_1.default.KEY)),
|
|
937
|
+
__param(14, (0, common_1.Optional)()),
|
|
938
|
+
__param(14, (0, common_1.Inject)(project_provider_1.REGISTRY_PROVIDER)),
|
|
939
|
+
__param(15, (0, common_1.Optional)()),
|
|
940
|
+
__param(15, (0, common_1.Inject)(project_provider_1.REGISTRY_PATH)),
|
|
941
|
+
__metadata("design:paramtypes", [runtime_store_1.RuntimeStore,
|
|
942
|
+
versions_service_1.VersionsService, Object, provider_factory_1.ProviderFactory,
|
|
943
|
+
port_allocator_1.PortAllocator,
|
|
944
|
+
environments_service_1.EnvironmentsService,
|
|
945
|
+
project_source_service_1.ProjectSourceService,
|
|
946
|
+
deployment_events_service_1.DeploymentEventsService,
|
|
947
|
+
logs_service_1.LogsService,
|
|
948
|
+
notifications_service_1.NotificationsService,
|
|
949
|
+
postgres_provisioner_service_1.PostgresProvisionerService,
|
|
950
|
+
cognito_provisioner_service_1.CognitoProvisionerService, void 0, projects_data_service_1.ProjectsDataService, Object, Object])
|
|
951
|
+
], EmployeesService);
|
|
952
|
+
//# sourceMappingURL=employees.service.js.map
|