[codex] Use compiler-backed schema previews#825
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | 4142102 | May 16 2026, 08:34 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 4142102 | Commit Preview URL Branch Preview URL |
May 16 2026, 08:34 AM |
d0c41b7 to
3bc6e67
Compare
3bc6e67 to
eaae2d5
Compare
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-google-discovery
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
This reverts commit 1b69bc7.
RhysSullivan
commented
May 16, 2026
RhysSullivan
commented
May 16, 2026
RhysSullivan
commented
May 16, 2026
RhysSullivan
commented
May 16, 2026
RhysSullivan
commented
May 16, 2026
RhysSullivan
added a commit
that referenced
this pull request
May 31, 2026
* Use compiler-backed schema previews * Keep schema compiler off browser path * Vendor schema TypeScript compiler * Fix vendored compiler runtime imports * Fix schema compiler CI failures * Fold schema compiler into SDK * Document vendored schema compiler attribution * Simplify tool schema TypeScript loading * Always include schema TypeScript previews * Use raw schema compiler previews * Revert "Use raw schema compiler previews" This reverts commit f95c650b17216ae7eac3e4f366eb5900ae6f27bf. * Restore tool metadata responses * Remove vendored compiler lodash dependency * Clean up vendored schema compiler helpers * Treat vendored schema compiler as internal code * Add real OpenAPI schema preview baselines * Resolve schema refs without external loading * Fix schema compiler format and typecheck * Remove vendored compiler debug logging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@executor-js/json-schema-to-typescriptso Executor owns the schema compiler used by@executor-js/sdk.unknown.$defsinto every root.@executor-js/sdk/shared.includeTypeScript=true/ the TypeScript tab is opened.Root Cause
The previous preview renderer built TypeScript strings by hand and used raw
$reftails as type names, so schema names such asfoo-barcould produce invalid TypeScript. Adding a real compiler at the SDK root also exposed an existing package-boundary issue: React imported@executor-js/sdkfor shared IDs/errors/policy helpers, which could pull Node-only compiler dependencies into the browser bundle.The remaining Cloudflare load slowness had three separate causes: the source detail page fetched the full stored OpenAPI spec even though it only needed metadata, the default schema tab eagerly ran the TypeScript compiler despite rendering the raw schema view first, and the tool-list endpoints shipped descriptions/annotation text for every row before any tool was selected.
After vendoring, Bun's TypeScript runtime hit upstream-style type-only imports/exports emitted as runtime imports. The SDK caught that import failure and returned
unknownfor the whole preview. The vendored package now uses explicitimport type/export typefor those symbols.Vendored Compiler Notes
@executor-js/sdknow depends on@executor-js/json-schema-to-typescriptviaworkspace:*.json-schema-to-typescript@15.0.4source, without the upstream CLI entrypoint.@apidevtools/json-schema-ref-parser,js-yaml, andlodash.Local Measurements
config.spec.includeTypeScript=trueafter runtime import fix: Input{ account_id: AccessIdentifier; body: AccessAppRequest; }, Output(AccessAppsComponentsSchemasSingleResponse & { result?: AccessAppResponse; }), 184 shared TypeScript definitions.Validation
bun run --cwd packages/core/json-schema-to-typescript typecheckbun run --cwd packages/core/json-schema-to-typescript buildbun run --cwd packages/core/sdk test src/schema-types.test.tsbuildToolTypeScriptPreviewreturns{ account_id: string; body: unknown; }instead of rootunknown.{ account_id: AccessIdentifier; body: AccessAppRequest; }.bun run --cwd packages/core/sdk test -- src/schema-refs.test.tsbun run --cwd packages/core/sdk test -- src/executor.test.tsbun run --cwd packages/core/execution test -- src/tool-invoker.test.tsbun run --cwd packages/core/sdk typecheckbun run --cwd packages/core/api typecheckbun run --cwd packages/react typecheckbun run --cwd packages/plugins/openapi typecheckbun run --cwd packages/plugins/mcp typecheckbun run --cwd packages/plugins/graphql typecheckbun run --cwd packages/plugins/google-discovery typecheckbun run --cwd packages/plugins/onepassword typecheckbun run --cwd packages/core/sdk buildbun run --cwd apps/local buildbunx oxfmt --checkon changed filesgit diff --checkoxlint --deny-warningson changed TypeScript files