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

Function missingEnv

examples/ts-react-chat/src/sandbox-triage.ts:256–275  ·  view source on GitHub ↗
(
  harness: HarnessName,
  provider: ProviderName,
)

Source from the content-addressed store, hash-verified

254
255/** Required env vars (harness + provider) that are not set in process.env. */
256export function missingEnv(
257 harness: HarnessName,
258 provider: ProviderName,
259): Array<string> {
260 // local-process runs the agent on the host with the host's OWN auth — an env
261 // API key, or a `claude login`/`codex login` — so the example requires no key
262 // for it. Sandboxed providers must have a key injected, so it's required.
263 const harnessSpec = HARNESSES[harness]
264 const harnessMissing =
265 provider === 'local'
266 ? []
267 : harnessSpec.envCheck
268 ? harnessSpec.envCheck()
269 : harnessSpec.requiredEnv.filter((key) => !process.env[key])
270 const spec = PROVIDERS[provider]
271 const providerMissing = spec.envCheck
272 ? spec.envCheck()
273 : spec.requiredEnv.filter((key) => !process.env[key])
274 return [...harnessMissing, ...providerMissing]
275}
276
277export interface GitHubIssue {
278 number: number

Callers 2

triagePostFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected