chore(opencode): remove scout agent (#30435)

This commit is contained in:
Shoubhit Dash
2026-06-02 23:30:34 +05:30
committed by GitHub
parent 18ba80f3ac
commit a639fe7a08
30 changed files with 26 additions and 925 deletions

View File

@@ -26,7 +26,6 @@ const agentLayer = (flags: Partial<RuntimeFlags.Info> = {}) =>
)
const it = testEffect(agentLayer())
const scout = testEffect(agentLayer({ experimentalScout: true }))
// Helper to evaluate permission for a tool with wildcard pattern
function evalPerm(agent: Agent.Info | undefined, permission: string): PermissionLegacy.Action | undefined {
@@ -56,7 +55,6 @@ it.instance("returns default native agents when no config", () =>
expect(names).toContain("plan")
expect(names).toContain("general")
expect(names).toContain("explore")
expect(names).not.toContain("scout")
expect(names).toContain("compaction")
expect(names).toContain("title")
expect(names).toContain("summary")
@@ -71,8 +69,6 @@ it.instance("build agent has correct default properties", () =>
expect(build?.native).toBe(true)
expect(evalPerm(build, "edit")).toBe("allow")
expect(evalPerm(build, "bash")).toBe("allow")
expect(evalPerm(build, "repo_clone")).toBe("deny")
expect(evalPerm(build, "repo_overview")).toBe("deny")
}),
)
@@ -110,31 +106,12 @@ it.instance("explore agent asks for external directories and allows whitelisted
}),
)
scout.instance("scout agent allows repo cloning and repo cache reads", () =>
Effect.gen(function* () {
const scout = yield* load((svc) => svc.get("scout"))
expect(scout).toBeDefined()
expect(scout?.mode).toBe("subagent")
expect(evalPerm(scout, "repo_clone")).toBe("allow")
expect(evalPerm(scout, "repo_overview")).toBe("allow")
expect(evalPerm(scout, "edit")).toBe("deny")
expect(
Permission.evaluate(
"external_directory",
path.join(Global.Path.repos, "github.com", "owner", "repo", "README.md"),
scout!.permission,
).action,
).toBe("allow")
}),
)
scout.instance(
it.instance(
"reference config does not create subagents",
() =>
Effect.gen(function* () {
const agents = yield* load((svc) => svc.list())
const names = agents.map((agent) => agent.name)
expect(names).toContain("scout")
expect(names).not.toContain("effect")
expect(names).not.toContain("effectFull")
expect(names).not.toContain("localdocs")