feat(worktree): add managed workspace cloning (#30117)

This commit is contained in:
Dax
2026-05-31 11:57:44 -04:00
committed by GitHub
parent 331bed2469
commit 5661af2034
23 changed files with 2374 additions and 28 deletions

View File

@@ -9,6 +9,7 @@
"opencode": "./src/index.ts"
},
"scripts": {
"build": "bun run script/build.ts",
"dev": "bun run src/index.ts",
"typecheck": "tsgo --noEmit"
},

View File

@@ -8,8 +8,12 @@ import { AbsolutePath } from "@opencode-ai/core/schema"
export const AgentsCommand = Command.make("agents", {}, () =>
Effect.gen(function* () {
yield* PluginBoot.Service.use((service) => service.wait())
const agents = yield* AgentV2.Service.use((service) => service.all())
const svc = {
plugin: yield* PluginBoot.Service,
agent: yield* AgentV2.Service,
}
yield* svc.plugin.wait()
const agents = yield* svc.agent.all()
process.stdout.write(
JSON.stringify(
agents.sort((a, b) => a.id.localeCompare(b.id)),