create-auto-app 0.2.3 → 0.3.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/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/templates/.gitkeep +0 -0
- package/templates/shopping-app/.context/schema.json +11 -51
- package/templates/shopping-app/.context/server/server/package.json +26 -0
- package/templates/shopping-app/.context/server/server/scripts/generate-schema.ts +34 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/commands.ts +8 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/decide.specs.ts +46 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/decide.ts +33 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/events.ts +10 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/evolve.ts +28 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/handle.ts +24 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/mutation.resolver.ts +25 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/register.ts +7 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/accepts-items-and-adds-to-their-cart/state.ts +47 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/creates-a-chat-session-/react.specs.ts +51 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/creates-a-chat-session-/react.ts +43 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/creates-a-chat-session-/register.ts +24 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/commands.ts +8 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/decide.specs.ts +38 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/decide.ts +33 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/events.ts +10 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/evolve.ts +28 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/handle.ts +24 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/mutation.resolver.ts +25 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/register.ts +7 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/enters-shopping-criteria-into-assistant/state.ts +47 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/commands.ts +8 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/decide.specs.ts +61 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/decide.ts +35 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/events.ts +9 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/evolve.ts +28 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/handle.ts +49 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/mutation.resolver.ts +25 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/register.ts +7 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/selects-items-relevant-to-the-shopping-criteria-/state.ts +47 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/views-suggested-items/projection.specs.ts +94 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/views-suggested-items/projection.ts +37 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/views-suggested-items/query.resolver.ts +56 -0
- package/templates/shopping-app/.context/server/server/src/domain/flows/seasonal-assistant/views-suggested-items/state.ts +4 -0
- package/templates/shopping-app/.context/server/server/src/domain/shared/ReadModel.ts +26 -0
- package/templates/shopping-app/{server/src/domain/shared/index.d.ts → .context/server/server/src/domain/shared/index.ts} +0 -1
- package/templates/shopping-app/{server/src/domain/shared/reactorSpecification.js → .context/server/server/src/domain/shared/reactorSpecification.ts} +116 -22
- package/templates/shopping-app/.context/server/server/src/domain/shared/sendCommand.ts +21 -0
- package/templates/shopping-app/{server/src/domain/shared/types.d.ts → .context/server/server/src/domain/shared/types.ts} +17 -5
- package/templates/shopping-app/.context/server/server/src/server.ts +43 -0
- package/templates/shopping-app/{server/src/utils/index.d.ts → .context/server/server/src/utils/index.ts} +0 -1
- package/templates/shopping-app/{server/src/utils/loadProjections.js → .context/server/server/src/utils/loadProjections.ts} +11 -6
- package/templates/shopping-app/.context/server/server/src/utils/loadRegisterFiles.ts +41 -0
- package/templates/shopping-app/{server/src/utils/loadResolvers.js → .context/server/server/src/utils/loadResolvers.ts} +16 -7
- package/templates/shopping-app/.context/server/server/tsconfig.json +13 -0
- package/templates/shopping-app/.context/server/server/vitest.config.ts +7 -0
- package/templates/shopping-app/auto.config.ts +78 -45
- package/templates/shopping-app/client/src/App.tsx +13 -13
- package/templates/shopping-app/client/src/components/molecules/QuantitySelector.tsx +4 -4
- package/templates/shopping-app/client/src/components/molecules/ShoppingCriteriaForm.tsx +4 -4
- package/templates/shopping-app/client/src/components/molecules/SuggestedItemCard.tsx +6 -6
- package/templates/shopping-app/client/src/components/organisms/AssistantChatInterface.tsx +3 -3
- package/templates/shopping-app/client/src/components/organisms/PageHeader.tsx +2 -3
- package/templates/shopping-app/client/src/components/organisms/SuggestedItemsList.tsx +3 -3
- package/templates/shopping-app/client/src/index.css +10 -14
- package/templates/shopping-app/client/src/pages/AssistantChatPage.tsx +4 -4
- package/templates/shopping-app/client/src/pages/SuggestedItemsPage.tsx +4 -4
- package/templates/shopping-app/example-integrations/product-catalogue/src/product-catalogue-integration.ts +122 -115
- package/templates/shopping-app/flows/shopping-assistant.flow.ts +0 -1
- package/templates/shopping-app/package.json +13 -10
- package/templates/shopping-app/server/package.json +1 -1
- package/templates/shopping-app/.env +0 -8
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-build.log +0 -4
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-format.log +0 -12
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-lint.log +0 -4
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-test.log +0 -12
- package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-type-check.log +0 -5
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.d.ts +0 -23
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.js +0 -41
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.js.map +0 -1
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.d.ts +0 -2
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.js +0 -2
- package/templates/shopping-app/example-integrations/ai-chat-completion/dist/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/eslint +0 -21
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/jiti +0 -21
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/msw +0 -21
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/tsc +0 -21
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/tsserver +0 -21
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/vite +0 -21
- package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/vitest +0 -21
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-build.log +0 -4
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-format.log +0 -12
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-lint.log +0 -5
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-test.log +0 -12
- package/templates/shopping-app/example-integrations/cart/.turbo/turbo-type-check.log +0 -5
- package/templates/shopping-app/example-integrations/cart/dist/cart-integration.d.ts +0 -30
- package/templates/shopping-app/example-integrations/cart/dist/cart-integration.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/cart-integration.js +0 -134
- package/templates/shopping-app/example-integrations/cart/dist/cart-integration.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.d.ts +0 -3
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.js +0 -149
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/client.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.d.ts +0 -8
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.js +0 -6
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.d.ts +0 -123
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.js +0 -3
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/types.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.d.ts +0 -46
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.js +0 -285
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client/utils.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.d.ts +0 -13
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.js +0 -6
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/client.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.d.ts +0 -19
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.js +0 -15
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/auth.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.d.ts +0 -18
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.js +0 -58
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/bodySerializer.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.d.ts +0 -34
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.js +0 -89
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/params.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.d.ts +0 -34
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.js +0 -115
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/pathSerializer.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.d.ts +0 -79
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.js +0 -3
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/core/types.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.d.ts +0 -2
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.js +0 -3
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.d.ts +0 -158
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.js +0 -3
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/types.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.d.ts +0 -382
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.js +0 -68
- package/templates/shopping-app/example-integrations/cart/dist/generated/cart/zod.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/index.d.ts +0 -2
- package/templates/shopping-app/example-integrations/cart/dist/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart/dist/index.js +0 -2
- package/templates/shopping-app/example-integrations/cart/dist/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/eslint +0 -21
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/jiti +0 -21
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/msw +0 -21
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/tsc +0 -21
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/tsserver +0 -21
- package/templates/shopping-app/example-integrations/cart/node_modules/.bin/vitest +0 -21
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-build.log +0 -4
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-format.log +0 -10
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-lint.log +0 -4
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-test.log +0 -12
- package/templates/shopping-app/example-integrations/cart-api/.turbo/turbo-type-check.log +0 -4
- package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.d.ts +0 -18
- package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.js +0 -28
- package/templates/shopping-app/example-integrations/cart-api/dist/data/cart.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart-api/dist/index.d.ts +0 -4
- package/templates/shopping-app/example-integrations/cart-api/dist/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart-api/dist/index.js +0 -49
- package/templates/shopping-app/example-integrations/cart-api/dist/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.d.ts +0 -4
- package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.js +0 -261
- package/templates/shopping-app/example-integrations/cart-api/dist/routes/cart.js.map +0 -1
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/nodemon +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/swagger-jsdoc +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-cwd +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-esm +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-script +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-node-transpile-only +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/ts-script +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/tsc +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/tsserver +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/tsx +0 -21
- package/templates/shopping-app/example-integrations/cart-api/node_modules/.bin/vitest +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-build.log +0 -4
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-format.log +0 -12
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-lint.log +0 -5
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-test.log +0 -12
- package/templates/shopping-app/example-integrations/product-catalogue/.turbo/turbo-type-check.log +0 -5
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.d.ts +0 -3
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.js +0 -149
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/client.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.d.ts +0 -8
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.js +0 -6
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.d.ts +0 -123
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.js +0 -3
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/types.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.d.ts +0 -46
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.js +0 -285
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client/utils.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.d.ts +0 -13
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.js +0 -6
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/client.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.d.ts +0 -19
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.js +0 -15
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/auth.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.d.ts +0 -18
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.js +0 -58
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/bodySerializer.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.d.ts +0 -34
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.js +0 -89
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/params.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.d.ts +0 -34
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.js +0 -115
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/pathSerializer.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.d.ts +0 -79
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.js +0 -3
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/core/types.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.d.ts +0 -2
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.js +0 -3
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.d.ts +0 -115
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.js +0 -3
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/types.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.d.ts +0 -206
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.js +0 -53
- package/templates/shopping-app/example-integrations/product-catalogue/dist/generated/product-catalog/zod.gen.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/index.d.ts +0 -2
- package/templates/shopping-app/example-integrations/product-catalogue/dist/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/index.js +0 -2
- package/templates/shopping-app/example-integrations/product-catalogue/dist/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.d.ts +0 -32
- package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.js +0 -163
- package/templates/shopping-app/example-integrations/product-catalogue/dist/product-catalogue-integration.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/eslint +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/jiti +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/msw +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/tsc +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/tsserver +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue/node_modules/.bin/vitest +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-build.log +0 -4
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-format.log +0 -10
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-lint.log +0 -5
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-test.log +0 -13
- package/templates/shopping-app/example-integrations/product-catalogue-api/.turbo/turbo-type-check.log +0 -5
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.d.ts +0 -10
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.js +0 -75
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/data/products.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.d.ts +0 -4
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.js +0 -49
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/index.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.d.ts +0 -4
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.d.ts.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.js +0 -170
- package/templates/shopping-app/example-integrations/product-catalogue-api/dist/routes/products.js.map +0 -1
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/nodemon +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/swagger-jsdoc +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-cwd +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-esm +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-script +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-node-transpile-only +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/ts-script +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/tsc +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/tsserver +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/tsx +0 -21
- package/templates/shopping-app/example-integrations/product-catalogue-api/node_modules/.bin/vitest +0 -21
- package/templates/shopping-app/pnpm-workspace.yaml +0 -2
- package/templates/shopping-app/server/src/domain/shared/ReadModel.d.ts +0 -10
- package/templates/shopping-app/server/src/domain/shared/ReadModel.d.ts.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/ReadModel.js +0 -19
- package/templates/shopping-app/server/src/domain/shared/ReadModel.js.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/index.d.ts.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/index.js +0 -5
- package/templates/shopping-app/server/src/domain/shared/index.js.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/reactorSpecification.d.ts +0 -56
- package/templates/shopping-app/server/src/domain/shared/reactorSpecification.d.ts.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/reactorSpecification.js.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/sendCommand.d.ts +0 -7
- package/templates/shopping-app/server/src/domain/shared/sendCommand.d.ts.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/sendCommand.js +0 -16
- package/templates/shopping-app/server/src/domain/shared/sendCommand.js.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/types.d.ts.map +0 -1
- package/templates/shopping-app/server/src/domain/shared/types.js +0 -40
- package/templates/shopping-app/server/src/domain/shared/types.js.map +0 -1
- package/templates/shopping-app/server/src/utils/index.d.ts.map +0 -1
- package/templates/shopping-app/server/src/utils/index.js +0 -4
- package/templates/shopping-app/server/src/utils/index.js.map +0 -1
- package/templates/shopping-app/server/src/utils/loadProjections.d.ts +0 -3
- package/templates/shopping-app/server/src/utils/loadProjections.d.ts.map +0 -1
- package/templates/shopping-app/server/src/utils/loadProjections.js.map +0 -1
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.d.ts +0 -6
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.d.ts.map +0 -1
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.js +0 -26
- package/templates/shopping-app/server/src/utils/loadRegisterFiles.js.map +0 -1
- package/templates/shopping-app/server/src/utils/loadResolvers.d.ts +0 -5
- package/templates/shopping-app/server/src/utils/loadResolvers.d.ts.map +0 -1
- package/templates/shopping-app/server/src/utils/loadResolvers.js.map +0 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"name": "shopping-assistant",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"scripts": {
|
|
5
|
+
"auto": "auto",
|
|
5
6
|
"start": "dotenv -e .env -- pnpm --parallel start",
|
|
6
7
|
"build": "pnpm --parallel build",
|
|
7
8
|
"start:ecommerce-site": "cd examples/ecommerce-site && pnpm start",
|
|
@@ -10,18 +11,20 @@
|
|
|
10
11
|
"start:examples": "pnpm --parallel --filter @examples/* start 2>&1 | grep -E '(localhost|Local)' || true"
|
|
11
12
|
},
|
|
12
13
|
"dependencies": {
|
|
13
|
-
"@auto-engineer/
|
|
14
|
-
"@auto-engineer/design-system-importer": "
|
|
15
|
-
"@auto-engineer/flow": "
|
|
16
|
-
"@auto-engineer/frontend-checks": "
|
|
17
|
-
"@auto-engineer/frontend-
|
|
18
|
-
"@auto-engineer/frontend-
|
|
19
|
-
"@auto-engineer/information-architect": "
|
|
20
|
-
"@auto-engineer/
|
|
21
|
-
"@auto-engineer/server-
|
|
22
|
-
"@auto-engineer/server-
|
|
14
|
+
"@auto-engineer/cli": "workspace:*",
|
|
15
|
+
"@auto-engineer/design-system-importer": "workspace:*",
|
|
16
|
+
"@auto-engineer/flow": "workspace:*",
|
|
17
|
+
"@auto-engineer/frontend-checks": "workspace:*",
|
|
18
|
+
"@auto-engineer/frontend-generator-react-graphql": "workspace:*",
|
|
19
|
+
"@auto-engineer/frontend-implementer": "workspace:*",
|
|
20
|
+
"@auto-engineer/information-architect": "workspace:*",
|
|
21
|
+
"@auto-engineer/message-bus": "workspace:*",
|
|
22
|
+
"@auto-engineer/server-checks": "workspace:*",
|
|
23
|
+
"@auto-engineer/server-generator-apollo-emmett": "workspace:*",
|
|
24
|
+
"@auto-engineer/server-implementer": "workspace:*"
|
|
23
25
|
},
|
|
24
26
|
"devDependencies": {
|
|
27
|
+
"chokidar": "^3.6.0",
|
|
25
28
|
"dotenv": "^16.4.5",
|
|
26
29
|
"dotenv-cli": "^9.0.0",
|
|
27
30
|
"tsx": "^3.12.7"
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"start": "tsx --no-deprecation src/server.ts",
|
|
8
8
|
"type-check": "tsc --noEmit",
|
|
9
9
|
"test": "vitest run",
|
|
10
|
-
"dev": "tsx --no-deprecation src/server.ts"
|
|
10
|
+
"dev": "tsx watch --no-deprecation src/server.ts"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@auto-engineer/ai-gateway": "latest",
|
package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-format.log
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
> @auto-engineer/ai-integration@0.6.1 format /Users/sam/WebstormProjects/top/auto-engineer/integrations/ai-chat-completion
|
|
4
|
-
> prettier --write "**/*.{js,ts,json,md,yml,yaml}" --ignore-path ../../.prettierignore
|
|
5
|
-
|
|
6
|
-
CHANGELOG.md[2K[1G[90mCHANGELOG.md[39m 25ms (unchanged)
|
|
7
|
-
eslint.config.ts[2K[1G[90meslint.config.ts[39m 27ms (unchanged)
|
|
8
|
-
package.json[2K[1G[90mpackage.json[39m 12ms (unchanged)
|
|
9
|
-
src/ai-integration.ts[2K[1G[90msrc/ai-integration.ts[39m 14ms (unchanged)
|
|
10
|
-
src/index.ts[2K[1G[90msrc/index.ts[39m 1ms (unchanged)
|
|
11
|
-
tsconfig.json[2K[1G[90mtsconfig.json[39m 1ms (unchanged)
|
|
12
|
-
tsconfig.test.json[2K[1G[90mtsconfig.test.json[39m 1ms (unchanged)
|
package/templates/shopping-app/example-integrations/ai-chat-completion/.turbo/turbo-test.log
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @auto-engineer/ai-integration@0.6.1 test /Users/sam/WebstormProjects/top/auto-engineer/integrations/ai-chat-completion
|
|
3
|
-
> vitest run
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
RUN v3.2.4 /Users/sam/WebstormProjects/top/auto-engineer/integrations/ai-chat-completion
|
|
7
|
-
|
|
8
|
-
No test files found, exiting with code 0
|
|
9
|
-
|
|
10
|
-
include: **/*.specs.{js,ts}
|
|
11
|
-
exclude: **/.tmp/**, **/node_modules/**, **/dist/**
|
|
12
|
-
|
package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Integration, Event, Command } from '@auto-engineer/flow';
|
|
2
|
-
export type ChatCompleted = Event<'ChatCompleted', {
|
|
3
|
-
sessionId: string;
|
|
4
|
-
suggestedItems: {
|
|
5
|
-
productId: string;
|
|
6
|
-
name: string;
|
|
7
|
-
quantity: number;
|
|
8
|
-
reason: string;
|
|
9
|
-
}[];
|
|
10
|
-
timestamp: Date;
|
|
11
|
-
}>;
|
|
12
|
-
export type DoChat = Command<'DoChat', {
|
|
13
|
-
sessionId: string;
|
|
14
|
-
prompt: string;
|
|
15
|
-
systemPrompt?: string;
|
|
16
|
-
schemaName?: string;
|
|
17
|
-
}>;
|
|
18
|
-
type AICommands = {
|
|
19
|
-
DoChat: <T>(command: DoChat) => Promise<T>;
|
|
20
|
-
};
|
|
21
|
-
export declare const AI: Integration<'ai', Record<string, never>, AICommands>;
|
|
22
|
-
export {};
|
|
23
|
-
//# sourceMappingURL=ai-integration.d.ts.map
|
package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ai-integration.d.ts","sourceRoot":"","sources":["../src/ai-integration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AASlE,MAAM,MAAM,aAAa,GAAG,KAAK,CAC/B,eAAe,EACf;IACE,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxF,SAAS,EAAE,IAAI,CAAC;CACjB,CACF,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG,OAAO,CAC1B,QAAQ,EACR;IACE,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CACF,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,EAAE,EAAE,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,UAAU,CA2CnE,CAAC"}
|
package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { generateStructuredDataWithAI, AIProvider, z, getSchemaByName, generateTextWithAI, } from '@auto-engineer/ai-gateway';
|
|
2
|
-
export const AI = {
|
|
3
|
-
__brand: 'Integration',
|
|
4
|
-
type: 'ai',
|
|
5
|
-
name: 'AI',
|
|
6
|
-
Commands: {
|
|
7
|
-
schema: {
|
|
8
|
-
DoChat: z.object({
|
|
9
|
-
sessionId: z.string(),
|
|
10
|
-
prompt: z.string(),
|
|
11
|
-
systemPrompt: z.string().optional(),
|
|
12
|
-
schemaName: z.string(),
|
|
13
|
-
}),
|
|
14
|
-
},
|
|
15
|
-
DoChat: async (command) => {
|
|
16
|
-
const { prompt, systemPrompt, schemaName } = command.data;
|
|
17
|
-
const fullPrompt = systemPrompt?.trim() != null ? `${systemPrompt.trim()}\n\n${prompt.trim()}` : prompt.trim();
|
|
18
|
-
if (schemaName != null) {
|
|
19
|
-
const schema = getSchemaByName(schemaName);
|
|
20
|
-
if (schema) {
|
|
21
|
-
return await generateStructuredDataWithAI(fullPrompt, AIProvider.Anthropic, {
|
|
22
|
-
schema: schema,
|
|
23
|
-
schemaName,
|
|
24
|
-
schemaDescription: `AI output matching schema '${schemaName}'`,
|
|
25
|
-
includeTools: true,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
const raw = await generateTextWithAI(fullPrompt, AIProvider.Anthropic, {
|
|
30
|
-
includeTools: true,
|
|
31
|
-
});
|
|
32
|
-
try {
|
|
33
|
-
return JSON.parse(raw);
|
|
34
|
-
}
|
|
35
|
-
catch (err) {
|
|
36
|
-
throw new Error(`Failed to parse unstructured AI response: ${err instanceof Error ? err.message : String(err)}`);
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=ai-integration.js.map
|
package/templates/shopping-app/example-integrations/ai-chat-completion/dist/ai-integration.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"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MAAM,GAAG,GAAG,MAAM,kBAAkB,CAAC,UAAU,EAAE,UAAU,CAAC,SAAS,EAAE;gBACrE,YAAY,EAAE,IAAI;aACnB,CAAC,CAAC;YAEH,IAAI,CAAC;gBACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAM,CAAC;YAC9B,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,MAAM,IAAI,KAAK,CACb,6CAA6C,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAChG,CAAC;YACJ,CAAC;QACH,CAAC;KACF;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/eslint
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/eslint@9.34.0_jiti@2.5.1/node_modules/eslint/bin/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/eslint@9.34.0_jiti@2.5.1/node_modules/eslint/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/eslint@9.34.0_jiti@2.5.1/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/eslint@9.34.0_jiti@2.5.1/node_modules/eslint/bin/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/eslint@9.34.0_jiti@2.5.1/node_modules/eslint/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/eslint@9.34.0_jiti@2.5.1/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/eslint@9.34.0_jiti@2.5.1/node_modules/eslint/bin/eslint.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../../../../node_modules/.pnpm/eslint@9.34.0_jiti@2.5.1/node_modules/eslint/bin/eslint.js" "$@"
|
|
21
|
-
fi
|
package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/jiti
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/jiti@2.5.1/node_modules/jiti/lib/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/jiti@2.5.1/node_modules/jiti/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/jiti@2.5.1/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/jiti@2.5.1/node_modules/jiti/lib/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/jiti@2.5.1/node_modules/jiti/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/jiti@2.5.1/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/jiti@2.5.1/node_modules/jiti/lib/jiti-cli.mjs" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../../../../node_modules/.pnpm/jiti@2.5.1/node_modules/jiti/lib/jiti-cli.mjs" "$@"
|
|
21
|
-
fi
|
package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/msw
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/msw@2.10.4_@types+node@24.3.0_typescript@5.8.3/node_modules/msw/cli/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/msw@2.10.4_@types+node@24.3.0_typescript@5.8.3/node_modules/msw/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/msw@2.10.4_@types+node@24.3.0_typescript@5.8.3/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/msw@2.10.4_@types+node@24.3.0_typescript@5.8.3/node_modules/msw/cli/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/msw@2.10.4_@types+node@24.3.0_typescript@5.8.3/node_modules/msw/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/msw@2.10.4_@types+node@24.3.0_typescript@5.8.3/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/msw@2.10.4_@types+node@24.3.0_typescript@5.8.3/node_modules/msw/cli/index.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../../../../node_modules/.pnpm/msw@2.10.4_@types+node@24.3.0_typescript@5.8.3/node_modules/msw/cli/index.js" "$@"
|
|
21
|
-
fi
|
package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/tsc
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/typescript@5.8.3/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/typescript@5.8.3/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsc" "$@"
|
|
21
|
-
fi
|
package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/tsserver
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/typescript@5.8.3/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/typescript@5.8.3/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../../../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/bin/tsserver" "$@"
|
|
21
|
-
fi
|
package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/vite
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vite@5.4.19_@types+node@22.18.0/node_modules/vite/bin/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vite@5.4.19_@types+node@22.18.0/node_modules/vite/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vite@5.4.19_@types+node@22.18.0/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vite@5.4.19_@types+node@22.18.0/node_modules/vite/bin/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vite@5.4.19_@types+node@22.18.0/node_modules/vite/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vite@5.4.19_@types+node@22.18.0/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../../../../node_modules/.pnpm/vite@5.4.19_@types+node@22.18.0/node_modules/vite/bin/vite.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../../../../node_modules/.pnpm/vite@5.4.19_@types+node@22.18.0/node_modules/vite/bin/vite.js" "$@"
|
|
21
|
-
fi
|
package/templates/shopping-app/example-integrations/ai-chat-completion/node_modules/.bin/vitest
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
-
|
|
4
|
-
case `uname` in
|
|
5
|
-
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
-
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
-
basedir=`cygpath -w "$basedir"`
|
|
8
|
-
fi
|
|
9
|
-
;;
|
|
10
|
-
esac
|
|
11
|
-
|
|
12
|
-
if [ -z "$NODE_PATH" ]; then
|
|
13
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vitest@3.2.4_@types+debug@4.1.12_@types+node@22.18.0_jsdom@26.1.0/node_modules/vitest/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vitest@3.2.4_@types+debug@4.1.12_@types+node@22.18.0_jsdom@26.1.0/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules"
|
|
14
|
-
else
|
|
15
|
-
export NODE_PATH="/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vitest@3.2.4_@types+debug@4.1.12_@types+node@22.18.0_jsdom@26.1.0/node_modules/vitest/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/vitest@3.2.4_@types+debug@4.1.12_@types+node@22.18.0_jsdom@26.1.0/node_modules:/Users/sam/WebstormProjects/top/auto-engineer/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
-
fi
|
|
17
|
-
if [ -x "$basedir/node" ]; then
|
|
18
|
-
exec "$basedir/node" "$basedir/../vitest/vitest.mjs" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../vitest/vitest.mjs" "$@"
|
|
21
|
-
fi
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
> @auto-engineer/cart-integration@0.6.1 format /Users/sam/WebstormProjects/top/auto-engineer/integrations/cart
|
|
4
|
-
> prettier --write "**/*.{js,ts,json,md,yml,yaml}" --ignore-path ../../.prettierignore
|
|
5
|
-
|
|
6
|
-
CHANGELOG.md[2K[1G[90mCHANGELOG.md[39m 31ms (unchanged)
|
|
7
|
-
eslint.config.ts[2K[1G[90meslint.config.ts[39m 40ms (unchanged)
|
|
8
|
-
package.json[2K[1G[90mpackage.json[39m 13ms (unchanged)
|
|
9
|
-
src/cart-integration.ts[2K[1G[90msrc/cart-integration.ts[39m 30ms (unchanged)
|
|
10
|
-
src/index.ts[2K[1G[90msrc/index.ts[39m 1ms (unchanged)
|
|
11
|
-
tsconfig.json[2K[1G[90mtsconfig.json[39m 1ms (unchanged)
|
|
12
|
-
tsconfig.test.json[2K[1G[90mtsconfig.test.json[39m 2ms (unchanged)
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @auto-engineer/cart-integration@0.6.1 test /Users/sam/WebstormProjects/top/auto-engineer/integrations/cart
|
|
3
|
-
> vitest run
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
RUN v3.2.4 /Users/sam/WebstormProjects/top/auto-engineer/integrations/cart
|
|
7
|
-
|
|
8
|
-
No test files found, exiting with code 0
|
|
9
|
-
|
|
10
|
-
include: **/*.specs.{js,ts}
|
|
11
|
-
exclude: **/.tmp/**, **/node_modules/**, **/dist/**
|
|
12
|
-
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { State, Integration } from '@auto-engineer/flow';
|
|
2
|
-
import type { CartSession } from './generated/cart';
|
|
3
|
-
export type CartState = State<'Cart', {
|
|
4
|
-
cart: CartSession;
|
|
5
|
-
}>;
|
|
6
|
-
type CartQueries = {
|
|
7
|
-
GetCart: (p: {
|
|
8
|
-
sessionId: string;
|
|
9
|
-
}) => Promise<CartState>;
|
|
10
|
-
};
|
|
11
|
-
type CartCommands = {
|
|
12
|
-
AddItem: (p: {
|
|
13
|
-
sessionId: string;
|
|
14
|
-
productId: string;
|
|
15
|
-
name: string;
|
|
16
|
-
price: number;
|
|
17
|
-
quantity: number;
|
|
18
|
-
}) => Promise<CartState>;
|
|
19
|
-
RemoveItem: (p: {
|
|
20
|
-
sessionId: string;
|
|
21
|
-
productId: string;
|
|
22
|
-
quantity: number;
|
|
23
|
-
}) => Promise<CartState>;
|
|
24
|
-
Clear: (p: {
|
|
25
|
-
sessionId: string;
|
|
26
|
-
}) => Promise<CartState>;
|
|
27
|
-
};
|
|
28
|
-
export declare const Cart: Integration<'cart', CartQueries, CartCommands>;
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=cart-integration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cart-integration.d.ts","sourceRoot":"","sources":["../src/cart-integration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAI9D,OAAO,KAAK,EACV,WAAW,EAOZ,MAAM,kBAAkB,CAAC;AAS1B,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAE;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAC,CAAC;AAM7D,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,CAAC,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;CAC3D,CAAC;AACF,KAAK,YAAY,GAAG;IAClB,OAAO,EAAE,CAAC,CAAC,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KAClB,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IACzB,UAAU,EAAE,CAAC,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;IAClG,KAAK,EAAE,CAAC,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC;CACzD,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,YAAY,CAgF/D,CAAC"}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { registerTool, z } from '@auto-engineer/ai-gateway';
|
|
2
|
-
import { createClient as createCartClient } from './generated/cart/client';
|
|
3
|
-
import { zGetApiCartBySessionIdResponse, zPostApiCartBySessionIdAddResponse, zPostApiCartBySessionIdRemoveResponse, zPostApiCartBySessionIdClearResponse, } from './generated/cart/zod.gen';
|
|
4
|
-
// ---------- Client ----------
|
|
5
|
-
const cartClient = createCartClient({ baseUrl: 'http://localhost:3002' });
|
|
6
|
-
export const Cart = {
|
|
7
|
-
__brand: 'Integration',
|
|
8
|
-
type: 'cart',
|
|
9
|
-
name: 'cart',
|
|
10
|
-
Queries: {
|
|
11
|
-
// GET /api/cart/{sessionId}
|
|
12
|
-
GetCart: async ({ sessionId }) => {
|
|
13
|
-
const res = await cartClient.get({
|
|
14
|
-
url: '/api/cart/{sessionId}',
|
|
15
|
-
path: { sessionId },
|
|
16
|
-
});
|
|
17
|
-
if (res.error !== undefined) {
|
|
18
|
-
console.error(`GetCart error for "${sessionId}":`, res.error);
|
|
19
|
-
const now = new Date().toISOString();
|
|
20
|
-
return { type: 'Cart', data: { cart: { sessionId, items: [], total: 0, createdAt: now, updatedAt: now } } };
|
|
21
|
-
}
|
|
22
|
-
return { type: 'Cart', data: { cart: res.data } };
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
Commands: {
|
|
26
|
-
// POST /api/cart/{sessionId}/add
|
|
27
|
-
AddItem: async ({ sessionId, productId, name, price, quantity }) => {
|
|
28
|
-
const res = await cartClient.post({
|
|
29
|
-
url: '/api/cart/{sessionId}/add',
|
|
30
|
-
path: { sessionId },
|
|
31
|
-
body: { productId, name, price, quantity },
|
|
32
|
-
});
|
|
33
|
-
if (res.error !== undefined) {
|
|
34
|
-
console.error(`AddItem error for "${sessionId}":`, res.error);
|
|
35
|
-
// fall back to current cart
|
|
36
|
-
const fallback = await cartClient.get({
|
|
37
|
-
url: '/api/cart/{sessionId}',
|
|
38
|
-
path: { sessionId },
|
|
39
|
-
});
|
|
40
|
-
return { type: 'Cart', data: { cart: fallback.data } };
|
|
41
|
-
}
|
|
42
|
-
return { type: 'Cart', data: { cart: res.data } };
|
|
43
|
-
},
|
|
44
|
-
// POST /api/cart/{sessionId}/remove
|
|
45
|
-
RemoveItem: async ({ sessionId, productId, quantity }) => {
|
|
46
|
-
const res = await cartClient.post({
|
|
47
|
-
url: '/api/cart/{sessionId}/remove',
|
|
48
|
-
path: { sessionId },
|
|
49
|
-
body: { productId, quantity },
|
|
50
|
-
});
|
|
51
|
-
if (res.error !== undefined) {
|
|
52
|
-
console.error(`RemoveItem error for "${sessionId}":`, res.error);
|
|
53
|
-
const fallback = await cartClient.get({
|
|
54
|
-
url: '/api/cart/{sessionId}',
|
|
55
|
-
path: { sessionId },
|
|
56
|
-
});
|
|
57
|
-
return { type: 'Cart', data: { cart: fallback.data } };
|
|
58
|
-
}
|
|
59
|
-
return { type: 'Cart', data: { cart: res.data } };
|
|
60
|
-
},
|
|
61
|
-
// POST /api/cart/{sessionId}/clear
|
|
62
|
-
Clear: async ({ sessionId }) => {
|
|
63
|
-
const res = await cartClient.post({
|
|
64
|
-
url: '/api/cart/{sessionId}/clear',
|
|
65
|
-
path: { sessionId },
|
|
66
|
-
});
|
|
67
|
-
if (res.error !== undefined) {
|
|
68
|
-
console.error(`Clear error for "${sessionId}":`, res.error);
|
|
69
|
-
const fallback = await cartClient.get({
|
|
70
|
-
url: '/api/cart/{sessionId}',
|
|
71
|
-
path: { sessionId },
|
|
72
|
-
});
|
|
73
|
-
return { type: 'Cart', data: { cart: fallback.data } };
|
|
74
|
-
}
|
|
75
|
-
return { type: 'Cart', data: { cart: res.data } };
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
// ---------- MCP tools ----------
|
|
80
|
-
registerTool('CART_GET', {
|
|
81
|
-
title: 'Get Cart',
|
|
82
|
-
description: 'Fetch a cart session by ID',
|
|
83
|
-
inputSchema: { sessionId: z.string().min(1) },
|
|
84
|
-
schema: zGetApiCartBySessionIdResponse,
|
|
85
|
-
schemaName: 'CartSession',
|
|
86
|
-
schemaDescription: 'Cart session details',
|
|
87
|
-
}, async ({ sessionId }) => {
|
|
88
|
-
const res = await Cart.Queries.GetCart({ sessionId });
|
|
89
|
-
return { content: [{ type: 'text', text: JSON.stringify(res.data.cart, null, 2) }] };
|
|
90
|
-
});
|
|
91
|
-
registerTool('CART_ADD', {
|
|
92
|
-
title: 'Add Item to Cart',
|
|
93
|
-
description: 'Add an item to the cart',
|
|
94
|
-
inputSchema: {
|
|
95
|
-
sessionId: z.string().min(1),
|
|
96
|
-
productId: z.string().min(1),
|
|
97
|
-
name: z.string().min(1),
|
|
98
|
-
price: z.number(),
|
|
99
|
-
quantity: z.number().int().positive(),
|
|
100
|
-
},
|
|
101
|
-
schema: zPostApiCartBySessionIdAddResponse,
|
|
102
|
-
schemaName: 'CartSession',
|
|
103
|
-
schemaDescription: 'Updated cart',
|
|
104
|
-
}, async (args) => {
|
|
105
|
-
const res = await Cart.Commands.AddItem(args);
|
|
106
|
-
return { content: [{ type: 'text', text: JSON.stringify(res.data.cart, null, 2) }] };
|
|
107
|
-
});
|
|
108
|
-
registerTool('CART_REMOVE', {
|
|
109
|
-
title: 'Remove Item from Cart',
|
|
110
|
-
description: 'Remove or decrement an item in the cart',
|
|
111
|
-
inputSchema: {
|
|
112
|
-
sessionId: z.string().min(1),
|
|
113
|
-
productId: z.string().min(1),
|
|
114
|
-
quantity: z.number().int().positive(),
|
|
115
|
-
},
|
|
116
|
-
schema: zPostApiCartBySessionIdRemoveResponse,
|
|
117
|
-
schemaName: 'CartSession',
|
|
118
|
-
schemaDescription: 'Updated cart',
|
|
119
|
-
}, async (args) => {
|
|
120
|
-
const res = await Cart.Commands.RemoveItem(args);
|
|
121
|
-
return { content: [{ type: 'text', text: JSON.stringify(res.data.cart, null, 2) }] };
|
|
122
|
-
});
|
|
123
|
-
registerTool('CART_CLEAR', {
|
|
124
|
-
title: 'Clear Cart',
|
|
125
|
-
description: 'Remove all items from the cart',
|
|
126
|
-
inputSchema: { sessionId: z.string().min(1) },
|
|
127
|
-
schema: zPostApiCartBySessionIdClearResponse,
|
|
128
|
-
schemaName: 'CartSession',
|
|
129
|
-
schemaDescription: 'Updated cart',
|
|
130
|
-
}, async ({ sessionId }) => {
|
|
131
|
-
const res = await Cart.Commands.Clear({ sessionId });
|
|
132
|
-
return { content: [{ type: 'text', text: JSON.stringify(res.data.cart, null, 2) }] };
|
|
133
|
-
});
|
|
134
|
-
//# sourceMappingURL=cart-integration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cart-integration.js","sourceRoot":"","sources":["../src/cart-integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,2BAA2B,CAAC;AAE5D,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAU3E,OAAO,EACL,8BAA8B,EAC9B,kCAAkC,EAClC,qCAAqC,EACrC,oCAAoC,GACrC,MAAM,0BAA0B,CAAC;AAKlC,+BAA+B;AAC/B,MAAM,UAAU,GAAG,gBAAgB,CAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC,CAAC;AAkB1E,MAAM,CAAC,MAAM,IAAI,GAAmD;IAClE,OAAO,EAAE,aAAsB;IAC/B,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IAEZ,OAAO,EAAE;QACP,4BAA4B;QAC5B,OAAO,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YAC/B,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,GAAG,CAAiD;gBAC/E,GAAG,EAAE,uBAAuB;gBAC5B,IAAI,EAAE,EAAE,SAAS,EAAE;aACpB,C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