fix(core): stop after declined permissions (#35356)

Co-authored-by: Aiden Cline <63023139+rekram1-node@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot] 2026-07-04 16:17:11 -05:00 committed by GitHub
commit 709af58612
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 190 additions and 24 deletions

View file

@ -31,7 +31,7 @@ const permission = Layer.succeed(
assert: (input) =>
Effect.sync(() => assertions.push(input)).pipe(
Effect.andThen(
input.action === denyAction ? Effect.fail(new PermissionV2.DeniedError({ rules: [] })) : Effect.void,
input.action === denyAction ? Effect.fail(new PermissionV2.BlockedError({ rules: [] })) : Effect.void,
),
),
ask: () => Effect.die("unused"),