chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-12 18:52:25 +00:00
parent 549b146ea6
commit f3c91c5f96
2 changed files with 40 additions and 36 deletions
+6 -6
View File
@@ -105,9 +105,9 @@ it.instance("explore agent asks for external directories and allows whitelisted
expect(explore).toBeDefined() expect(explore).toBeDefined()
expect(Permission.evaluate("external_directory", "/some/other/path", explore!.permission).action).toBe("ask") expect(Permission.evaluate("external_directory", "/some/other/path", explore!.permission).action).toBe("ask")
expect(Permission.evaluate("external_directory", Truncate.GLOB, explore!.permission).action).toBe("allow") expect(Permission.evaluate("external_directory", Truncate.GLOB, explore!.permission).action).toBe("allow")
expect(Permission.evaluate("external_directory", path.join(Global.Path.tmp, "agent-work"), explore!.permission).action).toBe( expect(
"allow", Permission.evaluate("external_directory", path.join(Global.Path.tmp, "agent-work"), explore!.permission).action,
) ).toBe("allow")
}), }),
) )
@@ -548,9 +548,9 @@ it.instance(
it.instance("global tmp directory children are allowed for external_directory", () => it.instance("global tmp directory children are allowed for external_directory", () =>
Effect.gen(function* () { Effect.gen(function* () {
const build = yield* load((svc) => svc.get("build")) const build = yield* load((svc) => svc.get("build"))
expect(Permission.evaluate("external_directory", path.join(Global.Path.tmp, "scratch"), build!.permission).action).toBe( expect(
"allow", Permission.evaluate("external_directory", path.join(Global.Path.tmp, "scratch"), build!.permission).action,
) ).toBe("allow")
expect(Permission.evaluate("external_directory", "/some/other/path", build!.permission).action).toBe("ask") expect(Permission.evaluate("external_directory", "/some/other/path", build!.permission).action).toBe("ask")
}), }),
) )
@@ -107,7 +107,9 @@ describe("tool.assertExternalDirectory", () => {
) )
if (process.platform === "win32") { if (process.platform === "win32") {
it.instance("normalizes Windows path variants to one glob", () => it.instance(
"normalizes Windows path variants to one glob",
() =>
Effect.gen(function* () { Effect.gen(function* () {
const { requests, ctx } = makeCtx() const { requests, ctx } = makeCtx()
@@ -131,7 +133,9 @@ describe("tool.assertExternalDirectory", () => {
{ git: true }, { git: true },
) )
it.instance("uses drive root glob for root files", () => it.instance(
"uses drive root glob for root files",
() =>
Effect.gen(function* () { Effect.gen(function* () {
const { requests, ctx } = makeCtx() const { requests, ctx } = makeCtx()