Package
Generator Converters Preview
The clearest public bridge between ontology IR, cross-language function discovery, richer metadata, and SDK generation.
- Publishes a `generate-sdk` CLI.
- Supports both TypeScript and Python discovered functions.
- Generates Python SDK artifacts first so Python function discovery can resolve ontology imports.
- Writes richer metadata like `ontology-metadata.json` in addition to codegen output.
- Most revealing bridge from ontology IR to discovery-aware SDK generation.
Relevant code
Most revealing source snippet
published: build/esm/cli/generate-sdk.js
packages/generator-converters.preview/src/cli/generate-sdk.ts
open source file ->const previewMetadata = PreviewOntologyIrConverter.getPreviewFullMetadataFromIr(irJson);
if (argv.pythonBinary && argv.pythonFunctionsDir) {
generatePythonSdk(previewMetadata, argv.pythonBinary);
}
if (argv.functionsDir || argv.pythonFunctionsDir) {
const queryTypes = await OntologyIrToFullMetadataConverter.getOsdkQueryTypes(...);
previewMetadata.queryTypes = queryTypes;
}
await generateClientSdkVersionTwoPointZero(metadata, ...); Notes
Why it matters
This is one of the packages where the new capability is easiest to trace directly in code.
It takes Ontology IR, enriches it into preview full metadata, optionally discovers TypeScript and Python functions, and then drives @osdk/generator.
The Python path is especially revealing: it generates a temporary Python SDK first so Python functions can import ontology types during discovery. That is compiler-pipeline behavior, not only packaging around existing steps.
That combination makes the package look less like a narrow helper and more like a partially externalized internal pipeline.