MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / withTracedClient

Function withTracedClient

packages/hosts/mcp/src/tool-server.test.ts:147–154  ·  view source on GitHub ↗
(
  engine: ExecutionEngine<E>,
  fn: (client: Client, spans: RecordedSpan[]) => Promise<void>,
  config?: TestServerConfig<E>,
)

Source from the content-addressed store, hash-verified

145
146/** withClient, but with a recording tracer installed for the whole server. */
147const withTracedClient = async <E extends Cause.YieldableError>(
148 engine: ExecutionEngine<E>,
149 fn: (client: Client, spans: RecordedSpan[]) => Promise<void>,
150 config?: TestServerConfig<E>,
151) => {
152 const { tracer, spans } = makeRecordingTracer();
153 await withClient(engine, NO_CAPS, (client) => fn(client, spans), { ...config, tracer });
154};
155
156const ELICITATION_CAPS: ClientCapabilities = {
157 elicitation: { form: {}, url: {} },

Callers 1

Calls 2

makeRecordingTracerFunction · 0.70
withClientFunction · 0.70

Tested by

no test coverage detected