{"record":{"id":"c3b6cdd65787462e","repo":"deepseek-ai/deepseek-harness","slug":"lsp-stdio-servers-must-contain-at-least-one-serve","errorCode":null,"errorMessage":"lsp-stdio: servers must contain at least one server","messagePattern":"lsp-stdio: servers must contain at least one server","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/lsp/lsp-stdio/src/index.ts","lineNumber":128,"sourceCode":"function throwTeardownFailures(results: readonly PromiseSettledResult<void>[], message: string): void {\n  const failures: unknown[] = []\n  for (const result of results) {\n    if (result.status === 'rejected') failures.push(result.reason)\n  }\n  if (failures.length === 1) throw failures[0]\n  if (failures.length > 1) throw new AggregateError(failures, message)\n}\n\n/**\n * Register the configured stdio LSP providers. Resolves every executable at load (after credential\n * scrubbing) before publishing any provider; each process launches lazily on its first matching\n * query.\n * @param ctx - the plugin context carrying `fs`, `lsp`, and `subprocess`.\n * @param config - the resolved plugin configuration (schemastery has filled every default).\n */\nexport async function apply(ctx: Context, config: Config): Promise<void> {\n  const entries = Object.entries(config.servers)\n  if (entries.length === 0) throw new Error('lsp-stdio: servers must contain at least one server')\n\n  const setupAbort = new AbortController()\n  const stopSetupCancellation = ctx.on('internal/plugin', (fiber) => {\n    // An async plugin callback must observe its own disposal before Cordis can\n    // run effect cleanup, because unload otherwise waits for this callback.\n    if (fiber === ctx.fiber && fiber.uid === null) {\n      setupAbort.abort(new Error('lsp-stdio setup disposed'))\n    }\n  })\n\n  // Resolve every server-local setting before registration so a bad later command or bound cannot\n  // publish an earlier provider. Registry-level mapping conflicts are rolled back below.\n  const providers = await (async () => {\n    const lookups = entries.map(async ([providerId, rawConfig]) => {\n      if (providerId.trim() === '') throw new Error('lsp-stdio: server ids must be non-empty strings')\n      const resolved = rawConfig as ResolvedServerConfig\n      validateServerConfig(providerId, resolved)\n      const executable = await ctx.subprocess.resolveExecutable(","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/lsp/lsp-stdio/src/index.ts#L110-L146","documentation":"Plugin-load validation for the lsp-stdio plugin: config.servers was defined but empty. At least one stdio server must be configured for the plugin to contribute anything, so an empty map is rejected loudly at load instead of silently registering no providers.","triggerScenarios":"Thrown at packages/lsp/lsp-stdio/src/index.ts:128 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure at least one server in the lsp-stdio servers config."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}