create-mercato-app 0.10.1-develop.7983.1.fd91207efe → 0.10.1-develop.7994.1.c9f31972aa
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/agentic/guides/module-tool.md +21 -0
- package/agentic/shared/ai/harness/cases.json +23 -9
- package/agentic/shared/ai/harness/source-link-inventory.json +90 -4
- package/dist/agentic/guides/module-facts.json +162 -162
- package/dist/agentic/guides/module-facts.v2.json +162 -162
- package/dist/agentic/guides/module-tool.md +21 -0
- package/dist/agentic/guides/modules/agent_orchestrator/index.md +1 -1
- package/dist/agentic/guides/modules/ai_assistant/index.md +1 -1
- package/dist/agentic/guides/modules/api_docs/index.md +1 -1
- package/dist/agentic/guides/modules/api_keys/index.md +1 -1
- package/dist/agentic/guides/modules/attachments/index.md +1 -1
- package/dist/agentic/guides/modules/audit_logs/index.md +1 -1
- package/dist/agentic/guides/modules/auth/index.md +1 -1
- package/dist/agentic/guides/modules/availability/index.md +1 -1
- package/dist/agentic/guides/modules/business_rules/index.md +1 -1
- package/dist/agentic/guides/modules/carrier_inpost/index.md +1 -1
- package/dist/agentic/guides/modules/cart/index.md +1 -1
- package/dist/agentic/guides/modules/catalog/index.md +1 -1
- package/dist/agentic/guides/modules/channel_apns/index.md +1 -1
- package/dist/agentic/guides/modules/channel_discord/index.md +1 -1
- package/dist/agentic/guides/modules/channel_expo/index.md +1 -1
- package/dist/agentic/guides/modules/channel_fcm/index.md +1 -1
- package/dist/agentic/guides/modules/channel_gmail/index.md +1 -1
- package/dist/agentic/guides/modules/channel_imap/index.md +1 -1
- package/dist/agentic/guides/modules/channel_resend/index.md +1 -1
- package/dist/agentic/guides/modules/channel_ses/index.md +1 -1
- package/dist/agentic/guides/modules/channel_smtp/index.md +1 -1
- package/dist/agentic/guides/modules/checkout/index.md +1 -1
- package/dist/agentic/guides/modules/communication_channels/index.md +1 -1
- package/dist/agentic/guides/modules/configs/index.md +1 -1
- package/dist/agentic/guides/modules/content/index.md +1 -1
- package/dist/agentic/guides/modules/currencies/index.md +1 -1
- package/dist/agentic/guides/modules/customer_accounts/index.md +1 -1
- package/dist/agentic/guides/modules/customer_groups/index.md +1 -1
- package/dist/agentic/guides/modules/customers/index.md +1 -1
- package/dist/agentic/guides/modules/dashboards/index.md +1 -1
- package/dist/agentic/guides/modules/data_sync/index.md +1 -1
- package/dist/agentic/guides/modules/design_system/index.md +1 -1
- package/dist/agentic/guides/modules/devices/index.md +1 -1
- package/dist/agentic/guides/modules/dictionaries/index.md +1 -1
- package/dist/agentic/guides/modules/directory/index.md +1 -1
- package/dist/agentic/guides/modules/documents/index.md +1 -1
- package/dist/agentic/guides/modules/ecommerce/index.md +1 -1
- package/dist/agentic/guides/modules/entities/index.md +1 -1
- package/dist/agentic/guides/modules/eudr/index.md +1 -1
- package/dist/agentic/guides/modules/events/index.md +1 -1
- package/dist/agentic/guides/modules/feature_toggles/index.md +1 -1
- package/dist/agentic/guides/modules/forms/index.md +1 -1
- package/dist/agentic/guides/modules/gateway_autopay/index.md +1 -1
- package/dist/agentic/guides/modules/gateway_stripe/index.md +1 -1
- package/dist/agentic/guides/modules/gateway_tpay/index.md +1 -1
- package/dist/agentic/guides/modules/generators/index.md +1 -1
- package/dist/agentic/guides/modules/inbox_ops/index.md +1 -1
- package/dist/agentic/guides/modules/integrations/index.md +1 -1
- package/dist/agentic/guides/modules/messages/index.md +1 -1
- package/dist/agentic/guides/modules/notifications/index.md +1 -1
- package/dist/agentic/guides/modules/onboarding/index.md +1 -1
- package/dist/agentic/guides/modules/payment_gateways/index.md +1 -1
- package/dist/agentic/guides/modules/perspectives/index.md +1 -1
- package/dist/agentic/guides/modules/phone_calls/index.md +1 -1
- package/dist/agentic/guides/modules/planner/index.md +1 -1
- package/dist/agentic/guides/modules/portal/index.md +1 -1
- package/dist/agentic/guides/modules/progress/index.md +1 -1
- package/dist/agentic/guides/modules/promotions/index.md +1 -1
- package/dist/agentic/guides/modules/push_notifications/index.md +1 -1
- package/dist/agentic/guides/modules/query_index/index.md +1 -1
- package/dist/agentic/guides/modules/record_locks/index.md +1 -1
- package/dist/agentic/guides/modules/resources/index.md +1 -1
- package/dist/agentic/guides/modules/sales/index.md +1 -1
- package/dist/agentic/guides/modules/scheduler/index.md +1 -1
- package/dist/agentic/guides/modules/search/index.md +1 -1
- package/dist/agentic/guides/modules/security/index.md +1 -1
- package/dist/agentic/guides/modules/seeds/index.md +1 -1
- package/dist/agentic/guides/modules/shipping_carriers/index.md +1 -1
- package/dist/agentic/guides/modules/sso/index.md +1 -1
- package/dist/agentic/guides/modules/staff/index.md +1 -1
- package/dist/agentic/guides/modules/storage_s3/index.md +1 -1
- package/dist/agentic/guides/modules/sync_akeneo/index.md +1 -1
- package/dist/agentic/guides/modules/sync_excel/index.md +1 -1
- package/dist/agentic/guides/modules/system_status_overlays/index.md +1 -1
- package/dist/agentic/guides/modules/telemetry/index.md +1 -1
- package/dist/agentic/guides/modules/tillio/index.md +1 -1
- package/dist/agentic/guides/modules/translations/index.md +1 -1
- package/dist/agentic/guides/modules/warranty_claims/index.md +1 -1
- package/dist/agentic/guides/modules/webhooks/index.md +1 -1
- package/dist/agentic/guides/modules/wms/index.md +1 -1
- package/dist/agentic/guides/modules/workflows/index.md +1 -1
- package/dist/agentic/guides/reference-module-facts.json +1 -1
- package/dist/agentic/guides/upstream/manifest.json +1 -1
- package/dist/agentic/shared/ai/harness/cases.json +23 -9
- package/dist/agentic/shared/ai/harness/source-link-inventory.json +90 -4
- package/dist/index.js +28 -5
- package/dist/templates/modules-ts.template +6 -1
- package/package.json +3 -3
- package/template/scripts/dev-database-url.mjs +12 -0
- package/template/scripts/dev-infra-preflight.mjs +215 -10
- package/template/scripts/dev-orchestration-log-policy.mjs +30 -1
- package/template/scripts/dev-runtime.mjs +14 -41
- package/template/scripts/dev-service-connections.mjs +167 -0
- package/template/scripts/dev-session-guard.mjs +50 -1
- package/template/scripts/dev-session-recovery.mjs +157 -0
- package/template/scripts/dev-shutdown-utils.mjs +84 -11
- package/template/scripts/dev.mjs +10 -8
- package/template/scripts/infra.mjs +39 -1
- package/template/scripts/setup.mjs +14 -4
- package/template/src/modules.ts +2 -0
|
@@ -33,3 +33,24 @@ npx create-mercato-module link visits
|
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
The tool checks GitHub login, clones under `.mercato`, backs up the original module source, and replaces the app module folder with a link to the checkout's module source. Keep editing and testing through this app. Use the checkout's normal Git branch/commit/PR workflow for review; `publish` does not create a PR. The link is local: a fresh clone of the app must restore or link the module again. Without `link`, keep development in the original app and rerun `publish` to export changes. Do not manually replace app source with compiled npm output or edit `node_modules`.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
## Receiving app: installation, aliases, and replacement
|
|
39
|
+
|
|
40
|
+
Before explaining or planning receiving-app installation, aliases, provider replacement, or ejection, read the exact installed CLI contracts: [installation and enablement](../../node_modules/@open-mercato/cli/src/lib/module-install.ts), [module identity and generation preflight](../../node_modules/@open-mercato/cli/src/lib/module-identity.ts), and [safe ejection](../../node_modules/@open-mercato/cli/src/lib/eject.ts). These files are read-only evidence. If the installed release does not ship one, report that limitation instead of guessing its behavior.
|
|
41
|
+
|
|
42
|
+
An alias selects a dependency binding, while the runtime module ID remains the module directory name. Install an alias with Yarn and enable that binding with `yarn mercato module enable <binding> --module <module_id> --allow-third-party`. The canonical package name comes from its manifest; an alias cannot make two providers with the same runtime module ID coexist. Keep one enabled entry per ID in `src/modules.ts`, including conditional registrations. A single package-backed registration with a local overlay remains supported; preserve its source when removing duplicate entries, then regenerate. Do not edit generated registries.
|
|
43
|
+
|
|
44
|
+
npm and GitHub are distinct installation origins. A package's repository field does not establish a GitHub origin for an npm installation. Versions and refs select artifacts; origin-qualified requirements compare canonical sources rather than version constraints. Optional `locator` and `packageName` fields retain provenance for aliases, linked source, or ejected modules. Existing entries need no bulk metadata migration, and missing provenance must not be invented from a folder name. A local file artifact establishes neither an npm nor a GitHub origin: omit an unknown `locator`; an active binding replacement must fail before Yarn when its origin cannot be preserved.
|
|
45
|
+
|
|
46
|
+
`module add` inspects the selected artifact before changing the dependency binding: npm packing suppresses lifecycle scripts, preserves the requested selector, and checks the resolved version after installation, local file artifacts are inspected directly, and GitHub refs are pinned to commits. Every enabled consumer must retain its source and module layout during a same-source update. Use this order for an explicit provider replacement:
|
|
47
|
+
|
|
48
|
+
1. Disable all entries consuming the binding in `src/modules.ts`, including conditional registrations. Preserve local source and data, and resolve any occupied destination before adding another provider.
|
|
49
|
+
2. Resolve or reconfigure origin-qualified dependants and manually authored imports while the old provider is still installed.
|
|
50
|
+
3. Run `yarn mercato generate` and `yarn build` successfully before changing the dependency binding. Stop and fix failures while the old package remains available.
|
|
51
|
+
4. Replace the dependency through Yarn and enable the intended provider.
|
|
52
|
+
5. Run `yarn mercato generate` and `yarn build` again, then run tests covering the replacement.
|
|
53
|
+
|
|
54
|
+
An explicitly empty enabled-module list stays disabled. Disabling discovery does not remove dependencies, local source, data, or manual imports. The CLI does not rename runtime IDs, rewrite arbitrary imports, or migrate provider data.
|
|
55
|
+
|
|
56
|
+
Ejection retains available source provenance when one entry changes to `@app`, validates configuration before copying, and refuses to overwrite an occupied destination. Use the supported command after the normal ejection approval; preserve and review any existing local source. If installation finishes but enablement fails, the package may remain installed: review `src/modules.ts` and restore the intended binding and lockfile through Yarn. If registration finished but generation failed, fix the error and rerun `yarn mercato generate`; do not report completed enablement with stale artifacts.
|
|
@@ -21696,13 +21696,15 @@
|
|
|
21696
21696
|
"mode": "analysis",
|
|
21697
21697
|
"evaluationKind": "routing",
|
|
21698
21698
|
"risk": "medium",
|
|
21699
|
-
"prompt": "I am already inside a create-mercato-app Cloud sandbox. Explain the supported npx tool commands to start a new visits module, or package an existing visits module, then publish it to npm and a dedicated GitHub repository. Include a local preview before remote publication and explain how to keep developing in this same app after publication, including the optional repository link and its portability. Distinguish npm login, environment token and trusted publishing requirements. Prepare the workflow only; do not publish or create remote resources.",
|
|
21699
|
+
"prompt": "I am already inside a create-mercato-app Cloud sandbox. Explain the supported npx tool commands to start a new visits module, or package an existing visits module, then publish it to npm and a dedicated GitHub repository. Include a local preview before remote publication and explain how to keep developing in this same app after publication, including the optional repository link and its portability. Distinguish npm login, environment token and trusted publishing requirements. Prepare the workflow only; do not publish or create remote resources. For the receiving app, also explain installing under a dependency alias, rejecting two providers with the same runtime module ID, keeping npm and GitHub source identities distinct, explicitly disabling all consumers before replacing a binding, and preserving local source/provenance when ejecting. Explain resolving old-origin dependants and manual imports and successfully regenerating/building while the old provider remains installed, then replacing the binding and verifying generation/build again. Identify what disabling does not remove.",
|
|
21700
21700
|
"tags": [
|
|
21701
21701
|
"architecture",
|
|
21702
21702
|
"module-package",
|
|
21703
21703
|
"publication",
|
|
21704
21704
|
"source-link",
|
|
21705
|
-
"auth"
|
|
21705
|
+
"auth",
|
|
21706
|
+
"module-installation",
|
|
21707
|
+
"source-identity"
|
|
21706
21708
|
],
|
|
21707
21709
|
"owner": {
|
|
21708
21710
|
"kind": "guide",
|
|
@@ -21722,15 +21724,22 @@
|
|
|
21722
21724
|
"context": {
|
|
21723
21725
|
"required": [
|
|
21724
21726
|
"AGENTS.md",
|
|
21725
|
-
".ai/guides/module-tool.md"
|
|
21727
|
+
".ai/guides/module-tool.md",
|
|
21728
|
+
"node_modules/@open-mercato/cli/src/lib/module-install.ts",
|
|
21729
|
+
"node_modules/@open-mercato/cli/src/lib/module-identity.ts",
|
|
21730
|
+
"node_modules/@open-mercato/cli/src/lib/eject.ts"
|
|
21726
21731
|
],
|
|
21727
21732
|
"allowedExtra": [
|
|
21728
21733
|
".ai/guides/architecture.md"
|
|
21729
21734
|
],
|
|
21730
21735
|
"forbidden": [
|
|
21731
21736
|
".env*",
|
|
21732
|
-
".git/**"
|
|
21733
|
-
|
|
21737
|
+
".git/**"
|
|
21738
|
+
],
|
|
21739
|
+
"sourceReferenceIds": [
|
|
21740
|
+
"guides/module-tool:node_modules/@open-mercato/cli/src/lib/module-install.ts",
|
|
21741
|
+
"guides/module-tool:node_modules/@open-mercato/cli/src/lib/module-identity.ts",
|
|
21742
|
+
"guides/module-tool:node_modules/@open-mercato/cli/src/lib/eject.ts"
|
|
21734
21743
|
]
|
|
21735
21744
|
},
|
|
21736
21745
|
"requiredDecisions": [
|
|
@@ -21739,7 +21748,12 @@
|
|
|
21739
21748
|
"fresh-consumer-third-party",
|
|
21740
21749
|
"app-source-preserved",
|
|
21741
21750
|
"optional-repository-source-link",
|
|
21742
|
-
"npm-auth-mode-boundaries"
|
|
21751
|
+
"npm-auth-mode-boundaries",
|
|
21752
|
+
"module-binding-is-not-runtime-id",
|
|
21753
|
+
"npm-github-origins-distinct",
|
|
21754
|
+
"one-enabled-provider-per-runtime-id",
|
|
21755
|
+
"explicit-provider-replacement",
|
|
21756
|
+
"eject-retains-source-provenance"
|
|
21743
21757
|
],
|
|
21744
21758
|
"forbiddenPatterns": [
|
|
21745
21759
|
"(?:print|display|commit).{0,30}(?:NPM_TOKEN|NODE_AUTH_TOKEN|raw token)",
|
|
@@ -21754,9 +21768,9 @@
|
|
|
21754
21768
|
"context.forbidden",
|
|
21755
21769
|
"patterns.forbidden"
|
|
21756
21770
|
],
|
|
21757
|
-
"maxContextFiles":
|
|
21758
|
-
"maxInitialContextBytes":
|
|
21759
|
-
"maxTotalContextBytes":
|
|
21771
|
+
"maxContextFiles": 6,
|
|
21772
|
+
"maxInitialContextBytes": 73728,
|
|
21773
|
+
"maxTotalContextBytes": 81920,
|
|
21760
21774
|
"relatedCases": [
|
|
21761
21775
|
"OMH-002",
|
|
21762
21776
|
"OMH-046",
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
"version": 1,
|
|
3
3
|
"generatedNote": "Derived asset — the app-facing projection of the repository source-link inventory, regenerated with `yarn workspace create-mercato-app harness:generate-source-link-inventory`. Never hand-edit. Harness cases resolve `context.sourceReferenceIds` against `referenceId` here; a record with `readStatus: \"qa-only\"` is validation evidence only and is refused as a case reference.",
|
|
4
4
|
"derived": {
|
|
5
|
-
"ownerCount":
|
|
6
|
-
"recordCount":
|
|
7
|
-
"sourceRequiredCount":
|
|
8
|
-
"readableCount":
|
|
5
|
+
"ownerCount": 33,
|
|
6
|
+
"recordCount": 159,
|
|
7
|
+
"sourceRequiredCount": 133,
|
|
8
|
+
"readableCount": 159,
|
|
9
9
|
"baselineSha": "f7c941570003f3abe920b1765995cbef98dcad0b"
|
|
10
10
|
},
|
|
11
11
|
"notCovered": [
|
|
@@ -615,6 +615,81 @@
|
|
|
615
615
|
"migration"
|
|
616
616
|
]
|
|
617
617
|
},
|
|
618
|
+
{
|
|
619
|
+
"referenceId": "guides/module-tool:node_modules/@open-mercato/cli/src/lib/eject.ts",
|
|
620
|
+
"requirement": "source-required",
|
|
621
|
+
"originAsset": ".ai/guides/module-tool.md",
|
|
622
|
+
"heading": "Receiving app: installation, aliases, and replacement",
|
|
623
|
+
"href": "../../node_modules/@open-mercato/cli/src/lib/eject.ts",
|
|
624
|
+
"targetKind": "installed-package",
|
|
625
|
+
"readStatus": "readable",
|
|
626
|
+
"resolvedPath": "node_modules/@open-mercato/cli/src/lib/eject.ts",
|
|
627
|
+
"moduleId": null,
|
|
628
|
+
"capabilityIds": [],
|
|
629
|
+
"packageName": "@open-mercato/cli",
|
|
630
|
+
"packageRelativePath": "src/lib/eject.ts",
|
|
631
|
+
"presets": [
|
|
632
|
+
"classic",
|
|
633
|
+
"crm",
|
|
634
|
+
"empty",
|
|
635
|
+
"wms"
|
|
636
|
+
],
|
|
637
|
+
"tiers": [
|
|
638
|
+
"automation",
|
|
639
|
+
"core",
|
|
640
|
+
"migration"
|
|
641
|
+
]
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"referenceId": "guides/module-tool:node_modules/@open-mercato/cli/src/lib/module-identity.ts",
|
|
645
|
+
"requirement": "source-required",
|
|
646
|
+
"originAsset": ".ai/guides/module-tool.md",
|
|
647
|
+
"heading": "Receiving app: installation, aliases, and replacement",
|
|
648
|
+
"href": "../../node_modules/@open-mercato/cli/src/lib/module-identity.ts",
|
|
649
|
+
"targetKind": "installed-package",
|
|
650
|
+
"readStatus": "readable",
|
|
651
|
+
"resolvedPath": "node_modules/@open-mercato/cli/src/lib/module-identity.ts",
|
|
652
|
+
"moduleId": null,
|
|
653
|
+
"capabilityIds": [],
|
|
654
|
+
"packageName": "@open-mercato/cli",
|
|
655
|
+
"packageRelativePath": "src/lib/module-identity.ts",
|
|
656
|
+
"presets": [
|
|
657
|
+
"classic",
|
|
658
|
+
"crm",
|
|
659
|
+
"empty",
|
|
660
|
+
"wms"
|
|
661
|
+
],
|
|
662
|
+
"tiers": [
|
|
663
|
+
"automation",
|
|
664
|
+
"core",
|
|
665
|
+
"migration"
|
|
666
|
+
]
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"referenceId": "guides/module-tool:node_modules/@open-mercato/cli/src/lib/module-install.ts",
|
|
670
|
+
"requirement": "source-required",
|
|
671
|
+
"originAsset": ".ai/guides/module-tool.md",
|
|
672
|
+
"heading": "Receiving app: installation, aliases, and replacement",
|
|
673
|
+
"href": "../../node_modules/@open-mercato/cli/src/lib/module-install.ts",
|
|
674
|
+
"targetKind": "installed-package",
|
|
675
|
+
"readStatus": "readable",
|
|
676
|
+
"resolvedPath": "node_modules/@open-mercato/cli/src/lib/module-install.ts",
|
|
677
|
+
"moduleId": null,
|
|
678
|
+
"capabilityIds": [],
|
|
679
|
+
"packageName": "@open-mercato/cli",
|
|
680
|
+
"packageRelativePath": "src/lib/module-install.ts",
|
|
681
|
+
"presets": [
|
|
682
|
+
"classic",
|
|
683
|
+
"crm",
|
|
684
|
+
"empty",
|
|
685
|
+
"wms"
|
|
686
|
+
],
|
|
687
|
+
"tiers": [
|
|
688
|
+
"automation",
|
|
689
|
+
"core",
|
|
690
|
+
"migration"
|
|
691
|
+
]
|
|
692
|
+
},
|
|
618
693
|
{
|
|
619
694
|
"referenceId": "om-backend-ui-design/crud-surfaces:README.md",
|
|
620
695
|
"requirement": "source-required",
|
|
@@ -3913,6 +3988,17 @@
|
|
|
3913
3988
|
"core"
|
|
3914
3989
|
]
|
|
3915
3990
|
},
|
|
3991
|
+
{
|
|
3992
|
+
"referenceId": "rule:guides/module-tool#file-artifact-unknown-origin",
|
|
3993
|
+
"requirement": "retained-normative-snippet",
|
|
3994
|
+
"originAsset": ".ai/guides/module-tool.md",
|
|
3995
|
+
"heading": null,
|
|
3996
|
+
"targetKind": "local-owner",
|
|
3997
|
+
"readStatus": "readable",
|
|
3998
|
+
"resolvedPath": ".ai/guides/module-tool.md",
|
|
3999
|
+
"moduleId": null,
|
|
4000
|
+
"capabilityIds": []
|
|
4001
|
+
},
|
|
3916
4002
|
{
|
|
3917
4003
|
"referenceId": "rule:guides/testing-debugging#generated-output-is-not-a-patch-target",
|
|
3918
4004
|
"requirement": "retained-normative-snippet",
|