{"record":{"id":"704546c5c31e9c87","repo":"Yeachan-Heo/oh-my-codex","slug":"catalog-manifest-invalid-agents-index","errorCode":null,"errorMessage":"catalog_manifest_invalid:agents[${index}]","messagePattern":"catalog_manifest_invalid:agents\\[(.+?)\\]","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/catalog/schema.ts","lineNumber":93,"sourceCode":"      : undefined;\n\n    if ((entry.status === 'alias' || entry.status === 'merged') && !canonical) {\n      throw new Error(`catalog_manifest_invalid:skills[${index}].canonical`);\n    }\n\n    return {\n      name,\n      category: entry.category as CatalogSkillCategory,\n      status: entry.status as CatalogEntryStatus,\n      canonical,\n      core: entry.core === true,\n      internalRequired: entry.internalRequired === true,\n    };\n  });\n\n  const seenAgents = new Set<string>();\n  const agents: CatalogAgentEntry[] = input.agents.map((entry, index) => {\n    if (!isObject(entry)) throw new Error(`catalog_manifest_invalid:agents[${index}]`);\n    assertNonEmptyString(entry.name, `agents[${index}].name`);\n    assertNonEmptyString(entry.category, `agents[${index}].category`);\n    assertNonEmptyString(entry.status, `agents[${index}].status`);\n\n    if (!AGENT_CATEGORIES.has(entry.category as CatalogAgentCategory)) {\n      throw new Error(`catalog_manifest_invalid:agents[${index}].category`);\n    }\n    if (!ENTRY_STATUSES.has(entry.status as CatalogEntryStatus)) {\n      throw new Error(`catalog_manifest_invalid:agents[${index}].status`);\n    }\n\n    const name = entry.name.trim();\n    if (seenAgents.has(name)) throw new Error(`catalog_manifest_invalid:duplicate_agent:${name}`);\n    seenAgents.add(name);\n\n    const canonical = typeof entry.canonical === 'string' && entry.canonical.trim() !== ''\n      ? entry.canonical.trim()\n      : undefined;","sourceCodeStart":75,"sourceCodeEnd":111,"githubUrl":"https://github.com/Yeachan-Heo/oh-my-codex/blob/3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2/src/catalog/schema.ts#L75-L111","documentation":"Each element of the agents array must be a plain JSON object; this error names the index of the first element that is not (string, number, null, or array). It mirrors the skills[i] object check during the agents mapping loop.","triggerScenarios":"An agents array containing a bare string agent name or null at the reported index.","commonSituations":"Shorthand agent lists or copy-paste from docs that list names without structure.","solutions":["Replace the offending element with a full agent entry {name, category, status}","Regenerate the manifest","Validate JSON in an editor with schema support while editing"],"exampleFix":"// before\n\"agents\": [\"builder\"]\n\n// after\n\"agents\": [ { \"name\": \"builder\", \"category\": \"build\", \"status\": \"active\" } ]","handlingStrategy":"validation","validationCode":"if (!raw.agents.every((a: unknown) => typeof a === 'object' && a !== null && !Array.isArray(a))) { /* fix entries */ }","typeGuard":"const isEntry = (v: unknown): v is Record<string, unknown> => typeof v === 'object' && v !== null && !Array.isArray(v);","tryCatchPattern":null,"preventionTips":["Never use bare string agent names in the manifest","Use shared entry-building helpers when generating"],"tags":["catalog","manifest","validation","agents"],"backgroundTag":"schema-validation-failed","analyzedSha":"3ad79a8a6fe6e95fdbb8c00e40716fffe4011ce2","analyzedAt":"2026-08-27T22:18:39.783Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}