@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.
- package/.turbo/turbo-build.log +1 -1
- package/dist/agentic/guides/module-facts.json +140 -140
- package/dist/agentic/guides/module-facts.v2.json +140 -140
- 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/business_rules/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/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/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/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/gateway_stripe/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/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/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/lib/generators/extensions/agent-files.js +18 -5
- package/dist/lib/generators/extensions/agent-files.js.map +2 -2
- package/package.json +6 -6
- package/src/lib/generators/__tests__/agent-files-extension.test.ts +19 -1
- 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
|
-
|
|
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 '
|
|
1108
|
-
import type { AgentTokenUsage, FileAgentFile } from '
|
|
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>()
|