@aurorajs.dev/catalyst-cli 3.1.2 → 3.1.3

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.
Files changed (234) hide show
  1. package/README.md +1 -1
  2. package/dist/ai/domain/skills-scanner.js +7 -2
  3. package/dist/deploy/domain/curl-config.js +1 -1
  4. package/dist/deploy/domain/playbook-vars.js +1 -1
  5. package/dist/generator/domain/frontend-composition.js +4 -4
  6. package/dist/generator/domain/property-filters.d.ts +8 -0
  7. package/dist/generator/domain/property-filters.js +17 -6
  8. package/dist/generator/handlers/front.handler.js +10 -1
  9. package/dist/sheets/domain/auth.js +10 -5
  10. package/dist/sheets/sync/sheet-to-yaml.d.ts +1 -0
  11. package/dist/sheets/sync/sheet-to-yaml.js +19 -3
  12. package/dist/templates/backend/application/.claude/skills/catalyst-tools/SKILL.md +5 -3
  13. package/dist/templates/backend/application/src/@aurora/modules/manual/application/manual-catalog-section-reader.spec.ts +4 -0
  14. package/dist/templates/backend/application/src/@aurora/modules/manual/application/manual-find-index.handler.spec.ts +2 -0
  15. package/dist/templates/backend/application/src/@aurora/modules/manual/application/manual-find-index.handler.ts +2 -1
  16. package/dist/templates/backend/application/src/@aurora/modules/manual/domain/manual-section-reader.port.ts +2 -0
  17. package/dist/templates/backend/application/src/@aurora/modules/manual/domain/manual.types.ts +2 -0
  18. package/dist/templates/backend/application/src/@aurora/modules/manual/graphql/manual-graphql-schema.spec.ts +10 -2
  19. package/dist/templates/backend/application/src/@aurora/modules/manual/graphql/manual.graphql +4 -0
  20. package/dist/templates/backend/business-rules/business-partner-portal/supplier-document.md +96 -6
  21. package/dist/templates/backend/business-rules/tools/assistant-usage.md +60 -0
  22. package/dist/templates/backend/manual/business-partner-portal/CONTEXT.md +5 -5
  23. package/dist/templates/backend/manual/business-partner-portal/en/purchase-invoice-header.md +5 -1
  24. package/dist/templates/backend/manual/business-partner-portal/es/purchase-invoice-header.md +5 -1
  25. package/dist/templates/backend/manual/production-planning/en/planner.md +1 -1
  26. package/dist/templates/backend/manual/production-planning/en/production-order-position-event.md +8 -5
  27. package/dist/templates/backend/manual/production-planning/es/planner.md +1 -1
  28. package/dist/templates/backend/manual/production-planning/es/production-order-position-event.md +8 -5
  29. package/dist/templates/backend/manual/reporting/en/report.md +40 -0
  30. package/dist/templates/backend/manual/reporting/es/report.md +40 -0
  31. package/dist/templates/backend/manual/tools/CONTEXT.md +1 -0
  32. package/dist/templates/backend/manual/tools/actions.yaml +11 -0
  33. package/dist/templates/backend/manual/tools/en/assistant-conversation.md +38 -0
  34. package/dist/templates/backend/manual/tools/en/assistant-usage-policy.md +46 -0
  35. package/dist/templates/backend/manual/tools/en/assistant-usage.md +28 -0
  36. package/dist/templates/backend/manual/tools/en/file-storage.md +83 -0
  37. package/dist/templates/backend/manual/tools/es/assistant-conversation.md +38 -0
  38. package/dist/templates/backend/manual/tools/es/assistant-usage-policy.md +46 -0
  39. package/dist/templates/backend/manual/tools/es/assistant-usage.md +28 -0
  40. package/dist/templates/backend/manual/tools/es/file-storage.md +83 -0
  41. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/infrastructure/business-partner-portal-anthropic-extraction-step-two.service.spec.ts +2 -1
  42. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-build-step-one-request.function.spec.ts +9 -2
  43. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-build-step-one-request.function.ts +6 -3
  44. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-build-step-two-request.function.spec.ts +19 -2
  45. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-build-step-two-request.function.ts +15 -2
  46. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-map-step-one-answer.function.ts +1 -1
  47. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/types/business-partner-portal-anthropic-step-one-answer.types.ts +1 -1
  48. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/extraction-step-two/business-partner-portal-extraction-step-two-context.service.spec.ts +63 -0
  49. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/extraction-step-two/business-partner-portal-extraction-step-two-context.service.ts +25 -3
  50. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/extraction-step-two/business-partner-portal-extraction-step-two-empty.service.spec.ts +1 -0
  51. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/extraction-step-two/business-partner-portal-extraction-step-two.types.ts +5 -0
  52. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/purchase-invoice-extraction/business-partner-portal-map-invoice-ocr-result-to-purchase-invoice.function.spec.ts +1 -1
  53. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/purchase-invoice-extraction/business-partner-portal-map-invoice-ocr-result-to-purchase-invoice.function.ts +1 -1
  54. package/dist/templates/backend/packages/production-planning/src/@app/production-planning/production-order-position/application/get-processes/production-planning-get-processes-production-order-position.handler.spec.ts +5 -2
  55. package/dist/templates/backend/packages/production-planning/src/@app/production-planning/production-order-position/application/get-processes/production-planning-get-processes-production-order-position.handler.ts +4 -0
  56. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-create-report.dto.ts +0 -21
  57. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-report.dto.ts +3 -3
  58. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-update-report-by-id.dto.ts +0 -48
  59. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-update-reports.dto.ts +0 -48
  60. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/graphql/reporting-report.graphql +3 -20
  61. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/create/reporting-create-report.service.ts +2 -2
  62. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/reporting-report.payload-types.ts +33 -0
  63. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update/reporting-update-report-by-id.handler.spec.ts +77 -0
  64. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update/reporting-update-report-by-id.service.ts +2 -2
  65. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update/reporting-update-reports.service.ts +2 -2
  66. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update-execution-cache/reporting-update-report-execution-cache.handler.spec.ts +35 -0
  67. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/domain/reporting-report.field-schema.ts +7 -0
  68. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/index.ts +5 -0
  69. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/dto/tools-assistant-conversation.dto.ts +8 -1
  70. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/dto/tools-update-assistant-conversation-by-id.dto.ts +8 -1
  71. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/dto/tools-update-assistant-conversations.dto.ts +8 -1
  72. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/graphql/tools-assistant-conversation.graphql +8 -1
  73. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/controllers/tools-ask-assistant-assistant-usage.controller.ts +1 -0
  74. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-ask-assistant.dto.ts +47 -0
  75. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-assistant-answer.dto.ts +1 -0
  76. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-assistant-usage.dto.ts +8 -1
  77. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-update-assistant-usage-by-id.dto.ts +8 -1
  78. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-update-assistant-usages.dto.ts +8 -1
  79. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/graphql/tools-assistant-usage.graphql +45 -1
  80. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/resolvers/tools-ask-assistant-assistant-usage.resolver.ts +1 -0
  81. package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/infrastructure/tools-anthropic-assistant-model.service.spec.ts +1 -0
  82. package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/shared/functions/tools-anthropic-build-assistant-request.function.spec.ts +145 -0
  83. package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/shared/functions/tools-anthropic-build-assistant-request.function.ts +44 -2
  84. package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/shared/types/tools-anthropic-assistant-answer.types.ts +3 -2
  85. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-conversation/domain/tools-assistant-conversation.field-schema.ts +6 -0
  86. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-conversation/infrastructure/drizzle/tools-drizzle-assistant-conversation.schema.ts +1 -0
  87. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-ask-assistant-assistant-usage.handler.spec.ts +105 -5
  88. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-ask-assistant-assistant-usage.handler.ts +40 -23
  89. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-assistant-errors.function.ts +8 -0
  90. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-assistant-read-screen.function.spec.ts +257 -0
  91. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-assistant-read-screen.function.ts +200 -0
  92. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/quota/tools-assistant-quota.service.spec.ts +7 -2
  93. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/quota/tools-assistant-quota.service.ts +7 -2
  94. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/domain/tools-assistant-model.port.ts +44 -0
  95. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/domain/tools-assistant-usage.field-schema.ts +6 -0
  96. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/infrastructure/drizzle/tools-drizzle-assistant-usage.repository.spec.ts +25 -0
  97. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/infrastructure/drizzle/tools-drizzle-assistant-usage.repository.ts +3 -0
  98. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/infrastructure/drizzle/tools-drizzle-assistant-usage.schema.ts +1 -0
  99. package/dist/templates/backend/packages/tools/test/acceptance/tools/assistant-ask.e2e-spec.ts +16 -1
  100. package/dist/templates/backend/packages/tools/test/acceptance/tools/assistant-usage-increment.e2e-spec.ts +52 -5
  101. package/dist/templates/codegen/frontend/module/__module_name__/features/__module_name__-list.component.ts.eta +7 -1
  102. package/dist/templates/codegen/frontend/module/__module_name__/features/index.ts.eta +1 -1
  103. package/dist/templates/frontend/application/.claude/skills/catalyst-project-structure/SKILL.md +3 -0
  104. package/dist/templates/frontend/application/libs/ui/command/src/lib/hlm-command-item.ts +1 -1
  105. package/dist/templates/frontend/application/src/@aurora/modules/assisted-form/README.md +2 -0
  106. package/dist/templates/frontend/application/src/@aurora/modules/command-palette/command-palette-trigger.component.ts +1 -0
  107. package/dist/templates/frontend/application/src/@aurora/modules/guided-action/README.md +4 -0
  108. package/dist/templates/frontend/application/src/@aurora/modules/guided-action/guided-action-runner.service.spec.ts +69 -0
  109. package/dist/templates/frontend/application/src/@aurora/modules/guided-action/guided-action-runner.service.ts +13 -4
  110. package/dist/templates/frontend/application/src/@aurora/modules/index.ts +1 -0
  111. package/dist/templates/frontend/application/src/@aurora/modules/manual/manual.graphql.ts +1 -0
  112. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/README.md +36 -0
  113. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/index.ts +2 -0
  114. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/screen-context.service.spec.ts +137 -0
  115. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/screen-context.service.ts +60 -0
  116. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/screen-context.types.ts +47 -0
  117. package/dist/templates/frontend/application/src/app/domains/admin/layout/site-header.ts +1 -1
  118. package/dist/templates/frontend/application/tsconfig.json +1 -0
  119. package/dist/templates/frontend/navigation-i18n/reporting/en.json +1 -1
  120. package/dist/templates/frontend/navigation-i18n/reporting/es.json +1 -1
  121. package/dist/templates/frontend/packages/automation/src/app/domains/admin/apps/automation/state-machine-history/features/index.ts +0 -1
  122. package/dist/templates/frontend/packages/automation/src/app/domains/admin/apps/automation/state-machine-history/features/state-machine-history-list.component.ts +0 -13
  123. package/dist/templates/frontend/packages/business-partner-portal/public/i18n/business-partner-portal/en.json +11 -0
  124. package/dist/templates/frontend/packages/business-partner-portal/public/i18n/business-partner-portal/es.json +11 -0
  125. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/data-access/purchase-invoice-review-context.derive.spec.ts +420 -0
  126. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/data-access/purchase-invoice-review-context.derive.ts +237 -0
  127. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/data-access/purchase-invoice-review.derive.spec.ts +181 -26
  128. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/data-access/purchase-invoice-review.derive.ts +143 -25
  129. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/features/purchase-invoice-header-detail.component.spec.ts +42 -0
  130. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/features/purchase-invoice-header-detail.component.ts +32 -8
  131. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/features/purchase-invoice-header-form.component.ts +32 -1
  132. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/features/purchase-invoice-header-list-actions-cell.component.ts +4 -1
  133. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/ui/purchase-invoice-breakdown.component.ts +7 -32
  134. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/ui/purchase-invoice-lines-grid.component.ts +12 -8
  135. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-trace/features/index.ts +0 -1
  136. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-trace/features/purchase-invoice-trace-list.component.ts +0 -13
  137. package/dist/templates/frontend/packages/identity/src/app/domains/admin/apps/iam/account/features/account-form.component.spec.ts +26 -1
  138. package/dist/templates/frontend/packages/identity/src/app/domains/admin/apps/iam/account/features/account-form.component.ts +45 -0
  139. package/dist/templates/frontend/packages/production-planning/public/i18n/production-planning/en.json +15 -4
  140. package/dist/templates/frontend/packages/production-planning/public/i18n/production-planning/es.json +15 -4
  141. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/index.ts +1 -0
  142. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner-process-weights.derive.spec.ts +57 -0
  143. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner-process-weights.derive.ts +39 -0
  144. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner.derive.spec.ts +15 -0
  145. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner.derive.ts +7 -3
  146. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner.graphql.ts +23 -0
  147. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/features/planner-process-weights-dialog.component.ts +137 -0
  148. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/features/planner.component.ts +41 -4
  149. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.derive.spec.ts +0 -30
  150. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.derive.ts +0 -21
  151. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.resolvers.spec.ts +24 -0
  152. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.resolvers.ts +3 -1
  153. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/batch-detail-sheet.component.ts +22 -10
  154. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/event-form-sheet.component.spec.ts +142 -0
  155. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/event-form-sheet.component.ts +95 -59
  156. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/event-list.component.ts +121 -123
  157. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/production-dashboard.component.ts +52 -19
  158. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-order-position/features/production-order-position-list.component.ts +8 -2
  159. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-order-position-event/features/production-order-position-event-list.component.ts +4 -0
  160. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-order-position-event/production-order-position-event.columns.spec.ts +104 -4
  161. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-order-position-event/production-order-position-event.columns.ts +121 -69
  162. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/shared/dialogs/finish-event-dialog.component.ts +3 -3
  163. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/shared/dialogs/weight-input-dialog.component.ts +3 -3
  164. package/dist/templates/frontend/packages/reporting/public/i18n/reporting/en.json +1 -1
  165. package/dist/templates/frontend/packages/reporting/public/i18n/reporting/es.json +1 -1
  166. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/data-access/report.detail-config.ts +1 -2
  167. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/data-access/report.graphql.ts +0 -14
  168. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/features/report-form.component.spec.ts +96 -0
  169. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/features/report-form.component.ts +46 -69
  170. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/features/report-list.component.ts +2 -22
  171. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/report.columns.ts +0 -1
  172. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/reporting-icons.providers.ts +2 -1
  173. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/reporting.navigation.ts +7 -0
  174. package/dist/templates/frontend/packages/tools/public/i18n/tools/en.json +4 -2
  175. package/dist/templates/frontend/packages/tools/public/i18n/tools/es.json +4 -2
  176. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant/tools-assistant.service.spec.ts +82 -7
  177. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant/tools-assistant.service.ts +12 -2
  178. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/assistant-conversation.columns.ts +13 -0
  179. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/data-access/assistant-conversation.graphql.ts +1 -0
  180. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/assistant-conversation-form.component.ts +18 -0
  181. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/assistant-conversation-list.component.ts +0 -13
  182. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/index.ts +0 -1
  183. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/assistant-usage.columns.ts +13 -0
  184. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/data-access/assistant-usage.graphql.ts +2 -0
  185. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/assistant-usage-form.component.ts +18 -0
  186. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/assistant-usage-list.component.ts +0 -13
  187. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/index.ts +0 -1
  188. package/dist/templates/monorepo/.claude/commands/business-rules/promote.md +5 -1
  189. package/dist/templates/monorepo/.claude/hooks/__fixtures__/br-hr-regression-baseline.txt +2 -2
  190. package/dist/templates/monorepo/.claude/hooks/check-required-setup.ts +4 -4
  191. package/dist/templates/monorepo/.claude/hooks/inject-prompt-context.ts +1 -1
  192. package/dist/templates/monorepo/.claude/scripts/generate-skills-index.test.ts +29 -1
  193. package/dist/templates/monorepo/.claude/scripts/generate-skills-index.ts +7 -1
  194. package/dist/templates/monorepo/.claude/skills/REGISTRY.md +2 -2
  195. package/dist/templates/monorepo/.claude/skills/catalyst-backlog/SKILL.md +19 -4
  196. package/dist/templates/monorepo/.claude/skills/catalyst-backlog/frontier-worker-addendum.md +3 -3
  197. package/dist/templates/monorepo/.claude/skills/catalyst-business-rules-guard/SKILL.md +8 -5
  198. package/dist/templates/monorepo/.claude/skills/catalyst-business-rules-guard/references/workflow.md +10 -6
  199. package/dist/templates/monorepo/.claude/skills/catalyst-delegation/SKILL.md +1 -1
  200. package/dist/templates/monorepo/.claude/skills/catalyst-harness-rules-guard/SKILL.md +6 -6
  201. package/dist/templates/monorepo/.claude/skills/catalyst-harness-rules-guard/references/enforcement.md +3 -3
  202. package/dist/templates/monorepo/.claude/skills/catalyst-harness-rules-guard/references/format.md +3 -3
  203. package/dist/templates/monorepo/.claude/skills/catalyst-update-skill-registry/SKILL.md +4 -4
  204. package/dist/templates/monorepo/.claude/skills/catalyst-user-manual/SKILL.md +48 -2
  205. package/dist/templates/monorepo/.claude/skills/openspec-apply-change/SKILL.md +28 -10
  206. package/dist/templates/monorepo/.claude/skills/openspec-archive-change/SKILL.md +52 -13
  207. package/dist/templates/monorepo/.claude/skills/openspec-explore/SKILL.md +59 -14
  208. package/dist/templates/monorepo/.claude/skills/openspec-propose/SKILL.md +38 -12
  209. package/dist/templates/monorepo/.claude/skills/openspec-sync-specs/SKILL.md +31 -3
  210. package/dist/templates/monorepo/CLAUDE.md +14 -14
  211. package/dist/templates/monorepo/docs/business-rules/ARCHITECTURE.md +16 -13
  212. package/dist/templates/monorepo/docs/business-rules/MIGRATION.md +5 -5
  213. package/dist/templates/monorepo/docs/manual/en/04-asistente.md +71 -0
  214. package/dist/templates/monorepo/docs/manual/es/04-asistente.md +71 -0
  215. package/dist/templates/monorepo/openspec/config.yaml +25 -5
  216. package/dist/templates/monorepo/package.json +3 -1
  217. package/dist/templates/monorepo/scripts/backlog/prompt.test.ts +5 -5
  218. package/dist/templates/monorepo/scripts/backlog/prompt.ts +1 -1
  219. package/dist/templates/monorepo/scripts/business-rules/audit.ts +1 -1
  220. package/dist/templates/monorepo/scripts/manual/compile.test.ts +78 -0
  221. package/dist/templates/monorepo/scripts/manual/compile.ts +36 -9
  222. package/dist/templates/monorepo/scripts/worktree/prune.test.ts +517 -0
  223. package/dist/templates/monorepo/scripts/worktree/prune.ts +331 -0
  224. package/oclif.manifest.json +85 -85
  225. package/package.json +15 -17
  226. package/dist/templates/frontend/packages/automation/src/app/domains/admin/apps/automation/state-machine-history/features/state-machine-history-list-actions-cell.component.ts +0 -44
  227. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-trace/features/purchase-invoice-trace-list-actions-cell.component.ts +0 -44
  228. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/assistant-conversation-list-actions-cell.component.ts +0 -44
  229. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/assistant-usage-list-actions-cell.component.ts +0 -43
  230. package/dist/templates/monorepo/.claude/commands/opsx/apply.md +0 -184
  231. package/dist/templates/monorepo/.claude/commands/opsx/archive.md +0 -225
  232. package/dist/templates/monorepo/.claude/commands/opsx/explore.md +0 -196
  233. package/dist/templates/monorepo/.claude/commands/opsx/propose.md +0 -145
  234. package/dist/templates/monorepo/.claude/commands/opsx/sync.md +0 -258
@@ -0,0 +1,331 @@
1
+ /**
2
+ * `pnpm worktree:prune` — removes the interactive git worktrees and local branches that the
3
+ * Worktree Gate leaves behind once their pull request has merged.
4
+ *
5
+ * Dry run by default; `--yes` removes. Spec: openspec/changes/add-worktree-prune.
6
+ */
7
+ import { execFileSync } from 'node:child_process';
8
+ import { pathToFileURL } from 'node:url';
9
+
10
+ export interface WorktreeEntry {
11
+ path: string;
12
+ head: string;
13
+ /** Branch name without `refs/heads/`; null when the HEAD is detached. */
14
+ branch: string | null;
15
+ /** The directory is gone; `git worktree prune` can drop the entry. */
16
+ prunable: boolean;
17
+ locked: boolean;
18
+ }
19
+
20
+ /** Parses `git worktree list --porcelain`. The first entry is the main checkout. */
21
+ export function parseWorktreeList(porcelain: string): WorktreeEntry[] {
22
+ const entries: WorktreeEntry[] = [];
23
+ const blocks = porcelain.split(/\n\s*\n/);
24
+
25
+ for (const block of blocks) {
26
+ const lines = block.split('\n').filter((line) => line.length > 0);
27
+ const pathLine = lines.find((line) => line.startsWith('worktree '));
28
+ if (pathLine === undefined) continue;
29
+
30
+ const headLine = lines.find((line) => line.startsWith('HEAD '));
31
+ const branchLine = lines.find((line) => line.startsWith('branch '));
32
+ entries.push({
33
+ path: pathLine.slice('worktree '.length),
34
+ head: headLine === undefined ? '' : headLine.slice('HEAD '.length),
35
+ branch: branchLine === undefined ? null : branchLine.slice('branch '.length).replace(/^refs\/heads\//, ''),
36
+ prunable: lines.some((line) => line === 'prunable' || line.startsWith('prunable ')),
37
+ locked: lines.some((line) => line === 'locked' || line.startsWith('locked ')),
38
+ });
39
+ }
40
+
41
+ return entries;
42
+ }
43
+
44
+ export const PR_STATE = {
45
+ OPEN: 'OPEN',
46
+ CLOSED: 'CLOSED',
47
+ MERGED: 'MERGED',
48
+ } as const;
49
+
50
+ export type PullRequestState = (typeof PR_STATE)[keyof typeof PR_STATE];
51
+
52
+ export interface PullRequest {
53
+ number: number;
54
+ state: PullRequestState;
55
+ headRefName: string;
56
+ headRefOid: string;
57
+ }
58
+
59
+ export interface LocalBranch {
60
+ name: string;
61
+ head: string;
62
+ }
63
+
64
+ export interface ClassifyInput {
65
+ /** Output of the porcelain parser; the first entry is the main checkout. */
66
+ worktrees: WorktreeEntry[];
67
+ branches: LocalBranch[];
68
+ /** Worktree paths with uncommitted or untracked changes. */
69
+ dirtyPaths: string[];
70
+ pullRequests: PullRequest[];
71
+ /** Root of the worktree the command runs from. */
72
+ currentRoot: string;
73
+ defaultBranch: string;
74
+ }
75
+
76
+ export const ACTION = {
77
+ REMOVE: 'remove',
78
+ KEEP: 'keep',
79
+ } as const;
80
+
81
+ export const KIND = {
82
+ WORKTREE: 'worktree',
83
+ BRANCH: 'branch',
84
+ } as const;
85
+
86
+ export interface Decision {
87
+ kind: (typeof KIND)[keyof typeof KIND];
88
+ action: (typeof ACTION)[keyof typeof ACTION];
89
+ /** Worktree path, or branch name for an orphan branch. */
90
+ target: string;
91
+ branch: string;
92
+ prNumber?: number;
93
+ reason: string;
94
+ }
95
+
96
+ const WORKTREES_SEGMENT = '/.claude/worktrees/';
97
+ const DISPATCH_PREFIX = 'dispatch-';
98
+
99
+ interface MergeVerdict {
100
+ action: Decision['action'];
101
+ reason: string;
102
+ prNumber?: number;
103
+ }
104
+
105
+ /** A branch qualifies only with a MERGED PR whose head commit is the local head. */
106
+ function judgeBranch(branch: string, localHead: string, pullRequests: PullRequest[]): MergeVerdict {
107
+ const ofBranch = pullRequests.filter((candidate) => candidate.headRefName === branch);
108
+ if (ofBranch.length === 0) {
109
+ return { action: ACTION.KEEP, reason: 'no pull request' };
110
+ }
111
+
112
+ const open = ofBranch.find((candidate) => candidate.state === PR_STATE.OPEN);
113
+ if (open !== undefined) {
114
+ return { action: ACTION.KEEP, reason: `pull request is open (#${open.number})`, prNumber: open.number };
115
+ }
116
+
117
+ const latest = ofBranch.reduce((highest, candidate) => (candidate.number > highest.number ? candidate : highest));
118
+ if (latest.state !== PR_STATE.MERGED) {
119
+ return {
120
+ action: ACTION.KEEP,
121
+ reason: `pull request closed without merge (#${latest.number})`,
122
+ prNumber: latest.number,
123
+ };
124
+ }
125
+
126
+ if (latest.headRefOid !== localHead) {
127
+ return {
128
+ action: ACTION.KEEP,
129
+ reason: `has commits after the merge (#${latest.number})`,
130
+ prNumber: latest.number,
131
+ };
132
+ }
133
+
134
+ return { action: ACTION.REMOVE, reason: `pull request merged (#${latest.number})`, prNumber: latest.number };
135
+ }
136
+
137
+ /** Interactive worktrees under `<main>/.claude/worktrees/`: not dispatcher slots, not detached. */
138
+ export function isCandidateWorktree(entry: WorktreeEntry, mainRoot: string): boolean {
139
+ if (entry.branch === null) return false;
140
+ const prefix = `${mainRoot}${WORKTREES_SEGMENT}`;
141
+ if (!entry.path.startsWith(prefix)) return false;
142
+ const name = entry.path.slice(prefix.length);
143
+ return !name.startsWith(DISPATCH_PREFIX);
144
+ }
145
+
146
+ /** Pure decision: one entry per candidate worktree and per orphan local branch. */
147
+ export function classify(input: ClassifyInput): Decision[] {
148
+ const [mainCheckout, ...linked] = input.worktrees;
149
+ const decisions: Decision[] = [];
150
+
151
+ for (const entry of linked) {
152
+ if (entry.branch === null || !isCandidateWorktree(entry, mainCheckout.path)) continue;
153
+ const base = { kind: KIND.WORKTREE, target: entry.path, branch: entry.branch };
154
+
155
+ if (entry.prunable) {
156
+ decisions.push({ ...base, action: ACTION.KEEP, reason: 'directory is missing (run git worktree prune)' });
157
+ continue;
158
+ }
159
+
160
+ if (entry.path === input.currentRoot) {
161
+ decisions.push({ ...base, action: ACTION.KEEP, reason: 'the command runs from it' });
162
+ continue;
163
+ }
164
+
165
+ const verdict = judgeBranch(entry.branch, entry.head, input.pullRequests);
166
+ if (verdict.action === ACTION.REMOVE && input.dirtyPaths.includes(entry.path)) {
167
+ decisions.push({
168
+ ...base,
169
+ action: ACTION.KEEP,
170
+ reason: `has uncommitted changes (#${verdict.prNumber})`,
171
+ prNumber: verdict.prNumber,
172
+ });
173
+ continue;
174
+ }
175
+ decisions.push({ ...base, ...verdict });
176
+ }
177
+
178
+ const checkedOut = new Set(input.worktrees.map((entry) => entry.branch));
179
+ for (const branch of input.branches) {
180
+ if (branch.name === input.defaultBranch || checkedOut.has(branch.name)) continue;
181
+ decisions.push({
182
+ kind: KIND.BRANCH,
183
+ target: branch.name,
184
+ branch: branch.name,
185
+ ...judgeBranch(branch.name, branch.head, input.pullRequests),
186
+ });
187
+ }
188
+
189
+ return decisions;
190
+ }
191
+
192
+ /** Everything the command needs from the outside world; injected so the failure path is testable. */
193
+ export interface PruneIO {
194
+ listWorktreesPorcelain(): string;
195
+ listLocalBranches(): LocalBranch[];
196
+ isDirty(worktreePath: string): boolean;
197
+ /** Throws when GitHub cannot be read. */
198
+ listPullRequests(): PullRequest[];
199
+ currentRoot(): string;
200
+ removeWorktree(worktreePath: string): void;
201
+ deleteBranch(branch: string): void;
202
+ pruneWorktrees(): void;
203
+ log(line: string): void;
204
+ error(line: string): void;
205
+ }
206
+
207
+ const DEFAULT_BRANCH = 'main';
208
+ const APPLY_FLAG = '--yes';
209
+
210
+ function describeError(error: unknown): string {
211
+ if (error instanceof Error) {
212
+ const stderr = (error as { stderr?: Buffer | string }).stderr;
213
+ const detail = stderr === undefined ? '' : stderr.toString().trim();
214
+ return detail === '' ? error.message : `${error.message}\n${detail}`;
215
+ }
216
+ return String(error);
217
+ }
218
+
219
+ function formatDecision(decision: Decision): string {
220
+ return `${decision.action} ${decision.kind} ${decision.target} - ${decision.reason}`;
221
+ }
222
+
223
+ /** Returns the process exit code. Dry run unless `--yes` is passed. */
224
+ export function run(args: string[], io: PruneIO): number {
225
+ const unknown = args.filter((arg) => arg !== APPLY_FLAG);
226
+ if (unknown.length > 0) {
227
+ io.error(`Unknown argument: ${unknown.join(' ')}. Usage: pnpm worktree:prune [${APPLY_FLAG}]`);
228
+ return 1;
229
+ }
230
+ const apply = args.includes(APPLY_FLAG);
231
+
232
+ let decisions: Decision[];
233
+ try {
234
+ const worktrees = parseWorktreeList(io.listWorktreesPorcelain());
235
+ const currentRoot = io.currentRoot();
236
+ const [mainCheckout, ...linked] = worktrees;
237
+ // Only worktrees classify() may remove are inspected: git status throws on a missing directory
238
+ // and has no business running inside a live dispatcher slot.
239
+ const dirtyPaths = linked
240
+ .filter((entry) => isCandidateWorktree(entry, mainCheckout.path) && !entry.prunable && entry.path !== currentRoot)
241
+ .filter((entry) => io.isDirty(entry.path))
242
+ .map((entry) => entry.path);
243
+ decisions = classify({
244
+ worktrees,
245
+ branches: io.listLocalBranches(),
246
+ dirtyPaths,
247
+ pullRequests: io.listPullRequests(),
248
+ currentRoot,
249
+ defaultBranch: DEFAULT_BRANCH,
250
+ });
251
+ } catch (error) {
252
+ io.error(`Cannot decide, nothing was removed: ${describeError(error)}`);
253
+ return 1;
254
+ }
255
+
256
+ for (const decision of decisions) {
257
+ io.log(formatDecision(decision));
258
+ }
259
+ if (!apply) return 0;
260
+
261
+ let failed = false;
262
+ let removedWorktree = false;
263
+ for (const decision of decisions.filter((candidate) => candidate.action === ACTION.REMOVE)) {
264
+ try {
265
+ if (decision.kind === KIND.WORKTREE) {
266
+ io.removeWorktree(decision.target);
267
+ removedWorktree = true;
268
+ }
269
+ io.deleteBranch(decision.branch);
270
+ io.log(`removed ${decision.kind} ${decision.target}`);
271
+ } catch (error) {
272
+ failed = true;
273
+ io.error(`failed ${decision.kind} ${decision.target}: ${describeError(error)}`);
274
+ }
275
+ }
276
+
277
+ if (removedWorktree) {
278
+ try {
279
+ io.pruneWorktrees();
280
+ } catch (error) {
281
+ failed = true;
282
+ io.error(`failed worktree prune: ${describeError(error)}`);
283
+ }
284
+ }
285
+
286
+ return failed ? 1 : 0;
287
+ }
288
+
289
+ function git(args: string[], cwd?: string): string {
290
+ return execFileSync('git', args, { cwd, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });
291
+ }
292
+
293
+ function realIO(): PruneIO {
294
+ return {
295
+ listWorktreesPorcelain: () => git(['worktree', 'list', '--porcelain']),
296
+ listLocalBranches: () =>
297
+ git(['for-each-ref', '--format=%(refname:short) %(objectname)', 'refs/heads'])
298
+ .split('\n')
299
+ .filter((line) => line.length > 0)
300
+ .map((line) => {
301
+ const [name, head] = line.split(' ');
302
+ return { name, head };
303
+ }),
304
+ isDirty: (worktreePath) => git(['status', '--porcelain'], worktreePath).trim().length > 0,
305
+ listPullRequests: () =>
306
+ JSON.parse(
307
+ execFileSync(
308
+ 'gh',
309
+ ['pr', 'list', '--state', 'all', '--limit', '1000', '--json', 'number,state,headRefName,headRefOid'],
310
+ { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] },
311
+ ),
312
+ ) as PullRequest[],
313
+ currentRoot: () => git(['rev-parse', '--show-toplevel']).trim(),
314
+ removeWorktree: (worktreePath) => {
315
+ git(['worktree', 'remove', worktreePath]);
316
+ },
317
+ deleteBranch: (branch) => {
318
+ git(['branch', '-D', branch]);
319
+ },
320
+ pruneWorktrees: () => {
321
+ git(['worktree', 'prune']);
322
+ },
323
+ log: (line) => console.log(line),
324
+ error: (line) => console.error(line),
325
+ };
326
+ }
327
+
328
+ const isEntryPoint = process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href;
329
+ if (isEntryPoint) {
330
+ process.exitCode = run(process.argv.slice(2), realIO());
331
+ }
@@ -113,6 +113,56 @@
113
113
  "setup.js"
114
114
  ]
115
115
  },
116
+ "deploy": {
117
+ "aliases": [],
118
+ "args": {},
119
+ "description": "Trigger deploy by pushing source branches to environments/{env}.",
120
+ "examples": [
121
+ "<%= config.bin %> deploy",
122
+ "<%= config.bin %> deploy --env dev",
123
+ "<%= config.bin %> deploy --dry-run",
124
+ "<%= config.bin %> deploy --env prod -c ../aurora.yaml"
125
+ ],
126
+ "flags": {
127
+ "config": {
128
+ "char": "c",
129
+ "description": "Path to aurora.yaml config file",
130
+ "name": "config",
131
+ "default": "./aurora.yaml",
132
+ "hasDynamicHelp": false,
133
+ "multiple": false,
134
+ "type": "option"
135
+ },
136
+ "dry-run": {
137
+ "description": "Show what would be pushed without executing",
138
+ "name": "dry-run",
139
+ "allowNo": false,
140
+ "type": "boolean"
141
+ },
142
+ "env": {
143
+ "description": "Deploy only this environment (e.g. dev, qa, prod)",
144
+ "name": "env",
145
+ "hasDynamicHelp": false,
146
+ "multiple": false,
147
+ "type": "option"
148
+ }
149
+ },
150
+ "hasDynamicHelp": false,
151
+ "hiddenAliases": [],
152
+ "id": "deploy",
153
+ "pluginAlias": "@aurorajs.dev/catalyst-cli",
154
+ "pluginName": "@aurorajs.dev/catalyst-cli",
155
+ "pluginType": "core",
156
+ "strict": true,
157
+ "enableJsonFlag": false,
158
+ "isESM": true,
159
+ "relativePath": [
160
+ "dist",
161
+ "commands",
162
+ "deploy",
163
+ "index.js"
164
+ ]
165
+ },
116
166
  "backup:list": {
117
167
  "aliases": [],
118
168
  "args": {},
@@ -500,56 +550,6 @@
500
550
  "index.js"
501
551
  ]
502
552
  },
503
- "deploy": {
504
- "aliases": [],
505
- "args": {},
506
- "description": "Trigger deploy by pushing source branches to environments/{env}.",
507
- "examples": [
508
- "<%= config.bin %> deploy",
509
- "<%= config.bin %> deploy --env dev",
510
- "<%= config.bin %> deploy --dry-run",
511
- "<%= config.bin %> deploy --env prod -c ../aurora.yaml"
512
- ],
513
- "flags": {
514
- "config": {
515
- "char": "c",
516
- "description": "Path to aurora.yaml config file",
517
- "name": "config",
518
- "default": "./aurora.yaml",
519
- "hasDynamicHelp": false,
520
- "multiple": false,
521
- "type": "option"
522
- },
523
- "dry-run": {
524
- "description": "Show what would be pushed without executing",
525
- "name": "dry-run",
526
- "allowNo": false,
527
- "type": "boolean"
528
- },
529
- "env": {
530
- "description": "Deploy only this environment (e.g. dev, qa, prod)",
531
- "name": "env",
532
- "hasDynamicHelp": false,
533
- "multiple": false,
534
- "type": "option"
535
- }
536
- },
537
- "hasDynamicHelp": false,
538
- "hiddenAliases": [],
539
- "id": "deploy",
540
- "pluginAlias": "@aurorajs.dev/catalyst-cli",
541
- "pluginName": "@aurorajs.dev/catalyst-cli",
542
- "pluginType": "core",
543
- "strict": true,
544
- "enableJsonFlag": false,
545
- "isESM": true,
546
- "relativePath": [
547
- "dist",
548
- "commands",
549
- "deploy",
550
- "index.js"
551
- ]
552
- },
553
553
  "new": {
554
554
  "aliases": [],
555
555
  "args": {
@@ -846,40 +846,6 @@
846
846
  "index.js"
847
847
  ]
848
848
  },
849
- "upgrade": {
850
- "aliases": [],
851
- "args": {},
852
- "description": "Run it from the root of the project, on the branch that should receive the upgrade. git must be on the PATH.\n\n1. It reads the installed packages from aurora.lock.yaml and refuses to run without it, or when the running CLI no longer ships a locked package. It also refuses, before changing anything, when the \"aurora/scaffold\" branch is missing or when a tracked file has staged or unstaged changes (untracked files do not count): commit or stash them first.\n2. It migrates the module definition files, with no version gate, so a rerun after a merge picks up late arrivals: it renames each cliter/<bc>/<module>.aurora.yaml to <module>.module.yaml with \"git mv\", rewrites in every tracked file the two generated lines that name the old file (the \"@source\" header and the field-schema \"derived from\" line, changing only the suffix), and recomputes the cliter/<bc>/.locks integrity of a rewritten file only when the stored hash matched the file before the rewrite, so a file you modified still shows up as modified. Developer comments and docs are not touched. If both names exist for one module it stops, naming both paths. When it changed something it commits exactly that in one commit, \"chore(catalyst): rename module definition files to <module>.module.yaml\", running the project's git hooks, before the merge.\n3. It renders the scaffold of the running CLI plus every locked package into a temporary directory, with the composition files generated from the package manifests and the lockfile updated to the running CLI version. The install, the backend/.env copy and the GraphQL codegen are not part of that rendering, so pnpm-lock.yaml, backend/.env and backend/src/@api/graphql.ts never enter it.\n4. It commits that rendering on \"aurora/scaffold\" as a child of its tip, without switching branches or touching the working tree. When the rendering equals the tip it creates no commit, and it reports the scaffold as up to date only when the tip is already contained in the checked-out branch; otherwise it runs the merge again.\n5. It runs \"git merge --no-edit aurora/scaffold\" on the checked-out branch.\n6. After a merge without conflict it installs the dependencies, appends to backend/.env the keys with a declared value that any locked package declares and the file lacks (an existing value is never changed), regenerates the GraphQL types and the business-rules index, and prints what is left to do: \"pnpm db:generate --name <package>\" for each package whose backend changed, the required keys missing in backend/.env and the tools SQL scripts to run. It never generates or applies a schema migration.\n\nGit's three-way merge resolves ownership. A file the project never changed (for example under backend/src/@aurora/) takes the new rendering's content. A file the project changed (wiring, custom module declarations, aurora.yaml) keeps its changes and receives only the rendering's own delta. A file the rendering removed and the project never changed is deleted.\n\nWhen the project and the rendering change the same lines, the command exits non-zero, lists the conflicted files, names the post-merge steps to run after the resolution together with the backend/.env keys to add (with their value) or to set, and leaves the merge in progress. Resolve the markers, then \"git add\" and \"git commit\", or discard the upgrade with \"git merge --abort\"; the next run merges the same rendering again.\n\nThe \"aurora/scaffold\" branch must exist: \"catalyst new\" creates it. It lives in the clone that ran \"catalyst new\" until it is pushed: after each upgrade, \"git push origin aurora/scaffold\" together with the merged branch, and a fresh clone gets it with \"git fetch origin aurora/scaffold:aurora/scaffold\". Installed packages upgrade here together with the scaffold; the framework npm packages update through npm.\n\nA post-merge step that fails (for example the install without network) stops the command with a non-zero exit after the merge commit: it names the failed step and the ones not run, and prints the pending backend/.env keys, because a rerun finds the project up to date.\n\nTo restore a file to its pristine rendering: git checkout aurora/scaffold -- <path>\nTo undo a completed upgrade: git reset --hard ORIG_HEAD\nWhen the run created the migration commit (\"chore(catalyst): rename module definition files to <module>.module.yaml\"), it sits before the merge: after that reset, git reset --hard HEAD~1 undoes it too.",
853
- "examples": [
854
- "<%= config.bin %> upgrade",
855
- "<%= config.bin %> upgrade --verbose"
856
- ],
857
- "flags": {
858
- "verbose": {
859
- "char": "v",
860
- "description": "Report all steps on screen.",
861
- "name": "verbose",
862
- "allowNo": false,
863
- "type": "boolean"
864
- }
865
- },
866
- "hasDynamicHelp": false,
867
- "hiddenAliases": [],
868
- "id": "upgrade",
869
- "pluginAlias": "@aurorajs.dev/catalyst-cli",
870
- "pluginName": "@aurorajs.dev/catalyst-cli",
871
- "pluginType": "core",
872
- "strict": true,
873
- "summary": "Merge the current scaffold and the locked packages into an installed project through its \"aurora/scaffold\" branch.",
874
- "enableJsonFlag": false,
875
- "isESM": true,
876
- "relativePath": [
877
- "dist",
878
- "commands",
879
- "upgrade",
880
- "index.js"
881
- ]
882
- },
883
849
  "provision:audit": {
884
850
  "aliases": [],
885
851
  "args": {},
@@ -1240,7 +1206,41 @@
1240
1206
  "sheets",
1241
1207
  "validate.js"
1242
1208
  ]
1209
+ },
1210
+ "upgrade": {
1211
+ "aliases": [],
1212
+ "args": {},
1213
+ "description": "Run it from the root of the project, on the branch that should receive the upgrade. git must be on the PATH.\n\n1. It reads the installed packages from aurora.lock.yaml and refuses to run without it, or when the running CLI no longer ships a locked package. It also refuses, before changing anything, when the \"aurora/scaffold\" branch is missing or when a tracked file has staged or unstaged changes (untracked files do not count): commit or stash them first.\n2. It migrates the module definition files, with no version gate, so a rerun after a merge picks up late arrivals: it renames each cliter/<bc>/<module>.aurora.yaml to <module>.module.yaml with \"git mv\", rewrites in every tracked file the two generated lines that name the old file (the \"@source\" header and the field-schema \"derived from\" line, changing only the suffix), and recomputes the cliter/<bc>/.locks integrity of a rewritten file only when the stored hash matched the file before the rewrite, so a file you modified still shows up as modified. Developer comments and docs are not touched. If both names exist for one module it stops, naming both paths. When it changed something it commits exactly that in one commit, \"chore(catalyst): rename module definition files to <module>.module.yaml\", running the project's git hooks, before the merge.\n3. It renders the scaffold of the running CLI plus every locked package into a temporary directory, with the composition files generated from the package manifests and the lockfile updated to the running CLI version. The install, the backend/.env copy and the GraphQL codegen are not part of that rendering, so pnpm-lock.yaml, backend/.env and backend/src/@api/graphql.ts never enter it.\n4. It commits that rendering on \"aurora/scaffold\" as a child of its tip, without switching branches or touching the working tree. When the rendering equals the tip it creates no commit, and it reports the scaffold as up to date only when the tip is already contained in the checked-out branch; otherwise it runs the merge again.\n5. It runs \"git merge --no-edit aurora/scaffold\" on the checked-out branch.\n6. After a merge without conflict it installs the dependencies, appends to backend/.env the keys with a declared value that any locked package declares and the file lacks (an existing value is never changed), regenerates the GraphQL types and the business-rules index, and prints what is left to do: \"pnpm db:generate --name <package>\" for each package whose backend changed, the required keys missing in backend/.env and the tools SQL scripts to run. It never generates or applies a schema migration.\n\nGit's three-way merge resolves ownership. A file the project never changed (for example under backend/src/@aurora/) takes the new rendering's content. A file the project changed (wiring, custom module declarations, aurora.yaml) keeps its changes and receives only the rendering's own delta. A file the rendering removed and the project never changed is deleted.\n\nWhen the project and the rendering change the same lines, the command exits non-zero, lists the conflicted files, names the post-merge steps to run after the resolution together with the backend/.env keys to add (with their value) or to set, and leaves the merge in progress. Resolve the markers, then \"git add\" and \"git commit\", or discard the upgrade with \"git merge --abort\"; the next run merges the same rendering again.\n\nThe \"aurora/scaffold\" branch must exist: \"catalyst new\" creates it. It lives in the clone that ran \"catalyst new\" until it is pushed: after each upgrade, \"git push origin aurora/scaffold\" together with the merged branch, and a fresh clone gets it with \"git fetch origin aurora/scaffold:aurora/scaffold\". Installed packages upgrade here together with the scaffold; the framework npm packages update through npm.\n\nA post-merge step that fails (for example the install without network) stops the command with a non-zero exit after the merge commit: it names the failed step and the ones not run, and prints the pending backend/.env keys, because a rerun finds the project up to date.\n\nTo restore a file to its pristine rendering: git checkout aurora/scaffold -- <path>\nTo undo a completed upgrade: git reset --hard ORIG_HEAD\nWhen the run created the migration commit (\"chore(catalyst): rename module definition files to <module>.module.yaml\"), it sits before the merge: after that reset, git reset --hard HEAD~1 undoes it too.",
1214
+ "examples": [
1215
+ "<%= config.bin %> upgrade",
1216
+ "<%= config.bin %> upgrade --verbose"
1217
+ ],
1218
+ "flags": {
1219
+ "verbose": {
1220
+ "char": "v",
1221
+ "description": "Report all steps on screen.",
1222
+ "name": "verbose",
1223
+ "allowNo": false,
1224
+ "type": "boolean"
1225
+ }
1226
+ },
1227
+ "hasDynamicHelp": false,
1228
+ "hiddenAliases": [],
1229
+ "id": "upgrade",
1230
+ "pluginAlias": "@aurorajs.dev/catalyst-cli",
1231
+ "pluginName": "@aurorajs.dev/catalyst-cli",
1232
+ "pluginType": "core",
1233
+ "strict": true,
1234
+ "summary": "Merge the current scaffold and the locked packages into an installed project through its \"aurora/scaffold\" branch.",
1235
+ "enableJsonFlag": false,
1236
+ "isESM": true,
1237
+ "relativePath": [
1238
+ "dist",
1239
+ "commands",
1240
+ "upgrade",
1241
+ "index.js"
1242
+ ]
1243
1243
  }
1244
1244
  },
1245
- "version": "3.1.2"
1245
+ "version": "3.1.3"
1246
1246
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aurorajs.dev/catalyst-cli",
3
3
  "description": "A CLI tool to manage Aurora Catalyst projects",
4
- "version": "3.1.2",
4
+ "version": "3.1.3",
5
5
  "author": "José Carlos Rodríguez Palacín",
6
6
  "bin": {
7
7
  "catalyst": "./bin/run.js"
@@ -12,16 +12,16 @@
12
12
  "@inquirer/checkbox": "^5.1.0",
13
13
  "@inquirer/confirm": "^6.0.4",
14
14
  "@inquirer/select": "^5.0.4",
15
- "@oclif/core": "^4",
16
- "@oclif/plugin-autocomplete": "^3.2.40",
17
- "@oclif/plugin-help": "^6",
18
- "@oclif/plugin-plugins": "^5",
15
+ "@oclif/core": "^5.1.12",
16
+ "@oclif/plugin-autocomplete": "^4.0.6",
17
+ "@oclif/plugin-help": "^7.0.7",
18
+ "@oclif/plugin-plugins": "^7.0.16",
19
19
  "chalk": "^5.6.2",
20
20
  "diff": "^9.0.0",
21
21
  "dotenv": "^17.2.4",
22
22
  "eta": "^4.6.0",
23
- "google-auth-library": "10.5.0",
24
- "googleapis": "^171.4.0",
23
+ "google-auth-library": "11.3.4",
24
+ "googleapis": "^190.0.0",
25
25
  "js-yaml": "^5.5.0",
26
26
  "lodash-es": "^4.17.23",
27
27
  "ora": "^9.3.0",
@@ -30,28 +30,26 @@
30
30
  "yaml": "^2.8.2"
31
31
  },
32
32
  "devDependencies": {
33
- "@eslint/compat": "^1",
34
33
  "@oclif/prettier-config": "^0.2.1",
35
- "@oclif/test": "^4",
34
+ "@oclif/test": "^5.0.3",
36
35
  "@types/chai": "^4",
37
36
  "@types/lodash-es": "^4.17.12",
38
37
  "@types/mocha": "^10",
39
38
  "@types/node": "^18",
40
39
  "@types/uuid": "^10.0.0",
41
40
  "chai": "^4",
42
- "eslint": "^9",
43
- "eslint-config-oclif": "^6",
44
- "eslint-config-prettier": "^10",
45
- "mocha": "^11",
46
- "oclif": "^4",
47
- "shx": "^0.3.3",
41
+ "mocha": "^12.0.3",
42
+ "oclif": "^6.0.15",
43
+ "oxlint": "^1.93.0",
44
+ "oxlint-tsgolint": "^7.0.2007",
45
+ "shx": "^0.4.0",
48
46
  "ts-node": "^10",
49
47
  "typedoc": "^0.28.19",
50
48
  "typedoc-plugin-markdown": "^4.11.0",
51
49
  "typescript": "^5"
52
50
  },
53
51
  "engines": {
54
- "node": ">=18.0.0"
52
+ "node": ">=22.0.0"
55
53
  },
56
54
  "files": [
57
55
  "./ansible",
@@ -117,7 +115,7 @@
117
115
  "scripts": {
118
116
  "build": "shx rm -rf dist && tsc -b && shx cp -r src/templates dist/",
119
117
  "docs:api": "typedoc",
120
- "lint": "eslint",
118
+ "lint": "oxlint --type-aware --disable-nested-config .",
121
119
  "posttest": "pnpm lint",
122
120
  "test": "OCLIF_TEST_ROOT=\"$(pwd)\" mocha --forbid-only \"test/**/*.test.ts\""
123
121
  }
@@ -1,44 +0,0 @@
1
- /**
2
- * @aurora-catalyst-generated
3
- * @source cliter/automation/state-machine-history.module.yaml
4
- */
5
- import { Component } from '@angular/core';
6
- import { TranslocoDirective } from '@jsverse/transloco';
7
- import { NgIcon, provideIcons } from '@ng-icons/core';
8
- import { lucideMoreHorizontal } from '@ng-icons/lucide';
9
- import { HlmButtonImports } from '@spartan-ng/helm/button';
10
- import { HlmDropdownMenuImports } from '@spartan-ng/helm/dropdown-menu';
11
- import { type AutomationStateMachineHistory } from '@src/src/app/aurora.types';
12
- import { injectFlexRenderContext, type CellContext } from '@tanstack/angular-table';
13
-
14
- @Component({
15
- selector: 'au-state-machine-history-list-actions-cell',
16
- imports: [TranslocoDirective, NgIcon, HlmButtonImports, HlmDropdownMenuImports],
17
- providers: [provideIcons({ lucideMoreHorizontal })],
18
- template: `
19
- <ng-container *transloco="let t">
20
- <div class="flex">
21
- <button
22
- class="h-6 w-6 p-0.5"
23
- [hlmDropdownMenuTrigger]="menu"
24
- align="start"
25
- hlmBtn
26
- variant="ghost"
27
- >
28
- <ng-icon name="lucideMoreHorizontal" />
29
- <span class="sr-only">{{ t('OpenMenu') }}</span>
30
- </button>
31
- <ng-template #menu>
32
- <hlm-dropdown-menu class="w-40"></hlm-dropdown-menu>
33
- </ng-template>
34
- </div>
35
- </ng-container>
36
- `,
37
- })
38
- export class StateMachineHistoryListActionsCell {
39
- // injections
40
- private readonly context =
41
- injectFlexRenderContext<CellContext<AutomationStateMachineHistory, unknown>>();
42
-
43
- // inputs
44
- }