@open-mercato/cli 0.6.6-develop.6457.1.41b39a465a → 0.6.6-develop.6460.1.f94c74174c

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/.turbo/turbo-build.log +45 -1
  2. package/build.mjs +25 -15
  3. package/dist/agentic/guides/module-facts.json +3375 -349
  4. package/dist/agentic/guides/modules/ai_assistant.md +57 -0
  5. package/dist/agentic/guides/modules/api_docs.md +39 -0
  6. package/dist/agentic/guides/modules/api_keys.md +41 -0
  7. package/dist/agentic/guides/modules/attachments.md +46 -0
  8. package/dist/agentic/guides/modules/audit_logs.md +42 -0
  9. package/dist/agentic/guides/modules/auth.md +1 -1
  10. package/dist/agentic/guides/modules/business_rules.md +44 -0
  11. package/dist/agentic/guides/modules/catalog.md +1 -1
  12. package/dist/agentic/guides/modules/channel_gmail.md +39 -0
  13. package/dist/agentic/guides/modules/channel_imap.md +39 -0
  14. package/dist/agentic/guides/modules/checkout.md +60 -0
  15. package/dist/agentic/guides/modules/communication_channels.md +65 -0
  16. package/dist/agentic/guides/modules/configs.md +42 -0
  17. package/dist/agentic/guides/modules/content.md +39 -0
  18. package/dist/agentic/guides/modules/currencies.md +1 -1
  19. package/dist/agentic/guides/modules/customer_accounts.md +1 -1
  20. package/dist/agentic/guides/modules/customers.md +1 -1
  21. package/dist/agentic/guides/modules/dashboards.md +43 -0
  22. package/dist/agentic/guides/modules/data_sync.md +1 -1
  23. package/dist/agentic/guides/modules/dictionaries.md +46 -0
  24. package/dist/agentic/guides/modules/directory.md +49 -0
  25. package/dist/agentic/guides/modules/entities.md +46 -0
  26. package/dist/agentic/guides/modules/events.md +39 -0
  27. package/dist/agentic/guides/modules/feature_toggles.md +42 -0
  28. package/dist/agentic/guides/modules/gateway_stripe.md +39 -0
  29. package/dist/agentic/guides/modules/generators.md +39 -0
  30. package/dist/agentic/guides/modules/inbox_ops.md +59 -0
  31. package/dist/agentic/guides/modules/integrations.md +1 -1
  32. package/dist/agentic/guides/modules/messages.md +55 -0
  33. package/dist/agentic/guides/modules/notifications.md +41 -0
  34. package/dist/agentic/guides/modules/onboarding.md +41 -0
  35. package/dist/agentic/guides/modules/payment_gateways.md +52 -0
  36. package/dist/agentic/guides/modules/perspectives.md +42 -0
  37. package/dist/agentic/guides/modules/planner.md +49 -0
  38. package/dist/agentic/guides/modules/portal.md +39 -0
  39. package/dist/agentic/guides/modules/progress.md +48 -0
  40. package/dist/agentic/guides/modules/query_index.md +46 -0
  41. package/dist/agentic/guides/modules/record_locks.md +53 -0
  42. package/dist/agentic/guides/modules/resources.md +62 -0
  43. package/dist/agentic/guides/modules/sales.md +1 -1
  44. package/dist/agentic/guides/modules/scheduler.md +46 -0
  45. package/dist/agentic/guides/modules/search.md +39 -0
  46. package/dist/agentic/guides/modules/security.md +67 -0
  47. package/dist/agentic/guides/modules/shipping_carriers.md +51 -0
  48. package/dist/agentic/guides/modules/sso.md +59 -0
  49. package/dist/agentic/guides/modules/staff.md +88 -0
  50. package/dist/agentic/guides/modules/storage_s3.md +39 -0
  51. package/dist/agentic/guides/modules/sync_akeneo.md +39 -0
  52. package/dist/agentic/guides/modules/sync_excel.md +41 -0
  53. package/dist/agentic/guides/modules/system_status_overlays.md +39 -0
  54. package/dist/agentic/guides/modules/translations.md +44 -0
  55. package/dist/agentic/guides/modules/webhooks.md +54 -0
  56. package/dist/agentic/guides/modules/workflows.md +1 -1
  57. package/dist/lib/generators/index.js +0 -2
  58. package/dist/lib/generators/index.js.map +2 -2
  59. package/dist/lib/generators/module-facts-discovery.js +46 -0
  60. package/dist/lib/generators/module-facts-discovery.js.map +7 -0
  61. package/dist/lib/generators/module-facts.js +14 -8
  62. package/dist/lib/generators/module-facts.js.map +2 -2
  63. package/dist/mercato.js +1 -3
  64. package/dist/mercato.js.map +2 -2
  65. package/package.json +5 -5
  66. package/src/__tests__/mercato.test.ts +0 -5
  67. package/src/lib/generators/__tests__/module-facts.bc-guard.test.ts +36 -23
  68. package/src/lib/generators/__tests__/module-facts.discovery.test.ts +88 -0
  69. package/src/lib/generators/index.ts +0 -1
  70. package/src/lib/generators/module-facts-discovery.ts +58 -0
  71. package/src/lib/generators/module-facts.ts +50 -10
  72. package/src/mercato.ts +0 -2
  73. package/dist/lib/generators/module-facts-generate.js +0 -52
  74. package/dist/lib/generators/module-facts-generate.js.map +0 -7
  75. package/src/lib/generators/module-facts-generate.ts +0 -68
@@ -1,15 +1,59 @@
1
1
  [build:cli] found 93 entry points
2
2
  Copied create-app/agentic/ → dist/agentic/
3
3
  Discovered 7 standalone guides → dist/agentic/guides/
4
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for ai_assistant
5
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for channel_gmail
6
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for channel_imap
7
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for checkout
8
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for content
9
+ Generated 53 module fact-sheets → dist/agentic/guides/modules/
10
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for api_docs
11
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for api_keys
12
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for attachments
13
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for audit_logs
4
14
  [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for auth
15
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for business_rules
5
16
  [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for catalog
17
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for communication_channels
18
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for configs
6
19
  [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for currencies
7
20
  [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for customer_accounts
8
21
  [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for customers
22
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for dashboards
9
23
  [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for data_sync
24
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for dictionaries
25
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for directory
26
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for entities
27
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for feature_toggles
28
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for inbox_ops
10
29
  [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for integrations
30
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for messages
31
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for notifications
32
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for payment_gateways
33
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for perspectives
34
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for planner
35
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for portal
36
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for progress
37
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for query_index
38
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for resources
11
39
  [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for sales
40
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for shipping_carriers
41
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for staff
42
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for sync_excel
43
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for translations
12
44
  [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for workflows
13
- Generated 9 module fact-sheets dist/agentic/guides/modules/
45
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for record_locks
46
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for security
47
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for sso
48
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for system_status_overlays
49
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for events
50
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for gateway_stripe
51
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for onboarding
52
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for scheduler
53
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for search
54
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for generators
55
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for storage_s3
56
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for sync_akeneo
57
+ [module-facts] module registry unavailable (registryPath not provided); API route auth omitted for webhooks
14
58
  Wrote 9 legacy core.<module>.md redirect stubs → dist/agentic/guides/
15
59
  [build:cli] built successfully
package/build.mjs CHANGED
@@ -71,14 +71,21 @@ await buildPackage(packageDir, {
71
71
  console.log(`Discovered ${guidesFound} standalone guides → dist/agentic/guides/`)
72
72
  }
73
73
 
74
- // Generate per-module fact-sheets (Layer 2) from core module sources via the
75
- // freshly built ts-morph extractor, so `mercato agentic:init` bundles the same
76
- // guides as a create-mercato-app scaffold (packages/create-app/build.mjs).
77
- const coreSrcRoot = join(packagesDir, 'core', 'src', 'modules')
78
- if (existsSync(coreSrcRoot)) {
79
- const { extractAllModuleFacts, renderModuleFactsJson } = await import(
80
- pathToFileURL(join(outdir, 'lib', 'generators', 'module-facts.js')).href
81
- )
74
+ // Generate per-module fact-sheets (Layer 2) for every package-provided module via
75
+ // the freshly built ts-morph extractor + resolver-routed discovery, so
76
+ // `mercato agentic:init` bundles the same guides as a create-mercato-app scaffold
77
+ // (packages/create-app/build.mjs). Discovery goes through the resolver, never a
78
+ // hardcoded packages/* path (.ai/lessons.md §161-169).
79
+ const { extractAllModuleFacts, renderModuleFactsJson, MODULE_FACTS_ALLOWLIST } = await import(
80
+ pathToFileURL(join(outdir, 'lib', 'generators', 'module-facts.js')).href
81
+ )
82
+ const { discoverPackageModuleSources } = await import(
83
+ pathToFileURL(join(outdir, 'lib', 'generators', 'module-facts-discovery.js')).href
84
+ )
85
+ const { createResolver } = await import(pathToFileURL(join(outdir, 'lib', 'resolver.js')).href)
86
+
87
+ const sources = discoverPackageModuleSources(createResolver(join(packagesDir, '..')))
88
+ if (sources.length > 0) {
82
89
  const registryPath = join(packagesDir, '..', 'apps', 'mercato', '.mercato', 'generated', 'modules.runtime.generated.ts')
83
90
  let coreVersion = null
84
91
  try {
@@ -88,7 +95,7 @@ await buildPackage(packageDir, {
88
95
  }
89
96
 
90
97
  const { factsByModule, markdownByModule, warnings } = extractAllModuleFacts({
91
- coreSrcRoot,
98
+ sources,
92
99
  registryPath: existsSync(registryPath) ? registryPath : null,
93
100
  coreVersion,
94
101
  })
@@ -103,12 +110,15 @@ await buildPackage(packageDir, {
103
110
  for (const warning of warnings) console.warn(warning)
104
111
  console.log(`Generated ${Object.keys(markdownByModule).length} module fact-sheets → dist/agentic/guides/modules/`)
105
112
 
106
- // BC bridge (spec §7 generated-file contract): for any allowlisted module whose
107
- // legacy full guide `core.<module>.md` is no longer bundled (its standalone-guide.md
108
- // source was removed), emit a thin redirect stub pointing at the generated fact-sheet.
109
- // Fresh scaffolds never link these names; they exist only for apps upgrading in place.
113
+ // BC bridge (spec §7 generated-file contract): the legacy hand-written guides
114
+ // existed only for the historical allowlisted modules, so redirect stubs are
115
+ // emitted for that set alone never for auto-discovered modules that never had a
116
+ // `core.<module>.md`. Fresh scaffolds never link these names; they exist only for
117
+ // apps upgrading in place.
118
+ const bundled = new Set(Object.keys(markdownByModule))
110
119
  let stubsWritten = 0
111
- for (const moduleId of Object.keys(markdownByModule)) {
120
+ for (const moduleId of MODULE_FACTS_ALLOWLIST) {
121
+ if (!bundled.has(moduleId)) continue
112
122
  const legacyGuidePath = join(guidesDestDir, `core.${moduleId}.md`)
113
123
  if (!existsSync(legacyGuidePath)) {
114
124
  writeFileSync(
@@ -124,7 +134,7 @@ await buildPackage(packageDir, {
124
134
  console.log(`Wrote ${stubsWritten} legacy core.<module>.md redirect stubs → dist/agentic/guides/`)
125
135
  }
126
136
  } else {
127
- console.warn(`[module-facts] core module sources not found at ${coreSrcRoot}; skipping fact-sheet generation`)
137
+ console.warn('[module-facts] no package modules discovered; skipping fact-sheet generation')
128
138
  }
129
139
  },
130
140
  })