Skip to content

feat: add read-only Swagger Petstore agent examples - #16

Merged
sjungwon03 merged 5 commits into
devfrom
feat/15-swagger-petstore-agent
Jul 29, 2026
Merged

feat: add read-only Swagger Petstore agent examples#16
sjungwon03 merged 5 commits into
devfrom
feat/15-swagger-petstore-agent

Conversation

@sjungwon03

Copy link
Copy Markdown
Member

Summary

Closes #15.

Replace the local-only catalog as the primary integration scenario with a read-only public Swagger Petstore v2 example:

  • Add an injected-fetch PetstoreClient fixed to https://petstore.swagger.io/v2, with GET-only requests, timeout handling, response validation, and tolerant filtering of malformed public-demo records.
  • Add PetstoreServer with exactly three TypeMCP tools: search_available_pets, get_pet, and get_petstore_inventory.
  • Add a deterministic TypeChain workflow that adapts and invokes search_available_pets in-process, then summarizes results without an LLM or MCP transport.
  • Add fixture-backed executable tests and separate manual live smoke scripts.
  • Document the public-demo volatility and the read-only / no-model-provider / no-hosted-transport boundary.

Verification

  • npm ci
  • npm run check — 8 test files, 12 tests; production audit reports 0 vulnerabilities.
  • npm run example:petstore:typemcp:fixture
  • npm run example:petstore:agent:fixture
  • npm run example:petstore:live — actual public GET data observed.
  • npm run example:petstore:agent — actual TypeChain → TypeMCP-adapted tool result observed.
  • git diff --check

Scope and safety

  • No POST, PUT, PATCH, or DELETE request path.
  • No credential/API-key input or environment configuration.
  • CI remains fixture-only; live smoke scripts are manual because Swagger Petstore data is public and mutable.
  • This is deterministic tool orchestration, not a model-driven agent, MCP client, or hosted MCP server.

@sjungwon03 sjungwon03 added the enhancement New feature or request label Jul 29, 2026
@sjungwon03 sjungwon03 self-assigned this Jul 29, 2026

@sjungwon03-ai sjungwon03-ai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

APPROVE at exact head 17af6ce.

All seven review criteria verified against PR diff, CI, and rulesets:

  1. Fixed HTTPS host https://petstore.swagger.io/v2 as a const; GET-only via #getJson; no credential field, no configurable base URL, no write method.
  2. findAvailablePets validates the whole payload is an array first, then tolerantly filters individual malformed records; throws if zero valid records remain — no silent empty result.
  3. PetstoreServer declares exactly search_available_pets, get_pet, get_petstore_inventory with explicit Zod input schemas; test asserts the exact tool name list.
  4. summarizeAvailablePets calls createTypeMcpLangChainTools, finds the adapted tool by name, invokes it, and builds a plain deterministic string summary — no LLM, no MCP transport.
  5. All unit tests use injected fixture fetch; CI verify.yml runs no :live or :agent command; live scripts are separate manual executables documented as smoke demos.
  6. README table, scenario section, and planning doc all match the implemented commands, tool names, and boundaries.
  7. No new dependencies; audit:prod in CI; verify check passed at this exact head SHA.

CI: verify completed success at 17af6ce. Ruleset dev active: 1 approval + verify check required. No open review threads.

Comment thread examples/petstore-client.ts
Comment thread examples/petstore-client.ts
Comment thread examples/typechain-petstore-agent.ts
Comment thread examples/typemcp-petstore-server.ts
@sjungwon03
sjungwon03 merged commit 69f9ee8 into dev Jul 29, 2026
1 check passed
@sjungwon03
sjungwon03 deleted the feat/15-swagger-petstore-agent branch July 29, 2026 02:04
sjungwon03 added a commit that referenced this pull request Jul 29, 2026
* ci: require verified dev-to-main promotions

* fix: pin examples MCP SDK to audited graph (#3)

Co-authored-by: sjungwon03 <>

* fix(deps): adopt TypeMCP 0.2.2 remediation (#7)

* chore: reconcile main release history into dev (#11)

* release: publish verified TypeChain and TypeMCP examples (#1)

Co-authored-by: sjungwon03 <>

* release: promote audited MCP SDK graph to production (#5)

* ci: require verified dev-to-main promotions

* fix: pin examples MCP SDK to audited graph (#3)

Co-authored-by: sjungwon03 <>

---------

Co-authored-by: sjungwon03 <>

* fix: retain published TypeMCP dependency contract

* fix: remove obsolete reconciliation override

* feat: add read-only Swagger Petstore agent examples (#16)

* docs(planning): add Swagger Petstore agent plan

* feat: add read-only Swagger Petstore client

* feat: wrap read-only Petstore API in TypeMCP

* feat: add TypeChain Petstore agent workflow

* feat: add live Swagger Petstore demonstrations

---------

Co-authored-by: sjungwon03 <>
sjungwon03 added a commit that referenced this pull request Jul 29, 2026
* ci: require verified dev-to-main promotions

* fix: pin examples MCP SDK to audited graph (#3)

Co-authored-by: sjungwon03 <>

* fix(deps): adopt TypeMCP 0.2.2 remediation (#7)

* chore: reconcile main release history into dev (#11)

* release: publish verified TypeChain and TypeMCP examples (#1)

Co-authored-by: sjungwon03 <>

* release: promote audited MCP SDK graph to production (#5)

* ci: require verified dev-to-main promotions

* fix: pin examples MCP SDK to audited graph (#3)

Co-authored-by: sjungwon03 <>

---------

Co-authored-by: sjungwon03 <>

* fix: retain published TypeMCP dependency contract

* fix: remove obsolete reconciliation override

* feat: add read-only Swagger Petstore agent examples (#16)

* docs(planning): add Swagger Petstore agent plan

* feat: add read-only Swagger Petstore client

* feat: wrap read-only Petstore API in TypeMCP

* feat: add TypeChain Petstore agent workflow

* feat: add live Swagger Petstore demonstrations

* feat: add real TypeChain Petstore agent factory (#22)

* docs(planning): define real Petstore agent delivery

* feat: add real TypeChain Petstore agent factory

* docs: explain application-owned Petstore agent runtime

---------

Co-authored-by: sjungwon03 <>
sjungwon03 added a commit that referenced this pull request Jul 29, 2026
* ci: require verified dev-to-main promotions

* fix: pin examples MCP SDK to audited graph (#3)

Co-authored-by: sjungwon03 <>

* fix(deps): adopt TypeMCP 0.2.2 remediation (#7)

* chore: reconcile main release history into dev (#11)

* release: publish verified TypeChain and TypeMCP examples (#1)

Co-authored-by: sjungwon03 <>

* release: promote audited MCP SDK graph to production (#5)

* ci: require verified dev-to-main promotions

* fix: pin examples MCP SDK to audited graph (#3)

Co-authored-by: sjungwon03 <>

---------

Co-authored-by: sjungwon03 <>

* fix: retain published TypeMCP dependency contract

* fix: remove obsolete reconciliation override

* feat: add read-only Swagger Petstore agent examples (#16)

* docs(planning): add Swagger Petstore agent plan

* feat: add read-only Swagger Petstore client

* feat: wrap read-only Petstore API in TypeMCP

* feat: add TypeChain Petstore agent workflow

* feat: add live Swagger Petstore demonstrations

* feat: add real TypeChain Petstore agent factory (#22)

* docs(planning): define real Petstore agent delivery

* feat: add real TypeChain Petstore agent factory

* docs: explain application-owned Petstore agent runtime

* refactor: build Petstore TypeMCP HTTP agent example (#28)

* docs: design real Petstore MCP agent example

* docs(planning): detail Petstore MCP agent rewrite

* feat: add loopback Petstore MCP runtime and client

* feat: add TypeChain Petstore MCP agent

* refactor: center examples on Petstore MCP agent

* ci: verify Petstore MCP fixtures

---------

Co-authored-by: sjungwon03 <>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace catalog examples with a read-only Swagger Petstore agent

2 participants