@shepai/cli 1.136.0-pr439.2a7af41 → 1.136.0-pr441.5eaafd1
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/apis/json-schema/FeatureFlags.yaml +5 -0
- package/apis/json-schema/NotificationEventConfig.yaml +15 -0
- package/apis/json-schema/NotificationEventType.yaml +3 -0
- package/apis/json-schema/Repository.yaml +0 -3
- package/apis/json-schema/ScheduledWorkflow.yaml +46 -0
- package/apis/json-schema/WorkflowExecution.yaml +38 -0
- package/apis/json-schema/WorkflowExecutionStatus.yaml +10 -0
- package/apis/json-schema/WorkflowTriggerType.yaml +7 -0
- package/dist/packages/core/src/application/index.d.ts +1 -1
- package/dist/packages/core/src/application/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/index.d.ts +1 -1
- package/dist/packages/core/src/application/ports/output/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/repositories/index.d.ts +2 -0
- package/dist/packages/core/src/application/ports/output/repositories/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts +1 -1
- package/dist/packages/core/src/application/ports/output/repositories/repository-repository.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/repositories/workflow-execution-repository.interface.d.ts +66 -0
- package/dist/packages/core/src/application/ports/output/repositories/workflow-execution-repository.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/repositories/workflow-execution-repository.interface.js +11 -0
- package/dist/packages/core/src/application/ports/output/repositories/workflow-repository.interface.d.ts +81 -0
- package/dist/packages/core/src/application/ports/output/repositories/workflow-repository.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/repositories/workflow-repository.interface.js +11 -0
- package/dist/packages/core/src/application/ports/output/services/clock.interface.d.ts +28 -0
- package/dist/packages/core/src/application/ports/output/services/clock.interface.d.ts.map +1 -0
- package/dist/packages/core/src/application/ports/output/services/clock.interface.js +13 -0
- package/dist/packages/core/src/application/ports/output/services/index.d.ts +2 -1
- package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts +5 -21
- package/dist/packages/core/src/application/ports/output/services/spec-initializer.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +2 -8
- package/dist/packages/core/src/application/use-cases/workflows/create-workflow.use-case.d.ts +28 -0
- package/dist/packages/core/src/application/use-cases/workflows/create-workflow.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/workflows/create-workflow.use-case.js +72 -0
- package/dist/packages/core/src/application/use-cases/workflows/cron-helpers.d.ts +27 -0
- package/dist/packages/core/src/application/use-cases/workflows/cron-helpers.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/workflows/cron-helpers.js +43 -0
- package/dist/packages/core/src/application/use-cases/workflows/delete-workflow.use-case.d.ts +18 -0
- package/dist/packages/core/src/application/use-cases/workflows/delete-workflow.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/workflows/delete-workflow.use-case.js +64 -0
- package/dist/packages/core/src/application/use-cases/workflows/get-workflow-history.use-case.d.ts +16 -0
- package/dist/packages/core/src/application/use-cases/workflows/get-workflow-history.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/workflows/get-workflow-history.use-case.js +46 -0
- package/dist/packages/core/src/application/use-cases/workflows/get-workflow.use-case.d.ts +13 -0
- package/dist/packages/core/src/application/use-cases/workflows/get-workflow.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/workflows/get-workflow.use-case.js +42 -0
- package/dist/packages/core/src/application/use-cases/workflows/list-workflows.use-case.d.ts +13 -0
- package/dist/packages/core/src/application/use-cases/workflows/list-workflows.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/workflows/list-workflows.use-case.js +33 -0
- package/dist/packages/core/src/application/use-cases/workflows/run-workflow.use-case.d.ts +19 -0
- package/dist/packages/core/src/application/use-cases/workflows/run-workflow.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/workflows/run-workflow.use-case.js +62 -0
- package/dist/packages/core/src/application/use-cases/workflows/schedule-workflow.use-case.d.ts +22 -0
- package/dist/packages/core/src/application/use-cases/workflows/schedule-workflow.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/workflows/schedule-workflow.use-case.js +73 -0
- package/dist/packages/core/src/application/use-cases/workflows/templates/branch-rebase.template.d.ts +9 -0
- package/dist/packages/core/src/application/use-cases/workflows/templates/branch-rebase.template.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/workflows/templates/branch-rebase.template.js +27 -0
- package/dist/packages/core/src/application/use-cases/workflows/templates/issue-triage.template.d.ts +11 -0
- package/dist/packages/core/src/application/use-cases/workflows/templates/issue-triage.template.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/workflows/templates/issue-triage.template.js +27 -0
- package/dist/packages/core/src/application/use-cases/workflows/toggle-workflow.use-case.d.ts +16 -0
- package/dist/packages/core/src/application/use-cases/workflows/toggle-workflow.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/workflows/toggle-workflow.use-case.js +60 -0
- package/dist/packages/core/src/application/use-cases/workflows/update-workflow.use-case.d.ts +25 -0
- package/dist/packages/core/src/application/use-cases/workflows/update-workflow.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/workflows/update-workflow.use-case.js +83 -0
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.d.ts.map +1 -1
- package/dist/packages/core/src/domain/factories/settings-defaults.factory.js +4 -0
- package/dist/packages/core/src/domain/generated/output.d.ts +112 -3
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/domain/generated/output.js +16 -0
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +66 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/repository.mapper.d.ts +0 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/repository.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/repository.mapper.js +0 -2
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +4 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +8 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/workflow-execution.mapper.d.ts +46 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/workflow-execution.mapper.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/workflow-execution.mapper.js +57 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/workflow.mapper.d.ts +51 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/workflow.mapper.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/workflow.mapper.js +71 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-workflow-notification-events.d.ts +12 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-workflow-notification-events.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-workflow-notification-events.js +22 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/045-create-scheduled-workflows.d.ts +14 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/045-create-scheduled-workflows.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/045-create-scheduled-workflows.js +65 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/046-add-feature-flag-scheduled-workflows.d.ts +11 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/046-add-feature-flag-scheduled-workflows.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/046-add-feature-flag-scheduled-workflows.js +17 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/repositories/sqlite-repository.repository.js +2 -6
- package/dist/packages/core/src/infrastructure/repositories/sqlite-workflow-execution.repository.d.ts +24 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-workflow-execution.repository.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-workflow-execution.repository.js +92 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-workflow.repository.d.ts +26 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-workflow.repository.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/repositories/sqlite-workflow.repository.js +117 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/evidence-prompts.d.ts +2 -4
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/evidence-prompts.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/prompts/evidence-prompts.js +8 -15
- package/dist/packages/core/src/infrastructure/services/clock.d.ts +11 -0
- package/dist/packages/core/src/infrastructure/services/clock.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/clock.js +22 -0
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.js +4 -2
- package/dist/packages/core/src/infrastructure/services/ide-launchers/compute-worktree-path.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/ide-launchers/compute-worktree-path.js +4 -2
- package/dist/packages/core/src/infrastructure/services/notifications/notification.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/notifications/notification.service.js +3 -0
- package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts +3 -17
- package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.js +13 -49
- package/dist/packages/core/src/infrastructure/services/workflow-scheduler/workflow-scheduler.service.d.ts +69 -0
- package/dist/packages/core/src/infrastructure/services/workflow-scheduler/workflow-scheduler.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/workflow-scheduler/workflow-scheduler.service.js +270 -0
- package/dist/src/presentation/cli/commands/_serve.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/_serve.command.js +14 -0
- package/dist/src/presentation/cli/commands/workflow/create.command.d.ts +13 -0
- package/dist/src/presentation/cli/commands/workflow/create.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/workflow/create.command.js +83 -0
- package/dist/src/presentation/cli/commands/workflow/delete.command.d.ts +13 -0
- package/dist/src/presentation/cli/commands/workflow/delete.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/workflow/delete.command.js +50 -0
- package/dist/src/presentation/cli/commands/workflow/disable.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/workflow/disable.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/workflow/disable.command.js +32 -0
- package/dist/src/presentation/cli/commands/workflow/enable.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/workflow/enable.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/workflow/enable.command.js +35 -0
- package/dist/src/presentation/cli/commands/workflow/format-helpers.d.ts +35 -0
- package/dist/src/presentation/cli/commands/workflow/format-helpers.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/workflow/format-helpers.js +89 -0
- package/dist/src/presentation/cli/commands/workflow/history.command.d.ts +12 -0
- package/dist/src/presentation/cli/commands/workflow/history.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/workflow/history.command.js +46 -0
- package/dist/src/presentation/cli/commands/workflow/index.d.ts +26 -0
- package/dist/src/presentation/cli/commands/workflow/index.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/workflow/index.js +48 -0
- package/dist/src/presentation/cli/commands/workflow/list.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/workflow/list.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/workflow/list.command.js +52 -0
- package/dist/src/presentation/cli/commands/workflow/run.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/workflow/run.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/workflow/run.command.js +37 -0
- package/dist/src/presentation/cli/commands/workflow/schedule.command.d.ts +13 -0
- package/dist/src/presentation/cli/commands/workflow/schedule.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/workflow/schedule.command.js +76 -0
- package/dist/src/presentation/cli/commands/workflow/show.command.d.ts +11 -0
- package/dist/src/presentation/cli/commands/workflow/show.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/workflow/show.command.js +93 -0
- package/dist/src/presentation/cli/commands/workflow/update.command.d.ts +13 -0
- package/dist/src/presentation/cli/commands/workflow/update.command.d.ts.map +1 -0
- package/dist/src/presentation/cli/commands/workflow/update.command.js +67 -0
- package/dist/src/presentation/cli/index.js +2 -0
- package/dist/src/presentation/web/app/actions/get-workflow-history.d.ts +7 -0
- package/dist/src/presentation/web/app/actions/get-workflow-history.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/get-workflow-history.js +17 -0
- package/dist/src/presentation/web/app/actions/list-workflows.d.ts +7 -0
- package/dist/src/presentation/web/app/actions/list-workflows.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/list-workflows.js +17 -0
- package/dist/src/presentation/web/app/actions/toggle-workflow.d.ts +8 -0
- package/dist/src/presentation/web/app/actions/toggle-workflow.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/toggle-workflow.js +19 -0
- package/dist/src/presentation/web/app/actions/trigger-workflow.d.ts +8 -0
- package/dist/src/presentation/web/app/actions/trigger-workflow.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/trigger-workflow.js +19 -0
- package/dist/src/presentation/web/app/workflows/page.d.ts +4 -0
- package/dist/src/presentation/web/app/workflows/page.d.ts.map +1 -0
- package/dist/src/presentation/web/app/workflows/page.js +18 -0
- package/dist/src/presentation/web/components/common/feature-node/derive-feature-state.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/derive-feature-state.js +4 -0
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.js +3 -0
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/feature-flags-settings-section.stories.js +3 -0
- package/dist/src/presentation/web/components/features/settings/notification-settings-section.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/notification-settings-section.js +6 -1
- package/dist/src/presentation/web/components/features/settings/notification-settings-section.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/notification-settings-section.stories.js +6 -0
- package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.js +19 -2
- package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.stories.js +1 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-execution-history.d.ts +7 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-execution-history.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-execution-history.js +84 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-execution-history.stories.d.ts +11 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-execution-history.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-execution-history.stories.js +104 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-list-item.d.ts +8 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-list-item.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-list-item.js +68 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-list-item.stories.d.ts +11 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-list-item.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-list-item.stories.js +89 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-list.d.ts +8 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-list.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-list.js +10 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-list.stories.d.ts +11 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-list.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/workflows/workflow-list.stories.js +90 -0
- package/dist/src/presentation/web/components/features/workflows/workflows-page-client.d.ts +6 -0
- package/dist/src/presentation/web/components/features/workflows/workflows-page-client.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/workflows/workflows-page-client.js +14 -0
- package/dist/src/presentation/web/components/features/workflows/workflows-page-client.stories.d.ts +10 -0
- package/dist/src/presentation/web/components/features/workflows/workflows-page-client.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/features/workflows/workflows-page-client.stories.js +70 -0
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +2 -2
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.stories.js +1 -0
- package/dist/src/presentation/web/hooks/feature-flags-context.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/feature-flags-context.js +1 -0
- package/dist/src/presentation/web/lib/feature-flags.d.ts +2 -0
- package/dist/src/presentation/web/lib/feature-flags.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/feature-flags.js +5 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +2 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +1 -1
- package/web/.next/required-server-files.json +1 -1
- package/web/.next/routes-manifest.json +6 -0
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +25 -25
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +25 -25
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +23 -23
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +25 -25
- package/web/.next/server/app/(dashboard)/create/page.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +31 -31
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +23 -23
- package/web/.next/server/app/(dashboard)/page.js +1 -1
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +23 -23
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +3 -3
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/feature-logs/route.js +1 -1
- package/web/.next/server/app/api/feature-logs/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/settings/page.js +2 -2
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/skills/page.js +1 -1
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +8 -8
- package/web/.next/server/app/tools/page.js +1 -1
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +3 -3
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/workflows/page/app-paths-manifest.json +3 -0
- package/web/.next/server/app/workflows/page/build-manifest.json +18 -0
- package/web/.next/server/app/workflows/page/next-font-manifest.json +6 -0
- package/web/.next/server/app/workflows/page/react-loadable-manifest.json +8 -0
- package/web/.next/server/app/workflows/page/server-reference-manifest.json +110 -0
- package/web/.next/server/app/workflows/page.js +18 -0
- package/web/.next/server/app/workflows/page.js.map +5 -0
- package/web/.next/server/app/workflows/page.js.nft.json +1 -0
- package/web/.next/server/app/workflows/page_client-reference-manifest.js +2 -0
- package/web/.next/server/app-paths-manifest.json +2 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_370c43b1.js.map +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__c6e32a23._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__c6e32a23._.js.map +1 -1
- package/web/.next/server/chunks/{[root-of-the-server]__2b1074db._.js → [root-of-the-server]__c7d52490._.js} +2 -2
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_02ec1aea._.js → 403f9_next_53742624._.js} +2 -2
- package/web/.next/server/chunks/ssr/403f9_next_53742624._.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_b49d9c97.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web__next-internal_server_app_(dashboard)_@drawer_adopt_page_actions_b49d9c97.js.map +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_0c7787d0._.js +3 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_0c7787d0._.js.map +1 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_28632197.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_28632197.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_10695d37.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_10695d37.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__a5f9c6e5._.js → [root-of-the-server]__07f12984._.js} +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__07f12984._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__082758f6._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__082758f6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__32cd6108._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__32cd6108._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__33ac1a70._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__33ac1a70._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__43f51aa6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__44358910._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__44358910._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__f4e193d3._.js → [root-of-the-server]__47ded061._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__f4e193d3._.js.map → [root-of-the-server]__47ded061._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__3ef34e4c._.js → [root-of-the-server]__57e0ee34._.js} +3 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__57e0ee34._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__d68f61dd._.js → [root-of-the-server]__68ce373c._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__d68f61dd._.js.map → [root-of-the-server]__68ce373c._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6e93b49c._.js +3 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__b3dbadca._.js.map → [root-of-the-server]__6e93b49c._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__b1670307._.js → [root-of-the-server]__718766da._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__b1670307._.js.map → [root-of-the-server]__718766da._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__815546bd._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__785e8499._.js → [root-of-the-server]__fdd058b2._.js} +2 -2
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__785e8499._.js.map → [root-of-the-server]__fdd058b2._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_20a4a0d5._.js +3 -0
- package/web/.next/server/chunks/ssr/_20a4a0d5._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_25555eb5._.js +3 -0
- package/web/.next/server/chunks/ssr/_25555eb5._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_b5fc318a._.js → _277acdde._.js} +2 -2
- package/web/.next/server/chunks/ssr/_277acdde._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_4711e8cf._.js +3 -0
- package/web/.next/server/chunks/ssr/_4711e8cf._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_a9f57758._.js → _6701ee41._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_a9f57758._.js.map → _6701ee41._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_89a36303._.js +3 -0
- package/web/.next/server/chunks/ssr/_89a36303._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_32961561._.js → _8e8cd7e1._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_32961561._.js.map → _8e8cd7e1._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_9869d3da._.js +3 -0
- package/web/.next/server/chunks/ssr/_9869d3da._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_0020fddd._.js → _a3721140._.js} +2 -2
- package/web/.next/server/chunks/ssr/_a3721140._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_a37f5f18._.js +1 -1
- package/web/.next/server/chunks/ssr/_a37f5f18._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_cc1243e6._.js +3 -0
- package/web/.next/server/chunks/ssr/_cc1243e6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_d8575088._.js +1 -1
- package/web/.next/server/chunks/ssr/_d8575088._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_e3411387._.js +9 -0
- package/web/.next/server/chunks/ssr/_e3411387._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_e69a26ba._.js +1 -1
- package/web/.next/server/chunks/ssr/_f64ffec0._.js +4 -0
- package/web/.next/server/chunks/ssr/_f64ffec0._.js.map +1 -0
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_1b7dae9a._.js → f7870_sonner_dist_index_mjs_dbf63824._.js} +2 -2
- package/web/.next/server/chunks/ssr/f7870_sonner_dist_index_mjs_dbf63824._.js.map +1 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_28388798._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_28388798._.js.map +1 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_ae1705ef._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_ae1705ef._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_53666118._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_53666118._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_53fa3010._.js +3 -0
- package/web/.next/server/chunks/ssr/{src_presentation_web_06ffd221._.js.map → src_presentation_web_53fa3010._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_d95e128d.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_d95e128d.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1b176e3c.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_bd9f0dda.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_e599bb8c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e4df6dd7._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_e4df6dd7._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +123 -42
- package/web/.next/static/chunks/{d0be9b22c3b9bce8.js → 196650f8cd7fb06a.js} +1 -1
- package/web/.next/static/chunks/{92cd6f523639a6fa.css → 2002f5eec5ffec42.css} +1 -1
- package/web/.next/static/chunks/2c1ff62df9b34313.js +1 -0
- package/web/.next/static/chunks/3005583e819fc4fc.js +1 -0
- package/web/.next/static/chunks/333c7873f6b17ef1.js +1 -0
- package/web/.next/static/chunks/3b3f8c4f6c36a7ba.js +1 -0
- package/web/.next/static/chunks/{672e3da3ad26005b.js → 42c9564e375717ed.js} +1 -1
- package/web/.next/static/chunks/43e0eea352eb5106.js +5 -0
- package/web/.next/static/chunks/5420560352333486.js +1 -0
- package/web/.next/static/chunks/62fa33876b0964a4.js +1 -0
- package/web/.next/static/chunks/6db2addb5e13e372.js +1 -0
- package/web/.next/static/chunks/886d0385ca1d4484.js +1 -0
- package/web/.next/static/chunks/8e52a649c3f6bdf4.js +1 -0
- package/web/.next/static/chunks/a02fc9467a585a1f.js +2 -0
- package/web/.next/static/chunks/{796bb98fb3f35b71.js → bee578019062e7f9.js} +1 -1
- package/web/.next/static/chunks/cdb51cfd682387d2.js +1 -0
- package/web/.next/static/chunks/ed35b4293a81c861.js +9 -0
- package/web/.next/static/chunks/ed7fbcdf0b48e735.js +1 -0
- package/web/.next/static/chunks/f75142a1b75f1c32.js +1 -0
- package/web/.next/static/chunks/fabcd29d488281fa.js +1 -0
- package/web/.next/static/chunks/fd925f996c3fa318.js +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-spec-storage-mode.d.ts +0 -12
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-spec-storage-mode.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/044-add-spec-storage-mode.js +0 -19
- package/dist/packages/core/src/infrastructure/services/filesystem/repo-hash.d.ts +0 -17
- package/dist/packages/core/src/infrastructure/services/filesystem/repo-hash.d.ts.map +0 -1
- package/dist/packages/core/src/infrastructure/services/filesystem/repo-hash.js +0 -21
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_8b618f7d._.js +0 -3
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_8b618f7d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__3ef34e4c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6ec59045._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6ec59045._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__a5f9c6e5._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3dbadca._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__d48c5b11._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_0020fddd._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_01046927._.js +0 -9
- package/web/.next/server/chunks/ssr/_01046927._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_02ec1aea._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_1b7dae9a._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_503680be._.js +0 -3
- package/web/.next/server/chunks/ssr/_503680be._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_67104d9e._.js +0 -3
- package/web/.next/server/chunks/ssr/_67104d9e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_7dca1882._.js +0 -3
- package/web/.next/server/chunks/ssr/_7dca1882._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_b5fc318a._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_d4b20e29._.js +0 -3
- package/web/.next/server/chunks/ssr/_d4b20e29._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_f39a1adb._.js +0 -3
- package/web/.next/server/chunks/ssr/_f39a1adb._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_55c7a131._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_55c7a131._.js.map +0 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_06ffd221._.js +0 -3
- package/web/.next/static/chunks/0b7fe2ac4f078f54.js +0 -13
- package/web/.next/static/chunks/2bbb31a39a80d011.js +0 -1
- package/web/.next/static/chunks/5466ac7c8d7c6b2b.js +0 -1
- package/web/.next/static/chunks/601d93593f5f664f.js +0 -1
- package/web/.next/static/chunks/688971d5bad5dc7c.js +0 -1
- package/web/.next/static/chunks/6daf875725c43e2c.js +0 -2
- package/web/.next/static/chunks/991f2fcba923f3ed.js +0 -1
- package/web/.next/static/chunks/af4d1051b6fa73d5.js +0 -1
- package/web/.next/static/chunks/b70dd4985a814b27.js +0 -1
- package/web/.next/static/chunks/c317cd6a6f76361d.js +0 -1
- package/web/.next/static/chunks/d0dff217a94d4ee1.js +0 -1
- package/web/.next/static/chunks/db862617e62ba1f9.js +0 -1
- package/web/.next/static/chunks/e15904973d49ff89.js +0 -1
- package/web/.next/static/chunks/e6cff1dacc561fa0.js +0 -1
- package/web/.next/static/chunks/e8d49a8e1274cb49.js +0 -1
- /package/web/.next/server/chunks/{[root-of-the-server]__2b1074db._.js.map → [root-of-the-server]__c7d52490._.js.map} +0 -0
- /package/web/.next/static/{xpAWvEAtoYdP3klvh5Yyo → w0YQoUPySQy1O9cN91KEk}/_buildManifest.js +0 -0
- /package/web/.next/static/{xpAWvEAtoYdP3klvh5Yyo → w0YQoUPySQy1O9cN91KEk}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{xpAWvEAtoYdP3klvh5Yyo → w0YQoUPySQy1O9cN91KEk}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Scheduler Service
|
|
3
|
+
*
|
|
4
|
+
* Polls for due scheduled workflows and executes them sequentially.
|
|
5
|
+
* Follows the NotificationWatcherService/PrSyncWatcherService pattern:
|
|
6
|
+
* - Singleton with start()/stop()/isRunning() lifecycle
|
|
7
|
+
* - setInterval-based polling
|
|
8
|
+
* - Immediate first poll on start()
|
|
9
|
+
* - Graceful shutdown via clearInterval
|
|
10
|
+
*
|
|
11
|
+
* Uses IClock for all time operations (deterministic testing).
|
|
12
|
+
* Uses croner only for validation and nextRun() calculation.
|
|
13
|
+
*
|
|
14
|
+
* Each tick:
|
|
15
|
+
* 1. Query enabled workflows where nextRunAt <= clock.now()
|
|
16
|
+
* 2. Enqueue due workflows into FIFO queue
|
|
17
|
+
* 3. If no execution is running, dequeue and execute next
|
|
18
|
+
* 4. Every 100 ticks: run retention cleanup
|
|
19
|
+
*
|
|
20
|
+
* Crash recovery on startup:
|
|
21
|
+
* - Mark stale 'running' executions as 'failed'
|
|
22
|
+
* - Recalculate nextRunAt for all enabled workflows
|
|
23
|
+
*/
|
|
24
|
+
import type { IWorkflowRepository } from '../../../application/ports/output/repositories/workflow-repository.interface.js';
|
|
25
|
+
import type { IWorkflowExecutionRepository } from '../../../application/ports/output/repositories/workflow-execution-repository.interface.js';
|
|
26
|
+
import type { IClock } from '../../../application/ports/output/services/clock.interface.js';
|
|
27
|
+
import type { INotificationService } from '../../../application/ports/output/services/notification-service.interface.js';
|
|
28
|
+
export declare class WorkflowSchedulerService {
|
|
29
|
+
private readonly workflowRepo;
|
|
30
|
+
private readonly executionRepo;
|
|
31
|
+
private readonly clock;
|
|
32
|
+
private readonly notificationService;
|
|
33
|
+
private readonly pollIntervalMs;
|
|
34
|
+
private readonly retentionDays;
|
|
35
|
+
private intervalId;
|
|
36
|
+
private tickCount;
|
|
37
|
+
private isExecuting;
|
|
38
|
+
private readonly queue;
|
|
39
|
+
constructor(workflowRepo: IWorkflowRepository, executionRepo: IWorkflowExecutionRepository, clock: IClock, notificationService: INotificationService, pollIntervalMs?: number, retentionDays?: number);
|
|
40
|
+
isRunning(): boolean;
|
|
41
|
+
start(): Promise<void>;
|
|
42
|
+
stop(): void;
|
|
43
|
+
private poll;
|
|
44
|
+
private executeWorkflow;
|
|
45
|
+
private recoverStaleExecutions;
|
|
46
|
+
private runRetentionCleanup;
|
|
47
|
+
private emitNotification;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Initialize the workflow scheduler singleton.
|
|
51
|
+
* Must be called once during daemon startup.
|
|
52
|
+
*/
|
|
53
|
+
export declare function initializeWorkflowScheduler(workflowRepo: IWorkflowRepository, executionRepo: IWorkflowExecutionRepository, clock: IClock, notificationService: INotificationService, pollIntervalMs?: number, retentionDays?: number): void;
|
|
54
|
+
/**
|
|
55
|
+
* Get the workflow scheduler singleton.
|
|
56
|
+
*/
|
|
57
|
+
export declare function getWorkflowScheduler(): WorkflowSchedulerService;
|
|
58
|
+
/**
|
|
59
|
+
* Check if the workflow scheduler has been initialized.
|
|
60
|
+
*/
|
|
61
|
+
export declare function hasWorkflowScheduler(): boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Reset the workflow scheduler singleton (for testing purposes only).
|
|
64
|
+
* Stops the scheduler if running before resetting.
|
|
65
|
+
*
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
export declare function resetWorkflowScheduler(): void;
|
|
69
|
+
//# sourceMappingURL=workflow-scheduler.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-scheduler.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/workflow-scheduler/workflow-scheduler.service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAcH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iFAAiF,CAAC;AAC3H,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,2FAA2F,CAAC;AAC9I,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+DAA+D,CAAC;AAC5F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8EAA8E,CAAC;AAOzH,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAsB;IACnD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAA+B;IAC7D,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAuB;IAC3D,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAS;IACxC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IAEvC,OAAO,CAAC,UAAU,CAA+C;IACjE,OAAO,CAAC,SAAS,CAAK;IACtB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAgB;gBAGpC,YAAY,EAAE,mBAAmB,EACjC,aAAa,EAAE,4BAA4B,EAC3C,KAAK,EAAE,MAAM,EACb,mBAAmB,EAAE,oBAAoB,EACzC,cAAc,GAAE,MAAiC,EACjD,aAAa,GAAE,MAA+B;IAUhD,SAAS,IAAI,OAAO;IAId,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAc5B,IAAI,IAAI,IAAI;YAOE,IAAI;YA2CJ,eAAe;YA6Hf,sBAAsB;YAqBtB,mBAAmB;IAWjC,OAAO,CAAC,gBAAgB;CAkBzB;AAMD;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,mBAAmB,EACjC,aAAa,EAAE,4BAA4B,EAC3C,KAAK,EAAE,MAAM,EACb,mBAAmB,EAAE,oBAAoB,EACzC,cAAc,CAAC,EAAE,MAAM,EACvB,aAAa,CAAC,EAAE,MAAM,GACrB,IAAI,CAaN;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,wBAAwB,CAQ/D;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAK7C"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Scheduler Service
|
|
3
|
+
*
|
|
4
|
+
* Polls for due scheduled workflows and executes them sequentially.
|
|
5
|
+
* Follows the NotificationWatcherService/PrSyncWatcherService pattern:
|
|
6
|
+
* - Singleton with start()/stop()/isRunning() lifecycle
|
|
7
|
+
* - setInterval-based polling
|
|
8
|
+
* - Immediate first poll on start()
|
|
9
|
+
* - Graceful shutdown via clearInterval
|
|
10
|
+
*
|
|
11
|
+
* Uses IClock for all time operations (deterministic testing).
|
|
12
|
+
* Uses croner only for validation and nextRun() calculation.
|
|
13
|
+
*
|
|
14
|
+
* Each tick:
|
|
15
|
+
* 1. Query enabled workflows where nextRunAt <= clock.now()
|
|
16
|
+
* 2. Enqueue due workflows into FIFO queue
|
|
17
|
+
* 3. If no execution is running, dequeue and execute next
|
|
18
|
+
* 4. Every 100 ticks: run retention cleanup
|
|
19
|
+
*
|
|
20
|
+
* Crash recovery on startup:
|
|
21
|
+
* - Mark stale 'running' executions as 'failed'
|
|
22
|
+
* - Recalculate nextRunAt for all enabled workflows
|
|
23
|
+
*/
|
|
24
|
+
import { randomUUID } from 'node:crypto';
|
|
25
|
+
import { NotificationEventType, NotificationSeverity, WorkflowExecutionStatus, WorkflowTriggerType, } from '../../../domain/generated/output.js';
|
|
26
|
+
import { calculateNextRunAt } from '../../../application/use-cases/workflows/cron-helpers.js';
|
|
27
|
+
const DEFAULT_POLL_INTERVAL_MS = 60_000;
|
|
28
|
+
const RETENTION_CLEANUP_INTERVAL_TICKS = 100;
|
|
29
|
+
const DEFAULT_RETENTION_DAYS = 30;
|
|
30
|
+
export class WorkflowSchedulerService {
|
|
31
|
+
workflowRepo;
|
|
32
|
+
executionRepo;
|
|
33
|
+
clock;
|
|
34
|
+
notificationService;
|
|
35
|
+
pollIntervalMs;
|
|
36
|
+
retentionDays;
|
|
37
|
+
intervalId = null;
|
|
38
|
+
tickCount = 0;
|
|
39
|
+
isExecuting = false;
|
|
40
|
+
queue = []; // workflow IDs
|
|
41
|
+
constructor(workflowRepo, executionRepo, clock, notificationService, pollIntervalMs = DEFAULT_POLL_INTERVAL_MS, retentionDays = DEFAULT_RETENTION_DAYS) {
|
|
42
|
+
this.workflowRepo = workflowRepo;
|
|
43
|
+
this.executionRepo = executionRepo;
|
|
44
|
+
this.clock = clock;
|
|
45
|
+
this.notificationService = notificationService;
|
|
46
|
+
this.pollIntervalMs = pollIntervalMs;
|
|
47
|
+
this.retentionDays = retentionDays;
|
|
48
|
+
}
|
|
49
|
+
isRunning() {
|
|
50
|
+
return this.intervalId !== null;
|
|
51
|
+
}
|
|
52
|
+
async start() {
|
|
53
|
+
if (this.intervalId !== null)
|
|
54
|
+
return;
|
|
55
|
+
// Crash recovery: mark stale 'running' executions as 'failed'
|
|
56
|
+
await this.recoverStaleExecutions();
|
|
57
|
+
// Run first poll immediately
|
|
58
|
+
void this.poll();
|
|
59
|
+
this.intervalId = setInterval(() => {
|
|
60
|
+
void this.poll();
|
|
61
|
+
}, this.pollIntervalMs);
|
|
62
|
+
}
|
|
63
|
+
stop() {
|
|
64
|
+
if (this.intervalId !== null) {
|
|
65
|
+
clearInterval(this.intervalId);
|
|
66
|
+
this.intervalId = null;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async poll() {
|
|
70
|
+
try {
|
|
71
|
+
this.tickCount++;
|
|
72
|
+
// Find due workflows
|
|
73
|
+
const enabledWorkflows = await this.workflowRepo.findEnabled();
|
|
74
|
+
const now = this.clock.now();
|
|
75
|
+
for (const workflow of enabledWorkflows) {
|
|
76
|
+
if (workflow.nextRunAt &&
|
|
77
|
+
new Date(workflow.nextRunAt).getTime() <= now.getTime() &&
|
|
78
|
+
!this.queue.includes(workflow.id)) {
|
|
79
|
+
this.queue.push(workflow.id);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// Also process any manually queued executions
|
|
83
|
+
const queuedExecutions = await this.executionRepo.findByStatus(WorkflowExecutionStatus.Queued);
|
|
84
|
+
for (const execution of queuedExecutions) {
|
|
85
|
+
if (!this.queue.includes(execution.workflowId)) {
|
|
86
|
+
this.queue.push(execution.workflowId);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
// Execute one queued workflow if nothing is running
|
|
90
|
+
if (!this.isExecuting && this.queue.length > 0) {
|
|
91
|
+
const workflowId = this.queue.shift();
|
|
92
|
+
void this.executeWorkflow(workflowId, queuedExecutions);
|
|
93
|
+
}
|
|
94
|
+
// Retention cleanup every N ticks
|
|
95
|
+
if (this.tickCount % RETENTION_CLEANUP_INTERVAL_TICKS === 0) {
|
|
96
|
+
await this.runRetentionCleanup();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
catch {
|
|
100
|
+
// DB not ready or query failed — skip this poll cycle
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
async executeWorkflow(workflowId, existingQueuedExecutions) {
|
|
104
|
+
this.isExecuting = true;
|
|
105
|
+
try {
|
|
106
|
+
const workflow = await this.workflowRepo.findById(workflowId);
|
|
107
|
+
if (!workflow) {
|
|
108
|
+
this.isExecuting = false;
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
// Find or create execution record
|
|
112
|
+
let execution = existingQueuedExecutions.find((e) => e.workflowId === workflowId && e.status === WorkflowExecutionStatus.Queued);
|
|
113
|
+
const now = this.clock.now();
|
|
114
|
+
if (!execution) {
|
|
115
|
+
// Create execution record for scheduled trigger
|
|
116
|
+
execution = {
|
|
117
|
+
id: randomUUID(),
|
|
118
|
+
workflowId,
|
|
119
|
+
triggerType: WorkflowTriggerType.Scheduled,
|
|
120
|
+
status: WorkflowExecutionStatus.Queued,
|
|
121
|
+
startedAt: now,
|
|
122
|
+
createdAt: now,
|
|
123
|
+
updatedAt: now,
|
|
124
|
+
};
|
|
125
|
+
await this.executionRepo.create(execution);
|
|
126
|
+
}
|
|
127
|
+
// Transition to Running
|
|
128
|
+
execution = {
|
|
129
|
+
...execution,
|
|
130
|
+
status: WorkflowExecutionStatus.Running,
|
|
131
|
+
startedAt: now,
|
|
132
|
+
updatedAt: now,
|
|
133
|
+
};
|
|
134
|
+
await this.executionRepo.update(execution);
|
|
135
|
+
// Emit WorkflowStarted event
|
|
136
|
+
this.emitNotification(NotificationEventType.WorkflowStarted, NotificationSeverity.Info, workflow, execution, `Workflow "${workflow.name}" started`);
|
|
137
|
+
try {
|
|
138
|
+
// Execute the workflow prompt
|
|
139
|
+
// For now, this is a placeholder — the actual agent execution
|
|
140
|
+
// will be wired in via the CLI/daemon integration (Phase 4).
|
|
141
|
+
// The scheduler creates the record and manages state transitions.
|
|
142
|
+
// Agent execution would happen here via IAgentRunner.
|
|
143
|
+
const completedAt = this.clock.now();
|
|
144
|
+
const durationMs = completedAt.getTime() - now.getTime();
|
|
145
|
+
// Mark as completed
|
|
146
|
+
execution = {
|
|
147
|
+
...execution,
|
|
148
|
+
status: WorkflowExecutionStatus.Completed,
|
|
149
|
+
completedAt,
|
|
150
|
+
durationMs,
|
|
151
|
+
updatedAt: completedAt,
|
|
152
|
+
};
|
|
153
|
+
await this.executionRepo.update(execution);
|
|
154
|
+
// Emit WorkflowCompleted event
|
|
155
|
+
this.emitNotification(NotificationEventType.WorkflowCompleted, NotificationSeverity.Success, workflow, execution, `Workflow "${workflow.name}" completed successfully`);
|
|
156
|
+
}
|
|
157
|
+
catch (err) {
|
|
158
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
159
|
+
const failedAt = this.clock.now();
|
|
160
|
+
execution = {
|
|
161
|
+
...execution,
|
|
162
|
+
status: WorkflowExecutionStatus.Failed,
|
|
163
|
+
completedAt: failedAt,
|
|
164
|
+
durationMs: failedAt.getTime() - now.getTime(),
|
|
165
|
+
errorMessage,
|
|
166
|
+
updatedAt: failedAt,
|
|
167
|
+
};
|
|
168
|
+
await this.executionRepo.update(execution);
|
|
169
|
+
// Emit WorkflowFailed event
|
|
170
|
+
this.emitNotification(NotificationEventType.WorkflowFailed, NotificationSeverity.Error, workflow, execution, `Workflow "${workflow.name}" failed: ${errorMessage}`);
|
|
171
|
+
}
|
|
172
|
+
// Update workflow lastRunAt and recalculate nextRunAt
|
|
173
|
+
const updateNow = this.clock.now();
|
|
174
|
+
const updatedWorkflow = {
|
|
175
|
+
...workflow,
|
|
176
|
+
lastRunAt: updateNow,
|
|
177
|
+
updatedAt: updateNow,
|
|
178
|
+
};
|
|
179
|
+
if (workflow.cronExpression && workflow.enabled) {
|
|
180
|
+
const nextRunAt = calculateNextRunAt(workflow.cronExpression, workflow.timezone, updateNow);
|
|
181
|
+
updatedWorkflow.nextRunAt = nextRunAt ?? undefined;
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
updatedWorkflow.nextRunAt = undefined;
|
|
185
|
+
}
|
|
186
|
+
await this.workflowRepo.update(updatedWorkflow);
|
|
187
|
+
}
|
|
188
|
+
finally {
|
|
189
|
+
this.isExecuting = false;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
async recoverStaleExecutions() {
|
|
193
|
+
try {
|
|
194
|
+
const staleExecutions = await this.executionRepo.findByStatus(WorkflowExecutionStatus.Running);
|
|
195
|
+
const now = this.clock.now();
|
|
196
|
+
for (const execution of staleExecutions) {
|
|
197
|
+
await this.executionRepo.update({
|
|
198
|
+
...execution,
|
|
199
|
+
status: WorkflowExecutionStatus.Failed,
|
|
200
|
+
completedAt: now,
|
|
201
|
+
errorMessage: 'Daemon crashed during execution',
|
|
202
|
+
updatedAt: now,
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
catch {
|
|
207
|
+
// Best-effort recovery
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
async runRetentionCleanup() {
|
|
211
|
+
try {
|
|
212
|
+
const cutoff = new Date(this.clock.now().getTime() - this.retentionDays * 24 * 60 * 60 * 1000);
|
|
213
|
+
await this.executionRepo.deleteOlderThan(cutoff);
|
|
214
|
+
}
|
|
215
|
+
catch {
|
|
216
|
+
// Best-effort cleanup
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
emitNotification(eventType, severity, workflow, execution, message) {
|
|
220
|
+
const event = {
|
|
221
|
+
eventType,
|
|
222
|
+
agentRunId: execution.id,
|
|
223
|
+
featureId: workflow.id,
|
|
224
|
+
featureName: workflow.name,
|
|
225
|
+
message,
|
|
226
|
+
severity,
|
|
227
|
+
timestamp: this.clock.now().toISOString(),
|
|
228
|
+
};
|
|
229
|
+
this.notificationService.notify(event);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
// --- Singleton accessors (follows NotificationWatcherService pattern) ---
|
|
233
|
+
let schedulerInstance = null;
|
|
234
|
+
/**
|
|
235
|
+
* Initialize the workflow scheduler singleton.
|
|
236
|
+
* Must be called once during daemon startup.
|
|
237
|
+
*/
|
|
238
|
+
export function initializeWorkflowScheduler(workflowRepo, executionRepo, clock, notificationService, pollIntervalMs, retentionDays) {
|
|
239
|
+
if (schedulerInstance !== null) {
|
|
240
|
+
throw new Error('Workflow scheduler already initialized. Cannot re-initialize.');
|
|
241
|
+
}
|
|
242
|
+
schedulerInstance = new WorkflowSchedulerService(workflowRepo, executionRepo, clock, notificationService, pollIntervalMs, retentionDays);
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Get the workflow scheduler singleton.
|
|
246
|
+
*/
|
|
247
|
+
export function getWorkflowScheduler() {
|
|
248
|
+
if (schedulerInstance === null) {
|
|
249
|
+
throw new Error('Workflow scheduler not initialized. Call initializeWorkflowScheduler() during daemon startup.');
|
|
250
|
+
}
|
|
251
|
+
return schedulerInstance;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Check if the workflow scheduler has been initialized.
|
|
255
|
+
*/
|
|
256
|
+
export function hasWorkflowScheduler() {
|
|
257
|
+
return schedulerInstance !== null;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Reset the workflow scheduler singleton (for testing purposes only).
|
|
261
|
+
* Stops the scheduler if running before resetting.
|
|
262
|
+
*
|
|
263
|
+
* @internal
|
|
264
|
+
*/
|
|
265
|
+
export function resetWorkflowScheduler() {
|
|
266
|
+
if (schedulerInstance !== null) {
|
|
267
|
+
schedulerInstance.stop();
|
|
268
|
+
}
|
|
269
|
+
schedulerInstance = null;
|
|
270
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_serve.command.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/commands/_serve.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"_serve.command.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/cli/commands/_serve.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,OAAO,EAAwB,MAAM,WAAW,CAAC;AAiC1D;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CA0E5C"}
|
|
@@ -29,6 +29,8 @@ import { container } from '../../../../packages/core/src/infrastructure/di/conta
|
|
|
29
29
|
import { setVersionEnvVars } from '../../../../packages/core/src/infrastructure/services/version.service.js';
|
|
30
30
|
import { resolveWebDir } from '../../../../packages/core/src/infrastructure/services/web-server.service.js';
|
|
31
31
|
import { initializeNotificationWatcher, getNotificationWatcher, } from '../../../../packages/core/src/infrastructure/services/notifications/notification-watcher.service.js';
|
|
32
|
+
import { initializeWorkflowScheduler, getWorkflowScheduler, hasWorkflowScheduler, } from '../../../../packages/core/src/infrastructure/services/workflow-scheduler/workflow-scheduler.service.js';
|
|
33
|
+
import { hasSettings, getSettings } from '../../../../packages/core/src/infrastructure/services/settings.service.js';
|
|
32
34
|
function parsePort(value) {
|
|
33
35
|
const port = parseInt(value, 10);
|
|
34
36
|
if (isNaN(port) || port < 1024 || port > 65535) {
|
|
@@ -62,6 +64,15 @@ export function createServeCommand() {
|
|
|
62
64
|
const notificationService = container.resolve('INotificationService');
|
|
63
65
|
initializeNotificationWatcher(runRepo, phaseTimingRepo, featureRepo, notificationService);
|
|
64
66
|
getNotificationWatcher().start();
|
|
67
|
+
// Start workflow scheduler (only when feature flag is enabled)
|
|
68
|
+
const scheduledWorkflowsEnabled = hasSettings() && getSettings().featureFlags?.scheduledWorkflows === true;
|
|
69
|
+
if (scheduledWorkflowsEnabled) {
|
|
70
|
+
const workflowRepo = container.resolve('IWorkflowRepository');
|
|
71
|
+
const executionRepo = container.resolve('IWorkflowExecutionRepository');
|
|
72
|
+
const clock = container.resolve('IClock');
|
|
73
|
+
initializeWorkflowScheduler(workflowRepo, executionRepo, clock, notificationService);
|
|
74
|
+
await getWorkflowScheduler().start();
|
|
75
|
+
}
|
|
65
76
|
// Graceful shutdown handler — identical pattern to ui.command.ts
|
|
66
77
|
let isShuttingDown = false;
|
|
67
78
|
const shutdown = async () => {
|
|
@@ -71,6 +82,9 @@ export function createServeCommand() {
|
|
|
71
82
|
// Force exit after 5s if graceful shutdown stalls
|
|
72
83
|
const forceExit = setTimeout(() => process.exit(0), 5000);
|
|
73
84
|
forceExit.unref();
|
|
85
|
+
if (hasWorkflowScheduler()) {
|
|
86
|
+
getWorkflowScheduler().stop();
|
|
87
|
+
}
|
|
74
88
|
getNotificationWatcher().stop();
|
|
75
89
|
const deploymentService = container.resolve('IDeploymentService');
|
|
76
90
|
deploymentService.stopAll();
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Create Command
|
|
3
|
+
*
|
|
4
|
+
* Create a new scheduled workflow definition with a name, prompt, and optional
|
|
5
|
+
* description, tool constraints, and template.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* shep workflow create <name> --prompt <prompt> [options]
|
|
9
|
+
* shep workflow create <name> --template <template-name> [options]
|
|
10
|
+
*/
|
|
11
|
+
import { Command } from 'commander';
|
|
12
|
+
export declare function createCreateCommand(): Command;
|
|
13
|
+
//# sourceMappingURL=create.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/workflow/create.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBpC,wBAAgB,mBAAmB,IAAI,OAAO,CA+E7C"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Create Command
|
|
3
|
+
*
|
|
4
|
+
* Create a new scheduled workflow definition with a name, prompt, and optional
|
|
5
|
+
* description, tool constraints, and template.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* shep workflow create <name> --prompt <prompt> [options]
|
|
9
|
+
* shep workflow create <name> --template <template-name> [options]
|
|
10
|
+
*/
|
|
11
|
+
import { Command } from 'commander';
|
|
12
|
+
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
13
|
+
import { CreateWorkflowUseCase } from '../../../../../packages/core/src/application/use-cases/workflows/create-workflow.use-case.js';
|
|
14
|
+
import { colors, messages } from '../../ui/index.js';
|
|
15
|
+
import { getIssueTriageTemplate } from '../../../../../packages/core/src/application/use-cases/workflows/templates/issue-triage.template.js';
|
|
16
|
+
import { getBranchRebaseTemplate } from '../../../../../packages/core/src/application/use-cases/workflows/templates/branch-rebase.template.js';
|
|
17
|
+
function collectToolConstraints(value, previous) {
|
|
18
|
+
return [...previous, value];
|
|
19
|
+
}
|
|
20
|
+
const TEMPLATES = {
|
|
21
|
+
'issue-triage': getIssueTriageTemplate,
|
|
22
|
+
'branch-rebase': getBranchRebaseTemplate,
|
|
23
|
+
};
|
|
24
|
+
export function createCreateCommand() {
|
|
25
|
+
return new Command('create')
|
|
26
|
+
.description('Create a new workflow')
|
|
27
|
+
.argument('<name>', 'Unique workflow name')
|
|
28
|
+
.option('-p, --prompt <prompt>', 'Agent prompt (the instruction the AI agent will execute)')
|
|
29
|
+
.option('-d, --description <text>', 'Human-readable description')
|
|
30
|
+
.option('-t, --tool-constraint <tool>', 'Allowed tool (repeatable)', collectToolConstraints, [])
|
|
31
|
+
.option('--template <name>', 'Create from built-in template (issue-triage, branch-rebase)')
|
|
32
|
+
.option('-r, --repo <path>', 'Repository path (defaults to current directory)')
|
|
33
|
+
.option('--disabled', 'Create in disabled state')
|
|
34
|
+
.action(async (name, options) => {
|
|
35
|
+
try {
|
|
36
|
+
let prompt = options.prompt;
|
|
37
|
+
let description = options.description;
|
|
38
|
+
let toolConstraints = options.toolConstraint.length > 0 ? options.toolConstraint : undefined;
|
|
39
|
+
// Resolve template if specified
|
|
40
|
+
if (options.template) {
|
|
41
|
+
const templateFactory = TEMPLATES[options.template];
|
|
42
|
+
if (!templateFactory) {
|
|
43
|
+
messages.error(`Unknown template: "${options.template}". Available templates: ${Object.keys(TEMPLATES).join(', ')}`);
|
|
44
|
+
process.exitCode = 1;
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const template = templateFactory();
|
|
48
|
+
prompt = prompt ?? template.prompt;
|
|
49
|
+
description = description ?? template.description;
|
|
50
|
+
toolConstraints = toolConstraints ?? template.toolConstraints;
|
|
51
|
+
}
|
|
52
|
+
if (!prompt) {
|
|
53
|
+
messages.error('A prompt is required. Use --prompt <prompt> or --template <name>.');
|
|
54
|
+
process.exitCode = 1;
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const repositoryPath = options.repo ?? process.cwd();
|
|
58
|
+
const useCase = container.resolve(CreateWorkflowUseCase);
|
|
59
|
+
const workflow = await useCase.execute({
|
|
60
|
+
name,
|
|
61
|
+
prompt,
|
|
62
|
+
repositoryPath,
|
|
63
|
+
...(description != null && { description }),
|
|
64
|
+
...(toolConstraints != null && { toolConstraints }),
|
|
65
|
+
...(options.disabled && { enabled: false }),
|
|
66
|
+
});
|
|
67
|
+
messages.newline();
|
|
68
|
+
messages.success('Workflow created');
|
|
69
|
+
console.log(` ${colors.muted('Name:')} ${colors.accent(workflow.name)}`);
|
|
70
|
+
console.log(` ${colors.muted('ID:')} ${workflow.id.substring(0, 8)}`);
|
|
71
|
+
console.log(` ${colors.muted('Enabled:')} ${workflow.enabled ? colors.success('yes') : colors.muted('no')}`);
|
|
72
|
+
if (workflow.description) {
|
|
73
|
+
console.log(` ${colors.muted('Desc:')} ${workflow.description}`);
|
|
74
|
+
}
|
|
75
|
+
messages.newline();
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
79
|
+
messages.error('Failed to create workflow', err);
|
|
80
|
+
process.exitCode = 1;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Delete Command
|
|
3
|
+
*
|
|
4
|
+
* Delete a workflow (soft-delete). Execution history is preserved
|
|
5
|
+
* subject to the retention policy.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* shep workflow delete <name>
|
|
9
|
+
* shep workflow delete <name> --force
|
|
10
|
+
*/
|
|
11
|
+
import { Command } from 'commander';
|
|
12
|
+
export declare function createDeleteCommand(): Command;
|
|
13
|
+
//# sourceMappingURL=delete.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/workflow/delete.command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,mBAAmB,IAAI,OAAO,CAyC7C"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Delete Command
|
|
3
|
+
*
|
|
4
|
+
* Delete a workflow (soft-delete). Execution history is preserved
|
|
5
|
+
* subject to the retention policy.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* shep workflow delete <name>
|
|
9
|
+
* shep workflow delete <name> --force
|
|
10
|
+
*/
|
|
11
|
+
import { Command } from 'commander';
|
|
12
|
+
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
13
|
+
import { DeleteWorkflowUseCase } from '../../../../../packages/core/src/application/use-cases/workflows/delete-workflow.use-case.js';
|
|
14
|
+
import { colors, messages } from '../../ui/index.js';
|
|
15
|
+
export function createDeleteCommand() {
|
|
16
|
+
return new Command('delete')
|
|
17
|
+
.description('Delete a workflow')
|
|
18
|
+
.argument('<name>', 'Workflow name or ID')
|
|
19
|
+
.option('--force', 'Skip confirmation')
|
|
20
|
+
.option('-r, --repo <path>', 'Repository path (defaults to current directory)')
|
|
21
|
+
.action(async (nameOrId, options) => {
|
|
22
|
+
try {
|
|
23
|
+
// Confirmation prompt (skip with --force or non-interactive)
|
|
24
|
+
if (!options.force && process.stdin.isTTY) {
|
|
25
|
+
const readline = await import('node:readline');
|
|
26
|
+
const rl = readline.createInterface({
|
|
27
|
+
input: process.stdin,
|
|
28
|
+
output: process.stdout,
|
|
29
|
+
});
|
|
30
|
+
const answer = await new Promise((resolve) => {
|
|
31
|
+
rl.question(` Delete workflow "${nameOrId}"? This will cancel queued executions. [y/N] `, resolve);
|
|
32
|
+
});
|
|
33
|
+
rl.close();
|
|
34
|
+
if (answer.toLowerCase() !== 'y') {
|
|
35
|
+
messages.info('Cancelled');
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const repositoryPath = options.repo ?? process.cwd();
|
|
40
|
+
const useCase = container.resolve(DeleteWorkflowUseCase);
|
|
41
|
+
const workflow = await useCase.execute(nameOrId, repositoryPath);
|
|
42
|
+
messages.success(`Deleted workflow "${colors.accent(workflow.name)}"`);
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
46
|
+
messages.error('Failed to delete workflow', err);
|
|
47
|
+
process.exitCode = 1;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Disable Command
|
|
3
|
+
*
|
|
4
|
+
* Disable a workflow's schedule (manual triggers still allowed).
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep workflow disable <name>
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
export declare function createDisableCommand(): Command;
|
|
11
|
+
//# sourceMappingURL=disable.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disable.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/workflow/disable.command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,oBAAoB,IAAI,OAAO,CAmB9C"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Disable Command
|
|
3
|
+
*
|
|
4
|
+
* Disable a workflow's schedule (manual triggers still allowed).
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep workflow disable <name>
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
11
|
+
import { ToggleWorkflowUseCase } from '../../../../../packages/core/src/application/use-cases/workflows/toggle-workflow.use-case.js';
|
|
12
|
+
import { messages } from '../../ui/index.js';
|
|
13
|
+
export function createDisableCommand() {
|
|
14
|
+
return new Command('disable')
|
|
15
|
+
.description('Disable a workflow schedule')
|
|
16
|
+
.argument('<name>', 'Workflow name or ID')
|
|
17
|
+
.option('-r, --repo <path>', 'Repository path (defaults to current directory)')
|
|
18
|
+
.action(async (nameOrId, options) => {
|
|
19
|
+
try {
|
|
20
|
+
const repositoryPath = options.repo ?? process.cwd();
|
|
21
|
+
const useCase = container.resolve(ToggleWorkflowUseCase);
|
|
22
|
+
const workflow = await useCase.execute(nameOrId, false, repositoryPath);
|
|
23
|
+
messages.success(`Workflow "${workflow.name}" disabled`);
|
|
24
|
+
messages.info('Manual triggers are still allowed via: shep workflow run <name>');
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
28
|
+
messages.error('Failed to disable workflow', err);
|
|
29
|
+
process.exitCode = 1;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Enable Command
|
|
3
|
+
*
|
|
4
|
+
* Enable a workflow's schedule.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep workflow enable <name>
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
export declare function createEnableCommand(): Command;
|
|
11
|
+
//# sourceMappingURL=enable.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enable.command.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/cli/commands/workflow/enable.command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,mBAAmB,IAAI,OAAO,CAuB7C"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Enable Command
|
|
3
|
+
*
|
|
4
|
+
* Enable a workflow's schedule.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* shep workflow enable <name>
|
|
8
|
+
*/
|
|
9
|
+
import { Command } from 'commander';
|
|
10
|
+
import { container } from '../../../../../packages/core/src/infrastructure/di/container.js';
|
|
11
|
+
import { ToggleWorkflowUseCase } from '../../../../../packages/core/src/application/use-cases/workflows/toggle-workflow.use-case.js';
|
|
12
|
+
import { colors, messages } from '../../ui/index.js';
|
|
13
|
+
import { formatTimestamp } from './format-helpers.js';
|
|
14
|
+
export function createEnableCommand() {
|
|
15
|
+
return new Command('enable')
|
|
16
|
+
.description('Enable a workflow schedule')
|
|
17
|
+
.argument('<name>', 'Workflow name or ID')
|
|
18
|
+
.option('-r, --repo <path>', 'Repository path (defaults to current directory)')
|
|
19
|
+
.action(async (nameOrId, options) => {
|
|
20
|
+
try {
|
|
21
|
+
const repositoryPath = options.repo ?? process.cwd();
|
|
22
|
+
const useCase = container.resolve(ToggleWorkflowUseCase);
|
|
23
|
+
const workflow = await useCase.execute(nameOrId, true, repositoryPath);
|
|
24
|
+
messages.success(`Workflow "${workflow.name}" enabled`);
|
|
25
|
+
if (workflow.nextRunAt) {
|
|
26
|
+
console.log(` ${colors.muted('Next run:')} ${formatTimestamp(new Date(workflow.nextRunAt))}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
const err = error instanceof Error ? error : new Error(String(error));
|
|
31
|
+
messages.error('Failed to enable workflow', err);
|
|
32
|
+
process.exitCode = 1;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|