Skip to content

feat: agents & api resource agent-card - #550

Draft
PDT42 wants to merge 8 commits into
mainfrom
feat/agents
Draft

PDT42 wants to merge 8 commits into
mainfrom
feat/agents

Conversation

@PDT42

@PDT42 PDT42 commented Sep 10, 2026

Copy link
Copy Markdown

This PR adds support for generating agents metadata as specified by ... This is pure vibe-code right now.

@hyperspace-pr-bot

hyperspace-pr-bot Bot commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


Add ORD Agent Metadata and A2A Agent Card API Resources

New Features

✨ Adds support for ORD agents generation from CAP services annotated with @agent, including linked A2A API resources that expose well-known agent card definitions.

Changes

  • lib/templates/agent.js: Added agent template generation, including ORD ID/title/description resolution, visibility handling, package/group assignment, and exposed API resource references.
  • lib/ord.js: Integrates generated agents into the ORD document and ensures agent packages are retained during pruning.
  • lib/templates/api-resource.js: Adds A2A API resource support with a2a-agent-card resource definitions pointing to /.well-known/agent-card.json; marks A2A resources as beta.
  • lib/constants.js: Introduces @agent, a2a, and agent card resource definition constants, plus CAP protocol mapping for agent.
  • lib/common/utils.js: Adds isAgentService() helper for detecting valid @agent service definitions.
  • lib/protocol-resolver.js: Updates protocol resolution comments and supports plugin-provided protocols such as agent.
  • lib/build.js: Restricts compile tasks to generated /ord/v1/ resource definition URLs, avoiding external/well-known resource URLs.
  • Tests: Adds CSN fixtures and unit coverage for agent generation, A2A resource definitions, compile task extraction, and agent service detection.

Images and Links

ORD Document agents specification
AI Agents and Protocols concept


  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.31.30

  • Summary Prompt: Default Prompt
  • File Content Strategy: Full file content
  • LLM: gpt-5.5
  • Event Trigger: issue_comment.edited
  • Correlation ID: 96cdbe80-ade8-11f1-9d19-f6b0718ddba5
  • Output Template: Default Template

@hyperspace-pr-bot hyperspace-pr-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review has been concluded!

PR Bot Information

Version: 1.31.20

  • Agent Instructions:
  • Correlation ID: a313fd70-acf4-11f1-9991-6afe41736a9b
  • LLM: gpt-5.5
  • File Content Strategy: Full file content
  • Experiment Variant: treatment
  • Event Trigger: pull_request.opened

@PDT42 PDT42 changed the title Feat/agents feat: agents & api resource agent-card Sep 11, 2026
@zongqichen

Copy link
Copy Markdown
Contributor

Hi @PDT42, thank u for contributing. I want to know more context about this pr. If you want, you can schedule a meeting with me and @mlakov. Lets see how can we support you. Or an descriptive issue is also appreciated. Thx

Best,
Zongqi

@PDT42

PDT42 commented Sep 15, 2026 •

Copy link
Copy Markdown
Author

Hi @zongqichen, I am currently in the process of testing this plugin in combination with https://github.com/cap-js/agents. You're probably aware of the problem to resolve. I thought that the integration should probably work just like the one for @cap-js/mcp and didn't expect to encounter any conceptual problems - but did.

I learned that some of my colleagues were looking into the ORD / agents cards issue, so I vibecoded the bits of the generation I required to make the generated documents work with minimal manual adoption and thought to leave this on draft until I know more ... I am currently uncertain who is supposed to take care of compiling; exposing the agents card. The agent card didn't seem to fit too well into the establish discover > compile pattern, meta-data uses. And importing the specific compiler from @cap-js/agents is currently awkward. I am pretty sure, there's a residual issue with the agents card currently being served from a service endpoint that uses a slugified segment based on the service name.

If you'd like, I can close this draft PR here and move the changes to a fork until I know more.

Comment thread lib/templates/api-resource.js Resolved
Comment thread lib/templates/api-resource.js Resolved
Comment thread lib/templates/api-resource.js Resolved
Comment thread lib/templates/api-resource.js Resolved
Comment thread lib/templates/agent.js Resolved
Comment thread lib/templates/api-resource.js Resolved
Comment thread lib/ord.js Resolved
@mlakov
mlakov force-pushed the feat/agents branch 4 times, most recently from 35d4b8a to 4a7e0fa Compare October 29, 2026 09:59
@mlakov

mlakov commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

@PDT42 - there's a problem with the agents plugin related to the registration of compile targets. We need to look into this one.

@PDT42

PDT42 commented Oct 29, 2026

Copy link
Copy Markdown
Author

@PDT42 - there's a problem with the agents plugin related to the registration of compile targets. We need to look into this one.

I am in that process: cap-js/agents#212 - kinda why this is taking so long 🙈

@mlakov
mlakov force-pushed the feat/agents branch 3 times, most recently from 339556b to 595387b Compare October 29, 2026 10:15

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants