Skip to content

Commit 599ae33

Browse files
authored
Merge pull request #284 from RhysSullivan/worktree-publish-execution-cli
feat(release): publish execution, cli, and kernel packages to npm
2 parents 96dc18a + 905973b commit 599ae33

35 files changed

Lines changed: 772 additions & 66 deletions

‎.changeset/config.json‎

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,40 @@
22
"$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
33
"changelog": false,
44
"commit": false,
5-
"fixed": [],
5+
"fixed": [
6+
[
7+
"@executor/sdk",
8+
"@executor/storage-core",
9+
"@executor/codemode-core",
10+
"@executor/runtime-quickjs",
11+
"@executor/execution",
12+
"@executor/cli",
13+
"@executor/plugin-file-secrets",
14+
"@executor/plugin-google-discovery",
15+
"@executor/plugin-graphql",
16+
"@executor/plugin-keychain",
17+
"@executor/plugin-mcp",
18+
"@executor/plugin-onepassword",
19+
"@executor/plugin-openapi"
20+
]
21+
],
622
"linked": [],
723
"access": "public",
824
"baseBranch": "main",
925
"updateInternalDependencies": "patch",
1026
"ignore": [
1127
"@executor/local",
12-
"@executor/execution",
1328
"@executor/storage-file",
1429
"@executor/host-mcp",
15-
"@executor/codemode-core",
1630
"@executor/ir",
1731
"@executor/runtime-deno-subprocess",
18-
"@executor/runtime-quickjs",
1932
"@executor/marketing",
2033
"@executor/runtime-dynamic-worker",
2134
"@executor/runtime-secure-exec",
2235
"@executor/react",
2336
"@executor/api",
2437
"@executor/config",
2538
"@executor/storage-postgres",
26-
"@executor/sdk",
27-
"@executor/plugin-file-secrets",
28-
"@executor/plugin-google-discovery",
29-
"@executor/plugin-graphql",
30-
"@executor/plugin-keychain",
31-
"@executor/plugin-mcp",
32-
"@executor/plugin-onepassword",
33-
"@executor/plugin-openapi",
3439
"@executor/plugin-workos-vault",
3540
"@executor/example-promise-sdk"
3641
]

‎apps/cli/src/main.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import * as Cause from "effect/Cause";
4141

4242
import { ExecutorApi } from "@executor/api";
4343
import { startServer, runMcpStdioServer, getExecutor } from "@executor/local";
44+
import { makeQuickJsExecutor } from "@executor/runtime-quickjs";
4445

4546
// Embedded web UI — baked into compiled binaries via `with { type: "file" }`
4647
import embeddedWebUI from "./embedded-web-ui.gen";
@@ -154,7 +155,9 @@ const runForegroundSession = (input: {
154155
const runStdioMcpSession = () =>
155156
Effect.gen(function* () {
156157
const executor = yield* Effect.promise(() => getExecutor());
157-
yield* Effect.promise(() => runMcpStdioServer({ executor }));
158+
yield* Effect.promise(() =>
159+
runMcpStdioServer({ executor, codeExecutor: makeQuickJsExecutor() }),
160+
);
158161
});
159162

160163
// ---------------------------------------------------------------------------

‎apps/cloud/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"@executor/plugin-workos-vault": "workspace:*",
3939
"@executor/react": "workspace:*",
4040
"@executor/runtime-dynamic-worker": "workspace:*",
41+
"@executor/runtime-quickjs": "workspace:*",
4142
"@executor/sdk": "workspace:*",
4243
"@executor/storage-core": "workspace:*",
4344
"@executor/storage-postgres": "workspace:*",

‎apps/cloud/src/mcp-session.e2e.node.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import type { ClientCapabilities } from "@modelcontextprotocol/sdk/types.js";
2323

2424
import { createExecutorMcpServer } from "@executor/host-mcp";
2525
import { createExecutionEngine } from "@executor/execution";
26+
import { makeQuickJsExecutor } from "@executor/runtime-quickjs";
2627
import {
2728
ElicitationResponse,
2829
FormElicitation,
@@ -134,7 +135,7 @@ const openSession = (
134135
Effect.acquireRelease(
135136
Effect.gen(function* () {
136137
const executor = yield* buildScopedExecutor(orgId, `Org ${orgId}`, options);
137-
const engine = createExecutionEngine({ executor });
138+
const engine = createExecutionEngine({ executor, codeExecutor: makeQuickJsExecutor() });
138139
const mcpServer = yield* Effect.promise(() => createExecutorMcpServer({ engine }));
139140
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
140141
const client = new Client(

‎apps/cloud/src/services/__test-harness__/api-harness.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
ExecutorService,
3232
} from "@executor/api/server";
3333
import { createExecutionEngine } from "@executor/execution";
34+
import { makeQuickJsExecutor } from "@executor/runtime-quickjs";
3435
import {
3536
Scope,
3637
ScopeId,
@@ -215,7 +216,7 @@ const TestApiLive = HttpApiBuilder.api(ProtectedCloudApi).pipe(
215216
const buildAppForScope = (scopeId: string, scopeName: string) =>
216217
Effect.gen(function* () {
217218
const executor = yield* createTestScopedExecutor(scopeId, scopeName);
218-
const engine = createExecutionEngine({ executor });
219+
const engine = createExecutionEngine({ executor, codeExecutor: makeQuickJsExecutor() });
219220
const services = Layer.mergeAll(
220221
Layer.succeed(ExecutorService, executor),
221222
Layer.succeed(ExecutionEngineService, engine),

‎apps/local/package.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"@executor/plugin-onepassword": "workspace:*",
3434
"@executor/plugin-openapi": "workspace:*",
3535
"@executor/react": "workspace:*",
36+
"@executor/runtime-quickjs": "workspace:*",
3637
"@executor/sdk": "workspace:*",
3738
"@executor/storage-file": "workspace:*",
3839
"@modelcontextprotocol/sdk": "^1.12.1",

‎apps/local/src/server/main.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { Context, Effect, Layer, ManagedRuntime } from "effect";
1010
import { addGroup } from "@executor/api";
1111
import { CoreHandlers, ExecutorService, ExecutionEngineService } from "@executor/api/server";
1212
import { createExecutionEngine } from "@executor/execution";
13+
import { makeQuickJsExecutor } from "@executor/runtime-quickjs";
1314
import {
1415
OpenApiGroup,
1516
OpenApiHandlers,
@@ -78,7 +79,7 @@ const closeServerHandlers = async (handlers: ServerHandlers): Promise<void> => {
7879

7980
export const createServerHandlers = async (): Promise<ServerHandlers> => {
8081
const executor = await getExecutor();
81-
const engine = createExecutionEngine({ executor });
82+
const engine = createExecutionEngine({ executor, codeExecutor: makeQuickJsExecutor() });
8283

8384
const pluginExtensions = Layer.mergeAll(
8485
Layer.succeed(OpenApiExtensionService, executor.openapi),

‎bun.lock‎

Lines changed: 27 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"dev:cli": "bun run apps/cli/src/main.ts",
3434
"test": "turbo run test",
3535
"test:release:bootstrap": "vitest run tests/release-bootstrap-smoke.test.ts",
36-
"build:packages": "bun run --filter='@executor/sdk' build && bun run --filter='@executor/plugin-*' build",
36+
"build:packages": "bun run --filter='@executor/storage-core' build && bun run --filter='@executor/codemode-core' build && bun run --filter='@executor/runtime-quickjs' build && bun run --filter='@executor/sdk' build && bun run --filter='@executor/execution' build && bun run --filter='@executor/cli' build && bun run --filter='@executor/plugin-*' build",
3737
"typecheck": "turbo run typecheck",
3838
"typecheck:slow": "turbo run typecheck:slow",
3939
"ci": "bun run lint && bun run typecheck && bun run test",

‎packages/core/cli/README.md‎

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# @executor/cli
2+
3+
Command-line tool for `@executor/sdk` projects. Generates Drizzle schema files from the plugins registered in your `executor.config.ts` so database migrations stay in sync with the executor you actually run.
4+
5+
## Install
6+
7+
```sh
8+
bun add -d @executor/cli
9+
# or
10+
npm install --save-dev @executor/cli
11+
```
12+
13+
The binary is installed as `executor`.
14+
15+
## Quick start
16+
17+
Create an `executor.config.ts` alongside your app code:
18+
19+
```ts
20+
import { defineExecutorConfig } from "@executor/sdk";
21+
import { mcpPlugin } from "@executor/plugin-mcp";
22+
import { openApiPlugin } from "@executor/plugin-openapi";
23+
24+
export default defineExecutorConfig({
25+
dialect: "postgres",
26+
plugins: [mcpPlugin(), openApiPlugin()],
27+
});
28+
```
29+
30+
Then generate a Drizzle schema from it:
31+
32+
```sh
33+
bunx executor generate --output ./src/db/executor-schema.ts
34+
# or
35+
npx executor generate --output ./src/db/executor-schema.ts
36+
```
37+
38+
The generator walks every plugin in the config, collects their schema contributions, and emits a single Drizzle schema file ready to hand to `drizzle-kit`.
39+
40+
## Commands
41+
42+
```
43+
executor generate [options]
44+
--cwd <dir> Project directory (default: cwd)
45+
--config <path> Path to executor.config.ts (default: auto-discover)
46+
--output <path> Output file for the generated schema
47+
```
48+
49+
Run `executor --help` to see the current command list.
50+
51+
## Status
52+
53+
Pre-`1.0`. APIs may still change between beta releases. Part of the [executor monorepo](https://github.com/RhysSullivan/executor).
54+
55+
## License
56+
57+
MIT

0 commit comments

Comments
 (0)