Skip to content

Commit ffde2be

Browse files
authored
[codex] Use compiler-backed schema previews (#825)
* 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
1 parent 607d713 commit ffde2be

107 files changed

Lines changed: 154247 additions & 585 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.oxlintrc.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
"integrationsdotsh/",
120120
"node_modules/",
121121
"packages/core/fumadb/",
122+
"packages/core/sdk/src/vendor/json-schema-to-typescript/",
122123
"bun.lock",
123124
"*.tsbuildinfo",
124125
"executor-*.tgz",

packages/core/api/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"type": "module",
66
"exports": {
77
".": "./src/index.ts",
8+
"./client": "./src/client.ts",
89
"./server": "./src/server.ts"
910
},
1011
"scripts": {

packages/core/api/src/client.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export { ExecutorApi, CoreExecutorApi } from "./api";
2+
export { ToolsApi } from "./tools/api";
3+
export { SourcesApi } from "./sources/api";
4+
export { SecretsApi } from "./secrets/api";
5+
export { ConnectionsApi } from "./connections/api";
6+
export { ExecutionsApi } from "./executions/api";
7+
export { ScopeApi } from "./scope/api";
8+
export { OAuthApi } from "./oauth/api";
9+
export { PoliciesApi } from "./policies/api";

packages/core/api/src/connections/api.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
22
import { Schema } from "effect";
33

4-
import { ConnectionId, ConnectionInUseError, ScopeId, Usage } from "@executor-js/sdk";
5-
6-
import { InternalError } from "../observability";
4+
import {
5+
ConnectionId,
6+
ConnectionInUseError,
7+
InternalError,
8+
ScopeId,
9+
Usage,
10+
} from "@executor-js/sdk/shared";
711

812
// ---------------------------------------------------------------------------
913
// Params

packages/core/api/src/executions/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
22
import { Schema } from "effect";
33

4-
import { InternalError } from "../observability";
4+
import { InternalError } from "@executor-js/sdk/shared";
55

66
// ---------------------------------------------------------------------------
77
// Schemas

packages/core/api/src/oauth/api.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema } from "effect/unstable/ht
1111
import { Schema } from "effect";
1212

1313
import {
14+
InternalError,
1415
OAuthCompleteError,
1516
OAuthProbeError,
1617
OAuthSessionNotFoundError,
1718
OAuthStartError,
1819
OAuthStrategySchema,
1920
ScopeId,
2021
SecretBackedMap,
21-
} from "@executor-js/sdk";
22-
23-
import { InternalError } from "../observability";
22+
} from "@executor-js/sdk/shared";
2423

2524
const ScopeParams = { scopeId: ScopeId };
2625
// ---------------------------------------------------------------------------

packages/core/api/src/policies/api.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
22
import { Schema } from "effect";
3-
import { PolicyId, ScopeId, ToolPolicyActionSchema } from "@executor-js/sdk";
4-
5-
import { InternalError } from "../observability";
3+
import { InternalError, PolicyId, ScopeId, ToolPolicyActionSchema } from "@executor-js/sdk/shared";
64

75
// ---------------------------------------------------------------------------
86
// Params

packages/core/api/src/scope/api.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
22
import { Schema } from "effect";
3-
import { ScopeId } from "@executor-js/sdk";
4-
5-
import { InternalError } from "../observability";
3+
import { InternalError, ScopeId } from "@executor-js/sdk/shared";
64

75
// ---------------------------------------------------------------------------
86
// Response schemas

packages/core/api/src/secrets/api.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
22
import { Schema } from "effect";
33
import {
4+
InternalError,
45
ScopeId,
56
SecretId,
67
SecretInUseError,
78
SecretNotFoundError,
89
SecretOwnedByConnectionError,
910
SecretResolutionError,
1011
Usage,
11-
} from "@executor-js/sdk";
12-
13-
import { InternalError } from "../observability";
12+
} from "@executor-js/sdk/shared";
1413

1514
// ---------------------------------------------------------------------------
1615
// Params

packages/core/api/src/sources/api.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
import { HttpApiEndpoint, HttpApiGroup } from "effect/unstable/httpapi";
22
import { Schema } from "effect";
3-
import { ScopeId, SourceRemovalNotAllowedError, ToolId } from "@executor-js/sdk";
4-
5-
import { InternalError } from "../observability";
3+
import {
4+
InternalError,
5+
ScopeId,
6+
SourceRemovalNotAllowedError,
7+
ToolId,
8+
} from "@executor-js/sdk/shared";
69

710
// ---------------------------------------------------------------------------
811
// Params

0 commit comments

Comments
 (0)