Skip to content

Commit a83e6b0

Browse files
fix(provider-muse): type skill catalog request failures
AI-assisted; verified with the tests and tools listed above.
1 parent 1f3309b commit a83e6b0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎packages/provider-muse/src/server/adapter.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2036,9 +2036,10 @@ export const makeMuseAdapterV2 = Effect.fn("makeMuseAdapterV2")(function* (
20362036
const mentions = [...text.matchAll(SKILL_MENTION_PATTERN)];
20372037
if (!mentions.length) return undefined;
20382038
// An optional catalog timeout must not close the host needed for the text fallback.
2039-
return yield* Effect.tryPromise(() =>
2040-
host.connection.request("skill/list", { sessionId: nativeSessionId }),
2041-
).pipe(
2039+
return yield* Effect.tryPromise({
2040+
try: () => host.connection.request("skill/list", { sessionId: nativeSessionId }),
2041+
catch: (cause) => protocolError("Muse skill/list failed", cause),
2042+
}).pipe(
20422043
Effect.flatMap((value) => decode(MuseSkillList, value)),
20432044
Effect.map(({ skills }) => {
20442045
const selectors = new Set(skills.map((skill) => skill.selector));

0 commit comments

Comments
 (0)