docs(modules): add client manifest generation and update discovery docs

- introduce `OUTPUT_CLIENT` constant and `renderClientManifest` for `'use client'` bundle
- rename `renderManifest` to `renderServerManifest` for clarity
- update `sync` command to write both server and client manifests
- update `findInstalledModuleNames` to support custom package path resolution
- rewrite MODULES.md to explain dual-manifest architecture and client hydration rationale
This commit is contained in:
2026-04-25 14:34:43 -04:00
parent c793bc418c
commit 1b85d6fac7
3 changed files with 76 additions and 20 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
import { readFile } from 'node:fs/promises';
import { resolve, join } from 'node:path';
import { createRequire } from 'node:module';
import { warn } from '@zen/core/shared/logger';
import { info, warn } from '@zen/core/shared/logger';
import { registerModule } from './registry.js';
/**
@@ -43,6 +43,7 @@ export function registerModules(modules) {
createTables: ex.createTables,
dropTables: ex.dropTables,
});
info(`zen-modules: registered ${ex.manifest.name}@${ex.manifest.version ?? '?'}`);
}
}