feat(plugin): add v2 effect host (#33111)

This commit is contained in:
Dax
2026-06-21 08:05:49 -04:00
committed by GitHub
parent 7a9337da8a
commit c780d7cee7
139 changed files with 3749 additions and 1952 deletions
+3 -5
View File
@@ -59,8 +59,7 @@ describe("SkillV2", () => {
})
const skill = yield* SkillV2.Service
const register = yield* skill.transform()
yield* register((editor) => {
yield* skill.transform((editor) => {
editor.source({ type: "directory", path: AbsolutePath.make(first) })
editor.source({ type: "directory", path: AbsolutePath.make(first) })
editor.source({ type: "directory", path: AbsolutePath.make(second) })
@@ -108,15 +107,14 @@ describe("SkillV2", () => {
urls.set("https://example.test/skills/", [AbsolutePath.make(tmp.path)])
const agents = yield* AgentV2.Service
yield* agents.update((editor) =>
yield* agents.transform((editor) =>
editor.update(AgentV2.ID.make("reviewer"), (agent) => {
agent.permissions.push({ action: "skill", resource: "deploy", effect: "deny" })
}),
)
const skill = yield* SkillV2.Service
const register = yield* skill.transform()
yield* register((editor) => editor.source({ type: "url", url: "https://example.test/skills/" }))
yield* skill.transform((editor) => editor.source({ type: "url", url: "https://example.test/skills/" }))
expect((yield* skill.list()).map((item) => item.name)).toEqual(["deploy"])
expect((yield* skill.list()).map((item) => item.name)).toEqual(["deploy"])