MCPcopy Create free account
hub / github.com/TanStack/ai / buildHarnessAdapter

Function buildHarnessAdapter

examples/ts-react-chat/src/sandbox-triage.ts:159–171  ·  view source on GitHub ↗
(
  harness: HarnessName,
  provider: ProviderName,
  grokOptions?: GrokHarnessOptions,
)

Source from the content-addressed store, hash-verified

157
158/** Build the adapter for a harness run, including per-run Grok protocol options. */
159export function buildHarnessAdapter(
160 harness: HarnessName,
161 provider: ProviderName,
162 grokOptions?: GrokHarnessOptions,
163): AnyTextAdapter {
164 if (harness === 'grok') {
165 return grokBuildText(grokOptions?.model ?? 'composer-2.5', {
166 protocol: grokOptions?.protocol ?? 'acp',
167 transport: grokOptions?.transport ?? 'auto',
168 })
169 }
170 return HARNESSES[harness].makeAdapter(provider)
171}
172
173export interface ProviderSpec {
174 label: string

Callers 1

triagePostFunction · 0.85

Calls 1

grokBuildTextFunction · 0.90

Tested by

no test coverage detected