@open-mercato/cli 0.6.8-develop.6931.1.4a1e1c786b → 0.6.8-develop.6940.1.177ea30c6e
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/.turbo/turbo-build.log +65 -1
- package/build.mjs +57 -7
- package/dist/agentic/guides/backend-ui.md +7 -1
- package/dist/agentic/guides/module-facts.json +565 -224
- package/dist/agentic/guides/module-facts.v2.json +122933 -0
- package/dist/agentic/guides/modules/ai_assistant.md +2 -2
- package/dist/agentic/guides/modules/api_docs.md +2 -2
- package/dist/agentic/guides/modules/api_keys.md +2 -2
- package/dist/agentic/guides/modules/attachments.md +2 -2
- package/dist/agentic/guides/modules/audit_logs.md +2 -2
- package/dist/agentic/guides/modules/auth.md +2 -2
- package/dist/agentic/guides/modules/business_rules.md +2 -2
- package/dist/agentic/guides/modules/catalog.md +11 -4
- package/dist/agentic/guides/modules/channel_gmail.md +2 -2
- package/dist/agentic/guides/modules/channel_imap.md +2 -2
- package/dist/agentic/guides/modules/checkout.md +8 -2
- package/dist/agentic/guides/modules/communication_channels.md +6 -6
- package/dist/agentic/guides/modules/configs.md +2 -2
- package/dist/agentic/guides/modules/content.md +2 -2
- package/dist/agentic/guides/modules/currencies.md +2 -2
- package/dist/agentic/guides/modules/customer_accounts.md +2 -2
- package/dist/agentic/guides/modules/customers.md +8 -8
- package/dist/agentic/guides/modules/dashboards.md +12 -12
- package/dist/agentic/guides/modules/data_sync.md +4 -4
- package/dist/agentic/guides/modules/design_system.md +2 -2
- package/dist/agentic/guides/modules/dictionaries.md +2 -2
- package/dist/agentic/guides/modules/directory.md +2 -2
- package/dist/agentic/guides/modules/entities.md +3 -3
- package/dist/agentic/guides/modules/eudr.md +3 -3
- package/dist/agentic/guides/modules/events.md +2 -2
- package/dist/agentic/guides/modules/feature_toggles.md +2 -2
- package/dist/agentic/guides/modules/gateway_stripe.md +2 -2
- package/dist/agentic/guides/modules/generators.md +2 -2
- package/dist/agentic/guides/modules/inbox_ops.md +2 -2
- package/dist/agentic/guides/modules/integrations.md +5 -2
- package/dist/agentic/guides/modules/messages.md +2 -2
- package/dist/agentic/guides/modules/notifications.md +2 -2
- package/dist/agentic/guides/modules/onboarding.md +2 -2
- package/dist/agentic/guides/modules/payment_gateways.md +7 -3
- package/dist/agentic/guides/modules/perspectives.md +2 -2
- package/dist/agentic/guides/modules/planner.md +2 -2
- package/dist/agentic/guides/modules/portal.md +2 -2
- package/dist/agentic/guides/modules/progress.md +2 -2
- package/dist/agentic/guides/modules/query_index.md +2 -2
- package/dist/agentic/guides/modules/record_locks.md +3 -3
- package/dist/agentic/guides/modules/resources.md +2 -2
- package/dist/agentic/guides/modules/sales.md +13 -4
- package/dist/agentic/guides/modules/scheduler.md +2 -2
- package/dist/agentic/guides/modules/search.md +4 -4
- package/dist/agentic/guides/modules/security.md +3 -3
- package/dist/agentic/guides/modules/shipping_carriers.md +2 -2
- package/dist/agentic/guides/modules/sso.md +2 -2
- package/dist/agentic/guides/modules/staff.md +7 -4
- package/dist/agentic/guides/modules/storage_s3.md +2 -2
- package/dist/agentic/guides/modules/sync_akeneo.md +4 -4
- package/dist/agentic/guides/modules/sync_excel.md +2 -2
- package/dist/agentic/guides/modules/system_status_overlays.md +2 -2
- package/dist/agentic/guides/modules/translations.md +2 -2
- package/dist/agentic/guides/modules/webhooks.md +2 -2
- package/dist/agentic/guides/modules/wms.md +31 -4
- package/dist/agentic/guides/modules/workflows.md +2 -2
- package/dist/agentic/guides/reference-module-facts.json +8335 -0
- package/dist/agentic/guides/reference-modules/example.md +489 -0
- package/dist/agentic/guides/spec-delivery.md +34 -0
- package/dist/agentic/guides/testing-debugging.md +2 -1
- package/dist/agentic/guides/upstream/BACKWARD_COMPATIBILITY.md +3 -2
- package/dist/agentic/guides/upstream/manifest.json +2 -2
- package/dist/agentic/shared/AGENTS.md.template +10 -14
- package/dist/agentic/shared/ai/harness/README.md +4 -4
- package/dist/agentic/shared/ai/harness/RELEASE.md +4 -4
- package/dist/agentic/shared/ai/harness/cases.json +11350 -5088
- package/dist/agentic/shared/ai/harness/cases.schema.json +70 -7
- package/dist/agentic/shared/ai/harness/design-system-inventory.json +6697 -0
- package/dist/agentic/shared/ai/harness/fixtures/index.json +3 -1
- package/dist/agentic/shared/ai/harness/fixtures/seeds.json +4 -0
- package/dist/agentic/shared/ai/harness/knowledge-change.schema.json +228 -0
- package/dist/agentic/shared/ai/harness/release-matrix.json +9 -4
- package/dist/agentic/shared/ai/harness/result.schema.json +60 -0
- package/dist/agentic/shared/ai/harness/routing-response.schema.json +10 -0
- package/dist/agentic/shared/ai/harness/source-link-inventory.json +3231 -0
- package/dist/agentic/shared/ai/harness/validators.json +8 -4
- package/dist/agentic/shared/ai/harness/writable-ast-oracles.mjs +5 -2
- package/dist/agentic/shared/ai/harness/writable-behavior-oracles.mjs +3 -0
- package/dist/agentic/shared/ai/harness/writable-spec-oracles.mjs +879 -0
- package/dist/agentic/shared/ai/skills/om-auto-upgrade-0.6.7-to-0.7.0/SKILL.md +102 -0
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/SKILL.md +1 -0
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/crud-surfaces.md +15 -0
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/frontend-and-design-system.md +6 -0
- package/dist/agentic/shared/ai/skills/om-backend-ui-design/references/page-and-navigation.md +4 -0
- package/dist/agentic/shared/ai/skills/om-data-model-design/SKILL.md +1 -0
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/integrity-and-concurrency.md +2 -0
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/migration-workflow.md +2 -0
- package/dist/agentic/shared/ai/skills/om-data-model-design/references/schema-design.md +3 -1
- package/dist/agentic/shared/ai/skills/om-eject-and-customize/SKILL.md +1 -0
- package/dist/agentic/shared/ai/skills/om-eject-and-customize/references/decision-and-procedure.md +2 -0
- package/dist/agentic/shared/ai/skills/om-evolve-harness/SKILL.md +2 -0
- package/dist/agentic/shared/ai/skills/om-evolve-harness/references/case-template.md +3 -3
- package/dist/agentic/shared/ai/skills/om-evolve-harness/references/case-workflow.md +1 -1
- package/dist/agentic/shared/ai/skills/om-evolve-harness/references/knowledge-change.md +133 -0
- package/dist/agentic/shared/ai/skills/om-integration-builder/SKILL.md +1 -0
- package/dist/agentic/shared/ai/skills/om-integration-builder/references/provider-families.md +11 -0
- package/dist/agentic/shared/ai/skills/om-judge-agent-session/references/judge-workflow.md +1 -1
- package/dist/agentic/shared/ai/skills/om-module-scaffold/SKILL.md +2 -2
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/api-and-domain.md +14 -1
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/data-and-migrations.md +2 -0
- package/dist/agentic/shared/ai/skills/om-module-scaffold/references/module-surfaces.md +19 -0
- package/dist/agentic/shared/ai/skills/om-share-this-session/scripts/prepare-share-bundle.mjs +1 -4
- package/dist/agentic/shared/ai/skills/om-system-extension/SKILL.md +1 -0
- package/dist/agentic/shared/ai/skills/om-system-extension/references/extension-branches.md +24 -0
- package/dist/agentic/shared/ai/skills/om-system-extension/references/unified-overrides.md +3 -1
- package/dist/agentic/shared/ai/skills/om-troubleshooter/SKILL.md +1 -0
- package/dist/agentic/shared/ai/skills/om-troubleshooter/references/diagnosis-map.md +13 -0
- package/dist/agentic/shared/ai/skills/tiers.json +2 -1
- package/dist/agentic/shared/ai/specs/2026-08-06-reference-module-activation.md +248 -0
- package/dist/agentic/shared/scripts/agent-harness-tool-server.mjs +39 -2
- package/dist/agentic/shared/scripts/design-source-contract.mjs +108 -0
- package/dist/agentic/shared/scripts/evaluate-agent-harness.mjs +935 -28
- package/dist/agentic/shared/scripts/framework-context.mjs +4 -1
- package/dist/agentic/shared/scripts/run-agent-harness-release.mjs +1 -1
- package/dist/agentic/shared/scripts/validate-knowledge-change.mjs +1511 -0
- package/dist/lib/__integration__/TC-INT-008.spec.js +1 -0
- package/dist/lib/__integration__/TC-INT-008.spec.js.map +2 -2
- package/dist/lib/agentic-setup.js +9 -1
- package/dist/lib/agentic-setup.js.map +2 -2
- package/dist/lib/generators/module-extension-facts.js +93 -26
- package/dist/lib/generators/module-extension-facts.js.map +3 -3
- package/dist/lib/generators/module-facts-discovery.js +23 -0
- package/dist/lib/generators/module-facts-discovery.js.map +2 -2
- package/dist/lib/generators/module-facts.js +969 -41
- package/dist/lib/generators/module-facts.js.map +2 -2
- package/dist/lib/generators/module-override-targets.js +35 -11
- package/dist/lib/generators/module-override-targets.js.map +2 -2
- package/dist/lib/generators/module-registry.js +105 -2
- package/dist/lib/generators/module-registry.js.map +2 -2
- package/dist/lib/resolver.js +5 -0
- package/dist/lib/resolver.js.map +2 -2
- package/dist/lib/testing/integration-discovery.js +34 -0
- package/dist/lib/testing/integration-discovery.js.map +2 -2
- package/dist/lib/testing/integration.js +0 -2
- package/dist/lib/testing/integration.js.map +2 -2
- package/dist/mercato.js +4 -4
- package/dist/mercato.js.map +2 -2
- package/package.json +6 -6
- package/src/lib/__integration__/TC-INT-008.spec.ts +4 -2
- package/src/lib/__tests__/resolve-environment.test.ts +18 -0
- package/src/lib/agentic-setup.ts +10 -2
- package/src/lib/generators/__tests__/helpers/override-target-diagnostic-fixtures.ts +150 -0
- package/src/lib/generators/__tests__/module-extension-facts.test.ts +290 -0
- package/src/lib/generators/__tests__/module-facts.bc-guard.test.ts +72 -7
- package/src/lib/generators/__tests__/module-facts.computed-di-token.test.ts +88 -0
- package/src/lib/generators/__tests__/module-facts.example-fact-coverage.test.ts +502 -0
- package/src/lib/generators/__tests__/module-facts.local-reference.test.ts +414 -0
- package/src/lib/generators/__tests__/module-facts.search-entity-id.test.ts +151 -0
- package/src/lib/generators/__tests__/module-facts.source-links.test.ts +42 -1
- package/src/lib/generators/__tests__/module-override-targets.diagnostic-wiring.test.ts +92 -0
- package/src/lib/generators/__tests__/module-override-targets.test.ts +24 -0
- package/src/lib/generators/__tests__/module-override-targets.unknown-mode.test.ts +117 -0
- package/src/lib/generators/__tests__/module-subset.test.ts +60 -0
- package/src/lib/generators/module-extension-facts.ts +181 -25
- package/src/lib/generators/module-facts-discovery.ts +46 -0
- package/src/lib/generators/module-facts.ts +1330 -86
- package/src/lib/generators/module-override-targets.ts +70 -26
- package/src/lib/generators/module-registry.ts +135 -2
- package/src/lib/resolver.ts +6 -1
- package/src/lib/testing/__tests__/integration-discovery.test.ts +35 -0
- package/src/lib/testing/integration-discovery.ts +50 -0
- package/src/lib/testing/integration.ts +0 -2
- package/src/mercato.ts +3 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
Copied create-app/agentic/ → dist/agentic/
|
|
3
3
|
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for ai_assistant
|
|
4
4
|
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for channel_gmail
|
|
5
|
+
Generated 56 module fact-sheets → dist/agentic/guides/modules/
|
|
5
6
|
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for channel_imap
|
|
6
7
|
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for checkout
|
|
8
|
+
[module-facts] searchConfig entityId is not statically resolvable: /home/runner/work/open-mercato/open-mercato/packages/checkout/src/modules/checkout/search.ts:11
|
|
9
|
+
[module-facts] searchConfig entityId is not statically resolvable: /home/runner/work/open-mercato/open-mercato/packages/checkout/src/modules/checkout/search.ts:31
|
|
10
|
+
[module-facts] searchConfig entityId is not statically resolvable: /home/runner/work/open-mercato/open-mercato/packages/checkout/src/modules/checkout/search.ts:58
|
|
7
11
|
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for content
|
|
8
12
|
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for api_docs
|
|
9
13
|
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for api_keys
|
|
@@ -56,5 +60,65 @@ Copied create-app/agentic/ → dist/agentic/
|
|
|
56
60
|
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for storage_s3
|
|
57
61
|
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for sync_akeneo
|
|
58
62
|
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for webhooks
|
|
59
|
-
|
|
63
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for ai_assistant
|
|
64
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for channel_gmail
|
|
65
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for channel_imap
|
|
66
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for checkout
|
|
67
|
+
[module-facts] searchConfig entityId is not statically resolvable: /home/runner/work/open-mercato/open-mercato/packages/checkout/src/modules/checkout/search.ts:11
|
|
68
|
+
[module-facts] searchConfig entityId is not statically resolvable: /home/runner/work/open-mercato/open-mercato/packages/checkout/src/modules/checkout/search.ts:31
|
|
69
|
+
[module-facts] searchConfig entityId is not statically resolvable: /home/runner/work/open-mercato/open-mercato/packages/checkout/src/modules/checkout/search.ts:58
|
|
70
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for content
|
|
71
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for api_docs
|
|
72
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for api_keys
|
|
73
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for attachments
|
|
74
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for audit_logs
|
|
75
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for auth
|
|
76
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for business_rules
|
|
77
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for catalog
|
|
78
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for communication_channels
|
|
79
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for configs
|
|
80
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for currencies
|
|
81
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for customer_accounts
|
|
82
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for customers
|
|
83
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for dashboards
|
|
84
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for data_sync
|
|
85
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for design_system
|
|
86
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for dictionaries
|
|
87
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for directory
|
|
88
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for entities
|
|
89
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for eudr
|
|
90
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for feature_toggles
|
|
91
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for inbox_ops
|
|
92
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for integrations
|
|
93
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for messages
|
|
94
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for notifications
|
|
95
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for payment_gateways
|
|
96
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for perspectives
|
|
97
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for planner
|
|
98
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for portal
|
|
99
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for progress
|
|
100
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for query_index
|
|
101
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for resources
|
|
102
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for sales
|
|
103
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for shipping_carriers
|
|
104
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for staff
|
|
105
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for sync_excel
|
|
106
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for translations
|
|
107
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for wms
|
|
108
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for workflows
|
|
109
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for record_locks
|
|
110
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for security
|
|
111
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for sso
|
|
112
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for system_status_overlays
|
|
113
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for events
|
|
114
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for gateway_stripe
|
|
115
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for onboarding
|
|
116
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for scheduler
|
|
117
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for search
|
|
118
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for generators
|
|
119
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for storage_s3
|
|
120
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for sync_akeneo
|
|
121
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for webhooks
|
|
122
|
+
[module-facts] module registry unavailable (registryPath not provided); API route auth omitted for example
|
|
123
|
+
Generated 1 local reference projection(s) → dist/agentic/guides/reference-modules/
|
|
60
124
|
[build:cli] built successfully
|
package/build.mjs
CHANGED
|
@@ -57,6 +57,9 @@ await buildPackage(packageDir, {
|
|
|
57
57
|
// in an incremental `dist/` from an older build. Mirrors packages/create-app/build.mjs;
|
|
58
58
|
// conceptual guides remain while stale single-dot package guides are removed below.
|
|
59
59
|
rmSync(join(guidesDestDir, 'modules'), { recursive: true, force: true })
|
|
60
|
+
rmSync(join(guidesDestDir, 'reference-modules'), { recursive: true, force: true })
|
|
61
|
+
rmSync(join(guidesDestDir, 'reference-module-facts.json'), { force: true })
|
|
62
|
+
rmSync(join(guidesDestDir, 'module-facts.v2.json'), { force: true })
|
|
60
63
|
for (const entry of readdirSync(guidesDestDir)) {
|
|
61
64
|
if (/^core\..+\.md$/.test(entry)) {
|
|
62
65
|
rmSync(join(guidesDestDir, entry))
|
|
@@ -88,19 +91,29 @@ await buildPackage(packageDir, {
|
|
|
88
91
|
console.log(`Discovered ${guidesFound} standalone guides → dist/agentic/guides/`)
|
|
89
92
|
}
|
|
90
93
|
|
|
91
|
-
// Generate per-module fact-sheets
|
|
92
|
-
// the freshly built ts-morph extractor
|
|
94
|
+
// Generate per-module fact-sheets plus legacy-v1 and corrected-v2 JSON sidecars
|
|
95
|
+
// for every package-provided module via the freshly built ts-morph extractor and
|
|
96
|
+
// resolver-routed discovery, so
|
|
93
97
|
// `mercato agentic:init` bundles the same guides as a create-mercato-app scaffold
|
|
94
98
|
// (packages/create-app/build.mjs). Discovery goes through the resolver, never a
|
|
95
99
|
// hardcoded packages/* path (.ai/lessons/standalone-scaffolding-and-generators-must-not-assume.md).
|
|
96
|
-
const {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
const {
|
|
101
|
+
assertPackageModuleFactsOnly,
|
|
102
|
+
extractAllModuleFacts,
|
|
103
|
+
extractLocalReferenceModuleFacts,
|
|
104
|
+
renderModuleFactsJson,
|
|
105
|
+
renderReferenceModuleFactsJson,
|
|
106
|
+
} = await import(pathToFileURL(join(outdir, 'lib', 'generators', 'module-facts.js')).href)
|
|
107
|
+
const { discoverLocalReferenceModuleSource, discoverPackageModuleSources } = await import(
|
|
100
108
|
pathToFileURL(join(outdir, 'lib', 'generators', 'module-facts-discovery.js')).href
|
|
101
109
|
)
|
|
102
110
|
const { createResolver } = await import(pathToFileURL(join(outdir, 'lib', 'resolver.js')).href)
|
|
103
111
|
|
|
112
|
+
// Mirrors packages/create-app/build.mjs: the disabled app-local example never enters
|
|
113
|
+
// the normal package outputs and is projected into its own reference bundle so
|
|
114
|
+
// `mercato agentic:init` bundles exactly what a create-mercato-app scaffold does.
|
|
115
|
+
const REFERENCE_MODULE_IDS = ['example']
|
|
116
|
+
|
|
104
117
|
const sources = discoverPackageModuleSources(createResolver(join(packagesDir, '..')))
|
|
105
118
|
if (sources.length > 0) {
|
|
106
119
|
const registryPath = join(packagesDir, '..', 'apps', 'mercato', '.mercato', 'generated', 'modules.runtime.generated.ts')
|
|
@@ -116,17 +129,54 @@ await buildPackage(packageDir, {
|
|
|
116
129
|
registryPath: existsSync(registryPath) ? registryPath : null,
|
|
117
130
|
coreVersion,
|
|
118
131
|
})
|
|
132
|
+
const { factsByModule: legacyFactsByModule } = extractAllModuleFacts({
|
|
133
|
+
sources,
|
|
134
|
+
registryPath: existsSync(registryPath) ? registryPath : null,
|
|
135
|
+
coreVersion,
|
|
136
|
+
factsContractVersion: 1,
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
assertPackageModuleFactsOnly(factsByModule)
|
|
140
|
+
assertPackageModuleFactsOnly(legacyFactsByModule)
|
|
119
141
|
|
|
120
142
|
const modulesGuidesDir = join(guidesDestDir, 'modules')
|
|
121
143
|
mkdirSync(modulesGuidesDir, { recursive: true })
|
|
122
144
|
for (const [moduleId, markdown] of Object.entries(markdownByModule)) {
|
|
123
145
|
writeFileSync(join(modulesGuidesDir, `${moduleId}.md`), markdown)
|
|
124
146
|
}
|
|
125
|
-
writeFileSync(join(guidesDestDir, 'module-facts.json'), renderModuleFactsJson(
|
|
147
|
+
writeFileSync(join(guidesDestDir, 'module-facts.json'), renderModuleFactsJson(legacyFactsByModule))
|
|
148
|
+
writeFileSync(join(guidesDestDir, 'module-facts.v2.json'), renderModuleFactsJson(factsByModule))
|
|
126
149
|
writeFileSync(join(guidesDestDir, 'framework-extension-points.md'), frameworkMarkdown)
|
|
127
150
|
|
|
128
151
|
for (const warning of warnings) console.warn(warning)
|
|
129
152
|
console.log(`Generated ${Object.keys(markdownByModule).length} module fact-sheets → dist/agentic/guides/modules/`)
|
|
153
|
+
|
|
154
|
+
const referenceBundle = {}
|
|
155
|
+
const referenceGuidesDir = join(guidesDestDir, 'reference-modules')
|
|
156
|
+
const templateRoot = join(packagesDir, 'create-app', 'template')
|
|
157
|
+
for (const moduleId of REFERENCE_MODULE_IDS) {
|
|
158
|
+
const reference = discoverLocalReferenceModuleSource({ appRoot: templateRoot, moduleId })
|
|
159
|
+
if (!reference) {
|
|
160
|
+
throw new Error(`[module-facts] reference module "${moduleId}" is missing from the create-app template`)
|
|
161
|
+
}
|
|
162
|
+
const { entry, markdown, warnings: referenceWarnings, unresolvedTargets } = extractLocalReferenceModuleFacts({
|
|
163
|
+
packageSources: sources,
|
|
164
|
+
reference,
|
|
165
|
+
registryPath: existsSync(registryPath) ? registryPath : null,
|
|
166
|
+
coreVersion,
|
|
167
|
+
})
|
|
168
|
+
referenceBundle[moduleId] = entry
|
|
169
|
+
mkdirSync(referenceGuidesDir, { recursive: true })
|
|
170
|
+
writeFileSync(join(referenceGuidesDir, `${moduleId}.md`), markdown)
|
|
171
|
+
for (const warning of referenceWarnings) console.warn(warning)
|
|
172
|
+
for (const target of unresolvedTargets) {
|
|
173
|
+
console.warn(`[module-facts][reference] unresolved first-party target: ${target}`)
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
writeFileSync(join(guidesDestDir, 'reference-module-facts.json'), renderReferenceModuleFactsJson(referenceBundle))
|
|
177
|
+
console.log(
|
|
178
|
+
`Generated ${REFERENCE_MODULE_IDS.length} local reference projection(s) → dist/agentic/guides/reference-modules/`,
|
|
179
|
+
)
|
|
130
180
|
} else {
|
|
131
181
|
console.warn('[module-facts] no package modules discovered; skipping fact-sheet generation')
|
|
132
182
|
}
|
|
@@ -18,7 +18,7 @@ Every app page is module-owned and auto-discovered: author it under `src/modules
|
|
|
18
18
|
| Public frontend | `src/modules/<id>/frontend/**/page.tsx`; explicitly declare auth posture in metadata. |
|
|
19
19
|
| Customer portal | `src/modules/<id>/frontend/[orgSlug]/portal/**/page.tsx`; public login/signup/verify/landing pages are `navHidden` without customer auth, authenticated pages require customer auth/features, and only sidebar destinations add `nav`. |
|
|
20
20
|
|
|
21
|
-
List destinations need stable `pageGroup`, `pageGroupKey`, and order.
|
|
21
|
+
List destinations need stable `pageGroup`, `pageGroupKey`, and order. A `page.meta.ts` `icon` MUST be a name the installed icon registry already lists — an unlisted Lucide name renders no icon at all, silently — so verify it before use; use `lucide-react` components in page-body UI. Hide create/edit/detail destinations from navigation when they are reached from a list.
|
|
22
22
|
|
|
23
23
|
## Default CRUD Completeness
|
|
24
24
|
|
|
@@ -78,3 +78,9 @@ For a new editable entity or module, unless the brief explicitly excludes an ope
|
|
|
78
78
|
2. Exercise loading, empty, validation error, server error, conflict, success, and delete flows.
|
|
79
79
|
3. Save, reload, edit, clear nullable fields, and verify the API payload and rendered state agree.
|
|
80
80
|
4. Check keyboard and narrow-width behavior; run affected integration tests through real API fixtures.
|
|
81
|
+
|
|
82
|
+
## Canonical example source
|
|
83
|
+
|
|
84
|
+
This guide stays the rule owner. For one compiling implementation of a table, form, page shell, or rendered injected widget, open the exact row in [`src/modules/example/references/surface-map.md`](../../src/modules/example/references/surface-map.md) — its `Backend UI` section links each file — or go straight to [`components/TodosTable.tsx`](../../src/modules/example/components/TodosTable.tsx) and [`components/TodoForm.tsx`](../../src/modules/example/components/TodoForm.tsx). That module is source-present and runtime-disabled: read one row, never the tree, and rename every `example` identifier.
|
|
85
|
+
|
|
86
|
+
When you need what the component *accepts*, not how the example uses it, open the installed implementation: [`@open-mercato/ui/src/backend/DataTable.tsx`](../../node_modules/@open-mercato/ui/src/backend/DataTable.tsx). That exact file is what your app installs. Read-only: never edit inside `node_modules`, and take no sibling or import target this guide does not link.
|