blob: 4cfd5c3e0a843b127fe584e325f99bc5254f6842 (
plain)
1
2
3
4
5
6
7
|
import { Actor } from "@opencode/cloud-core/actor.js"
import { getActor } from "./auth"
export async function withActor<T>(fn: () => T, workspace?: string) {
const actor = await getActor(workspace)
return Actor.provide(actor.type, actor.properties, fn)
}
|