stablyai/orca · error

[verify-packaged-plugin-resources] bundled plugin index is…

Error message

[verify-packaged-plugin-resources] bundled plugin index is empty or invalid

What it means

Thrown by the packaged plugin resource verifier when the parsed bundled-plugins.json fails structural validation: index.version must equal 1, index.plugins must be an array, and the array must be non-empty. This is a schema check that ensures the plugin index was generated by the correct version of the indexing tool and actually contains at least one plugin.

Solutions

  1. Inspect the actual content of bundled-plugins.json: cat <launchRoot>/bundled-plugins.json | python3 -m json.tool.
  2. If version is wrong, update either the indexing tool to write version 1, or update the check in verify-packaged-plugin-resources.cjs:77 to accept the new version.
  3. If the plugins array is empty, investigate why no plugins were indexed — check the plugin build output and the indexing script's discovery logic.
  4. Re-run the plugin indexing/build step to regenerate a valid bundled-plugins.json.
Defensive patterns

Strategy: type-guard

Type guard

// Validate the bundled plugin index shape before processing.
function isValidPluginIndex(value) {
  return (
    typeof value === 'object' &&
    value !== null &&
    value.version === 1 &&
    Array.isArray(value.plugins) &&
    value.plugins.length > 0
  )
}

Prevention

When it happens

Trigger: bundled-plugins.json was parsed successfully but its shape is wrong: the version field is missing or is not 1; the plugins field is missing, is not an array, or is an empty array. This typically indicates the indexing script that generates bundled-plugins.json was changed, is a different version, or produced no plugins.

Common situations: The plugin indexing tool was updated and now writes version 2 instead of 1; no plugins were found during indexing so the array is empty; the indexing script has a bug that omits the plugins field; a manual edit corrupted the index structure.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/d569019e7a4310f1. Report an issue: GitHub.

Appendix: source

Thrown at config/scripts/verify-packaged-plugin-resources.cjs:78

function readJsonFile(path, label) {
  try {
    return JSON.parse(readFileSync(path, 'utf8'))
  } catch (error) {
    throw new Error(
      `[verify-packaged-plugin-resources] invalid ${label} at ${path}: ${error instanceof Error ? error.message : String(error)}`
    )
  }
}

function verifyPackagedPluginResources(resourcesDir) {
  const launchRoot = join(resourcesDir, 'plugins', 'launch')
  if (!statSync(launchRoot).isDirectory()) {
    throw new Error(`[verify-packaged-plugin-resources] missing launch directory at ${launchRoot}`)
  }
  const index = readJsonFile(join(launchRoot, 'bundled-plugins.json'), 'bundled plugin index')
  readJsonFile(join(launchRoot, 'orca-marketplace.json'), 'marketplace index')
  if (index?.version !== 1 || !Array.isArray(index.plugins) || index.plugins.length === 0) {
    throw new Error('[verify-packaged-plugin-resources] bundled plugin index is empty or invalid')
  }
  const resolvedRoot = resolve(launchRoot)
  for (const entry of index.plugins) {
    if (
      typeof entry?.pluginKey !== 'string' ||
      typeof entry.path !== 'string' ||
      !/^[0-9a-f]{64}$/.test(entry.contentHash)
    ) {
      throw new Error('[verify-packaged-plugin-resources] bundled plugin entry is invalid')
    }
    const pluginRoot = resolve(launchRoot, entry.path)
    const fromRoot = relative(resolvedRoot, pluginRoot)
    if (!fromRoot || fromRoot === '..' || fromRoot.startsWith(`..${sep}`) || isAbsolute(fromRoot)) {
      throw new Error('[verify-packaged-plugin-resources] bundled plugin path escapes launch root')
    }
    const manifest = readJsonFile(join(pluginRoot, 'orca-plugin.json'), 'plugin manifest')
    if (`${manifest.publisher}.${manifest.id}` !== entry.pluginKey) {
      throw new Error(

View on GitHub (pinned to 1136503c6a)