Showing the changes to apps (1 of 2 files). Show all
Unified · Split
| @@ -17,6 +17,7 @@ import { startMcpElicitationDemoServer } from "@executor/mcp-elicitation-demo"; · 16 unmodified lines | ||
| 17 | 17 | import { makeToolInvokerFromTools, toTool } from "@executor/codemode-core"; |
| 18 | 18 | import { |
| 19 | 19 | createControlPlaneClient, |
| 20 | + controlPlaneOpenApiSpec, | |
| 20 | 21 | type ControlPlaneClient, |
| 21 | 22 | type ResolveExecutionEnvironment, |
| 22 | 23 | SourceIdSchema, |
| @@ -599,6 +600,24 @@ const waitForExecutionCompletion = (input: { · 576 unmodified lines | ||
| 599 | 600 | }); |
| 600 | 601 | |
| 601 | 602 | describe("local-executor-server", () => { |
| 603 | + it.scoped("serves the control-plane OpenAPI spec at /v1/openapi.json", () => | |
| 604 | + Effect.gen(function* () { | |
| 605 | + const server = yield* makeServer; | |
| 606 | + const response = yield* Effect.promise(() => | |
| 607 | + fetch(`${server.baseUrl}/v1/openapi.json`, { | |
| 608 | + headers: { | |
| 609 | + accept: "application/json", | |
| 610 | + }, | |
| 611 | + }), | |
| 612 | + ); | |
| 613 | + const spec = yield* Effect.promise(() => response.json()); | |
| 614 | + | |
| 615 | + expect(response.status).toBe(200); | |
| 616 | + expect(response.headers.get("content-type")).toContain("application/json"); | |
| 617 | + expect(spec).toEqual(controlPlaneOpenApiSpec); | |
| 618 | + }), | |
| 619 | + ); | |
| 620 | + | |
| 602 | 621 | it.scoped("serves the control-plane API and executes code", () => |
| 603 | 622 | Effect.gen(function* () { |
| 604 | 623 | const server = yield* makeServer; |