Skip to content

feat(management): type mcp_enabled, router_introspection_enabled, cors_origins on APIInfo (0.7.1)#18

Merged
loookashow merged 2 commits into
mainfrom
feat/api-cors-origins-types
Jul 24, 2026
Merged

feat(management): type mcp_enabled, router_introspection_enabled, cors_origins on APIInfo (0.7.1)#18
loookashow merged 2 commits into
mainfrom
feat/api-cors-origins-types

Conversation

@loookashow

Copy link
Copy Markdown
Contributor

Summary

Types three previously-untyped fields on the Management API "API" object and
releases them as a patch (0.7.0 → 0.7.1). Types/tests/docs only — no transport
or behavior change.

What changed

  • APIInfo now types three fields, with defaults for forward/backward
    compatibility with older servers:
    • mcp_enabled: bool — whether the MCP endpoint is exposed (default True)
    • router_introspection_enabled: bool — whether router introspection is
      exposed (default True)
    • cors_origins: list[str] — allowed browser origins for cross-origin reads
      (empty = off, ["*"] = any origin); server-validated and normalized. Covers
      public read traffic only — writes still require a key.
  • Docs: a create_api example using cors_origins in the management-client guide.
  • CHANGELOG + version bump to 0.7.1 (single-sourced in src/foxnose_sdk/_version.py).

Setting these via create_api / update_api already worked (the payload is
passed through) — this only adds the typed fields on the response model.

Testing

  • Full suite green (sync + async clients): create/update pass-through, response
    parsing, omitted-field defaults, and unknown-field tolerance.
  • ruff check + ruff format --check clean on changed files.

Compatibility

Non-breaking. Responses from older servers (without the fields) parse with sane
defaults (CORS off, agent features on); unknown response fields are ignored.

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@loookashow
loookashow merged commit fd36a02 into main Jul 24, 2026
5 checks passed
@loookashow
loookashow deleted the feat/api-cors-origins-types branch July 24, 2026 15:02
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.

1 participant