Skip to content

feat: ord plugin compat - #212

Draft
PDT42 wants to merge 45 commits into
mainfrom
feat/ord-plugin-compat
Draft

PDT42 wants to merge 45 commits into
mainfrom
feat/ord-plugin-compat

Conversation

@PDT42

@PDT42 PDT42 commented Oct 22, 2026 •

Copy link
Copy Markdown
  • Lazy exposure of compile logic via lib/api.js, symmetric to https://github.com/cap-js/mcp/blob/main/lib/api.js
  • Dropped support for @Core.Links
  • Dropped support for @agent.card, as it was not considered in any other place that needs to resolve the AGENTS.md to use


it("should use the @Core.Links rel=via href as proxy URL on both card.url and supportedInterfaces", () => {
const csn = cds.linked(`
@Core.Links: [{rel: 'via', href: 'https://proxy.example.com/agent'}]

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Why do we need this?

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.

@schiwekM are you using this? We now typically get the actual url via req.headers["x-forwarded-proto"]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We use it because if the CAP service is behind a proxy the wrong URL was advertised before and then Joule made wrong requests. If the url gets replaced by a relative path property that would be ideal and would avoid these workarounds.

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.

Does Joule support relative URLs?

According to A2A:
"For HTTP-based transports, must be a valid absolute HTTPS URL in production"
https://a2a-protocol.org/latest/specification/#446-agentinterface

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.

We noticed the following situation (approuter / dwc approuter):

client --> approuter --> srv (agent)

The agent card will contain the srv url, but the client can only access the approuter. Here we still need a way for the agent to customize the host.

@Akatuoro

Copy link
Copy Markdown
Contributor
> cds.compile.to.a2a(cds.model, { service: 'CatalogService' })
{
  name: 'CatalogService',
  description: 'Agent for CatalogService',
  url: 'https://HOST/a2a/catalog',
  version: '1.0.0',
  protocolVersion: '0.3.0',
  supportedInterfaces: [
    {
      url: 'https://HOST/a2a/catalog',
      protocolBinding: 'JSONRPC',
      protocolVersion: '0.3.0'
    }
  ],

Host is still unresolved when calling cds.compile.to.a2a. This is how we fill it in at the endpoint:

agents/lib/index.js

Lines 166 to 168 in 95bce97

router.get("/.well-known/agent-card.json", (req, res) => {
const proto = req.headers["x-forwarded-proto"]?.split(",")[0].trim() || req.protocol
const url = proxyUrl || `${proto}://${req.get("host")}${req.baseUrl}`

Just noting it. @PDT42 do you know if ORD will fill urls in themselves?

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔍 PR Review — feat: ord plugin compat

🔴 Action required (1 open, 4 total)
CategoryFindingFile
⚙️ CorrectnessAdapter path override is omitted from the base cardlib/index.js:106
⚙️ CorrectnessFeature cards still compile the base service definitionlib/index.js:164
⚙️ CorrectnessSkills are skipped when AGENTS.md has no frontmatterprotocol/agent-card.js:124
⚙️ CorrectnessCompile target cannot resolve the service's AGENTS.mdlib/compile.js:40
🟡 Suggestions (1 open, 4 total)
CategoryFindingFile
⚙️ CorrectnessEmpty Example lines suppress the fallback exampleprotocol/agent-card.js:58
⚙️ CorrectnessChangelog omits SKILL.md as an agent-card sourceCHANGELOG.md:12
⚙️ CorrectnessChangelog claims the compile function is exportedCHANGELOG.md:17
⚙️ CorrectnessChangelog names the wrong Core annotationCHANGELOG.md:13
🟢 Nitpicks (2 open, 4 total)
CategoryFindingFile
✏️ StyleAgent-card JSDoc contains a grammatical typoprotocol/agent-card.js:137
✏️ StyleHelper name misidentifies a directory as a fileprotocol/agent-card.js:121
⚙️ Correctness`serviceUrl` documentation contradicts relative defaultprotocol/agent-card.js:146
✏️ StyleMisleading `compileCallActionSkill` nameprotocol/agent-card.js:51

You're seeing this review as part of a pilot for our new /review+ experience. To help us continuously improve, check the feedback boxes on the comments below or share your thoughts in our Community channel.


PR Bot Information

Version: 1.33.19

  • Correlation ID: 7ff0bd10-d3b9-11f1-94c2-f535e223d455
  • LLM: gpt-5.6-sol
  • File Content Strategy: Full file content
  • Event Trigger: issue_comment.created
  • Experiment Variant: treatment

Comment thread lib/protocol/agent-card.js Resolved
Comment thread lib/protocol/agent-card.js Resolved
Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
Comment thread CHANGELOG.md Resolved
Comment thread lib/compile.js Resolved
Comment thread lib/protocol/agent-card.js Resolved
Comment thread lib/index.js Resolved
@hyperspace-pr-bot hyperspace-pr-bot Bot deleted a comment from PDT42 Oct 29, 2026
Comment thread lib/protocol/agent-card.js Resolved
Comment thread lib/protocol/agent-card.js Resolved
Comment thread lib/index.js Resolved
Comment thread lib/protocol/agent-card.js Resolved
@hyperspace-pr-bot hyperspace-pr-bot Bot deleted a comment from PDT42 Oct 29, 2026
PDT42 and others added 5 commits October 30, 2026 16:30
Co-authored-by: hyperspace-pr-bot[bot] <209611008+hyperspace-pr-bot[bot]@users.noreply.github.com>
Co-authored-by: hyperspace-pr-bot[bot] <209611008+hyperspace-pr-bot[bot]@users.noreply.github.com>

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