refactor(install): prefer native plugin install across targets (#609)
Some checks failed
CI / pr-title (push) Has been cancelled
CI / test (push) Has been cancelled
Release PR / release-pr (push) Has been cancelled
Release PR / publish-cli (push) Has been cancelled

Co-authored-by: John Cavanaugh <cavanaug@users.noreply.github.com>
This commit is contained in:
Trevin Chow
2026-04-20 18:47:07 -07:00
committed by GitHub
parent 9497a00d90
commit c2d60b47be
104 changed files with 7073 additions and 7068 deletions

View File

@@ -15,6 +15,24 @@ const compoundEngineeringRoot = path.join(
)
describe("convertClaudeToOpenCode", () => {
test("current compound-engineering output is skills and subagents, not commands", async () => {
const plugin = await loadClaudePlugin(compoundEngineeringRoot)
const bundle = convertClaudeToOpenCode(plugin, {
agentMode: "subagent",
inferTemperature: true,
permissions: "none",
})
expect(bundle.agents.length).toBeGreaterThan(0)
expect(bundle.skillDirs.length).toBeGreaterThan(0)
expect(bundle.commandFiles).toHaveLength(0)
expect(bundle.plugins).toHaveLength(0)
expect(bundle.config.tools).toBeUndefined()
const parsedAgents = bundle.agents.map((agent) => parseFrontmatter(agent.content))
expect(parsedAgents.every((agent) => agent.data.mode === "subagent")).toBe(true)
})
test("from-command mode: map allowedTools to global permission block", async () => {
const plugin = await loadClaudePlugin(fixtureRoot)
const bundle = convertClaudeToOpenCode(plugin, {
@@ -24,6 +42,7 @@ describe("convertClaudeToOpenCode", () => {
})
expect(bundle.config.command).toBeUndefined()
expect(bundle.config.tools).toBeUndefined()
expect(bundle.commandFiles.find((f) => f.name === "workflows:review")).toBeDefined()
expect(bundle.commandFiles.find((f) => f.name === "plan_review")).toBeDefined()
@@ -275,6 +294,7 @@ describe("convertClaudeToOpenCode", () => {
inferTemperature: false,
permissions: "broad",
})
expect(broadBundle.config.tools).toBeUndefined()
expect(broadBundle.config.permission).toEqual({
read: "allow",
write: "allow",