Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ bun install --frozen-lockfile
bun run dev
```

Development TypeScript runs on Node.js with `@oxc-node/core` for transpilation, including the
isolated runtime executor. Production continues to run compiled JavaScript. Type checking runs
separately through `bun run check`.

The development Workbench listens on `http://127.0.0.1:5174` and proxies API requests to the
Server on `http://127.0.0.1:3001`. The first run writes an operator token to
`apps/server/.open-flow-dev/operator-token`; later runs reuse it. Set `OPEN_FLOW_TOKEN` to use an
Expand Down
3 changes: 2 additions & 1 deletion apps/server/node/runtime/isolated-vm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ export class IsolatedVmHost {
#start(): ChildProcess {
const modulePath = fileURLToPath(import.meta.url)
const executorPath = fileURLToPath(new URL(modulePath.endsWith('.ts') ? './isolated-vm-executor.ts' : './isolated-vm-executor.js', import.meta.url))
const child = spawn(process.execPath, ['--no-node-snapshot', executorPath, '--executor'], {
const loaderArgs = modulePath.endsWith('.ts') ? ['--import', import.meta.resolve('@oxc-node/core/register')] : []
const child = spawn(process.execPath, ['--no-node-snapshot', ...loaderArgs, executorPath, '--executor'], {
env: { NODE_ENV: 'production' },
stdio: ['ignore', 'ignore', 'pipe', 'ipc'],
}) as ChildProcessByStdio<null, null, Readable>
Expand Down
5 changes: 3 additions & 2 deletions apps/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
},
"devDependencies": {
"@modelcontextprotocol/client": "2.0.0",
"@oomol-lab/open-flow-command": "workspace:*",
"@oxc-node/core": "1.0.1",
"@tailwindcss/vite": "^4",
"@types/node": "^26.0.0",
"@types/react": "^18.3.12",
Expand All @@ -49,7 +51,6 @@
"tailwindcss": "^4",
"typescript": "7.0.2",
"vite": "8.2.1",
"vitest": "^5.0.0",
"@oomol-lab/open-flow-command": "workspace:*"
"vitest": "^5.0.0"
}
}
2 changes: 1 addition & 1 deletion apps/server/scripts/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function developmentBackendPlugin(): Plugin {
}

const developmentToken = configuredOperatorToken == null ? await loadDevelopmentToken() : { created: false, token: configuredOperatorToken }
backend = spawn('node', ['--watch', '--no-node-snapshot', 'node/main.ts', '--api-only'], {
backend = spawn('node', ['--watch', '--no-node-snapshot', '--import', '@oxc-node/core/register', 'node/main.ts', '--api-only'], {
cwd: appRoot,
env: {
...process.env,
Expand Down
38 changes: 38 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"apps/*"
],
"devDependencies": {
"@oxc-node/core": "1.0.1",
"oxfmt": "^0.60.0",
"wrangler": "4.132.0"
},
Expand All @@ -28,7 +29,7 @@
"test:docker": "bun run --filter @oomol-lab/open-flow-server test:docker",
"test:npm-package": "bun run --filter @oomol-lab/open-flow test:package",
"test:package": "bun run test:npm-package",
"lab": "node --no-node-snapshot apps/server/scripts/lab/main.ts",
"lab": "node --no-node-snapshot --import @oxc-node/core/register apps/server/scripts/lab/main.ts",
"flow": "bun apps/server/scripts/flow.ts",
"skill:generate": "bun run --filter @oomol-lab/open-flow skill:generate"
}
Expand Down
Loading