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 fabd10c650
commit 07a4c49e30
23 changed files with 2374 additions and 28 deletions
+2
View File
@@ -16,6 +16,7 @@ export class Info extends Schema.Class<Info>("Policy.Info")({
export interface Interface {
readonly load: (statements: Info[]) => EffectRuntime.Effect<void>
readonly evaluate: (action: string, resource: string, fallback: Effect) => EffectRuntime.Effect<Effect>
readonly hasStatements: () => boolean
}
export class Service extends Context.Service<Service, Interface>()("@opencode/v2/Policy") {}
@@ -30,6 +31,7 @@ export const layer = Layer.effect(
load: EffectRuntime.fn("Policy.load")(function* (input) {
statements = input
}),
hasStatements: () => statements.length > 0,
evaluate: EffectRuntime.fn("Policy.evaluate")(function* (action, resource, fallback) {
return (
statements.findLast(