MCPcopy Index your code
hub / github.com/anomalyco/opencode / wellKnown

Function wellKnown

packages/opencode/test/config/config.test.ts:212–234  ·  view source on GitHub ↗
(input: {
  authUrl?: string
  config?: unknown
  remoteConfig?: { url: string; headers?: Record<string, string> }
  remote?: unknown
  remoteHtml?: string
  wellKnown?: unknown
})

Source from the content-addressed store, hash-verified

210 })
211
212const wellKnown = (input: {
213 authUrl?: string
214 config?: unknown
215 remoteConfig?: { url: string; headers?: Record<string, string> }
216 remote?: unknown
217 remoteHtml?: string
218 wellKnown?: unknown
219}) => {
220 const seen: { wellKnown?: string; remote?: string; authorization?: string } = {}
221 const client = remoteConfigClient({
222 seen,
223 wellKnown: input.wellKnown ?? {
224 ...(input.config !== undefined ? { config: input.config } : {}),
225 ...(input.remoteConfig !== undefined ? { remote_config: input.remoteConfig } : {}),
226 },
227 remote: input.remote,
228 remoteHtml: input.remoteHtml,
229 })
230 return {
231 seen,
232 it: configIt({ auth: wellKnownAuth(input.authUrl ?? "https://example.com"), client }),
233 }
234}
235
236function withProcessEnv<A, E, R>(key: string, value: string | undefined, effect: Effect.Effect<A, E, R>) {
237 return withProcessEnvs({ [key]: value }, effect)

Callers 1

config.test.tsFile · 0.85

Calls 3

remoteConfigClientFunction · 0.85
configItFunction · 0.85
wellKnownAuthFunction · 0.85

Tested by

no test coverage detected