feat(#4128): add AiResource agent typed schema - #4164
feat(#4128): add AiResource agent typed schema#4164fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Add AgentAiResourceEntityV1alpha1 types, KindValidator, type guard, JSON schema, example fixtures, and unit tests for the agent-shaped AiResource entity (spec.type: 'agent'). Implementation follows the upstream skill/rule discriminated-union pattern from @backstage/catalog-model. Agent entities require spec.instructions (non-empty string) and support optional fields per the design D3 mapping: handoffDescription, model, handoffs, tools, toolUseBehavior, resetToolChoice, modelSettings (temperature, maxTokens, toolChoice), and outputSchema. Changes: - plugins/ai-experience-common/src/agent/: new AgentAiResource types, validator, type guard, and JSON schema - examples/ai-resource-agents.yaml: router + specialist multi-agent handoff example demonstrating required and optional fields - examples/ai-resources-oci-skills.yaml: fix plural spec.type 'skills' -> 'skill' (D8) - app-config.yaml: wire agent example into catalog locations - report.api.md: regenerated with new public exports No @openai/agents-core dependency; opaque string[] for handoffs/tools (no entity-ref format enforcement). Closes #4128 Assisted-by: Claude Opus 4.6
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4164 +/- ##
=======================================
Coverage 58.12% 58.12%
=======================================
Files 2422 2423 +1
Lines 96490 96502 +12
Branches 26844 26849 +5
=======================================
+ Hits 56080 56092 +12
+ Misses 40213 40206 -7
- Partials 197 204 +7
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
Changed Packages
|
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 3:26 PM UTC · Completed 3:41 PM UTC |
ReviewFindingsMedium
Low
|



Add AgentAiResourceEntityV1alpha1 types, KindValidator, type guard, JSON schema, example fixtures, and unit tests for the agent-shaped AiResource entity (spec.type: 'agent').
Implementation follows the upstream skill/rule discriminated-union pattern from @backstage/catalog-model. Agent entities require spec.instructions (non-empty string) and support optional fields per the design D3 mapping: handoffDescription, model, handoffs, tools, toolUseBehavior, resetToolChoice, modelSettings (temperature, maxTokens, toolChoice), and outputSchema.
Changes:
validator, type guard, and JSON schema
handoff example demonstrating required and optional fields
'skills' -> 'skill' (D8)
No @openai/agents-core dependency; opaque string[] for handoffs/tools (no entity-ref format enforcement).
Assisted-by: Claude Opus 4.6
Closes #4128
Post-script verification
agent/4128-airesource-agent-schema)bb5785cf9f6139b82812b9825cf35738d216944b..HEAD)