Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c454c4acc5 |
@@ -450,7 +450,6 @@
|
||||
"@typescript/native-preview": "catalog:",
|
||||
"drizzle-kit": "catalog:",
|
||||
"drizzle-orm": "catalog:",
|
||||
"rollup": "4.60.1",
|
||||
"typescript": "catalog:",
|
||||
"vscode-languageserver-types": "3.17.5",
|
||||
"why-is-node-running": "3.2.2",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
research
|
||||
.rollup-tmp
|
||||
dist
|
||||
dist-*
|
||||
gen
|
||||
|
||||
@@ -69,7 +69,6 @@
|
||||
"@typescript/native-preview": "catalog:",
|
||||
"drizzle-kit": "catalog:",
|
||||
"drizzle-orm": "catalog:",
|
||||
"rollup": "4.60.1",
|
||||
"typescript": "catalog:",
|
||||
"vscode-languageserver-types": "3.17.5",
|
||||
"why-is-node-running": "3.2.2",
|
||||
|
||||
@@ -5,7 +5,6 @@ import fs from "fs"
|
||||
import path from "path"
|
||||
import { fileURLToPath } from "url"
|
||||
import { createSolidTransformPlugin } from "@opentui/solid/bun-plugin"
|
||||
import { treeshakePrepass } from "./treeshake-prepass"
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url)
|
||||
const __dirname = path.dirname(__filename)
|
||||
@@ -51,23 +50,9 @@ console.log(`Loaded ${migrations.length} migrations`)
|
||||
const singleFlag = process.argv.includes("--single")
|
||||
const baselineFlag = process.argv.includes("--baseline")
|
||||
const skipInstall = process.argv.includes("--skip-install")
|
||||
const skipTreeshake = process.argv.includes("--skip-treeshake")
|
||||
const plugin = createSolidTransformPlugin()
|
||||
const skipEmbedWebUi = process.argv.includes("--skip-embed-web-ui")
|
||||
|
||||
// Run Rollup tree-shaking pre-pass on the main entrypoint.
|
||||
// Bun/esbuild can't tree-shake `export * as X` barrels (evanw/esbuild#1420).
|
||||
// Rollup can — it does AST-level analysis to drop unused exports and their
|
||||
// transitive imports. Workers are excluded since they're separate bundles.
|
||||
const rollupTmpDir = path.join(dir, ".rollup-tmp")
|
||||
let treeshakenEntry: string | undefined
|
||||
if (!skipTreeshake) {
|
||||
const entryMap = await treeshakePrepass(["./src/index.ts"], rollupTmpDir)
|
||||
treeshakenEntry = entryMap.get("index")
|
||||
} else {
|
||||
console.log("[treeshake] Skipped (--skip-treeshake)")
|
||||
}
|
||||
|
||||
const createEmbeddedWebUIBundle = async () => {
|
||||
console.log(`Building Web UI to embed in the binary`)
|
||||
const appDir = path.join(import.meta.dirname, "../../app")
|
||||
@@ -228,7 +213,7 @@ for (const item of targets) {
|
||||
},
|
||||
files: embeddedFileMap ? { "opencode-web-ui.gen.ts": embeddedFileMap } : {},
|
||||
entrypoints: [
|
||||
treeshakenEntry ?? "./src/index.ts",
|
||||
"./src/index.ts",
|
||||
parserWorker,
|
||||
workerPath,
|
||||
rgPath,
|
||||
@@ -285,9 +270,4 @@ if (Script.release) {
|
||||
await $`gh release upload v${Script.version} ./dist/*.zip ./dist/*.tar.gz --clobber --repo ${process.env.GH_REPO}`
|
||||
}
|
||||
|
||||
// Clean up Rollup temp directory
|
||||
if (fs.existsSync(rollupTmpDir)) {
|
||||
fs.rmSync(rollupTmpDir, { recursive: true })
|
||||
}
|
||||
|
||||
export { binaries }
|
||||
|
||||
@@ -1,187 +0,0 @@
|
||||
#!/usr/bin/env bun
|
||||
/**
|
||||
* Rollup tree-shaking pre-pass for the opencode build.
|
||||
*
|
||||
* Bun's bundler cannot tree-shake `export * as X from "./mod"` barrels
|
||||
* (nor can esbuild — see evanw/esbuild#1420). Rollup can.
|
||||
*
|
||||
* This script runs Rollup on the source entrypoints to eliminate unused
|
||||
* exports and their transitive imports, then writes the tree-shaken ESM
|
||||
* to .rollup-tmp/ for Bun to compile into the final binary.
|
||||
*
|
||||
* Usage:
|
||||
* bun script/treeshake-prepass.ts [entrypoints...]
|
||||
*
|
||||
* If no entrypoints are given, defaults to ./src/index.ts.
|
||||
* Output goes to .rollup-tmp/ preserving the entry filename.
|
||||
*/
|
||||
|
||||
import { rollup, type Plugin as RollupPlugin } from "rollup"
|
||||
import path from "path"
|
||||
import fs from "fs"
|
||||
|
||||
const dir = path.resolve(import.meta.dirname, "..")
|
||||
const srcDir = path.join(dir, "src")
|
||||
|
||||
// Path alias mappings from tsconfig.json
|
||||
const aliases: Record<string, string> = {
|
||||
"@/": path.join(srcDir, "/"),
|
||||
"@tui/": path.join(srcDir, "cli/cmd/tui/"),
|
||||
}
|
||||
|
||||
// Conditional imports from package.json "#imports"
|
||||
const hashImports: Record<string, string> = {
|
||||
"#db": path.join(srcDir, "storage/db.bun.ts"),
|
||||
"#pty": path.join(srcDir, "pty/pty.bun.ts"),
|
||||
"#hono": path.join(srcDir, "server/adapter.bun.ts"),
|
||||
}
|
||||
|
||||
function resolveWithAliases(source: string, importerDir: string): string | null {
|
||||
// Handle hash imports
|
||||
if (hashImports[source]) return hashImports[source]
|
||||
|
||||
// Handle path aliases
|
||||
for (const [alias, target] of Object.entries(aliases)) {
|
||||
if (source.startsWith(alias)) {
|
||||
return target + source.slice(alias.length)
|
||||
}
|
||||
}
|
||||
|
||||
// Handle relative imports
|
||||
if (source.startsWith(".")) {
|
||||
return path.resolve(importerDir, source)
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
// Binary/asset extensions that Bun imports natively but Rollup can't parse
|
||||
const assetExtensions = new Set([".wav", ".wasm", ".node", ".png", ".jpg", ".gif", ".svg", ".css"])
|
||||
|
||||
function tryResolveFile(base: string): string | null {
|
||||
// Try exact file, then .ts, then .tsx, then /index.ts, then /index.tsx
|
||||
for (const suffix of ["", ".ts", ".tsx", "/index.ts", "/index.tsx"]) {
|
||||
const p = base + suffix
|
||||
if (fs.existsSync(p) && fs.statSync(p).isFile()) return p
|
||||
}
|
||||
// Bun.Transpiler rewrites .ts → .js in import paths, so try .ts for .js
|
||||
if (base.endsWith(".js")) {
|
||||
const tsBase = base.slice(0, -3)
|
||||
for (const suffix of [".ts", ".tsx"]) {
|
||||
const p = tsBase + suffix
|
||||
if (fs.existsSync(p) && fs.statSync(p).isFile()) return p
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
/**
|
||||
* Rollup plugin that resolves TypeScript paths and transpiles TS/TSX.
|
||||
* Uses Bun.Transpiler for speed — no separate TS compilation step.
|
||||
*/
|
||||
const bunTranspilePlugin: RollupPlugin = {
|
||||
name: "bun-transpile",
|
||||
|
||||
resolveId(source, importer) {
|
||||
if (!importer) return null
|
||||
|
||||
const importerDir = path.dirname(importer)
|
||||
const resolved = resolveWithAliases(source, importerDir)
|
||||
if (!resolved) return null // external (node_modules, node builtins)
|
||||
|
||||
const file = tryResolveFile(resolved)
|
||||
if (file) return file
|
||||
|
||||
// If it's a local import we can't resolve (generated file, missing, etc.),
|
||||
// mark it external so Bun handles it later
|
||||
return { id: source, external: true }
|
||||
},
|
||||
|
||||
load(id) {
|
||||
if (id.endsWith(".ts") || id.endsWith(".tsx")) {
|
||||
return fs.readFileSync(id, "utf-8")
|
||||
}
|
||||
// Handle non-JS assets that Bun imports natively
|
||||
if (id.endsWith(".txt")) {
|
||||
const content = fs.readFileSync(id, "utf-8")
|
||||
return `export default ${JSON.stringify(content)};`
|
||||
}
|
||||
if (id.endsWith(".json")) {
|
||||
const content = fs.readFileSync(id, "utf-8")
|
||||
return `export default ${content};`
|
||||
}
|
||||
if (id.endsWith(".sql")) {
|
||||
const content = fs.readFileSync(id, "utf-8")
|
||||
return `export default ${JSON.stringify(content)};`
|
||||
}
|
||||
// Binary assets — return a placeholder (Bun handles the real import)
|
||||
const ext = path.extname(id)
|
||||
if (assetExtensions.has(ext)) {
|
||||
return `export default "asset:${path.basename(id)}";`
|
||||
}
|
||||
return null
|
||||
},
|
||||
|
||||
transform(code, id) {
|
||||
if (!id.endsWith(".ts") && !id.endsWith(".tsx")) return null
|
||||
const loader = id.endsWith(".tsx") ? "tsx" : "ts"
|
||||
const t = new Bun.Transpiler({ loader, tsconfig: JSON.stringify({ compilerOptions: { jsx: "preserve" } }) })
|
||||
return { code: t.transformSync(code), map: null }
|
||||
},
|
||||
}
|
||||
|
||||
export async function treeshakePrepass(entrypoints: string[], outDir: string) {
|
||||
const absEntries = entrypoints.map((e) => path.resolve(dir, e))
|
||||
const startTime = performance.now()
|
||||
|
||||
console.log(`[treeshake] Running Rollup pre-pass on ${absEntries.length} entrypoint(s)...`)
|
||||
|
||||
const bundle = await rollup({
|
||||
input: absEntries,
|
||||
plugins: [bunTranspilePlugin],
|
||||
treeshake: {
|
||||
moduleSideEffects: false, // equivalent to sideEffects: false
|
||||
},
|
||||
// Mark everything that isn't local source as external.
|
||||
// Bun handles node_modules resolution + bundling in the compile step.
|
||||
external: (id) => {
|
||||
if (id.startsWith(".") || id.startsWith("/") || id.startsWith("@/") || id.startsWith("@tui/") || id.startsWith("#"))
|
||||
return false
|
||||
return true
|
||||
},
|
||||
logLevel: "warn",
|
||||
})
|
||||
|
||||
fs.mkdirSync(outDir, { recursive: true })
|
||||
const { output } = await bundle.write({
|
||||
dir: outDir,
|
||||
format: "esm",
|
||||
preserveModules: false,
|
||||
entryFileNames: "[name].js",
|
||||
})
|
||||
await bundle.close()
|
||||
|
||||
const elapsed = (performance.now() - startTime).toFixed(0)
|
||||
const totalSize = output.reduce((sum, chunk) => sum + ("code" in chunk ? chunk.code.length : 0), 0)
|
||||
console.log(`[treeshake] Done in ${elapsed}ms — ${output.length} chunks, ${(totalSize / 1024).toFixed(0)}KB total`)
|
||||
|
||||
// Return a mapping of original entry basenames to output paths
|
||||
const entryMap = new Map<string, string>()
|
||||
for (const chunk of output) {
|
||||
if (chunk.type === "chunk" && chunk.isEntry) {
|
||||
entryMap.set(chunk.name, path.join(outDir, chunk.fileName))
|
||||
}
|
||||
}
|
||||
return entryMap
|
||||
}
|
||||
|
||||
// CLI mode: run directly
|
||||
if (import.meta.main) {
|
||||
const args = process.argv.slice(2)
|
||||
const entries = args.length > 0 ? args : ["./src/index.ts"]
|
||||
const outDir = path.join(dir, ".rollup-tmp")
|
||||
const result = await treeshakePrepass(entries, outDir)
|
||||
for (const [name, out] of result) {
|
||||
console.log(` ${name} → ${path.relative(dir, out)}`)
|
||||
}
|
||||
}
|
||||
@@ -1,33 +1,31 @@
|
||||
import z from "zod"
|
||||
import type { ZodType } from "zod"
|
||||
|
||||
export namespace BusEvent {
|
||||
export type Definition = ReturnType<typeof define>
|
||||
export type Definition = ReturnType<typeof define>
|
||||
|
||||
const registry = new Map<string, Definition>()
|
||||
const registry = new Map<string, Definition>()
|
||||
|
||||
export function define<Type extends string, Properties extends ZodType>(type: Type, properties: Properties) {
|
||||
const result = {
|
||||
type,
|
||||
properties,
|
||||
}
|
||||
registry.set(type, result)
|
||||
return result
|
||||
}
|
||||
|
||||
export function payloads() {
|
||||
return registry
|
||||
.entries()
|
||||
.map(([type, def]) => {
|
||||
return z
|
||||
.object({
|
||||
type: z.literal(type),
|
||||
properties: def.properties,
|
||||
})
|
||||
.meta({
|
||||
ref: `Event.${def.type}`,
|
||||
})
|
||||
})
|
||||
.toArray()
|
||||
export function define<Type extends string, Properties extends ZodType>(type: Type, properties: Properties) {
|
||||
const result = {
|
||||
type,
|
||||
properties,
|
||||
}
|
||||
registry.set(type, result)
|
||||
return result
|
||||
}
|
||||
|
||||
export function payloads() {
|
||||
return registry
|
||||
.entries()
|
||||
.map(([type, def]) => {
|
||||
return z
|
||||
.object({
|
||||
type: z.literal(type),
|
||||
properties: def.properties,
|
||||
})
|
||||
.meta({
|
||||
ref: `Event.${def.type}`,
|
||||
})
|
||||
})
|
||||
.toArray()
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import z from "zod"
|
||||
import { Effect, Exit, Layer, PubSub, Scope, Context, Stream } from "effect"
|
||||
import { EffectBridge } from "@/effect"
|
||||
import { Log } from "../util"
|
||||
import { BusEvent } from "./bus-event"
|
||||
import * as BusEvent from "./bus-event"
|
||||
import { GlobalBus } from "./global"
|
||||
import { InstanceState } from "@/effect"
|
||||
import { makeRuntime } from "@/effect/run-service"
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export * as Bus from "./bus"
|
||||
export * as BusEvent from "./bus-event"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { SessionID } from "@/session/schema"
|
||||
import z from "zod"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { InstanceState } from "@/effect"
|
||||
import { EffectBridge } from "@/effect"
|
||||
import type { InstanceContext } from "@/project/instance"
|
||||
|
||||
@@ -3,7 +3,7 @@ import { setTimeout as sleep } from "node:timers/promises"
|
||||
import { fn } from "@/util/fn"
|
||||
import { Database, asc, eq, inArray } from "@/storage"
|
||||
import { Project } from "@/project"
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { GlobalBus } from "@/bus/global"
|
||||
import { SyncEvent } from "@/sync"
|
||||
import { EventTable } from "@/sync/event.sql"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { InstanceState } from "@/effect"
|
||||
|
||||
import { AppFileSystem } from "@opencode-ai/shared/filesystem"
|
||||
|
||||
@@ -6,7 +6,7 @@ import { readdir } from "fs/promises"
|
||||
import path from "path"
|
||||
import z from "zod"
|
||||
import { Bus } from "@/bus"
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { InstanceState } from "@/effect"
|
||||
import { Flag } from "@/flag/flag"
|
||||
import { Git } from "@/git"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import z from "zod"
|
||||
import { NamedError } from "@opencode-ai/shared/util/error"
|
||||
import { Log } from "../util"
|
||||
|
||||
@@ -5,7 +5,7 @@ import { withTransientReadRetry } from "@/util/effect-http-client"
|
||||
import { ChildProcess, ChildProcessSpawner } from "effect/unstable/process"
|
||||
import path from "path"
|
||||
import z from "zod"
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { Flag } from "../flag/flag"
|
||||
import { Log } from "../util"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { Bus } from "@/bus"
|
||||
import path from "path"
|
||||
import { pathToFileURL, fileURLToPath } from "url"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { Bus } from "@/bus"
|
||||
import { Log } from "../util"
|
||||
import * as LSPClient from "./client"
|
||||
|
||||
@@ -21,7 +21,7 @@ import { AppFileSystem } from "@opencode-ai/shared/filesystem"
|
||||
import { McpOAuthProvider } from "./oauth-provider"
|
||||
import { McpOAuthCallback } from "./oauth-callback"
|
||||
import { McpAuth } from "./auth"
|
||||
import { BusEvent } from "../bus/bus-event"
|
||||
import { BusEvent } from "../bus"
|
||||
import { Bus } from "@/bus"
|
||||
import { TuiEvent } from "@/cli/cmd/tui/event"
|
||||
import open from "open"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Bus } from "@/bus"
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { Config } from "@/config"
|
||||
import { InstanceState } from "@/effect"
|
||||
import { ProjectID } from "@/project/schema"
|
||||
|
||||
@@ -4,7 +4,7 @@ import { ProjectTable } from "./project.sql"
|
||||
import { SessionTable } from "../session/session.sql"
|
||||
import { Log } from "../util"
|
||||
import { Flag } from "@/flag/flag"
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { GlobalBus } from "@/bus/global"
|
||||
import { which } from "../util/which"
|
||||
import { ProjectID } from "./schema"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Effect, Layer, Context, Stream, Scope } from "effect"
|
||||
import { formatPatch, structuredPatch } from "diff"
|
||||
import path from "path"
|
||||
import { Bus } from "@/bus"
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { InstanceState } from "@/effect"
|
||||
import { AppFileSystem } from "@opencode-ai/shared/filesystem"
|
||||
import { FileWatcher } from "@/file/watcher"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { Bus } from "@/bus"
|
||||
import { InstanceState } from "@/effect"
|
||||
import { Instance } from "@/project/instance"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Deferred, Effect, Layer, Schema, Context } from "effect"
|
||||
import { Bus } from "@/bus"
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { InstanceState } from "@/effect"
|
||||
import { SessionID, MessageID } from "@/session/schema"
|
||||
import { zod } from "@/util/effect-zod"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import z from "zod"
|
||||
|
||||
export const Event = {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Hono } from "hono"
|
||||
import { describeRoute, resolver } from "hono-openapi"
|
||||
import { streamSSE } from "hono/streaming"
|
||||
import { Log } from "@/util"
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { Bus } from "@/bus"
|
||||
import { AsyncQueue } from "../../util/queue"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { describeRoute, resolver, validator } from "hono-openapi"
|
||||
import { streamSSE } from "hono/streaming"
|
||||
import { Effect } from "effect"
|
||||
import z from "zod"
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { SyncEvent } from "@/sync"
|
||||
import { GlobalBus } from "@/bus/global"
|
||||
import { AppRuntime } from "@/effect/app-runtime"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { Bus } from "@/bus"
|
||||
import * as Session from "./session"
|
||||
import { SessionID, MessageID, PartID } from "./schema"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { SessionID, MessageID, PartID } from "./schema"
|
||||
import z from "zod"
|
||||
import { NamedError } from "@opencode-ai/shared/util/error"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Slug } from "@opencode-ai/shared/util/slug"
|
||||
import path from "path"
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { Bus } from "@/bus"
|
||||
import { Decimal } from "decimal.js"
|
||||
import z from "zod"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { Bus } from "@/bus"
|
||||
import { InstanceState } from "@/effect"
|
||||
import { SessionID } from "./schema"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { Bus } from "@/bus"
|
||||
import { SessionID } from "./schema"
|
||||
import { Effect, Layer, Context } from "effect"
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { ZodObject } from "zod"
|
||||
import { Database, eq } from "@/storage"
|
||||
import { GlobalBus } from "@/bus/global"
|
||||
import { Bus as ProjectBus } from "@/bus"
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { Instance } from "@/project/instance"
|
||||
import { EventSequenceTable, EventTable } from "./event.sql"
|
||||
import { WorkspaceContext } from "@/control-plane/workspace-context"
|
||||
|
||||
@@ -10,7 +10,7 @@ import type { ProjectID } from "../project/schema"
|
||||
import { Log } from "../util"
|
||||
import { Slug } from "@opencode-ai/shared/util/slug"
|
||||
import { errorMessage } from "../util/error"
|
||||
import { BusEvent } from "@/bus/bus-event"
|
||||
import { BusEvent } from "@/bus"
|
||||
import { GlobalBus } from "@/bus/global"
|
||||
import { Git } from "@/git"
|
||||
import { Effect, Layer, Path, Scope, Context, Stream } from "effect"
|
||||
|
||||
@@ -2,7 +2,7 @@ import { describe, expect } from "bun:test"
|
||||
import { Deferred, Effect, Layer, Stream } from "effect"
|
||||
import z from "zod"
|
||||
import { Bus } from "../../src/bus"
|
||||
import { BusEvent } from "../../src/bus/bus-event"
|
||||
import { BusEvent } from "../../src/bus"
|
||||
import { Instance } from "../../src/project/instance"
|
||||
import * as CrossSpawnSpawner from "../../src/effect/cross-spawn-spawner"
|
||||
import { provideInstance, provideTmpdirInstance, tmpdirScoped } from "../fixture/fixture"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { afterEach, describe, expect, test } from "bun:test"
|
||||
import z from "zod"
|
||||
import { Bus } from "../../src/bus"
|
||||
import { BusEvent } from "../../src/bus/bus-event"
|
||||
import { BusEvent } from "../../src/bus"
|
||||
import { Instance } from "../../src/project/instance"
|
||||
import { tmpdir } from "../fixture/fixture"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { afterEach, describe, expect, test } from "bun:test"
|
||||
import z from "zod"
|
||||
import { Bus } from "../../src/bus"
|
||||
import { BusEvent } from "../../src/bus/bus-event"
|
||||
import { BusEvent } from "../../src/bus"
|
||||
import { Instance } from "../../src/project/instance"
|
||||
import { tmpdir } from "../fixture/fixture"
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import { AppFileSystem } from "@opencode-ai/shared/filesystem"
|
||||
import { Format } from "../../src/format"
|
||||
import { Agent } from "../../src/agent/agent"
|
||||
import { Bus } from "../../src/bus"
|
||||
import { BusEvent } from "../../src/bus/bus-event"
|
||||
import { BusEvent } from "../../src/bus"
|
||||
import { Truncate } from "../../src/tool"
|
||||
import { SessionID, MessageID } from "../../src/session/schema"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user