chore: generate
This commit is contained in:
@@ -392,7 +392,12 @@ export const layer = Layer.effect(
|
|||||||
if (!listed) {
|
if (!listed) {
|
||||||
return yield* Effect.fail(new Error("Failed to get tools"))
|
return yield* Effect.fail(new Error("Failed to get tools"))
|
||||||
}
|
}
|
||||||
return { mcpClient, status, defs: listed, instructions: mcpClient.getInstructions()?.trim() } satisfies CreateResult
|
return {
|
||||||
|
mcpClient,
|
||||||
|
status,
|
||||||
|
defs: listed,
|
||||||
|
instructions: mcpClient.getInstructions()?.trim(),
|
||||||
|
} satisfies CreateResult
|
||||||
}).pipe(
|
}).pipe(
|
||||||
Effect.catchCause((cause) =>
|
Effect.catchCause((cause) =>
|
||||||
Effect.tryPromise(() => mcpClient.close()).pipe(Effect.ignore, Effect.andThen(Effect.failCause(cause))),
|
Effect.tryPromise(() => mcpClient.close()).pipe(Effect.ignore, Effect.andThen(Effect.failCause(cause))),
|
||||||
|
|||||||
@@ -168,10 +168,7 @@ const blockingProcessor = Layer.succeed(
|
|||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
function makePrompt(input?: {
|
function makePrompt(input?: { mcpInstructions?: MCP.ServerInstructions[]; processor?: "blocking" }) {
|
||||||
mcpInstructions?: MCP.ServerInstructions[]
|
|
||||||
processor?: "blocking"
|
|
||||||
}) {
|
|
||||||
const deps = Layer.mergeAll(
|
const deps = Layer.mergeAll(
|
||||||
Session.defaultLayer,
|
Session.defaultLayer,
|
||||||
Snapshot.defaultLayer,
|
Snapshot.defaultLayer,
|
||||||
@@ -243,17 +240,11 @@ function makePrompt(input?: {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeHttp(input?: {
|
function makeHttp(input?: { mcpInstructions?: MCP.ServerInstructions[]; processor?: "blocking" }) {
|
||||||
mcpInstructions?: MCP.ServerInstructions[]
|
|
||||||
processor?: "blocking"
|
|
||||||
}) {
|
|
||||||
return Layer.mergeAll(TestLLMServer.layer, makePrompt(input))
|
return Layer.mergeAll(TestLLMServer.layer, makePrompt(input))
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeHttpNoLLMServer(input?: {
|
function makeHttpNoLLMServer(input?: { mcpInstructions?: MCP.ServerInstructions[]; processor?: "blocking" }) {
|
||||||
mcpInstructions?: MCP.ServerInstructions[]
|
|
||||||
processor?: "blocking"
|
|
||||||
}) {
|
|
||||||
return makePrompt(input)
|
return makePrompt(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -537,7 +528,9 @@ it.instance("loop calls LLM and returns assistant message", () =>
|
|||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
|
|
||||||
withMcpInstructions.instance("loop includes MCP instructions in model system context", () =>
|
withMcpInstructions.instance(
|
||||||
|
"loop includes MCP instructions in model system context",
|
||||||
|
() =>
|
||||||
Effect.gen(function* () {
|
Effect.gen(function* () {
|
||||||
const { llm } = yield* useServerConfig(providerCfg)
|
const { llm } = yield* useServerConfig(providerCfg)
|
||||||
const prompt = yield* SessionPrompt.Service
|
const prompt = yield* SessionPrompt.Service
|
||||||
|
|||||||
Reference in New Issue
Block a user