@open-mercato/cli 0.6.7-develop.6788.1.c2a1520a30 → 0.6.7-develop.6814.1.0627c7e9f1
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 +3 -2
- package/build.mjs +1 -1
- package/dist/agentic/guides/module-facts.json +90313 -20759
- package/dist/agentic/guides/modules/ai_assistant.md +170 -60
- package/dist/agentic/guides/modules/api_docs.md +26 -1
- package/dist/agentic/guides/modules/api_keys.md +57 -17
- package/dist/agentic/guides/modules/attachments.md +72 -19
- package/dist/agentic/guides/modules/audit_logs.md +95 -29
- package/dist/agentic/guides/modules/auth.md +218 -83
- package/dist/agentic/guides/modules/business_rules.md +108 -34
- package/dist/agentic/guides/modules/catalog.md +386 -157
- package/dist/agentic/guides/modules/channel_gmail.md +55 -6
- package/dist/agentic/guides/modules/channel_imap.md +55 -6
- package/dist/agentic/guides/modules/checkout.md +254 -129
- package/dist/agentic/guides/modules/communication_channels.md +280 -109
- package/dist/agentic/guides/modules/configs.md +68 -11
- package/dist/agentic/guides/modules/content.md +26 -1
- package/dist/agentic/guides/modules/currencies.md +109 -44
- package/dist/agentic/guides/modules/customer_accounts.md +350 -156
- package/dist/agentic/guides/modules/customers.md +642 -294
- package/dist/agentic/guides/modules/dashboards.md +122 -28
- package/dist/agentic/guides/modules/data_sync.md +117 -37
- package/dist/agentic/guides/modules/design_system.md +102 -0
- package/dist/agentic/guides/modules/dictionaries.md +78 -20
- package/dist/agentic/guides/modules/directory.md +110 -45
- package/dist/agentic/guides/modules/entities.md +95 -38
- package/dist/agentic/guides/modules/events.md +31 -1
- package/dist/agentic/guides/modules/feature_toggles.md +79 -12
- package/dist/agentic/guides/modules/gateway_stripe.md +61 -6
- package/dist/agentic/guides/modules/generators.md +17 -1
- package/dist/agentic/guides/modules/inbox_ops.md +171 -60
- package/dist/agentic/guides/modules/integrations.md +116 -30
- package/dist/agentic/guides/modules/messages.md +187 -66
- package/dist/agentic/guides/modules/notifications.md +64 -9
- package/dist/agentic/guides/modules/onboarding.md +47 -8
- package/dist/agentic/guides/modules/payment_gateways.md +133 -48
- package/dist/agentic/guides/modules/perspectives.md +50 -12
- package/dist/agentic/guides/modules/planner.md +102 -32
- package/dist/agentic/guides/modules/portal.md +58 -15
- package/dist/agentic/guides/modules/progress.md +78 -30
- package/dist/agentic/guides/modules/query_index.md +115 -53
- package/dist/agentic/guides/modules/record_locks.md +178 -59
- package/dist/agentic/guides/modules/resources.md +155 -78
- package/dist/agentic/guides/modules/sales.md +620 -257
- package/dist/agentic/guides/modules/scheduler.md +95 -19
- package/dist/agentic/guides/modules/search.md +124 -20
- package/dist/agentic/guides/modules/security.md +251 -105
- package/dist/agentic/guides/modules/shipping_carriers.md +106 -37
- package/dist/agentic/guides/modules/sso.md +121 -49
- package/dist/agentic/guides/modules/staff.md +314 -126
- package/dist/agentic/guides/modules/storage_s3.md +55 -6
- package/dist/agentic/guides/modules/sync_akeneo.md +54 -4
- package/dist/agentic/guides/modules/sync_excel.md +49 -11
- package/dist/agentic/guides/modules/system_status_overlays.md +33 -5
- package/dist/agentic/guides/modules/translations.md +76 -21
- package/dist/agentic/guides/modules/webhooks.md +166 -82
- package/dist/agentic/guides/modules/wms.md +383 -223
- package/dist/agentic/guides/modules/workflows.md +248 -112
- package/dist/agentic/guides/upstream/AGENTS.md +1 -1
- package/dist/agentic/guides/upstream/manifest.json +2 -2
- package/dist/agentic/shared/AGENTS.md.template +6 -5
- package/dist/agentic/shared/ai/harness/cases.json +3 -0
- package/dist/agentic/shared/ai/lessons/_template.md +16 -0
- package/dist/agentic/shared/ai/lessons.md +26 -3
- package/dist/agentic/shared/ai/skills/om-evolve-harness/SKILL.md +7 -6
- package/dist/agentic/shared/ai/skills/om-system-extension/references/unified-overrides.md +4 -2
- package/dist/agentic/shared/scripts/check-lessons.mjs +178 -0
- package/dist/lib/agentic-setup.js +2 -2
- package/dist/lib/agentic-setup.js.map +2 -2
- package/dist/lib/generators/module-extension-facts.js +652 -24
- package/dist/lib/generators/module-extension-facts.js.map +3 -3
- package/dist/lib/generators/module-fact-sources.js +70 -0
- package/dist/lib/generators/module-fact-sources.js.map +7 -0
- package/dist/lib/generators/module-facts.js +1001 -26
- package/dist/lib/generators/module-facts.js.map +3 -3
- package/dist/lib/generators/module-override-targets.js +688 -0
- package/dist/lib/generators/module-override-targets.js.map +7 -0
- package/dist/lib/testing/integration.js +5 -0
- package/dist/lib/testing/integration.js.map +2 -2
- package/package.json +10 -10
- package/src/lib/__tests__/agentic-setup.ownership.test.ts +6 -0
- package/src/lib/agentic-setup.ts +6 -2
- package/src/lib/generators/__tests__/activation-adapter-coverage.test.ts +92 -0
- package/src/lib/generators/__tests__/module-extension-activations.test.ts +762 -0
- package/src/lib/generators/__tests__/module-extension-facts.test.ts +4 -2
- package/src/lib/generators/__tests__/module-facts.bc-guard.test.ts +37 -3
- package/src/lib/generators/__tests__/module-facts.owned-contracts.test.ts +561 -0
- package/src/lib/generators/__tests__/module-override-targets.roundtrip.test.ts +149 -0
- package/src/lib/generators/__tests__/module-override-targets.test.ts +304 -0
- package/src/lib/generators/module-extension-facts.ts +923 -27
- package/src/lib/generators/module-fact-sources.ts +108 -0
- package/src/lib/generators/module-facts.ts +1360 -25
- package/src/lib/generators/module-override-targets.ts +863 -0
- package/src/lib/testing/__tests__/integration.test.ts +4 -0
- package/src/lib/testing/integration.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/cli",
|
|
3
|
-
"version": "0.6.7-develop.
|
|
3
|
+
"version": "0.6.7-develop.6814.1.0627c7e9f1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"node": "24.x"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@mikro-orm/core": "^7.1.
|
|
60
|
-
"@mikro-orm/decorators": "^7.1.
|
|
61
|
-
"@mikro-orm/migrations": "^7.1.
|
|
62
|
-
"@mikro-orm/postgresql": "^7.1.
|
|
63
|
-
"@open-mercato/queue": "0.6.7-develop.
|
|
64
|
-
"@open-mercato/shared": "0.6.7-develop.
|
|
59
|
+
"@mikro-orm/core": "^7.1.8",
|
|
60
|
+
"@mikro-orm/decorators": "^7.1.8",
|
|
61
|
+
"@mikro-orm/migrations": "^7.1.8",
|
|
62
|
+
"@mikro-orm/postgresql": "^7.1.8",
|
|
63
|
+
"@open-mercato/queue": "0.6.7-develop.6814.1.0627c7e9f1",
|
|
64
|
+
"@open-mercato/shared": "0.6.7-develop.6814.1.0627c7e9f1",
|
|
65
65
|
"cross-spawn": "^7.0.6",
|
|
66
66
|
"pg": "8.22.0",
|
|
67
67
|
"semver": "^7.8.5",
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
"typescript-js": "npm:typescript@6.0.3"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@open-mercato/shared": "0.6.7-develop.
|
|
75
|
+
"@open-mercato/shared": "0.6.7-develop.6814.1.0627c7e9f1"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
|
-
"@open-mercato/shared": "0.6.7-develop.
|
|
78
|
+
"@open-mercato/shared": "0.6.7-develop.6814.1.0627c7e9f1",
|
|
79
79
|
"@types/jest": "^30.0.0",
|
|
80
80
|
"jest": "^30.4.2",
|
|
81
|
-
"ts-jest": "^29.4.
|
|
81
|
+
"ts-jest": "^29.4.12"
|
|
82
82
|
},
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public"
|
|
@@ -262,6 +262,12 @@ describe('runAgenticSetup ownership modes', () => {
|
|
|
262
262
|
'# Private\n',
|
|
263
263
|
)
|
|
264
264
|
expect(existsSync(join(appDir, '.ai', 'harness', 'manifest.json'))).toBe(true)
|
|
265
|
+
const manifest = JSON.parse(
|
|
266
|
+
readFileSync(join(appDir, '.ai', 'harness', 'manifest.json'), 'utf8'),
|
|
267
|
+
) as { files: ManifestEntry[] }
|
|
268
|
+
expect(manifest.files.find((item) => item.path === '.ai/lessons.md')?.userEditable).toBe(true)
|
|
269
|
+
expect(manifest.files.find((item) => item.path === '.ai/lessons/_template.md')?.userEditable).toBe(true)
|
|
270
|
+
expect(existsSync(join(appDir, 'scripts', 'check-lessons.mjs'))).toBe(true)
|
|
265
271
|
if (process.platform !== 'win32') {
|
|
266
272
|
expect(statSync(join(appDir, 'scripts', 'install-skills.sh')).mode & 0o111).not.toBe(0)
|
|
267
273
|
}
|
package/src/lib/agentic-setup.ts
CHANGED
|
@@ -140,7 +140,7 @@ export function renderModuleGuidesBlock(selected: string[]): string {
|
|
|
140
140
|
return [
|
|
141
141
|
`Enabled module facts: ${selected.map((moduleId) => `\`${moduleId}\``).join(',')}.`,
|
|
142
142
|
'',
|
|
143
|
-
'Load `.ai/guides/modules/<id>.md` only
|
|
143
|
+
'Load `.ai/guides/modules/<id>.md` only for a named or targeted installed module/host; never preload all module facts.',
|
|
144
144
|
].join('\n')
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -438,7 +438,11 @@ function finalizeHarnessManifest(config: AgenticConfig, selectedTools: string[])
|
|
|
438
438
|
path: relativePath,
|
|
439
439
|
sha256: hashFile(path),
|
|
440
440
|
source: skillName ? (externalSkills.has(skillName) ? 'external-override' : 'local-skill') : 'generated',
|
|
441
|
-
userEditable:
|
|
441
|
+
userEditable:
|
|
442
|
+
relativePath === 'AGENTS.md'
|
|
443
|
+
|| relativePath === '.ai/agentic.config.json'
|
|
444
|
+
|| relativePath === '.ai/lessons.md'
|
|
445
|
+
|| relativePath.startsWith('.ai/lessons/'),
|
|
442
446
|
}
|
|
443
447
|
})
|
|
444
448
|
atomicWriteFile(
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ACTIVATION_ADAPTERS,
|
|
3
|
+
ALL_ACTIVATION_KINDS,
|
|
4
|
+
ALL_CONTRIBUTION_KINDS,
|
|
5
|
+
CONTRIBUTION_ACTIVATION_CLASSIFICATION,
|
|
6
|
+
} from '../module-extension-facts'
|
|
7
|
+
import type {
|
|
8
|
+
ModuleExtensionActivationKind,
|
|
9
|
+
ModuleExtensionContributionKind,
|
|
10
|
+
} from '@open-mercato/shared/modules/widgets/extension-points'
|
|
11
|
+
|
|
12
|
+
// Explicit expected inventories. Adding a UMES activation kind or contribution
|
|
13
|
+
// kind to the shared union forces the typed Record in module-extension-facts.ts
|
|
14
|
+
// to gain a key (compile-time gate) AND requires updating these lists (this
|
|
15
|
+
// coverage gate), so an unclassified kind cannot ship silently.
|
|
16
|
+
const EXPECTED_ACTIVATION_KINDS: ModuleExtensionActivationKind[] = [
|
|
17
|
+
'crud-response-enricher',
|
|
18
|
+
'query-enricher',
|
|
19
|
+
'mutation-guard',
|
|
20
|
+
'api-interceptor-bridge',
|
|
21
|
+
'command-interceptor-bridge',
|
|
22
|
+
'widget-injection-consumer',
|
|
23
|
+
'component-extension-consumer',
|
|
24
|
+
'dashboard-host-consumer',
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
const EXPECTED_CONTRIBUTION_KINDS: ModuleExtensionContributionKind[] = [
|
|
28
|
+
'widget',
|
|
29
|
+
'data-table',
|
|
30
|
+
'crud-form',
|
|
31
|
+
'component-override',
|
|
32
|
+
'response-enricher',
|
|
33
|
+
'api-interceptor',
|
|
34
|
+
'command-interceptor',
|
|
35
|
+
'mutation-guard',
|
|
36
|
+
'entity-extension',
|
|
37
|
+
'subscriber',
|
|
38
|
+
'browser-reaction',
|
|
39
|
+
'specialized-registry',
|
|
40
|
+
'module-override',
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
// Route/entity-bound contribution kinds MUST bind through an activation adapter —
|
|
44
|
+
// never be silently classified as capability-only.
|
|
45
|
+
const ROUTE_OR_ENTITY_BOUND_KINDS: ModuleExtensionContributionKind[] = [
|
|
46
|
+
'response-enricher',
|
|
47
|
+
'mutation-guard',
|
|
48
|
+
'api-interceptor',
|
|
49
|
+
'command-interceptor',
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
describe('activation adapter coverage', () => {
|
|
53
|
+
it('registers exactly the expected closed set of activation adapters', () => {
|
|
54
|
+
expect([...ALL_ACTIVATION_KINDS].sort()).toEqual([...EXPECTED_ACTIVATION_KINDS].sort())
|
|
55
|
+
expect(Object.keys(ACTIVATION_ADAPTERS).sort()).toEqual([...EXPECTED_ACTIVATION_KINDS].sort())
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
it('classifies exactly the expected closed set of contribution kinds', () => {
|
|
59
|
+
expect([...ALL_CONTRIBUTION_KINDS].sort()).toEqual([...EXPECTED_CONTRIBUTION_KINDS].sort())
|
|
60
|
+
expect(Object.keys(CONTRIBUTION_ACTIVATION_CLASSIFICATION).sort()).toEqual([...EXPECTED_CONTRIBUTION_KINDS].sort())
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
it('maps every contribution kind to a real adapter whose contributionKinds accept it, or to a tested capability-only classification', () => {
|
|
64
|
+
for (const kind of ALL_CONTRIBUTION_KINDS) {
|
|
65
|
+
const classification = CONTRIBUTION_ACTIVATION_CLASSIFICATION[kind]
|
|
66
|
+
if (classification === 'capability-only') {
|
|
67
|
+
expect(ROUTE_OR_ENTITY_BOUND_KINDS).not.toContain(kind)
|
|
68
|
+
continue
|
|
69
|
+
}
|
|
70
|
+
expect(classification.length).toBeGreaterThan(0)
|
|
71
|
+
for (const activationKind of classification) {
|
|
72
|
+
const adapter = ACTIVATION_ADAPTERS[activationKind]
|
|
73
|
+
expect(adapter).toBeDefined()
|
|
74
|
+
expect(adapter.contributionKinds).toContain(kind)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
it('requires every route/entity-bound contribution kind to have an activation adapter (never capability-only)', () => {
|
|
80
|
+
for (const kind of ROUTE_OR_ENTITY_BOUND_KINDS) {
|
|
81
|
+
const classification = CONTRIBUTION_ACTIVATION_CLASSIFICATION[kind]
|
|
82
|
+
expect(classification).not.toBe('capability-only')
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
it('keeps a call-site-object adapter for every kind that distinguishes bound from capability-only by opt-in', () => {
|
|
87
|
+
const callSiteKinds = ALL_ACTIVATION_KINDS.filter((kind) => ACTIVATION_ADAPTERS[kind].mode === 'call-site-object')
|
|
88
|
+
// Enricher (response + query) and mutation-guard opt-ins are the only surfaces
|
|
89
|
+
// whose activation presence is NOT implied by mere host existence.
|
|
90
|
+
expect(callSiteKinds.sort()).toEqual(['crud-response-enricher', 'mutation-guard', 'query-enricher'])
|
|
91
|
+
})
|
|
92
|
+
})
|