@hexagen-monaco/sync 0.4.0
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/LICENSE +33 -0
- package/README.md +181 -0
- package/dist/application/index.d.ts +3 -0
- package/dist/application/index.d.ts.map +1 -0
- package/dist/application/ports/index.d.ts +2 -0
- package/dist/application/ports/index.d.ts.map +1 -0
- package/dist/application/ports/out/architecture-graph-provider.port.d.ts +6 -0
- package/dist/application/ports/out/architecture-graph-provider.port.d.ts.map +1 -0
- package/dist/application/ports/out/file-system.port.d.ts +22 -0
- package/dist/application/ports/out/file-system.port.d.ts.map +1 -0
- package/dist/application/ports/out/generator-config.port.d.ts +51 -0
- package/dist/application/ports/out/generator-config.port.d.ts.map +1 -0
- package/dist/application/ports/out/index.d.ts +9 -0
- package/dist/application/ports/out/index.d.ts.map +1 -0
- package/dist/application/ports/out/linter-report-provider.port.d.ts +6 -0
- package/dist/application/ports/out/linter-report-provider.port.d.ts.map +1 -0
- package/dist/application/ports/out/ownership-registry.port.d.ts +35 -0
- package/dist/application/ports/out/ownership-registry.port.d.ts.map +1 -0
- package/dist/application/ports/out/project-configuration-read.port.d.ts +9 -0
- package/dist/application/ports/out/project-configuration-read.port.d.ts.map +1 -0
- package/dist/application/ports/out/symbol-reference-provider.port.d.ts +10 -0
- package/dist/application/ports/out/symbol-reference-provider.port.d.ts.map +1 -0
- package/dist/application/ports/out/workspace-file-provider.port.d.ts +14 -0
- package/dist/application/ports/out/workspace-file-provider.port.d.ts.map +1 -0
- package/dist/application/use-cases/get-architecture-graph.use-case.d.ts +8 -0
- package/dist/application/use-cases/get-architecture-graph.use-case.d.ts.map +1 -0
- package/dist/application/use-cases/get-linter-report.use-case.d.ts +8 -0
- package/dist/application/use-cases/get-linter-report.use-case.d.ts.map +1 -0
- package/dist/application/use-cases/get-manifest-resource.use-case.d.ts +8 -0
- package/dist/application/use-cases/get-manifest-resource.use-case.d.ts.map +1 -0
- package/dist/application/use-cases/index.d.ts +4 -0
- package/dist/application/use-cases/index.d.ts.map +1 -0
- package/dist/application/use-cases/refactoring-impact.use-case.d.ts +29 -0
- package/dist/application/use-cases/refactoring-impact.use-case.d.ts.map +1 -0
- package/dist/application/use-cases/stub-generation.use-case.d.ts +23 -0
- package/dist/application/use-cases/stub-generation.use-case.d.ts.map +1 -0
- package/dist/arch-linter-bin.d.ts +20 -0
- package/dist/arch-linter-bin.d.ts.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +12149 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/add/index.d.ts +8 -0
- package/dist/commands/add/index.d.ts.map +1 -0
- package/dist/commands/add/validate.d.ts +2 -0
- package/dist/commands/add/validate.d.ts.map +1 -0
- package/dist/commands/arch/add.d.ts +3 -0
- package/dist/commands/arch/add.d.ts.map +1 -0
- package/dist/commands/arch/context/command.d.ts +4 -0
- package/dist/commands/arch/context/command.d.ts.map +1 -0
- package/dist/commands/arch/context/persistence.d.ts +22 -0
- package/dist/commands/arch/context/persistence.d.ts.map +1 -0
- package/dist/commands/arch/context/wizard.d.ts +7 -0
- package/dist/commands/arch/context/wizard.d.ts.map +1 -0
- package/dist/commands/arch/diff.d.ts +3 -0
- package/dist/commands/arch/diff.d.ts.map +1 -0
- package/dist/commands/arch/edit.d.ts +9 -0
- package/dist/commands/arch/edit.d.ts.map +1 -0
- package/dist/commands/arch/index.d.ts +3 -0
- package/dist/commands/arch/index.d.ts.map +1 -0
- package/dist/commands/arch/list.d.ts +2 -0
- package/dist/commands/arch/list.d.ts.map +1 -0
- package/dist/commands/arch/port/persistence.d.ts +28 -0
- package/dist/commands/arch/port/persistence.d.ts.map +1 -0
- package/dist/commands/arch/port.d.ts +4 -0
- package/dist/commands/arch/port.d.ts.map +1 -0
- package/dist/commands/arch/refactor-rename-entity.d.ts +3 -0
- package/dist/commands/arch/refactor-rename-entity.d.ts.map +1 -0
- package/dist/commands/arch/refactor-rename-port.d.ts +3 -0
- package/dist/commands/arch/refactor-rename-port.d.ts.map +1 -0
- package/dist/commands/arch/refactor-rename-use-case.d.ts +3 -0
- package/dist/commands/arch/refactor-rename-use-case.d.ts.map +1 -0
- package/dist/commands/arch/refactor-shared.d.ts +11 -0
- package/dist/commands/arch/refactor-shared.d.ts.map +1 -0
- package/dist/commands/arch/refactor.d.ts +3 -0
- package/dist/commands/arch/refactor.d.ts.map +1 -0
- package/dist/commands/arch/remove/context.d.ts +7 -0
- package/dist/commands/arch/remove/context.d.ts.map +1 -0
- package/dist/commands/arch/remove/port.d.ts +7 -0
- package/dist/commands/arch/remove/port.d.ts.map +1 -0
- package/dist/commands/arch/remove.d.ts +3 -0
- package/dist/commands/arch/remove.d.ts.map +1 -0
- package/dist/commands/arch/validate.d.ts +2 -0
- package/dist/commands/arch/validate.d.ts.map +1 -0
- package/dist/commands/manifest/index.d.ts +3 -0
- package/dist/commands/manifest/index.d.ts.map +1 -0
- package/dist/commands/manifest/split-utils.d.ts +8 -0
- package/dist/commands/manifest/split-utils.d.ts.map +1 -0
- package/dist/commands/manifest/split.d.ts +3 -0
- package/dist/commands/manifest/split.d.ts.map +1 -0
- package/dist/commands/shared/confirm.d.ts +5 -0
- package/dist/commands/shared/confirm.d.ts.map +1 -0
- package/dist/commands/shared/error-formatter.d.ts +7 -0
- package/dist/commands/shared/error-formatter.d.ts.map +1 -0
- package/dist/commands/shared/index.d.ts +15 -0
- package/dist/commands/shared/index.d.ts.map +1 -0
- package/dist/commands/shared/project-root.d.ts +3 -0
- package/dist/commands/shared/project-root.d.ts.map +1 -0
- package/dist/commands/shared/prompt-service.d.ts +15 -0
- package/dist/commands/shared/prompt-service.d.ts.map +1 -0
- package/dist/commands/shared/spinner.d.ts +13 -0
- package/dist/commands/shared/spinner.d.ts.map +1 -0
- package/dist/commands/shared/template-engine-path.d.ts +12 -0
- package/dist/commands/shared/template-engine-path.d.ts.map +1 -0
- package/dist/commands/shared/validation.d.ts +15 -0
- package/dist/commands/shared/validation.d.ts.map +1 -0
- package/dist/commands/shared/yaml-service.d.ts +23 -0
- package/dist/commands/shared/yaml-service.d.ts.map +1 -0
- package/dist/commands/templates/index.d.ts +3 -0
- package/dist/commands/templates/index.d.ts.map +1 -0
- package/dist/commands/templates/info.d.ts +2 -0
- package/dist/commands/templates/info.d.ts.map +1 -0
- package/dist/commands/templates/list.d.ts +2 -0
- package/dist/commands/templates/list.d.ts.map +1 -0
- package/dist/config/barrel-exclusions.d.ts +10 -0
- package/dist/config/barrel-exclusions.d.ts.map +1 -0
- package/dist/config.d.ts +19 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/domain/index.d.ts +5 -0
- package/dist/domain/index.d.ts.map +1 -0
- package/dist/domain/result.d.ts +4 -0
- package/dist/domain/result.d.ts.map +1 -0
- package/dist/domain/services/architectural-boundary-checker.d.ts +18 -0
- package/dist/domain/services/architectural-boundary-checker.d.ts.map +1 -0
- package/dist/domain/services/emission-plan-builder.d.ts +17 -0
- package/dist/domain/services/emission-plan-builder.d.ts.map +1 -0
- package/dist/domain/services/impact-analysis.types.d.ts +24 -0
- package/dist/domain/services/impact-analysis.types.d.ts.map +1 -0
- package/dist/domain/services/impact-request-validator.d.ts +14 -0
- package/dist/domain/services/impact-request-validator.d.ts.map +1 -0
- package/dist/domain/services/index.d.ts +7 -0
- package/dist/domain/services/index.d.ts.map +1 -0
- package/dist/domain/services/layer-classifier.d.ts +4 -0
- package/dist/domain/services/layer-classifier.d.ts.map +1 -0
- package/dist/domain/services/stub-template-resolver.d.ts +16 -0
- package/dist/domain/services/stub-template-resolver.d.ts.map +1 -0
- package/dist/domain/session.d.ts +6 -0
- package/dist/domain/session.d.ts.map +1 -0
- package/dist/domain/stub-templates.d.ts +8 -0
- package/dist/domain/stub-templates.d.ts.map +1 -0
- package/dist/domain/types.d.ts +4 -0
- package/dist/domain/types.d.ts.map +1 -0
- package/dist/fs-utils.d.ts +28 -0
- package/dist/fs-utils.d.ts.map +1 -0
- package/dist/generators/apps-framework-templates.d.ts +4 -0
- package/dist/generators/apps-framework-templates.d.ts.map +1 -0
- package/dist/generators/apps.d.ts +5 -0
- package/dist/generators/apps.d.ts.map +1 -0
- package/dist/generators/architecture-file-templates.d.ts +9 -0
- package/dist/generators/architecture-file-templates.d.ts.map +1 -0
- package/dist/generators/architecture-files.d.ts +5 -0
- package/dist/generators/architecture-files.d.ts.map +1 -0
- package/dist/generators/barrels/index.d.ts +6 -0
- package/dist/generators/barrels/index.d.ts.map +1 -0
- package/dist/generators/barrels/recursive.d.ts +44 -0
- package/dist/generators/barrels/recursive.d.ts.map +1 -0
- package/dist/generators/barrels/utils.d.ts +56 -0
- package/dist/generators/barrels/utils.d.ts.map +1 -0
- package/dist/generators/barrels.d.ts +31 -0
- package/dist/generators/barrels.d.ts.map +1 -0
- package/dist/generators/eslint.d.ts +47 -0
- package/dist/generators/eslint.d.ts.map +1 -0
- package/dist/generators/layer-folders.d.ts +16 -0
- package/dist/generators/layer-folders.d.ts.map +1 -0
- package/dist/generators/migration-assistant.d.ts +7 -0
- package/dist/generators/migration-assistant.d.ts.map +1 -0
- package/dist/generators/migration-audit.d.ts +28 -0
- package/dist/generators/migration-audit.d.ts.map +1 -0
- package/dist/generators/migration-stubs.d.ts +7 -0
- package/dist/generators/migration-stubs.d.ts.map +1 -0
- package/dist/generators/package-json.d.ts +11 -0
- package/dist/generators/package-json.d.ts.map +1 -0
- package/dist/generators/port-analyzer.d.ts +56 -0
- package/dist/generators/port-analyzer.d.ts.map +1 -0
- package/dist/generators/reap.d.ts +11 -0
- package/dist/generators/reap.d.ts.map +1 -0
- package/dist/generators/root-file-templates.d.ts +8 -0
- package/dist/generators/root-file-templates.d.ts.map +1 -0
- package/dist/generators/root-files.d.ts +5 -0
- package/dist/generators/root-files.d.ts.map +1 -0
- package/dist/generators/stubs/index.d.ts +4 -0
- package/dist/generators/stubs/index.d.ts.map +1 -0
- package/dist/generators/stubs/stub-templates.d.ts +3 -0
- package/dist/generators/stubs/stub-templates.d.ts.map +1 -0
- package/dist/generators/stubs.d.ts +5 -0
- package/dist/generators/stubs.d.ts.map +1 -0
- package/dist/generators/test-generator.d.ts +7 -0
- package/dist/generators/test-generator.d.ts.map +1 -0
- package/dist/generators/test-templates/data-builder.d.ts +2 -0
- package/dist/generators/test-templates/data-builder.d.ts.map +1 -0
- package/dist/generators/test-templates/enhanced-test-double.d.ts +2 -0
- package/dist/generators/test-templates/enhanced-test-double.d.ts.map +1 -0
- package/dist/generators/test-templates/index.d.ts +5 -0
- package/dist/generators/test-templates/index.d.ts.map +1 -0
- package/dist/generators/test-templates/integration-test.d.ts +2 -0
- package/dist/generators/test-templates/integration-test.d.ts.map +1 -0
- package/dist/generators/test-templates/unit-test.d.ts +2 -0
- package/dist/generators/test-templates/unit-test.d.ts.map +1 -0
- package/dist/generators/tsconfig.d.ts +16 -0
- package/dist/generators/tsconfig.d.ts.map +1 -0
- package/dist/generators/validators/index.d.ts +11 -0
- package/dist/generators/validators/index.d.ts.map +1 -0
- package/dist/generators/validators/validate-dependencies.d.ts +7 -0
- package/dist/generators/validators/validate-dependencies.d.ts.map +1 -0
- package/dist/generators/validators/validate-manifest-sync.d.ts +5 -0
- package/dist/generators/validators/validate-manifest-sync.d.ts.map +1 -0
- package/dist/generators/validators/validate-port-adapter.d.ts +5 -0
- package/dist/generators/validators/validate-port-adapter.d.ts.map +1 -0
- package/dist/generators/validators/validation-types.d.ts +20 -0
- package/dist/generators/validators/validation-types.d.ts.map +1 -0
- package/dist/generators/validators.d.ts +7 -0
- package/dist/generators/validators.d.ts.map +1 -0
- package/dist/generators/wiring.d.ts +20 -0
- package/dist/generators/wiring.d.ts.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8070 -0
- package/dist/index.js.map +1 -0
- package/dist/infrastructure/adapters/atomic-file-system.adapter.d.ts +13 -0
- package/dist/infrastructure/adapters/atomic-file-system.adapter.d.ts.map +1 -0
- package/dist/infrastructure/adapters/file-system-workspace.adapter.d.ts +12 -0
- package/dist/infrastructure/adapters/file-system-workspace.adapter.d.ts.map +1 -0
- package/dist/infrastructure/adapters/in-memory-config-double.d.ts +30 -0
- package/dist/infrastructure/adapters/in-memory-config-double.d.ts.map +1 -0
- package/dist/infrastructure/adapters/index.d.ts +5 -0
- package/dist/infrastructure/adapters/index.d.ts.map +1 -0
- package/dist/infrastructure/adapters/yaml-config.adapter.d.ts +38 -0
- package/dist/infrastructure/adapters/yaml-config.adapter.d.ts.map +1 -0
- package/dist/infrastructure/index.d.ts +2 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/linter.d.ts +7 -0
- package/dist/linter.d.ts.map +1 -0
- package/dist/loaders/index.d.ts +2 -0
- package/dist/loaders/index.d.ts.map +1 -0
- package/dist/loaders/manifest-merge-loader.d.ts +3 -0
- package/dist/loaders/manifest-merge-loader.d.ts.map +1 -0
- package/dist/lock.d.ts +14 -0
- package/dist/lock.d.ts.map +1 -0
- package/dist/manifest-service.d.ts +10 -0
- package/dist/manifest-service.d.ts.map +1 -0
- package/dist/migration-report.d.ts +12 -0
- package/dist/migration-report.d.ts.map +1 -0
- package/dist/preflight.d.ts +7 -0
- package/dist/preflight.d.ts.map +1 -0
- package/dist/refactoring/git-operations.d.ts +9 -0
- package/dist/refactoring/git-operations.d.ts.map +1 -0
- package/dist/refactoring/impact-analyzer.d.ts +23 -0
- package/dist/refactoring/impact-analyzer.d.ts.map +1 -0
- package/dist/refactoring/index.d.ts +6 -0
- package/dist/refactoring/index.d.ts.map +1 -0
- package/dist/refactoring/refactoring-engine.d.ts +40 -0
- package/dist/refactoring/refactoring-engine.d.ts.map +1 -0
- package/dist/refactoring/refactoring-patterns/base-pattern.d.ts +37 -0
- package/dist/refactoring/refactoring-patterns/base-pattern.d.ts.map +1 -0
- package/dist/refactoring/refactoring-patterns/index.d.ts +5 -0
- package/dist/refactoring/refactoring-patterns/index.d.ts.map +1 -0
- package/dist/refactoring/refactoring-patterns/refactoring-utils.d.ts +8 -0
- package/dist/refactoring/refactoring-patterns/refactoring-utils.d.ts.map +1 -0
- package/dist/refactoring/refactoring-patterns/rename-entity.pattern.d.ts +19 -0
- package/dist/refactoring/refactoring-patterns/rename-entity.pattern.d.ts.map +1 -0
- package/dist/refactoring/refactoring-patterns/rename-port.pattern.d.ts +42 -0
- package/dist/refactoring/refactoring-patterns/rename-port.pattern.d.ts.map +1 -0
- package/dist/refactoring/refactoring-patterns/rename-use-case.pattern.d.ts +40 -0
- package/dist/refactoring/refactoring-patterns/rename-use-case.pattern.d.ts.map +1 -0
- package/dist/refactoring/safe-refactoring-orchestrator.d.ts +24 -0
- package/dist/refactoring/safe-refactoring-orchestrator.d.ts.map +1 -0
- package/dist/refactoring/validation-suite.d.ts +20 -0
- package/dist/refactoring/validation-suite.d.ts.map +1 -0
- package/dist/results.d.ts +16 -0
- package/dist/results.d.ts.map +1 -0
- package/dist/sync-engine-helpers.d.ts +15 -0
- package/dist/sync-engine-helpers.d.ts.map +1 -0
- package/dist/sync-engine-init.d.ts +12 -0
- package/dist/sync-engine-init.d.ts.map +1 -0
- package/dist/sync-engine.d.ts +21 -0
- package/dist/sync-engine.d.ts.map +1 -0
- package/dist/template-engine.d.ts +3 -0
- package/dist/template-engine.d.ts.map +1 -0
- package/dist/templates/__example__/files/example-output.txt +9 -0
- package/dist/templates/__example__/manifest.json +44 -0
- package/dist/templates/adobe-creative-production/README.md +89 -0
- package/dist/templates/adobe-creative-production/files/.env.adobe-creative-production.example +6 -0
- package/dist/templates/adobe-creative-production/files/src/domain/ports/out/creative-production.port.ts +62 -0
- package/dist/templates/adobe-creative-production/files/src/infrastructure/adobe/creative-production/creative-production.adapter.ts +144 -0
- package/dist/templates/adobe-creative-production/manifest.json +25 -0
- package/dist/templates/adobe-express/README.md +85 -0
- package/dist/templates/adobe-express/files/.env.adobe-express.example +7 -0
- package/dist/templates/adobe-express/files/src/domain/ports/out/express.port.ts +47 -0
- package/dist/templates/adobe-express/files/src/infrastructure/adobe/express/express.adapter.ts +155 -0
- package/dist/templates/adobe-express/manifest.json +32 -0
- package/dist/templates/adobe-firefly-composite/README.md +75 -0
- package/dist/templates/adobe-firefly-composite/files/.env.adobe-composite.example +5 -0
- package/dist/templates/adobe-firefly-composite/files/src/domain/ports/out/composite.port.ts +39 -0
- package/dist/templates/adobe-firefly-composite/files/src/infrastructure/adobe/composite/composite.adapter.ts +102 -0
- package/dist/templates/adobe-firefly-composite/manifest.json +32 -0
- package/dist/templates/adobe-firefly-content-tagging/README.md +70 -0
- package/dist/templates/adobe-firefly-content-tagging/files/.env.adobe-content-tagging.example +4 -0
- package/dist/templates/adobe-firefly-content-tagging/files/src/domain/ports/out/content-tagging.port.ts +28 -0
- package/dist/templates/adobe-firefly-content-tagging/files/src/infrastructure/adobe/content-tagging/content-tagging.adapter.ts +120 -0
- package/dist/templates/adobe-firefly-content-tagging/manifest.json +31 -0
- package/dist/templates/adobe-firefly-core/README.md +147 -0
- package/dist/templates/adobe-firefly-core/files/.env.adobe.example +15 -0
- package/dist/templates/adobe-firefly-core/files/src/domain/ports/out/firefly-auth.port.ts +11 -0
- package/dist/templates/adobe-firefly-core/files/src/domain/ports/out/firefly-job.port.ts +50 -0
- package/dist/templates/adobe-firefly-core/files/src/domain/ports/out/firefly-storage.port.ts +20 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/auth/ims-token-provider.adapter.ts +112 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/auth/smoke-token.ts +17 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/errors/firefly-errors.ts +91 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/http/firefly-client.ts +135 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/index.ts +46 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/jobs/job-poller.ts +52 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/jobs/job-port.ts +149 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/jobs/job-result.ts +113 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/jobs/webhook-verifier.ts +67 -0
- package/dist/templates/adobe-firefly-core/files/src/infrastructure/adobe/storage/passthrough-storage.adapter.ts +36 -0
- package/dist/templates/adobe-firefly-core/manifest.json +86 -0
- package/dist/templates/adobe-firefly-custom-models/README.md +96 -0
- package/dist/templates/adobe-firefly-custom-models/files/.env.adobe-custom-models.example +6 -0
- package/dist/templates/adobe-firefly-custom-models/files/src/domain/ports/out/custom-model.port.ts +77 -0
- package/dist/templates/adobe-firefly-custom-models/files/src/infrastructure/adobe/custom-models/firefly-custom-model.adapter.ts +199 -0
- package/dist/templates/adobe-firefly-custom-models/manifest.json +33 -0
- package/dist/templates/adobe-firefly-generate/README.md +86 -0
- package/dist/templates/adobe-firefly-generate/files/.env.adobe-generate.example +5 -0
- package/dist/templates/adobe-firefly-generate/files/src/domain/ports/out/image-generation.port.ts +61 -0
- package/dist/templates/adobe-firefly-generate/files/src/infrastructure/adobe/generate/firefly-generate.adapter.ts +167 -0
- package/dist/templates/adobe-firefly-generate/manifest.json +45 -0
- package/dist/templates/adobe-firefly-media/README.md +99 -0
- package/dist/templates/adobe-firefly-media/files/.env.adobe-media.example +8 -0
- package/dist/templates/adobe-firefly-media/files/src/domain/ports/out/media-generation.port.ts +80 -0
- package/dist/templates/adobe-firefly-media/files/src/infrastructure/adobe/media/firefly-media.adapter.ts +161 -0
- package/dist/templates/adobe-firefly-media/manifest.json +32 -0
- package/dist/templates/adobe-firefly-storage-azure/README.md +88 -0
- package/dist/templates/adobe-firefly-storage-azure/files/.env.adobe-storage-azure.example +9 -0
- package/dist/templates/adobe-firefly-storage-azure/files/src/infrastructure/adobe/storage/azure-blob-presign.adapter.ts +171 -0
- package/dist/templates/adobe-firefly-storage-azure/files/src/infrastructure/adobe/storage/azure-register.ts +15 -0
- package/dist/templates/adobe-firefly-storage-azure/manifest.json +37 -0
- package/dist/templates/adobe-firefly-storage-gcs/README.md +85 -0
- package/dist/templates/adobe-firefly-storage-gcs/files/.env.adobe-storage-gcs.example +8 -0
- package/dist/templates/adobe-firefly-storage-gcs/files/src/infrastructure/adobe/storage/gcs-presign.adapter.ts +100 -0
- package/dist/templates/adobe-firefly-storage-gcs/files/src/infrastructure/adobe/storage/gcs-register.ts +15 -0
- package/dist/templates/adobe-firefly-storage-gcs/manifest.json +33 -0
- package/dist/templates/adobe-firefly-storage-s3/README.md +76 -0
- package/dist/templates/adobe-firefly-storage-s3/files/.env.adobe-storage-s3.example +8 -0
- package/dist/templates/adobe-firefly-storage-s3/files/src/infrastructure/adobe/storage/s3-presign.adapter.ts +109 -0
- package/dist/templates/adobe-firefly-storage-s3/files/src/infrastructure/adobe/storage/s3-register.ts +15 -0
- package/dist/templates/adobe-firefly-storage-s3/manifest.json +31 -0
- package/dist/templates/adobe-firefly-upscale/README.md +68 -0
- package/dist/templates/adobe-firefly-upscale/files/.env.adobe-upscale.example +3 -0
- package/dist/templates/adobe-firefly-upscale/files/src/domain/ports/out/upscale.port.ts +25 -0
- package/dist/templates/adobe-firefly-upscale/files/src/infrastructure/adobe/upscale/upscale.adapter.ts +85 -0
- package/dist/templates/adobe-firefly-upscale/manifest.json +30 -0
- package/dist/templates/adobe-illustrator/README.md +80 -0
- package/dist/templates/adobe-illustrator/files/.env.adobe-illustrator.example +7 -0
- package/dist/templates/adobe-illustrator/files/src/domain/ports/out/illustrator.port.ts +51 -0
- package/dist/templates/adobe-illustrator/files/src/infrastructure/adobe/illustrator/illustrator.adapter.ts +167 -0
- package/dist/templates/adobe-illustrator/manifest.json +38 -0
- package/dist/templates/adobe-ims-spa/README.md +99 -0
- package/dist/templates/adobe-ims-spa/files/.env.adobe-ims.example +12 -0
- package/dist/templates/adobe-ims-spa/files/app/api/auth/callback/route.ts +84 -0
- package/dist/templates/adobe-ims-spa/files/app/api/auth/login/route.ts +30 -0
- package/dist/templates/adobe-ims-spa/files/app/api/auth/logout/route.ts +24 -0
- package/dist/templates/adobe-ims-spa/files/app/api/auth/me/route.ts +18 -0
- package/dist/templates/adobe-ims-spa/files/middleware.ts +74 -0
- package/dist/templates/adobe-ims-spa/files/src/domain/ports/out/ims-auth.port.ts +24 -0
- package/dist/templates/adobe-ims-spa/files/src/infrastructure/auth/adobe-ims/adobe-ims-auth.adapter.ts +71 -0
- package/dist/templates/adobe-ims-spa/files/src/infrastructure/auth/adobe-ims/config.ts +34 -0
- package/dist/templates/adobe-ims-spa/files/src/infrastructure/auth/adobe-ims/ims-client.ts +85 -0
- package/dist/templates/adobe-ims-spa/files/src/infrastructure/auth/adobe-ims/pkce.ts +37 -0
- package/dist/templates/adobe-ims-spa/files/src/infrastructure/auth/adobe-ims/token-store.ts +54 -0
- package/dist/templates/adobe-ims-spa/files/src/infrastructure/auth/adobe-ims/user-profile-mapper.ts +12 -0
- package/dist/templates/adobe-ims-spa/files/src/lib/auth/get-current-user.ts +56 -0
- package/dist/templates/adobe-ims-spa/files/src/lib/auth/require-auth.ts +11 -0
- package/dist/templates/adobe-ims-spa/manifest.json +88 -0
- package/dist/templates/adobe-indesign/README.md +76 -0
- package/dist/templates/adobe-indesign/files/.env.adobe-indesign.example +7 -0
- package/dist/templates/adobe-indesign/files/src/domain/ports/out/indesign.port.ts +43 -0
- package/dist/templates/adobe-indesign/files/src/infrastructure/adobe/indesign/indesign.adapter.ts +160 -0
- package/dist/templates/adobe-indesign/manifest.json +38 -0
- package/dist/templates/adobe-lightroom/README.md +81 -0
- package/dist/templates/adobe-lightroom/files/.env.adobe-lightroom.example +7 -0
- package/dist/templates/adobe-lightroom/files/src/domain/ports/out/lightroom.port.ts +36 -0
- package/dist/templates/adobe-lightroom/files/src/infrastructure/adobe/lightroom/lightroom.adapter.ts +145 -0
- package/dist/templates/adobe-lightroom/manifest.json +39 -0
- package/dist/templates/adobe-photoshop/README.md +87 -0
- package/dist/templates/adobe-photoshop/files/.env.adobe-photoshop.example +7 -0
- package/dist/templates/adobe-photoshop/files/src/domain/ports/out/photoshop-automation.port.ts +60 -0
- package/dist/templates/adobe-photoshop/files/src/infrastructure/adobe/photoshop/photoshop-automation.adapter.ts +180 -0
- package/dist/templates/adobe-photoshop/manifest.json +45 -0
- package/dist/templates/adobe-substance-3d/README.md +88 -0
- package/dist/templates/adobe-substance-3d/files/.env.adobe-substance-3d.example +12 -0
- package/dist/templates/adobe-substance-3d/files/src/domain/ports/out/substance-3d.port.ts +45 -0
- package/dist/templates/adobe-substance-3d/files/src/infrastructure/adobe/substance-3d/substance-3d.adapter.ts +177 -0
- package/dist/templates/adobe-substance-3d/manifest.json +39 -0
- package/dist/templates/agents-md/README.md +55 -0
- package/dist/templates/agents-md/files/.agents/architecture.md +42 -0
- package/dist/templates/agents-md/files/.agents/git.md +30 -0
- package/dist/templates/agents-md/files/.agents/session-log.md +37 -0
- package/dist/templates/agents-md/files/.agents/tech-stack.md +34 -0
- package/dist/templates/agents-md/files/.agents/testing.md +30 -0
- package/dist/templates/agents-md/files/AGENTS.md +97 -0
- package/dist/templates/agents-md/manifest.json +49 -0
- package/dist/templates/auth-mock/README.md +57 -0
- package/dist/templates/auth-mock/files/.env.auth.example +9 -0
- package/dist/templates/auth-mock/files/middleware.ts +28 -0
- package/dist/templates/auth-mock/manifest.json +23 -0
- package/dist/templates/bedrock-agentcore-runtime/README.md +68 -0
- package/dist/templates/bedrock-agentcore-runtime/files/.env.agentcore.example +19 -0
- package/dist/templates/bedrock-agentcore-runtime/files/.github/workflows/deploy-agentcore.yml +100 -0
- package/dist/templates/bedrock-agentcore-runtime/files/Dockerfile.agentcore +33 -0
- package/dist/templates/bedrock-agentcore-runtime/files/agentcore/agentcore.json +16 -0
- package/dist/templates/bedrock-agentcore-runtime/files/agentcore/aws-targets.json +7 -0
- package/dist/templates/bedrock-agentcore-runtime/files/iam/agentcore-runtime-role.policy.json +49 -0
- package/dist/templates/bedrock-agentcore-runtime/files/infra/agentcore-stack.ts +90 -0
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/http/invocations.handler.ts +152 -0
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/http/ping.handler.ts +13 -0
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/http/server.ts +134 -0
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/runtime/payload.ts +63 -0
- package/dist/templates/bedrock-agentcore-runtime/files/src/infrastructure/agentcore/runtime/session.ts +58 -0
- package/dist/templates/bedrock-agentcore-runtime/manifest.json +89 -0
- package/dist/templates/bedrock-agentcore-services/README.md +65 -0
- package/dist/templates/bedrock-agentcore-services/files/.env.agentcore-services.example +20 -0
- package/dist/templates/bedrock-agentcore-services/files/agentcore/agentcore-services.json +14 -0
- package/dist/templates/bedrock-agentcore-services/files/src/domain/ports/out/agent-identity.port.ts +26 -0
- package/dist/templates/bedrock-agentcore-services/files/src/domain/ports/out/agent-memory.port.ts +30 -0
- package/dist/templates/bedrock-agentcore-services/files/src/domain/ports/out/tool-gateway.port.ts +27 -0
- package/dist/templates/bedrock-agentcore-services/files/src/infrastructure/agentcore/gateway/agentcore-gateway.adapter.ts +103 -0
- package/dist/templates/bedrock-agentcore-services/files/src/infrastructure/agentcore/gateway/mcp-tool-mapper.ts +44 -0
- package/dist/templates/bedrock-agentcore-services/files/src/infrastructure/agentcore/identity/agentcore-identity.adapter.ts +82 -0
- package/dist/templates/bedrock-agentcore-services/files/src/infrastructure/agentcore/identity/idp-bridge.ts +74 -0
- package/dist/templates/bedrock-agentcore-services/files/src/infrastructure/agentcore/memory/agentcore-memory.adapter.ts +82 -0
- package/dist/templates/bedrock-agentcore-services/files/src/infrastructure/agentcore/memory/memory-config.ts +45 -0
- package/dist/templates/bedrock-agentcore-services/manifest.json +97 -0
- package/dist/templates/better-auth/README.md +60 -0
- package/dist/templates/better-auth/files/.env.better-auth.example +20 -0
- package/dist/templates/better-auth/files/app/api/auth/[...all]/route.ts +5 -0
- package/dist/templates/better-auth/files/src/db/index.ts +10 -0
- package/dist/templates/better-auth/files/src/db/migrations/0001_better_auth.sql +49 -0
- package/dist/templates/better-auth/files/src/db/schema/better-auth.ts +57 -0
- package/dist/templates/better-auth/files/src/lib/auth-client.ts +13 -0
- package/dist/templates/better-auth/files/src/lib/auth.ts +72 -0
- package/dist/templates/better-auth/manifest.json +71 -0
- package/dist/templates/bullmq/README.md +61 -0
- package/dist/templates/bullmq/files/.env.bullmq.example +34 -0
- package/dist/templates/bullmq/files/app/admin/queues/[[...slug]]/route.ts +103 -0
- package/dist/templates/bullmq/files/scripts/start-worker.ts +55 -0
- package/dist/templates/bullmq/files/server/startup/start-workers.ts +171 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/connection.ts +105 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/fallback/sync-executor.ts +96 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/index.ts +30 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/jobs/ai-generation.job.ts +53 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/jobs/email.job.ts +42 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/jobs/export.job.ts +49 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/jobs/image-processing.job.ts +48 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/jobs/webhook.job.ts +139 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/parse-int-env.ts +28 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/queues.ts +153 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/scheduler/job-scheduler.ts +70 -0
- package/dist/templates/bullmq/files/src/infrastructure/queue/workers.ts +101 -0
- package/dist/templates/bullmq/manifest.json +120 -0
- package/dist/templates/ci-github-actions/README.md +62 -0
- package/dist/templates/ci-github-actions/files/.github/dependabot.yml +20 -0
- package/dist/templates/ci-github-actions/files/.github/workflows/ci.yml +103 -0
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-fly.yml +30 -0
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-railway.yml +32 -0
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-vercel.yml +39 -0
- package/dist/templates/ci-github-actions/files/.github/workflows/deploy-vps.yml +34 -0
- package/dist/templates/ci-github-actions/files/.github/workflows/preview.yml +58 -0
- package/dist/templates/ci-github-actions/files/fly.toml +23 -0
- package/dist/templates/ci-github-actions/manifest.json +100 -0
- package/dist/templates/clerk/README.md +59 -0
- package/dist/templates/clerk/files/.env.clerk.example +11 -0
- package/dist/templates/clerk/files/app/(protected)/layout.tsx +18 -0
- package/dist/templates/clerk/files/app/api/protected-example/route.ts +17 -0
- package/dist/templates/clerk/files/middleware.ts +25 -0
- package/dist/templates/clerk/files/src/lib/auth.ts +12 -0
- package/dist/templates/clerk/files/src/lib/role-guard.tsx +32 -0
- package/dist/templates/clerk/manifest.json +67 -0
- package/dist/templates/design-system/README.md +60 -0
- package/dist/templates/design-system/files/.storybook/main.ts +9 -0
- package/dist/templates/design-system/files/.storybook/preview.ts +13 -0
- package/dist/templates/design-system/files/DESIGN.md +76 -0
- package/dist/templates/design-system/files/src/components/ui/button.stories.tsx +17 -0
- package/dist/templates/design-system/files/src/components/ui/button.tsx +61 -0
- package/dist/templates/design-system/files/src/components/ui/card.tsx +40 -0
- package/dist/templates/design-system/files/src/components/ui/index.ts +6 -0
- package/dist/templates/design-system/files/src/components/ui/input.tsx +29 -0
- package/dist/templates/design-system/files/src/lib/cn.ts +13 -0
- package/dist/templates/design-system/files/src/styles/globals.css +37 -0
- package/dist/templates/design-system/files/src/styles/theme.ts +56 -0
- package/dist/templates/design-system/files/src/styles/tokens.css +73 -0
- package/dist/templates/design-system/files/tailwind.config.ts +58 -0
- package/dist/templates/design-system/manifest.json +81 -0
- package/dist/templates/docker/README.md +62 -0
- package/dist/templates/docker/files/.dockerignore +34 -0
- package/dist/templates/docker/files/.github/workflows/docker-build.yml +74 -0
- package/dist/templates/docker/files/Dockerfile +57 -0
- package/dist/templates/docker/files/docker-compose.ci.yml +22 -0
- package/dist/templates/docker/files/docker-compose.override.yml +20 -0
- package/dist/templates/docker/files/docker-compose.yml +109 -0
- package/dist/templates/docker/manifest.json +59 -0
- package/dist/templates/env-setup/README.md +70 -0
- package/dist/templates/env-setup/files/.env.example +28 -0
- package/dist/templates/env-setup/files/.gitignore.hexagen +16 -0
- package/dist/templates/env-setup/files/SETUP.md +70 -0
- package/dist/templates/env-setup/files/scripts/check-env.ts +95 -0
- package/dist/templates/env-setup/files/src/config/env.client.ts +18 -0
- package/dist/templates/env-setup/files/src/config/env.server.ts +49 -0
- package/dist/templates/env-setup/files/src/config/env.ts +14 -0
- package/dist/templates/env-setup/files/src/config/load-env.ts +40 -0
- package/dist/templates/env-setup/manifest.json +55 -0
- package/dist/templates/error-handling/README.md +72 -0
- package/dist/templates/error-handling/files/.env.sentry.example +8 -0
- package/dist/templates/error-handling/files/app/components/ErrorBoundary.tsx +49 -0
- package/dist/templates/error-handling/files/app/components/ErrorFallback.tsx +35 -0
- package/dist/templates/error-handling/files/server/middleware/error-handler.ts +131 -0
- package/dist/templates/error-handling/files/src/application/errors/application.error.ts +33 -0
- package/dist/templates/error-handling/files/src/domain/errors/authorization.error.ts +20 -0
- package/dist/templates/error-handling/files/src/domain/errors/domain.error.ts +23 -0
- package/dist/templates/error-handling/files/src/domain/errors/not-found.error.ts +11 -0
- package/dist/templates/error-handling/files/src/domain/errors/validation.error.ts +17 -0
- package/dist/templates/error-handling/files/src/infrastructure/errors/external-service.error.ts +24 -0
- package/dist/templates/error-handling/files/src/infrastructure/errors/infrastructure.error.ts +22 -0
- package/dist/templates/error-handling/files/src/infrastructure/errors/llm-errors.ts +57 -0
- package/dist/templates/error-handling/files/src/shared/errors/error-codes.ts +29 -0
- package/dist/templates/error-handling/files/src/shared/result.ts +38 -0
- package/dist/templates/error-handling/manifest.json +63 -0
- package/dist/templates/eslint-no-console/README.md +78 -0
- package/dist/templates/eslint-no-console/files/eslint.no-console.mjs +35 -0
- package/dist/templates/eslint-no-console/manifest.json +28 -0
- package/dist/templates/github-oauth/README.md +61 -0
- package/dist/templates/github-oauth/files/.env.github-oauth.example +13 -0
- package/dist/templates/github-oauth/files/app/api/auth/callback/github/route.ts +105 -0
- package/dist/templates/github-oauth/files/app/api/auth/login/github/route.ts +33 -0
- package/dist/templates/github-oauth/files/app/api/auth/logout/github/route.ts +8 -0
- package/dist/templates/github-oauth/files/app/api/auth/me/route.ts +10 -0
- package/dist/templates/github-oauth/files/middleware.ts +59 -0
- package/dist/templates/github-oauth/files/src/infrastructure/auth/github/config.ts +34 -0
- package/dist/templates/github-oauth/files/src/infrastructure/auth/github/github-auth.adapter.ts +12 -0
- package/dist/templates/github-oauth/files/src/infrastructure/auth/github/github-client.ts +95 -0
- package/dist/templates/github-oauth/files/src/infrastructure/auth/github/github-user.ts +8 -0
- package/dist/templates/github-oauth/files/src/infrastructure/auth/github/session-store.ts +56 -0
- package/dist/templates/github-oauth/files/src/infrastructure/auth/github/user-profile-mapper.ts +24 -0
- package/dist/templates/github-oauth/files/src/lib/auth/get-current-user.ts +31 -0
- package/dist/templates/github-oauth/files/src/lib/auth/require-auth.ts +11 -0
- package/dist/templates/github-oauth/manifest.json +83 -0
- package/dist/templates/google-oauth/README.md +70 -0
- package/dist/templates/google-oauth/files/.env.google-oauth.example +14 -0
- package/dist/templates/google-oauth/files/app/api/auth/callback/google/route.ts +78 -0
- package/dist/templates/google-oauth/files/app/api/auth/login/google/route.ts +34 -0
- package/dist/templates/google-oauth/files/app/api/auth/logout/google/route.ts +8 -0
- package/dist/templates/google-oauth/files/app/api/auth/me/route.ts +13 -0
- package/dist/templates/google-oauth/files/middleware.ts +62 -0
- package/dist/templates/google-oauth/files/src/infrastructure/auth/google/config.ts +29 -0
- package/dist/templates/google-oauth/files/src/infrastructure/auth/google/google-auth.adapter.ts +22 -0
- package/dist/templates/google-oauth/files/src/infrastructure/auth/google/google-client.ts +65 -0
- package/dist/templates/google-oauth/files/src/infrastructure/auth/google/google-user.ts +9 -0
- package/dist/templates/google-oauth/files/src/infrastructure/auth/google/session-store.ts +62 -0
- package/dist/templates/google-oauth/files/src/infrastructure/auth/google/user-profile-mapper.ts +24 -0
- package/dist/templates/google-oauth/files/src/lib/auth/get-current-user.ts +36 -0
- package/dist/templates/google-oauth/files/src/lib/auth/require-auth.ts +13 -0
- package/dist/templates/google-oauth/manifest.json +82 -0
- package/dist/templates/langgraph/README.md +60 -0
- package/dist/templates/langgraph/files/.env.langgraph.example +26 -0
- package/dist/templates/langgraph/files/app/api/agent/invoke/route.ts +48 -0
- package/dist/templates/langgraph/files/app/api/agent/resume/route.ts +66 -0
- package/dist/templates/langgraph/files/app/api/agent/stream/route.ts +63 -0
- package/dist/templates/langgraph/files/src/domain/ports/out/agent-graph.port.ts +78 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/adapters/langgraph.adapter.ts +185 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/checkpointers/index.ts +84 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/checkpointers/memory-checkpointer.ts +12 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/checkpointers/postgres-checkpointer.ts +20 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/checkpointers/redis-checkpointer.ts +25 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/checkpointers/supabase-checkpointer.ts +26 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/edges/routing.ts +31 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/graphs/research-agent.graph.ts +81 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/graphs/simple-chain.graph.ts +81 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/index.ts +23 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/human-review.node.ts +34 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/input-processor.node.ts +31 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/llm-call.node.ts +38 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/output-formatter.node.ts +27 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/planner.node.ts +51 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/researcher.node.ts +63 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/nodes/synthesiser.node.ts +62 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/state/graph-state.ts +57 -0
- package/dist/templates/langgraph/files/src/infrastructure/langgraph/streaming/token-stream.ts +84 -0
- package/dist/templates/langgraph/manifest.json +131 -0
- package/dist/templates/llm-adapter/README.md +63 -0
- package/dist/templates/llm-adapter/files/.env.llm.example +49 -0
- package/dist/templates/llm-adapter/files/src/domain/ports/out/llm-client.port.ts +36 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/anthropic-llm-client.adapter.ts +111 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/azure-openai-llm-client.adapter.ts +105 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/ollama-llm-client.adapter.ts +102 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/openai-llm-client.adapter.ts +104 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/adapters/xai-llm-client.adapter.ts +104 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/constants/capabilities.ts +38 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/constants/models.ts +39 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/errors/llm-errors.ts +83 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/index.ts +39 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/router/llm-router.ts +117 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/router/provider-registry.ts +45 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/smoke-test.ts +25 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/utils/parse-env.ts +8 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/utils/retry.ts +39 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/utils/structured-output.ts +78 -0
- package/dist/templates/llm-adapter/files/src/infrastructure/llm/utils/timeout.ts +22 -0
- package/dist/templates/llm-adapter/manifest.json +113 -0
- package/dist/templates/llm-adapter-bedrock/README.md +58 -0
- package/dist/templates/llm-adapter-bedrock/files/.env.bedrock.example +23 -0
- package/dist/templates/llm-adapter-bedrock/files/src/infrastructure/llm/adapters/bedrock-llm-client.adapter.ts +126 -0
- package/dist/templates/llm-adapter-bedrock/files/src/infrastructure/llm/adapters/bedrock-register.ts +20 -0
- package/dist/templates/llm-adapter-bedrock/files/src/infrastructure/llm/errors/bedrock-errors.ts +42 -0
- package/dist/templates/llm-adapter-bedrock/manifest.json +51 -0
- package/dist/templates/magic-link/README.md +66 -0
- package/dist/templates/magic-link/files/.env.magic-link.example +24 -0
- package/dist/templates/magic-link/files/app/api/auth/logout/route.ts +12 -0
- package/dist/templates/magic-link/files/app/api/auth/magic-link/request/route.ts +34 -0
- package/dist/templates/magic-link/files/app/api/auth/magic-link/verify/route.ts +41 -0
- package/dist/templates/magic-link/files/app/api/auth/me/route.ts +10 -0
- package/dist/templates/magic-link/files/middleware.ts +60 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/config.ts +17 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/email-templates.ts +46 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/email-transport.ts +71 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/magic-link-auth.adapter.ts +11 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/magic-link-store.ts +31 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/session-store.ts +56 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/token-generator.ts +71 -0
- package/dist/templates/magic-link/files/src/infrastructure/auth/magic-link/user-profile-mapper.ts +10 -0
- package/dist/templates/magic-link/files/src/lib/auth/get-current-user.ts +28 -0
- package/dist/templates/magic-link/files/src/lib/auth/require-auth.ts +11 -0
- package/dist/templates/magic-link/manifest.json +99 -0
- package/dist/templates/microsoft-entra/README.md +63 -0
- package/dist/templates/microsoft-entra/files/.env.microsoft-entra.example +17 -0
- package/dist/templates/microsoft-entra/files/app/api/auth/callback/entra/route.ts +93 -0
- package/dist/templates/microsoft-entra/files/app/api/auth/login/entra/route.ts +29 -0
- package/dist/templates/microsoft-entra/files/app/api/auth/logout/entra/route.ts +26 -0
- package/dist/templates/microsoft-entra/files/app/api/auth/me/route.ts +10 -0
- package/dist/templates/microsoft-entra/files/middleware.ts +59 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/config.ts +43 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/entra-auth.adapter.ts +14 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/entra-client.ts +82 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/entra-user.ts +9 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/group-role-mapper.ts +22 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/pkce.ts +20 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/session-store.ts +56 -0
- package/dist/templates/microsoft-entra/files/src/infrastructure/auth/entra/user-profile-mapper.ts +33 -0
- package/dist/templates/microsoft-entra/files/src/lib/auth/get-current-user.ts +31 -0
- package/dist/templates/microsoft-entra/files/src/lib/auth/require-auth.ts +11 -0
- package/dist/templates/microsoft-entra/manifest.json +93 -0
- package/dist/templates/nextauth/README.md +61 -0
- package/dist/templates/nextauth/files/.env.nextauth.example +16 -0
- package/dist/templates/nextauth/files/app/api/auth/[...nextauth]/route.ts +4 -0
- package/dist/templates/nextauth/files/middleware.ts +17 -0
- package/dist/templates/nextauth/files/src/auth.config.ts +41 -0
- package/dist/templates/nextauth/files/src/auth.ts +67 -0
- package/dist/templates/nextauth/files/types/next-auth.d.ts +16 -0
- package/dist/templates/nextauth/manifest.json +74 -0
- package/dist/templates/observability/README.md +69 -0
- package/dist/templates/observability/files/.env.observability.example +12 -0
- package/dist/templates/observability/files/.env.otel.example +7 -0
- package/dist/templates/observability/files/app/api/health/route.ts +37 -0
- package/dist/templates/observability/files/instrumentation.ts +52 -0
- package/dist/templates/observability/files/server/middleware/request-logger.ts +53 -0
- package/dist/templates/observability/files/src/infrastructure/logging/context.ts +21 -0
- package/dist/templates/observability/files/src/infrastructure/logging/correlation.ts +39 -0
- package/dist/templates/observability/files/src/infrastructure/logging/index.ts +12 -0
- package/dist/templates/observability/files/src/infrastructure/logging/logger.ts +68 -0
- package/dist/templates/observability/files/src/infrastructure/logging/redact.ts +89 -0
- package/dist/templates/observability/manifest.json +57 -0
- package/dist/templates/rate-limiting/README.md +63 -0
- package/dist/templates/rate-limiting/files/.env.rate-limit.example +21 -0
- package/dist/templates/rate-limiting/files/server/errors/rate-limit-exceeded.error.ts +43 -0
- package/dist/templates/rate-limiting/files/server/middleware/rate-limit.ts +79 -0
- package/dist/templates/rate-limiting/files/server/utils/get-client-ip.ts +27 -0
- package/dist/templates/rate-limiting/files/server/utils/rate-limiter.ts +82 -0
- package/dist/templates/rate-limiting/files/server/utils/session-id.ts +28 -0
- package/dist/templates/rate-limiting/files/types/rate-limit.d.ts +12 -0
- package/dist/templates/rate-limiting/manifest.json +66 -0
- package/dist/templates/shared-types/README.md +59 -0
- package/dist/templates/shared-types/files/.env.shared-types.example +14 -0
- package/dist/templates/shared-types/files/src/domain/value-objects/user-context.ts +11 -0
- package/dist/templates/shared-types/files/src/infrastructure/auth/mock-user.ts +16 -0
- package/dist/templates/shared-types/files/src/infrastructure/auth/session/session-manager.ts +59 -0
- package/dist/templates/shared-types/manifest.json +37 -0
- package/dist/templates/supabase/README.md +59 -0
- package/dist/templates/supabase/files/.env.supabase.example +15 -0
- package/dist/templates/supabase/files/drizzle.config.ts +15 -0
- package/dist/templates/supabase/files/scripts/gen-types.sh +9 -0
- package/dist/templates/supabase/files/scripts/migrate.ts +23 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/admin.ts +23 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/client.ts +16 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/drizzle/client.ts +17 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/drizzle/schema.ts +10 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/realtime/subscribe.ts +41 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/result.ts +30 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/server.ts +28 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/storage/delete.ts +17 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/storage/download.ts +17 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/storage/index.ts +4 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/storage/signed-url.ts +26 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/storage/upload.ts +24 -0
- package/dist/templates/supabase/files/src/infrastructure/supabase/types/database.types.ts +10 -0
- package/dist/templates/supabase/files/supabase/migrations/0001_example_rls.sql +23 -0
- package/dist/templates/supabase/files/supabase/seed.sql +7 -0
- package/dist/templates/supabase/manifest.json +133 -0
- package/dist/templates/supabase-auth/README.md +55 -0
- package/dist/templates/supabase-auth/files/app/api/auth/me/route.ts +10 -0
- package/dist/templates/supabase-auth/files/middleware.ts +108 -0
- package/dist/templates/supabase-auth/files/src/lib/auth/get-current-user.ts +46 -0
- package/dist/templates/supabase-auth/files/src/lib/auth/require-auth.ts +11 -0
- package/dist/templates/supabase-auth/manifest.json +40 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/manifest/apps.d.ts +24 -0
- package/dist/types/manifest/apps.d.ts.map +1 -0
- package/dist/types/manifest/bounded-context.d.ts +43 -0
- package/dist/types/manifest/bounded-context.d.ts.map +1 -0
- package/dist/types/manifest/generator.d.ts +51 -0
- package/dist/types/manifest/generator.d.ts.map +1 -0
- package/dist/types/manifest/helpers.d.ts +30 -0
- package/dist/types/manifest/helpers.d.ts.map +1 -0
- package/dist/types/manifest/index.d.ts +8 -0
- package/dist/types/manifest/index.d.ts.map +1 -0
- package/dist/types/manifest/layers.d.ts +32 -0
- package/dist/types/manifest/layers.d.ts.map +1 -0
- package/dist/types/manifest/manifest.d.ts +64 -0
- package/dist/types/manifest/manifest.d.ts.map +1 -0
- package/dist/types/manifest/monorepo.d.ts +94 -0
- package/dist/types/manifest/monorepo.d.ts.map +1 -0
- package/dist/types/manifest.d.ts +2 -0
- package/dist/types/manifest.d.ts.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
// @hexagen-server-only
|
|
2
|
+
import type {
|
|
3
|
+
CompositeRequest,
|
|
4
|
+
RelightRequest,
|
|
5
|
+
RenderRequest,
|
|
6
|
+
Substance3DFormat,
|
|
7
|
+
Substance3DPort,
|
|
8
|
+
} from "../../../domain/ports/out/substance-3d.port";
|
|
9
|
+
import { fireflyClient } from "../http/firefly-client";
|
|
10
|
+
import { jobPort } from "../jobs/job-port";
|
|
11
|
+
import { toJobHandle } from "../jobs/job-result";
|
|
12
|
+
import { getStoragePresigner } from "../storage/passthrough-storage.adapter";
|
|
13
|
+
import { classifyAdobeError, FireflyError } from "../errors/firefly-errors";
|
|
14
|
+
import { ok, err, type Result } from "../../../shared/result";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Adobe Substance 3D adapter — the Substance↔domain boundary for {@link Substance3DPort}.
|
|
18
|
+
*
|
|
19
|
+
* Enabled operations (install): {operations}. The Substance 3D API lives on the
|
|
20
|
+
* image.adobe.io host family (same as Photoshop/Lightroom/Illustrator/InDesign/
|
|
21
|
+
* Express — a different host than firefly-api.adobe.io), so the adapter posts
|
|
22
|
+
* ABSOLUTE URLs; the shared `fireflyClient` passes those through with the same
|
|
23
|
+
* IMS auth. Each call presigns its IO, submits the async job, and awaits the result.
|
|
24
|
+
*
|
|
25
|
+
* These are the LONGEST-RUNNING Firefly jobs. image.adobe.io services don't deliver
|
|
26
|
+
* Firefly webhooks, so the wait ALWAYS goes through the centralised job port's
|
|
27
|
+
* status-URL poll, regardless of the project's job_mode — webhook mode and its
|
|
28
|
+
* timeout knob don't apply here. The poll has no max-wait cap (so a long render is
|
|
29
|
+
* not cut off); raise ADOBE_JOB_POLL_INTERVAL_MS to throttle status checks during
|
|
30
|
+
* long renders.
|
|
31
|
+
*
|
|
32
|
+
* NOTE: host/paths/payloads version frequently — verify against Adobe docs.
|
|
33
|
+
*/
|
|
34
|
+
const SUBSTANCE_3D_BASE = normalizeBase(
|
|
35
|
+
process.env.ADOBE_SUBSTANCE_3D_BASE_URL?.trim() || "https://image.adobe.io",
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
// Strictly validate the env value rather than blind-casting — an invalid value
|
|
39
|
+
// would otherwise reach the API. Fall back to the (always-valid) install default.
|
|
40
|
+
const rawDefaultFormat = process.env.ADOBE_SUBSTANCE_3D_FORMAT?.trim();
|
|
41
|
+
const DEFAULT_FORMAT: Substance3DFormat =
|
|
42
|
+
rawDefaultFormat === "png" || rawDefaultFormat === "jpg"
|
|
43
|
+
? rawDefaultFormat
|
|
44
|
+
: "{output_format}";
|
|
45
|
+
|
|
46
|
+
export class Substance3DAdapter implements Substance3DPort {
|
|
47
|
+
async render(req: RenderRequest): Promise<Result<string, FireflyError>> {
|
|
48
|
+
return this.run(async () => {
|
|
49
|
+
const { input, output } = await this.presignIO(req);
|
|
50
|
+
return {
|
|
51
|
+
path: endpoint("render"),
|
|
52
|
+
body: {
|
|
53
|
+
inputs: [external(input)],
|
|
54
|
+
outputs: [outputSpec(output, req.format ?? DEFAULT_FORMAT)],
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async composite(
|
|
61
|
+
req: CompositeRequest,
|
|
62
|
+
): Promise<Result<string, FireflyError>> {
|
|
63
|
+
return this.run(async () => {
|
|
64
|
+
const storage = getStoragePresigner();
|
|
65
|
+
const input = await storage.presignInput(req.inputHref);
|
|
66
|
+
const background = await storage.presignInput(req.backgroundHref);
|
|
67
|
+
const output = await storage.presignOutput(req.outputHref);
|
|
68
|
+
return {
|
|
69
|
+
path: endpoint("composite"),
|
|
70
|
+
body: {
|
|
71
|
+
inputs: [external(input.href)],
|
|
72
|
+
options: { background: external(background.href) },
|
|
73
|
+
outputs: [outputSpec(output.href, req.format ?? DEFAULT_FORMAT)],
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
async relight(req: RelightRequest): Promise<Result<string, FireflyError>> {
|
|
80
|
+
return this.run(async () => {
|
|
81
|
+
const storage = getStoragePresigner();
|
|
82
|
+
const input = await storage.presignInput(req.inputHref);
|
|
83
|
+
const environment = await storage.presignInput(req.environmentHref);
|
|
84
|
+
const output = await storage.presignOutput(req.outputHref);
|
|
85
|
+
return {
|
|
86
|
+
path: endpoint("relight"),
|
|
87
|
+
body: {
|
|
88
|
+
inputs: [external(input.href)],
|
|
89
|
+
options: { environment: external(environment.href) },
|
|
90
|
+
outputs: [outputSpec(output.href, req.format ?? DEFAULT_FORMAT)],
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
private async presignIO(req: {
|
|
97
|
+
inputHref: string;
|
|
98
|
+
outputHref: string;
|
|
99
|
+
}): Promise<{ input: string; output: string }> {
|
|
100
|
+
const storage = getStoragePresigner();
|
|
101
|
+
const input = await storage.presignInput(req.inputHref);
|
|
102
|
+
const output = await storage.presignOutput(req.outputHref);
|
|
103
|
+
return { input: input.href, output: output.href };
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
private async run(
|
|
107
|
+
build: () => Promise<{ path: string; body: unknown }>,
|
|
108
|
+
): Promise<Result<string, FireflyError>> {
|
|
109
|
+
try {
|
|
110
|
+
const { path, body } = await build();
|
|
111
|
+
const handle = toJobHandle(await fireflyClient.post(path, body));
|
|
112
|
+
// image.adobe.io services are tracked by a status URL (_links.self.href) and
|
|
113
|
+
// are polled regardless of the project's job_mode (they don't deliver Firefly
|
|
114
|
+
// webhooks). A response without a status URL can't be polled, so surface a
|
|
115
|
+
// clear error rather than routing through the job port's await — which only
|
|
116
|
+
// resolves a jobId-only handle in webhook mode and would fail in polling builds.
|
|
117
|
+
if (!handle.statusUrl) {
|
|
118
|
+
return err(
|
|
119
|
+
new FireflyError(
|
|
120
|
+
"Substance 3D submit response had no status URL to track the job.",
|
|
121
|
+
),
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
// jobPort.poll() is the centralised always-poll entry point (keeps the wait
|
|
125
|
+
// path on the port rather than importing the poller directly).
|
|
126
|
+
const done = await jobPort.poll(handle);
|
|
127
|
+
if (done.status !== "succeeded") {
|
|
128
|
+
return err(
|
|
129
|
+
new FireflyError(done.error ?? "Substance 3D job did not succeed."),
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
// `done.outputs` is a non-optional JobOutput[] (parseJobResult always returns
|
|
133
|
+
// an array), so `[0]?.href` is enough — an empty array yields the no-output
|
|
134
|
+
// path below; no `?.` on `outputs` itself is needed.
|
|
135
|
+
const href = done.outputs[0]?.href;
|
|
136
|
+
if (!href) {
|
|
137
|
+
return err(new FireflyError("Substance 3D job produced no output."));
|
|
138
|
+
}
|
|
139
|
+
return ok(href);
|
|
140
|
+
} catch (error) {
|
|
141
|
+
return err(classifyAdobeError(error));
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function endpoint(operation: string): string {
|
|
147
|
+
return `${SUBSTANCE_3D_BASE}/substance-3d/${operation}`;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function external(href: string): { href: string; storage: "external" } {
|
|
151
|
+
return { href, storage: "external" };
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function outputSpec(
|
|
155
|
+
href: string,
|
|
156
|
+
format: Substance3DFormat,
|
|
157
|
+
): { href: string; storage: "external"; type: string } {
|
|
158
|
+
const type = format === "png" ? "image/png" : "image/jpeg";
|
|
159
|
+
return { ...external(href), type };
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Guarantee an absolute, scheme-qualified base with no trailing slash, and lowercase
|
|
164
|
+
* the scheme. fireflyClient now matches schemes case-insensitively, but keeping the
|
|
165
|
+
* emitted URL lowercase is defensive and consistent with the other image.adobe.io
|
|
166
|
+
* adapters (Photoshop/Lightroom/Illustrator/InDesign/Express). A schemeless
|
|
167
|
+
* `image.adobe.io` would otherwise be mis-prefixed with the Firefly base URL.
|
|
168
|
+
*/
|
|
169
|
+
function normalizeBase(raw: string): string {
|
|
170
|
+
const withScheme = /^https?:\/\//i.test(raw)
|
|
171
|
+
? raw.replace(/^https?:\/\//i, (scheme) => scheme.toLowerCase())
|
|
172
|
+
: `https://${raw}`;
|
|
173
|
+
return withScheme.replace(/\/+$/, "");
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/** Shared singleton. */
|
|
177
|
+
export const substance3d = new Substance3DAdapter();
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "adobe-substance-3d",
|
|
3
|
+
"name": "Adobe Substance 3D API",
|
|
4
|
+
"description": "Substance 3D automation for Adobe Firefly Services (image.adobe.io): a Substance3DPort + adapter for scene render, composite, and relight over the adobe-firefly-core foundation. Async, compute-heavy — the longest-running Firefly jobs; polled by status URL (image.adobe.io services don't deliver Firefly webhooks) and the poll has no max-wait cap, so long renders aren't cut off.",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"requires": ["adobe-firefly-core"],
|
|
7
|
+
"conflicts": [],
|
|
8
|
+
"questions": [
|
|
9
|
+
{
|
|
10
|
+
"id": "operations",
|
|
11
|
+
"type": "multiselect",
|
|
12
|
+
"prompt": "Which Substance 3D operations will you use?",
|
|
13
|
+
"options": ["render", "composite", "relight"],
|
|
14
|
+
"default": ["render"]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "output_format",
|
|
18
|
+
"type": "select",
|
|
19
|
+
"prompt": "Default output image format?",
|
|
20
|
+
"options": ["png", "jpg"],
|
|
21
|
+
"default": "png"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"envVars": ["ADOBE_SUBSTANCE_3D_BASE_URL", "ADOBE_SUBSTANCE_3D_FORMAT"],
|
|
25
|
+
"outputs": [
|
|
26
|
+
"src/domain/ports/out/substance-3d.port.ts",
|
|
27
|
+
"src/infrastructure/adobe/substance-3d/substance-3d.adapter.ts",
|
|
28
|
+
".env.adobe-substance-3d.example"
|
|
29
|
+
],
|
|
30
|
+
"checklist": [
|
|
31
|
+
"Confirm the Substance 3D API entitlement + scope on your Adobe Developer Console project (same IMS Server-to-Server auth as Firefly)",
|
|
32
|
+
"Verify the current host/endpoints/payloads against Adobe docs — configured via ADOBE_SUBSTANCE_3D_BASE_URL (defaults to the image.adobe.io host family; the client posts absolute URLs there)",
|
|
33
|
+
"Provide presigned input (scene/mesh/material) + output hrefs; composite also needs a background plate, relight a lighting environment (HDRI) — use core passthrough or install an adobe-firefly-storage-* addon",
|
|
34
|
+
"Long-running jobs: these are the heaviest Firefly renders. They are polled by status URL regardless of job_mode (image.adobe.io services don't deliver Firefly webhooks, so ADOBE_WEBHOOK_TIMEOUT_MS / webhook mode do NOT apply); the poll has no max-wait cap so a long render isn't cut off. Raise ADOBE_JOB_POLL_INTERVAL_MS to reduce status-check volume during long renders",
|
|
35
|
+
"Default output format is ADOBE_SUBSTANCE_3D_FORMAT (set at install)",
|
|
36
|
+
"Optional official SDK: npm install @adobe/firefly-services-sdk-js"
|
|
37
|
+
],
|
|
38
|
+
"branch": "feature/generator-template-adobe-substance-3d"
|
|
39
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# AGENTS.md (`agents-md`)
|
|
2
|
+
|
|
3
|
+
> A rich `AGENTS.md` (mode system, tech-stack reference, commands-after-edits table) plus a
|
|
4
|
+
> companion `.agents/` spec directory — the instructions your AI agents read.
|
|
5
|
+
|
|
6
|
+
| | |
|
|
7
|
+
| ------------- | -------------------------------------- |
|
|
8
|
+
| **ID** | `agents-md` |
|
|
9
|
+
| **Category** | Project meta / agent instructions |
|
|
10
|
+
| **Requires** | — |
|
|
11
|
+
| **Conflicts** | none |
|
|
12
|
+
| **Branch** | `feature/generator-template-agents-md` |
|
|
13
|
+
|
|
14
|
+
Author/agent-facing reference, beside `manifest.json` — not emitted into projects.
|
|
15
|
+
|
|
16
|
+
## What it does
|
|
17
|
+
|
|
18
|
+
Generates the project's agent contract: a top-level `AGENTS.md` and a `.agents/` directory
|
|
19
|
+
documenting architecture, testing, git, and tech-stack conventions — so AI agents (and humans)
|
|
20
|
+
have one authoritative source of how this codebase works.
|
|
21
|
+
|
|
22
|
+
## What it scaffolds
|
|
23
|
+
|
|
24
|
+
`AGENTS.md`, `.agents/architecture.md`, `.agents/testing.md`, `.agents/git.md`,
|
|
25
|
+
`.agents/tech-stack.md`, and (gated) `.agents/session-log.md`.
|
|
26
|
+
|
|
27
|
+
## Install
|
|
28
|
+
|
|
29
|
+
`hexagen add agents-md`. Questions:
|
|
30
|
+
|
|
31
|
+
| Question | Options (default) |
|
|
32
|
+
| -------------------------------- | -------------------------------------------------------------------- |
|
|
33
|
+
| `project_description` (required) | one-sentence description |
|
|
34
|
+
| `architecture_style` | `hexagonal` / `layered` / `feature-based` / `monolith` (`hexagonal`) |
|
|
35
|
+
| `session_logging` | `true` — emit `.agents/session-log.md` |
|
|
36
|
+
|
|
37
|
+
## Usage
|
|
38
|
+
|
|
39
|
+
Edit the generated files to match reality, then point your agent at `AGENTS.md` (this repo's own
|
|
40
|
+
convention is that `AGENTS.md` is canonical — `CLAUDE.md` redirects to it).
|
|
41
|
+
|
|
42
|
+
## Notes for agents
|
|
43
|
+
|
|
44
|
+
- Keep `.agents/tech-stack.md` current — add a row per installed Hexagen template.
|
|
45
|
+
- If session logging is enabled and you don't want it tracked, add `.agents/session-log.md` to
|
|
46
|
+
`.gitignore`.
|
|
47
|
+
|
|
48
|
+
## Checklist (post-install)
|
|
49
|
+
|
|
50
|
+
Edit the description; confirm the architecture style matches the code; update the tech-stack table;
|
|
51
|
+
verify the agent reads `AGENTS.md`; gitignore the session log if desired.
|
|
52
|
+
|
|
53
|
+
## Related
|
|
54
|
+
|
|
55
|
+
Standalone (no dependencies). Complements every other template by documenting how they fit together.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
Style: **{architecture_style}**
|
|
4
|
+
|
|
5
|
+
> {project_description}
|
|
6
|
+
|
|
7
|
+
## Universal Boundary Rules
|
|
8
|
+
|
|
9
|
+
These hold regardless of style and are enforced in review:
|
|
10
|
+
|
|
11
|
+
- **Dependencies point inward / downward.** Business logic never imports
|
|
12
|
+
framework, transport, or persistence code. The edges depend on the core, not
|
|
13
|
+
the other way round.
|
|
14
|
+
- **No circular dependencies** between modules.
|
|
15
|
+
- **I/O lives at the edges.** Network, filesystem, database, and clock access
|
|
16
|
+
are isolated behind a thin boundary so the core stays pure and testable.
|
|
17
|
+
- **One reason to change per module.** If a file mixes business rules with
|
|
18
|
+
wiring, split it.
|
|
19
|
+
|
|
20
|
+
## Layer Conventions
|
|
21
|
+
|
|
22
|
+
The naming below is the convention for the **{architecture_style}** style. If
|
|
23
|
+
your style differs, keep the *intent* (clear boundaries, inward dependencies)
|
|
24
|
+
even if the folder names change.
|
|
25
|
+
|
|
26
|
+
- **hexagonal** — `domain/` (entities, value objects, pure logic), `application/`
|
|
27
|
+
(use cases + `*.port.ts` interfaces), `infrastructure/` (`*.adapter.ts`
|
|
28
|
+
implementations). Domain imports nothing outward; adapters implement ports.
|
|
29
|
+
- **layered** — `presentation/` → `application/` → `domain/` → `infrastructure/`,
|
|
30
|
+
each layer importing only the one below it.
|
|
31
|
+
- **feature-based** — top-level `features/<name>/` slices, each self-contained;
|
|
32
|
+
shared code lives in a `shared/` module that features may import but that
|
|
33
|
+
never imports a feature.
|
|
34
|
+
- **monolith** — keep modules cohesive and dependencies explicit; resist a
|
|
35
|
+
single god-module by grouping by responsibility.
|
|
36
|
+
|
|
37
|
+
## Adding Code
|
|
38
|
+
|
|
39
|
+
1. Identify the layer the change belongs to.
|
|
40
|
+
2. If it crosses a boundary, define/extend a port (interface) rather than
|
|
41
|
+
reaching across directly.
|
|
42
|
+
3. Put the test next to the module (see `.agents/testing.md`).
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Git Conventions
|
|
2
|
+
|
|
3
|
+
## Branches
|
|
4
|
+
|
|
5
|
+
- `feat/<short-description>` — new functionality
|
|
6
|
+
- `fix/<short-description>` — bug fixes
|
|
7
|
+
- `chore/<short-description>` — tooling, deps, docs
|
|
8
|
+
- Never commit directly to the default branch; branch first.
|
|
9
|
+
|
|
10
|
+
## Commits
|
|
11
|
+
|
|
12
|
+
- **Conventional Commits:** `type(scope): summary` — e.g.
|
|
13
|
+
`feat(auth): add magic-link login`.
|
|
14
|
+
- Types: `feat`, `fix`, `chore`, `docs`, `refactor`, `test`, `perf`.
|
|
15
|
+
- Subject in the imperative ("add", not "added"); body explains *why*, not what.
|
|
16
|
+
- One logical change per commit. Do not bundle unrelated edits.
|
|
17
|
+
|
|
18
|
+
## Pull Requests
|
|
19
|
+
|
|
20
|
+
- Title = the commit summary; description covers what changed and why, plus how
|
|
21
|
+
it was verified.
|
|
22
|
+
- Squash merge so the default branch keeps one commit per PR.
|
|
23
|
+
- CI (build, typecheck, lint, test) must be green before merge.
|
|
24
|
+
|
|
25
|
+
## Never
|
|
26
|
+
|
|
27
|
+
- `git commit --no-verify` (it skips the hooks that protect the branch).
|
|
28
|
+
- Force-push the default branch.
|
|
29
|
+
- Commit secrets, `.env` files, or generated artifacts that are gitignored.
|
|
30
|
+
- Amend or rebase commits that have already been pushed and reviewed by others.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Session Log
|
|
2
|
+
|
|
3
|
+
A running record of AI-assisted work sessions. After each session, append an
|
|
4
|
+
entry using the template below. Keep entries short — this is a memory aid for
|
|
5
|
+
the next session, not documentation.
|
|
6
|
+
|
|
7
|
+
Unlike the other `.agents/*.md` spec files (which AGENTS.md marks "never edit"),
|
|
8
|
+
this file is **append-only by design** — adding session entries is expected.
|
|
9
|
+
|
|
10
|
+
To keep this file out of version control, add `.agents/session-log.md` to
|
|
11
|
+
`.gitignore`.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Template (copy for each session)
|
|
16
|
+
|
|
17
|
+
**Session:** YYYY-MM-DD — topic
|
|
18
|
+
|
|
19
|
+
- **Mode:** Implementer
|
|
20
|
+
- **Changes:**
|
|
21
|
+
- (what was edited, at a file/feature level)
|
|
22
|
+
- **Decisions:**
|
|
23
|
+
- (choices made and the reason, so they are not relitigated)
|
|
24
|
+
- **Left open:**
|
|
25
|
+
- (follow-ups, known gaps, anything the next session should pick up)
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 2026-01-01 — example entry
|
|
30
|
+
|
|
31
|
+
- **Mode:** Architect
|
|
32
|
+
- **Changes:**
|
|
33
|
+
- none (planning only)
|
|
34
|
+
- **Decisions:**
|
|
35
|
+
- Adopted the Hexagen template system for infrastructure slices.
|
|
36
|
+
- **Left open:**
|
|
37
|
+
- Decide which auth provider template to install.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Tech Stack Reference
|
|
2
|
+
|
|
3
|
+
The explicit, canonical list of tools. Read this before suggesting any library —
|
|
4
|
+
if it is not here (or is in "Never Suggest"), do not introduce it without asking.
|
|
5
|
+
|
|
6
|
+
## In Use
|
|
7
|
+
|
|
8
|
+
| Tool | Purpose | Notes |
|
|
9
|
+
| ------------- | ------------- | -------------------------------------------------- |
|
|
10
|
+
| Next.js | Web framework | App Router. Do not add Pages Router. |
|
|
11
|
+
| React | UI | Function components + hooks; no class components. |
|
|
12
|
+
| TypeScript | Language | `strict: true`. No `any` — narrow or use `unknown`. |
|
|
13
|
+
| node:test | Test runner | Built-in; `import { test } from "node:test"`. |
|
|
14
|
+
| node:assert | Assertions | `node:assert/strict`; never `expect()`. |
|
|
15
|
+
|
|
16
|
+
> Keep this table accurate. When you add a dependency (or a Hexagen template
|
|
17
|
+
> adds one), add its row here in the same change — a stale stack reference is
|
|
18
|
+
> how agents start hallucinating.
|
|
19
|
+
|
|
20
|
+
## Never Suggest
|
|
21
|
+
|
|
22
|
+
- **Jest / Vitest / Mocha / Chai** — this project uses `node:test` + `node:assert`.
|
|
23
|
+
- **The `expect()` API** — use `assert.*`.
|
|
24
|
+
- **Pages Router** — App Router only.
|
|
25
|
+
- **`any`** — use a precise type, a generic, or `unknown` with narrowing.
|
|
26
|
+
- A new HTTP client, date library, or state manager **before checking** whether
|
|
27
|
+
the standard platform API (`fetch`, `Intl`, React state) already covers it.
|
|
28
|
+
|
|
29
|
+
## Per-Template Additions
|
|
30
|
+
|
|
31
|
+
Hexagen templates extend this stack. After installing a template, add its
|
|
32
|
+
primary packages here — e.g. BullMQ + ioredis (background jobs), LangGraph
|
|
33
|
+
(agent graphs), Supabase (storage). Run `hexagen validate-templates` to see
|
|
34
|
+
what is installed.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Testing
|
|
2
|
+
|
|
3
|
+
## Runner & Assertions
|
|
4
|
+
|
|
5
|
+
- **Runner:** the Node.js built-in test runner — `import { test } from "node:test"`.
|
|
6
|
+
- **Assertions:** `node:assert/strict` — e.g. `assert.equal()`, `assert.deepEqual()`.
|
|
7
|
+
- **Never** introduce Jest, Vitest, Mocha, Chai, or an `expect()` API. If you
|
|
8
|
+
see them suggested, stop and use `node:test` / `node:assert`.
|
|
9
|
+
|
|
10
|
+
## Conventions
|
|
11
|
+
|
|
12
|
+
- **File naming:** `*.test.ts` (not `*.spec.ts`).
|
|
13
|
+
- **Location:** a `__tests__/` directory adjacent to the module under test.
|
|
14
|
+
- **Mocks:** prefer `node:test`'s built-in `mock.fn()` over external mock
|
|
15
|
+
libraries. Mock at the boundary (ports/adapters), not deep internals.
|
|
16
|
+
- **Determinism:** no real network, clock, or filesystem in unit tests — inject
|
|
17
|
+
a fake at the seam. Integration tests that need real I/O are named and
|
|
18
|
+
isolated.
|
|
19
|
+
|
|
20
|
+
## What a Good Test Looks Like
|
|
21
|
+
|
|
22
|
+
- One behaviour per test; the name states the behaviour, not the method.
|
|
23
|
+
- Arrange / act / assert, with the assertion targeting observable output.
|
|
24
|
+
- Failing first: when fixing a bug, add the test that reproduces it before the
|
|
25
|
+
fix, and confirm it goes red then green.
|
|
26
|
+
|
|
27
|
+
## Before You Commit
|
|
28
|
+
|
|
29
|
+
Run the full suite (`npm test`). A red suite blocks the commit — diagnose, do
|
|
30
|
+
not skip or delete the failing test to make it pass.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
> {project_description}
|
|
4
|
+
|
|
5
|
+
This is the primary instruction set for AI agents (Claude Code and others)
|
|
6
|
+
working in this repository. It is a **living contract**, written in the
|
|
7
|
+
imperative — "You MUST", "Never", "Always". Explanations and longer guidance
|
|
8
|
+
live in the `.agents/` spec directory, not here.
|
|
9
|
+
|
|
10
|
+
If a request conflicts with this file, follow this file and say so.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## The Immutable Anchor
|
|
15
|
+
|
|
16
|
+
- This project follows the **{architecture_style}** architecture style. See
|
|
17
|
+
`.agents/architecture.md` for layer boundaries and import rules — do not
|
|
18
|
+
violate them.
|
|
19
|
+
- Match the surrounding code: naming, file layout, test style, and comment
|
|
20
|
+
density. Read a neighbouring file before writing a new one.
|
|
21
|
+
- Prefer editing existing files over adding new ones. Do not introduce a new
|
|
22
|
+
dependency without a clear reason.
|
|
23
|
+
|
|
24
|
+
## Before Every Exchange
|
|
25
|
+
|
|
26
|
+
1. Declare your **mode** (see the Mode System below) on the first line.
|
|
27
|
+
2. Restate the goal in one sentence.
|
|
28
|
+
3. Check this file and the relevant `.agents/` spec before acting.
|
|
29
|
+
|
|
30
|
+
## Tech Stack Reference
|
|
31
|
+
|
|
32
|
+
The canonical, explicit stack lives in `.agents/tech-stack.md`. It lists both
|
|
33
|
+
what IS used and what is **never** used — read it before suggesting any tool or
|
|
34
|
+
library, to avoid hallucinated dependencies.
|
|
35
|
+
|
|
36
|
+
## Conventions
|
|
37
|
+
|
|
38
|
+
- **Logging:** use the structured logger (`src/infrastructure/logging/logger.ts`, from the
|
|
39
|
+
`observability` template) — e.g. `logger.info({ userId }, "user.created")`. **Never `console.log`**
|
|
40
|
+
— it has no level, correlation id, or redaction and becomes technical debt. The `eslint-no-console`
|
|
41
|
+
template enforces this in lint/CI; the only exempt sites are the logger transport, server startup,
|
|
42
|
+
scripts, and config files.
|
|
43
|
+
|
|
44
|
+
## Commands After Edits
|
|
45
|
+
|
|
46
|
+
Run the matching command after each kind of change. On failure, stop and fix
|
|
47
|
+
before continuing.
|
|
48
|
+
|
|
49
|
+
| Trigger | Command | On failure |
|
|
50
|
+
| ------------------------ | ---------------------------------------- | ----------------------- |
|
|
51
|
+
| Before starting work | `npm run build && npm run typecheck` | STOP — fix first |
|
|
52
|
+
| Any `.ts` / `.tsx` edit | `npm run lint && npm run typecheck` | Fix before continuing |
|
|
53
|
+
| After adding a template | `hexagen validate-templates` | Resolve conflicts |
|
|
54
|
+
| Before committing | `npm test` | Diagnose — never skip |
|
|
55
|
+
|
|
56
|
+
(If this project uses yarn or pnpm, substitute the package manager — the
|
|
57
|
+
triggers stay the same.)
|
|
58
|
+
|
|
59
|
+
## Files Never Edit
|
|
60
|
+
|
|
61
|
+
Each rule has a reason; agents follow rules they understand.
|
|
62
|
+
|
|
63
|
+
| File | Reason |
|
|
64
|
+
| ----------------------------- | ----------------------------------------------------------- |
|
|
65
|
+
| `AGENTS.md` | This contract. Change it deliberately, never as a side effect. |
|
|
66
|
+
| `.agents/*.md` (except `session-log.md`) | Spec files — edit only when explicitly asked to update specs. `session-log.md` is the deliberate exception: append to it after each session. |
|
|
67
|
+
| `package-lock.json` | Updated only via `npm` commands, never by hand. |
|
|
68
|
+
| `DESIGN.md` | Design contract (if present). Changes require design review. |
|
|
69
|
+
|
|
70
|
+
## Mode System
|
|
71
|
+
|
|
72
|
+
Declare your mode at the top of every response. Do not blend modes.
|
|
73
|
+
|
|
74
|
+
| Mode | Trigger | Behaviour |
|
|
75
|
+
| ------------------ | ---------------------------------- | -------------------------------------------------- |
|
|
76
|
+
| Architect | "design", "plan", "how should we" | Think in layers, ports, trade-offs. No code. |
|
|
77
|
+
| Implementer | "build", "add", "implement" | Write code. Follow conventions exactly. |
|
|
78
|
+
| Debugger | "fix", "broken", "error", "why" | Find the root cause before touching code. |
|
|
79
|
+
| Reviewer | "review", "check", "audit" | Read only. Report findings. No unsolicited fixes. |
|
|
80
|
+
| Tester | "test", "coverage", "spec" | Write tests. Never modify the code under test. |
|
|
81
|
+
|
|
82
|
+
## Commit & PR Conventions
|
|
83
|
+
|
|
84
|
+
See `.agents/git.md`. In short: Conventional Commits, branch names like
|
|
85
|
+
`feat/<desc>` or `fix/<desc>`, never `--no-verify`, never force-push the
|
|
86
|
+
default branch.
|
|
87
|
+
|
|
88
|
+
## Spec Directory
|
|
89
|
+
|
|
90
|
+
Deeper guidance lives in `.agents/`:
|
|
91
|
+
|
|
92
|
+
- `architecture.md` — layer boundaries and import rules
|
|
93
|
+
- `testing.md` — runner, assertions, file naming
|
|
94
|
+
- `git.md` — commit/branch/PR rules
|
|
95
|
+
- `tech-stack.md` — exact tools, with negative examples
|
|
96
|
+
- `session-log.md` — running log of AI-assisted sessions (present when session
|
|
97
|
+
logging is enabled)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "agents-md",
|
|
3
|
+
"name": "AGENTS.md",
|
|
4
|
+
"description": "Rich AGENTS.md with mode system, tech stack reference, commands-after-edits table, and companion .agents/ spec directory",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"requires": [],
|
|
7
|
+
"conflicts": [],
|
|
8
|
+
"questions": [
|
|
9
|
+
{
|
|
10
|
+
"id": "project_description",
|
|
11
|
+
"type": "text",
|
|
12
|
+
"prompt": "One-sentence project description?",
|
|
13
|
+
"required": true
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"id": "architecture_style",
|
|
17
|
+
"type": "select",
|
|
18
|
+
"prompt": "Architecture style?",
|
|
19
|
+
"options": ["hexagonal", "layered", "feature-based", "monolith"],
|
|
20
|
+
"default": "hexagonal"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "session_logging",
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"prompt": "Include session logging structure?",
|
|
26
|
+
"default": true
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"envVars": [],
|
|
30
|
+
"outputs": [
|
|
31
|
+
"AGENTS.md",
|
|
32
|
+
".agents/architecture.md",
|
|
33
|
+
".agents/testing.md",
|
|
34
|
+
".agents/git.md",
|
|
35
|
+
".agents/tech-stack.md",
|
|
36
|
+
{
|
|
37
|
+
"path": ".agents/session-log.md",
|
|
38
|
+
"when": { "answer": "session_logging", "equals": true }
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"checklist": [
|
|
42
|
+
"Edit the description line at the top of AGENTS.md so it accurately names your project",
|
|
43
|
+
"Confirm the architecture style in .agents/architecture.md matches how the code is actually organised",
|
|
44
|
+
"Review .agents/tech-stack.md — add any tools not listed (and a row per installed Hexagen template)",
|
|
45
|
+
"Run: cat AGENTS.md to verify your AI agent will read the correct instructions",
|
|
46
|
+
"Session logging (if enabled): add .agents/session-log.md to .gitignore if you don't want it tracked"
|
|
47
|
+
],
|
|
48
|
+
"branch": "feature/generator-template-agents-md"
|
|
49
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Auth Mock (`auth-mock`)
|
|
2
|
+
|
|
3
|
+
> Dev-only root middleware that injects `shared-types`' `MOCK_USER` as `x-user-context` when
|
|
4
|
+
> `AUTH_MODE=mock`. Real providers ship their own middleware that overwrites this one.
|
|
5
|
+
|
|
6
|
+
| | |
|
|
7
|
+
| ------------- | ----------------------------------------------------------------------------------------------- |
|
|
8
|
+
| **ID** | `auth-mock` |
|
|
9
|
+
| **Category** | Auth (dev short-circuit) |
|
|
10
|
+
| **Requires** | `shared-types`, `env-setup` |
|
|
11
|
+
| **Conflicts** | none (but standalone frameworks like `nextauth`/`clerk`/`better-auth` declare it as a conflict) |
|
|
12
|
+
| **Branch** | `feature/shared-types-and-derived-answers` |
|
|
13
|
+
|
|
14
|
+
Author/agent-facing reference, beside `manifest.json` — not emitted into projects.
|
|
15
|
+
|
|
16
|
+
## What it does
|
|
17
|
+
|
|
18
|
+
Lets you build against a known user without a real IdP. When `AUTH_MODE=mock`, the middleware
|
|
19
|
+
attaches `MOCK_USER` (from `shared-types`) as the `x-user-context` header on every request. Every
|
|
20
|
+
real adapter-group provider (`google-oauth`, `github-oauth`, `microsoft-entra`, `magic-link`,
|
|
21
|
+
`supabase-auth`, `adobe-ims-spa`) overwrites this `middleware.ts` and still honours
|
|
22
|
+
`AUTH_MODE=mock` as a dev short-circuit.
|
|
23
|
+
|
|
24
|
+
## What it scaffolds
|
|
25
|
+
|
|
26
|
+
`middleware.ts`, `.env.auth.example`. The `session_cookie_name` question is **auto-derived**
|
|
27
|
+
from `shared-types.session_cookie_name`.
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
`hexagen add auth-mock`. Env introduced: `AUTH_MODE`.
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
AUTH_MODE=mock # middleware injects MOCK_USER as x-user-context
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Override the mock identity via `MOCK_USER_NAME` / `MOCK_USER_EMAIL` / `MOCK_USER_ROLES` /
|
|
40
|
+
`MOCK_USER_AVATAR_URL` (defined in `shared-types`).
|
|
41
|
+
|
|
42
|
+
## Notes for agents
|
|
43
|
+
|
|
44
|
+
- This is **dev-only** — it trusts a header and authenticates nobody. Never ship with
|
|
45
|
+
`AUTH_MODE=mock` in production.
|
|
46
|
+
- A real provider's `middleware.ts` replaces this file; the mock path survives as the
|
|
47
|
+
`AUTH_MODE=mock` branch inside it.
|
|
48
|
+
|
|
49
|
+
## Checklist (post-install)
|
|
50
|
+
|
|
51
|
+
Set `AUTH_MODE=mock` in dev; mock values + overrides live in `shared-types`; a real provider
|
|
52
|
+
overwrites this middleware.
|
|
53
|
+
|
|
54
|
+
## Related
|
|
55
|
+
|
|
56
|
+
Requires [`shared-types`](../shared-types), [`env-setup`](../env-setup). Superseded at runtime by
|
|
57
|
+
any real auth provider.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# ─── Authentication mode ───────────────────────────────────────────────────────
|
|
2
|
+
# AUTH_MODE=mock makes the dev middleware short-circuit every request as
|
|
3
|
+
# MOCK_USER (defined in shared-types). Any other value (or unset) lets a real
|
|
4
|
+
# provider's middleware (google-oauth, supabase-auth, etc.) take over.
|
|
5
|
+
AUTH_MODE=mock
|
|
6
|
+
|
|
7
|
+
# ─── Shared cookie + mock-user overrides ──────────────────────────────────────
|
|
8
|
+
# AUTH_COOKIE_NAME / AUTH_SESSION_MAX_AGE / MOCK_USER_* are configured in
|
|
9
|
+
# shared-types' .env block. Add them to .env.local from there.
|