{"record":{"id":"1a82143e32348c92","repo":"moeru-ai/airi","slug":"extension-entrypoint-is-required-for-runtime-runtime-define","errorCode":null,"errorMessage":"Extension entrypoint is required for runtime \\`${runtime}\\`. Define \\`entrypoints.<runtime>\\` or \\`entrypoints.default\\` in the extension manifest.","messagePattern":"Extension entrypoint is required for runtime \\\\`(.+?)\\\\`\\. Define \\\\`entrypoints\\.<runtime>\\\\` or \\\\`entrypoints\\.default\\\\` in the extension manifest\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/plugin-sdk/src/plugin-host/runtimes/node/loaders/fs.ts","lineNumber":64,"sourceCode":"   * Resolve a manifest entrypoint for the requested runtime.\n   *\n   * Resolution order:\n   * 1) `entrypoints.<runtime>`\n   * 2) `entrypoints.default`\n   */\n  resolveEntrypointFor(manifest: ExtensionManifestV2, options?: ExtensionLoadOptions) {\n    const runtime = options?.runtime ?? 'electron'\n    if (!manifest.engines.runtimes.includes(runtime)) {\n      throw new Error(`Extension \\`${manifest.id}\\` does not support runtime \\`${runtime}\\`.`)\n    }\n\n    const root = options?.cwd ?? cwd()\n    const entrypoint\n      = manifest.entrypoints[runtime]\n        ?? manifest.entrypoints.default\n\n    if (!entrypoint) {\n      throw new Error(''\n        + `Extension entrypoint is required for runtime \\`${runtime}\\`. `\n        + 'Define `entrypoints.<runtime>` or `entrypoints.default` in the extension manifest.',\n      )\n    }\n\n    return isAbsolute(entrypoint) ? entrypoint : join(root, entrypoint)\n  }\n\n  async loadExtensionFor(manifest: ExtensionManifestV2, options?: ExtensionLoadOptions) {\n    const entrypoint = this.resolveEntrypointFor(manifest, options)\n    const extensionModule = await import(entrypoint)\n    return coerceExtensionFromModule(extensionModule)\n  }\n}\n","sourceCodeStart":46,"sourceCodeEnd":79,"githubUrl":"https://github.com/moeru-ai/airi/blob/438a067dde47aa0bdb46c2323d1fe293dc805218/packages/plugin-sdk/src/plugin-host/runtimes/node/loaders/fs.ts#L46-L79","documentation":"resolveEntrypointFor resolves manifest.entrypoints[runtime] ?? manifest.entrypoints.default. If neither exists, there is no executable entry to load for that runtime, so it throws. This is the manifest-shape error as opposed to the compatibility error: the runtime is supported but no entrypoint path was declared.","triggerScenarios":"resolveEntrypointFor with a manifest whose entrypoints object lacks both a key for the resolved runtime and a 'default' key.","commonSituations":"A manifest declaring runtimes but never filling entrypoints; an entrypoint key typo (e.g. 'electorn'); a manifest generated for a different runtime only; hand-written minimal manifests during development.","solutions":["Add entrypoints.default to the manifest pointing at the built entry file.","Add an entrypoints.<runtime> key for the specific runtime being loaded.","Fix key typos in the entrypoints object.","Regenerate the manifest with the extension build tool so entrypoints are populated."],"exampleFix":"// before\n\"entrypoints\": { \"node\": \"./dist/index.js\" } // loading with runtime 'electron'\n// after\n\"entrypoints\": { \"node\": \"./dist/index.js\", \"default\": \"./dist/index.js\" }","handlingStrategy":"validation","validationCode":"const ep = manifest.entrypoints[runtime] ?? manifest.entrypoints.default\nif (!ep) throw new Error(`manifest ${manifest.id} has no entrypoint for ${runtime}`)","typeGuard":null,"tryCatchPattern":"try {\n  const entry = await loader.resolveEntrypointFor(manifest)\n} catch (e) {\n  if (e.message.includes('entrypoint is required')) flagBrokenManifest(manifest.id)\n  else throw e\n}","preventionTips":["Always include entrypoints.default as a fallback in published manifests.","Lint extension manifests with a schema that requires entrypoints.","Watch for key typos in entrypoints; generate them from build output paths."],"tags":["plugin-host","manifest","missing-entrypoint","loader"],"backgroundTag":"missing-required-config-field","analyzedSha":"438a067dde47aa0bdb46c2323d1fe293dc805218","analyzedAt":"2026-09-17T01:14:42.644Z","contentChangedAt":"2026-09-17T01:14:42.644Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}