Files
opencode/packages
Developer ff6f032faa refactor(mcp): use Effect-native catch + tryPromise instead of try/catch
Per CLAUDE.md style guide ("Avoid try/catch where possible") and the
opencode Effect rules ("Use Effect.tryPromise for promise-based APIs",
"Use Effect.fnUntraced for internal helpers"), replace the plain
async function + try/catch in listTools with an Effect-native
listToolsTolerant that composes via Effect.tryPromise + Effect.catch.

Also drops the no-op `Effect.map((tools) => tools)` identity in defs(),
and extracts a tiny `wrapAsError` helper to remove the duplicated
"err instanceof Error ? ... : new Error(String(err))" expression.

No behavior change. 20/20 tests still green.
2026-05-09 19:15:36 -04:00
..
2026-05-09 19:33:26 +00:00
2026-05-09 21:56:49 +02:00
2026-05-09 19:33:26 +00:00
2026-05-09 19:33:26 +00:00