feat: add experimental background subagents (#27084)

This commit is contained in:
Shoubhit Dash
2026-05-14 22:10:15 +05:30
committed by GitHub
parent bdb0c16a93
commit 22de34c4de
21 changed files with 976 additions and 102 deletions

View File

@@ -6,6 +6,7 @@ import path from "path"
import { fileURLToPath, pathToFileURL } from "url"
import { NamedError } from "@opencode-ai/core/util/error"
import { Agent as AgentSvc } from "../../src/agent/agent"
import { BackgroundJob } from "@/background/job"
import { Bus } from "../../src/bus"
import { Command } from "../../src/command"
import { Config } from "@/config/config"
@@ -176,6 +177,7 @@ function makeHttp(input?: { processor?: "blocking" }) {
lsp,
mcp,
AppFileSystem.defaultLayer,
BackgroundJob.defaultLayer,
status,
SyncEvent.defaultLayer,
).pipe(Layer.provideMerge(infra))

View File

@@ -12,6 +12,7 @@ import { Bus } from "@/bus"
import { Storage } from "@/storage/storage"
import { SyncEvent } from "@/sync"
import { RuntimeFlags } from "@/effect/runtime-flags"
import { BackgroundJob } from "@/background/job"
void Log.init({ print: false })
@@ -22,6 +23,7 @@ const it = testEffect(
Layer.provide(Storage.defaultLayer),
Layer.provide(SyncEvent.defaultLayer),
Layer.provide(RuntimeFlags.layer({ experimentalWorkspaces: false })),
Layer.provide(BackgroundJob.defaultLayer),
),
CrossSpawnSpawner.defaultLayer,
),

View File

@@ -30,6 +30,7 @@ import { TestLLMServer } from "../lib/llm-server"
// Same layer setup as prompt-effect.test.ts
import { NodeFileSystem } from "@effect/platform-node"
import { Agent as AgentSvc } from "../../src/agent/agent"
import { BackgroundJob } from "@/background/job"
import { Git } from "../../src/git"
import { Bus } from "../../src/bus"
import { Command } from "../../src/command"
@@ -125,6 +126,7 @@ function makeHttp() {
lsp,
mcp,
AppFileSystem.defaultLayer,
BackgroundJob.defaultLayer,
status,
SyncEvent.defaultLayer,
).pipe(Layer.provideMerge(infra))