Skip to content

docs(api): align catalog contract with the AgentEndpoint implementation - #99

Merged
TOMOKI977 merged 2 commits into
mainfrom
docs/98-align-catalog-contract
Oct 6, 2026
Merged

TOMOKI977 merged 2 commits into
mainfrom
docs/98-align-catalog-contract

Conversation

@TOMOKI977

Copy link
Copy Markdown
Contributor

Closes #98

Summary

Aligns the catalog part of the API contract (#77) with the AgentEndpoint implementation in #88, so #88 and #90 can merge as they are for the Stellar Elite demo.

  • AgentEndpoint.list() / get(id: String) replace CatalogEndpoint.listAgents() / getAgent(agentId: int).
  • New Agent catalog section: the two identifiers (metadata id for get, on-chain registryId for createHire and the escrow), ordering, outage behaviour, and the typed AgentCatalogUnavailable exception.
  • AgentSummary and AgentCatalogUnavailable models copied byte for byte from feat(server): add agent catalog endpoint backed by registry metadata #88.
  • Fields the MVP doesn't serve yet (rating, paidHireCount, active, owner, structured skills, explorerUrl, chainDataFresh, input limit) are listed as planned, each with its target issue.
  • HireDetail.agent and the F2, F3, F5 and F7 traceability rows use the new names.

Acceptance criteria

Verification evidence

Notes for reviewers

Replace CatalogEndpoint with AgentEndpoint.list/get as implemented in
#88, document the metadata id and on-chain registryId, copy the
AgentSummary and AgentCatalogUnavailable models, and list the fields the
MVP does not serve yet as planned.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Deploying puls3 with  Cloudflare Pages  Cloudflare Pages

Latest commit: c8b46f1
Status: ✅  Deploy successful!
Preview URL: https://d1873da8.puls3-4lw.pages.dev
Branch Preview URL: https://docs-98-align-catalog-contra.puls3-4lw.pages.dev

View logs

@moises-cisneros moises-cisneros 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.

Approving. I compared the doc against the server code and the models: agent_summary.spy.yaml and agent_catalog_unavailable.spy.yaml in docs/architecture/models/ are identical to the server ones (comments aside), and the endpoint methods, 60s TTL, nullability of wallet? / model? and the dedup by highest registryId match AgentEndpoint / agent_catalog_service. The branch merges cleanly with current main.

Non-blocking:

  • api.md:239 and the comment in puls3_api_exception.spy.yaml:10-11 still list CatalogUnavailable, ChainDataUnavailable and AgentNotFound as catalog codes. api.md:245 explains it, but the spy comment has no such note.
  • HireDetail.agent is resolved by registryId == hire.agentId, and the catalog drops superseded duplicates. The doc does not say what HireDetail.agent is for a hire on a superseded registry id.
  • The docs copy the server .spy.yaml files "exactly", but nothing enforces it, so they can drift.

@TOMOKI977
TOMOKI977 merged commit 34a8032 into main Oct 6, 2026
8 checks passed
@TOMOKI977

Copy link
Copy Markdown
Contributor Author

Merged into main as 34a8032 (squash), which closes #98. Thanks @moises-cisneros for checking the doc against the server models.

Your three non-blocking notes (the catalog codes in the puls3_api_exception.spy.yaml comment, HireDetail.agent for a superseded registry id, and drift between the docs and server .spy.yaml copies) are still open; I'll pick them up in a follow-up.

@TOMOKI977
TOMOKI977 deleted the docs/98-align-catalog-contract branch October 6, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: architecture System design, diagrams, contracts between layers type: docs Documentation deliverable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(api): align catalog contract with the AgentEndpoint implementation

2 participants