MCPcopy
hub / github.com/anomalyco/opencode / main

Function main

packages/opencode/test/fixture/plug-worker.ts:72–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70}
71
72async function main() {
73 const msg = input()
74 const run = createPlugTask(
75 {
76 mod: msg.mod,
77 global: msg.global,
78 force: msg.force,
79 },
80 deps(msg),
81 )
82
83 const ok = await run(ctx(msg))
84 if (!ok) {
85 throw new Error("Plug task failed")
86 }
87}
88
89await main().catch((err) => {
90 const text = err instanceof Error ? (err.stack ?? err.message) : String(err)

Callers 1

plug-worker.tsFile · 0.70

Calls 5

createPlugTaskFunction · 0.90
inputFunction · 0.70
depsFunction · 0.70
ctxFunction · 0.70
runFunction · 0.50

Tested by

no test coverage detected