Skip to content

ai-integrations: catalog processor validation for AiResource agent type #4129

Description

@johnmcollier

Summary

Extend the AiResource extensions catalog processor in the ai-integrations workspace to validate agent-specific fields when spec.type: agent, rejecting invalid agent entities at ingestion with actionable errors. Add automated processor accept/reject tests; leave non-agent AiResources unchanged.

This issue corresponds to Jira RHIDP-15868. Field set and processor rules are defined in the OpenSpec change below.

Tasks

  • Extend AIResourceExtensionsProcessor (or equivalent registered processor path) to validate agent-specific fields when spec.type: agent
  • Reject missing/empty/wrong-type spec.instructions with an actionable error naming the field
  • Reject clearly wrong optional agent field shapes (e.g. handoffs not an array, resetToolChoice not a boolean) with actionable errors
  • Accept opaque string[] for handoffs / tools without entity-ref format enforcement
  • Do not add new processor rules for core entity fields such as owner / lifecycle
  • Add processor tests for accept and reject paths; ensure spec.type: skill (and other non-agent) entities are unaffected by agent instructions rules
  • Keep validation error messages free of internal class names / stack traces

Acceptance Criteria

  • Valid agent AiResource entities ingest successfully
  • Invalid agent entities are rejected with actionable processor errors (required field missing/empty/wrong type; invalid optional shapes)
  • Opaque handoffs / tools string arrays are accepted without ref-format checks
  • Non-agent AiResources continue existing extension processor behavior
  • Automated tests cover accept and reject paths
  • OpenSpec ingestion requirements for this story are satisfied

Specifications

All paths below are relative to workspaces/ai-integrations/.

  • openspec/changes/airesource-agent-typed-schema/proposal.md
  • openspec/changes/airesource-agent-typed-schema/design.md (especially D3–D5, D10 local processor precedent)
  • openspec/changes/airesource-agent-typed-schema/tasks.md (Section 5: Catalog processor validation; Section 7 verification as applicable)
  • openspec/changes/airesource-agent-typed-schema/specs/ai-resource-agent-ingestion/spec.md
  • openspec/changes/airesource-agent-typed-schema/specs/ai-resource-agent-schema/spec.md (field set / schema-layer context only)

OpenSpec PR (source of truth for this change): #4090

Out of Scope

Context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions