@open-mercato/cli 0.8.1-develop.7269.1.493e13f954 → 0.8.1-develop.7275.1.f772b944d4

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 (80) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/agentic/guides/module-facts.json +140 -140
  3. package/dist/agentic/guides/module-facts.v2.json +140 -140
  4. package/dist/agentic/guides/modules/agent_orchestrator/index.md +1 -1
  5. package/dist/agentic/guides/modules/ai_assistant/index.md +1 -1
  6. package/dist/agentic/guides/modules/api_docs/index.md +1 -1
  7. package/dist/agentic/guides/modules/api_keys/index.md +1 -1
  8. package/dist/agentic/guides/modules/attachments/index.md +1 -1
  9. package/dist/agentic/guides/modules/audit_logs/index.md +1 -1
  10. package/dist/agentic/guides/modules/auth/index.md +1 -1
  11. package/dist/agentic/guides/modules/business_rules/index.md +1 -1
  12. package/dist/agentic/guides/modules/catalog/index.md +1 -1
  13. package/dist/agentic/guides/modules/channel_apns/index.md +1 -1
  14. package/dist/agentic/guides/modules/channel_discord/index.md +1 -1
  15. package/dist/agentic/guides/modules/channel_expo/index.md +1 -1
  16. package/dist/agentic/guides/modules/channel_fcm/index.md +1 -1
  17. package/dist/agentic/guides/modules/channel_gmail/index.md +1 -1
  18. package/dist/agentic/guides/modules/channel_imap/index.md +1 -1
  19. package/dist/agentic/guides/modules/channel_resend/index.md +1 -1
  20. package/dist/agentic/guides/modules/channel_ses/index.md +1 -1
  21. package/dist/agentic/guides/modules/checkout/index.md +1 -1
  22. package/dist/agentic/guides/modules/communication_channels/index.md +1 -1
  23. package/dist/agentic/guides/modules/configs/index.md +1 -1
  24. package/dist/agentic/guides/modules/content/index.md +1 -1
  25. package/dist/agentic/guides/modules/currencies/index.md +1 -1
  26. package/dist/agentic/guides/modules/customer_accounts/index.md +1 -1
  27. package/dist/agentic/guides/modules/customers/index.md +1 -1
  28. package/dist/agentic/guides/modules/dashboards/index.md +1 -1
  29. package/dist/agentic/guides/modules/data_sync/index.md +1 -1
  30. package/dist/agentic/guides/modules/design_system/index.md +1 -1
  31. package/dist/agentic/guides/modules/devices/index.md +1 -1
  32. package/dist/agentic/guides/modules/dictionaries/index.md +1 -1
  33. package/dist/agentic/guides/modules/directory/index.md +1 -1
  34. package/dist/agentic/guides/modules/documents/index.md +1 -1
  35. package/dist/agentic/guides/modules/entities/index.md +1 -1
  36. package/dist/agentic/guides/modules/eudr/index.md +1 -1
  37. package/dist/agentic/guides/modules/events/index.md +1 -1
  38. package/dist/agentic/guides/modules/feature_toggles/index.md +1 -1
  39. package/dist/agentic/guides/modules/gateway_stripe/index.md +1 -1
  40. package/dist/agentic/guides/modules/generators/index.md +1 -1
  41. package/dist/agentic/guides/modules/inbox_ops/index.md +1 -1
  42. package/dist/agentic/guides/modules/integrations/index.md +1 -1
  43. package/dist/agentic/guides/modules/messages/index.md +1 -1
  44. package/dist/agentic/guides/modules/notifications/index.md +1 -1
  45. package/dist/agentic/guides/modules/onboarding/index.md +1 -1
  46. package/dist/agentic/guides/modules/payment_gateways/index.md +1 -1
  47. package/dist/agentic/guides/modules/perspectives/index.md +1 -1
  48. package/dist/agentic/guides/modules/phone_calls/index.md +1 -1
  49. package/dist/agentic/guides/modules/planner/index.md +1 -1
  50. package/dist/agentic/guides/modules/portal/index.md +1 -1
  51. package/dist/agentic/guides/modules/progress/index.md +1 -1
  52. package/dist/agentic/guides/modules/push_notifications/index.md +1 -1
  53. package/dist/agentic/guides/modules/query_index/index.md +1 -1
  54. package/dist/agentic/guides/modules/record_locks/index.md +1 -1
  55. package/dist/agentic/guides/modules/resources/index.md +1 -1
  56. package/dist/agentic/guides/modules/sales/index.md +1 -1
  57. package/dist/agentic/guides/modules/scheduler/index.md +1 -1
  58. package/dist/agentic/guides/modules/search/index.md +1 -1
  59. package/dist/agentic/guides/modules/security/index.md +1 -1
  60. package/dist/agentic/guides/modules/seeds/index.md +1 -1
  61. package/dist/agentic/guides/modules/shipping_carriers/index.md +1 -1
  62. package/dist/agentic/guides/modules/sso/index.md +1 -1
  63. package/dist/agentic/guides/modules/staff/index.md +1 -1
  64. package/dist/agentic/guides/modules/storage_s3/index.md +1 -1
  65. package/dist/agentic/guides/modules/sync_akeneo/index.md +1 -1
  66. package/dist/agentic/guides/modules/sync_excel/index.md +1 -1
  67. package/dist/agentic/guides/modules/system_status_overlays/index.md +1 -1
  68. package/dist/agentic/guides/modules/tillio/index.md +1 -1
  69. package/dist/agentic/guides/modules/translations/index.md +1 -1
  70. package/dist/agentic/guides/modules/warranty_claims/index.md +1 -1
  71. package/dist/agentic/guides/modules/webhooks/index.md +1 -1
  72. package/dist/agentic/guides/modules/wms/index.md +1 -1
  73. package/dist/agentic/guides/modules/workflows/index.md +1 -1
  74. package/dist/agentic/guides/reference-module-facts.json +1 -1
  75. package/dist/agentic/guides/upstream/manifest.json +1 -1
  76. package/dist/lib/generators/extensions/agent-files.js +18 -5
  77. package/dist/lib/generators/extensions/agent-files.js.map +2 -2
  78. package/package.json +6 -6
  79. package/src/lib/generators/__tests__/agent-files-extension.test.ts +19 -1
  80. package/src/lib/generators/extensions/agent-files.ts +31 -5
@@ -870,6 +870,7 @@ function findRepoRoot(start: string): string | null {
870
870
  * `docker/scripts/init-or-migrate.sh` run before the app boots.
871
871
  */
872
872
  type AgentFilesTargets = {
873
+ layout: 'monorepo' | 'standalone'
873
874
  manifestPath: string
874
875
  dockerAgentsDir: string
875
876
  dockerSkillsDir: string
@@ -882,6 +883,7 @@ function resolveAgentFilesTargets(
882
883
  if (resolver && !resolver.isMonorepo()) {
883
884
  const appDir = resolver.getAppDir()
884
885
  return {
886
+ layout: 'standalone',
885
887
  manifestPath: path.join(resolver.getOutputDir(), 'file-agents.generated.ts'),
886
888
  dockerAgentsDir: path.join(appDir, 'docker', 'opencode', 'agents'),
887
889
  dockerSkillsDir: path.join(appDir, 'docker', 'opencode', 'skills'),
@@ -892,6 +894,7 @@ function resolveAgentFilesTargets(
892
894
  const repoRoot = resolver?.getRootDir() ?? fallbackRepoRoot
893
895
  if (!repoRoot) return null
894
896
  return {
897
+ layout: 'monorepo',
895
898
  manifestPath: path.join(
896
899
  repoRoot,
897
900
  'packages',
@@ -1091,8 +1094,31 @@ function renderDescriptor(agent: DiscoveredAgent, indent: string): string {
1091
1094
  ].join('\n')
1092
1095
  }
1093
1096
 
1094
- function renderManifest(agents: DiscoveredAgent[]): string {
1097
+ /**
1098
+ * Type-only import paths baked into `file-agents.generated.ts`.
1099
+ *
1100
+ * Monorepo: the manifest lives next to `lib/` under `agent_orchestrator/`, so
1101
+ * module-relative paths resolve. Standalone: the same file lands in
1102
+ * `<app>/.mercato/generated/`, where those relatives do not exist — use the
1103
+ * public `@open-mercato/enterprise/...` package exports instead (#6227 / #6236).
1104
+ */
1105
+ const MANIFEST_TYPE_IMPORTS = {
1106
+ monorepo: {
1107
+ outcomeSchema: '../lib/sdk/outcomeSchema',
1108
+ tokensTypes: '../lib/tokens/types',
1109
+ },
1110
+ standalone: {
1111
+ outcomeSchema: '@open-mercato/enterprise/modules/agent_orchestrator/lib/sdk/outcomeSchema',
1112
+ tokensTypes: '@open-mercato/enterprise/modules/agent_orchestrator/lib/tokens/types',
1113
+ },
1114
+ } as const
1115
+
1116
+ function renderManifest(
1117
+ agents: DiscoveredAgent[],
1118
+ options: { layout: 'monorepo' | 'standalone' } = { layout: 'monorepo' },
1119
+ ): string {
1095
1120
  const descriptors = agents.map((agent) => renderDescriptor(agent, ' ')).join('\n')
1121
+ const typeImports = MANIFEST_TYPE_IMPORTS[options.layout]
1096
1122
 
1097
1123
  return `// AUTO-GENERATED by mercato generate registry — DO NOT EDIT BY HAND.
1098
1124
  //
@@ -1104,8 +1130,8 @@ function renderManifest(agents: DiscoveredAgent[]): string {
1104
1130
  // \`compileOutcome\` at load time and registers it with \`runtime:'opencode'\`.
1105
1131
  //
1106
1132
  // Regenerate with \`yarn generate\`.
1107
- import type { JsonSchemaNode, OutcomeKind } from '../lib/sdk/outcomeSchema'
1108
- import type { AgentTokenUsage, FileAgentFile } from '../lib/tokens/types'
1133
+ import type { JsonSchemaNode, OutcomeKind } from '${typeImports.outcomeSchema}'
1134
+ import type { AgentTokenUsage, FileAgentFile } from '${typeImports.tokensTypes}'
1109
1135
 
1110
1136
  export type FileAgentScript = {
1111
1137
  name: string
@@ -1334,9 +1360,9 @@ export function createAgentFilesExtension(resolver?: AgentFilesResolver): Genera
1334
1360
  return new Map<string, string>()
1335
1361
  }
1336
1362
 
1337
- const { manifestPath, dockerAgentsDir, dockerSkillsDir } = targets
1363
+ const { layout, manifestPath, dockerAgentsDir, dockerSkillsDir } = targets
1338
1364
  fs.mkdirSync(path.dirname(manifestPath), { recursive: true })
1339
- fs.writeFileSync(manifestPath, renderManifest(sorted), 'utf8')
1365
+ fs.writeFileSync(manifestPath, renderManifest(sorted, { layout }), 'utf8')
1340
1366
 
1341
1367
  fs.mkdirSync(dockerAgentsDir, { recursive: true })
1342
1368
  const desiredFiles = new Map<string, string>()