Skip to content

[Feature] Add Agent-IDP, MCP, studio for new openapi - #62

Merged
wangxingjun778 merged 7 commits into
mainfrom
feat/latest_openapi
Sep 2, 2026
Merged

[Feature] Add Agent-IDP, MCP, studio for new openapi#62
wangxingjun778 merged 7 commits into
mainfrom
feat/latest_openapi

Conversation

@wangxingjun778

@wangxingjun778 wangxingjun778 commented Sep 1, 2026

Copy link
Copy Markdown
Member

Features

  • Added OpenAPI-first Agent-IDP support for Ed25519 identity lifecycle, key rotation, pause/resume, token records, OIDC discovery/JWKS, and locally signed JWT issuance via HubApi and ms-hub agent-idp.
  • Completed MCP and Studio OpenAPI support, including Studio listing, variables, hardware/base-image/SDK discovery, hosted MCP listing, protected visibility, and runtime metadata.

Fixes

  • Prevented Studio compat calls from leaking API tokens or connection options into request bodies; per-call credentials now work correctly and Studio logs no longer fail.
  • Fixed Studio cover images, anonymous public Studio access, log pagination, and OpenAPI error mapping for permission, quota, and conflict responses.

Enhancements

  • Added permission-tier guidance for read/write/admin tokens; read-only tokens can log in and rejected writes identify the required tier.
  • Improved MCP discovery with PUT-first negotiation and cached verb fallback; Studio owner listings now return all statuses.

Quality

  • Added Agent-IDP, MCP, and Studio OpenAPI coverage guards, typed response models, CLI tests, and secure local JWK validation.
  • Private JWKs are never stored automatically; explicit key files use owner-only permissions and token issuance outputs only the credential.

Documentation

  • Documented Agent-IDP CLI/SDK workflows and its separation from Agent repository file transfer.
  • Consolidated release news, added the missing v0.3.x history, and folded older releases.

…ssion tiers

Audited the live OpenAPI document (1.1.0+master.20260813) against the client:
of the 23 operations under the MCP and Studios tags, 8 were unimplemented and
several implemented ones had drifted from the spec. Closes the gap and adds a
guard so the next drift fails the suite instead of going unnoticed.

Feature
- Studios: list_studios, list_studio_hardware / _base_images / _sdk_versions,
  and the four plaintext-variable operations; exposed as `ms-hub studio list`,
  `studio variable`, `studio hardware|base-images|sdk-versions`, and
  `ms-hub list --repo-type studio`.
- MCP: HubApi.list_operational_mcp_servers() plus `ms-hub mcp list --hosted`,
  which also unblocks the umbrella SDK delegating its own MCPApi here.
- Studio visibility gains `protected` (app public, code hidden), previously
  inexpressible because visibility was folded into a `private` bool.
- RepoInfo now carries the Studio runtime fields (sdk_type, sdk_version,
  base_image, hardware, mcp_support, runtime) instead of discarding them.
- Token permission tiers: TokenScope annotations, a read-scoped token can log in
  (warning that writes need a higher tier), and a rejected write names the tier
  it requires.

Fix
- The compat layer forwarded `token` / `endpoint` into request bodies, so
  `HubApi().update_studio_settings(..., token=...)` serialised the caller's API
  token into the PATCH body. All Studio shims now split control kwargs from
  business fields.
- `HubApi().get_studio_logs(..., token=...)` raised TypeError and could never
  succeed; a per-call `token=` was silently ignored on every Studio shim.
- `cover_image` was renamed to `coverImage` on the way out and dropped by the
  server, so Studio cover images never applied.
- 403 now separates insufficient permission from an exhausted quota (new
  QuotaExceededError, deliberately not retryable); 409 maps to
  AlreadyExistsError; the OpenAPI string error codes are recognised at all.
- `get_studio` demanded a token for spaces the spec says are public.
- `studio logs` read a `total` field the response never had, so its pagination
  footer never printed.

Enhance
- MCP discovery sends PUT first -- the only verb the spec defines -- and
  remembers which verb a deployment serves, so the loser is tried at most once.
- Listing a Studio owner asks for every status: the endpoint keeps filtering to
  running spaces even with an owner set, so "list my spaces" returned nothing.

Documentation
- README: new Studio/MCP command surface, a Token permission levels section, and
  the SDK method reference.

Testing
- Vendored the spec under tests/data/ and check it against OPERATION_REGISTRY.
- 723 unit tests (881 in mock mode) and 28 integration tests against the live
  service.
The News list had no entry for 0.3.0 or 0.3.1, so it jumped straight from 0.4.0
to 0.2.0 and left the release that took over all four console scripts
undocumented.

- Adds v0.3.0 (unified console scripts, repo/files truncation mitigation,
  get_current_username, agent visibility) and v0.3.1 (upload env var rename with
  deprecation shims, logout wiring, download lock paths, UserInfo and legacy
  compat field mapping), both reconstructed from the commits in each range.
- Condenses v0.4.0 from eleven bullets to nine by merging entries that share a
  root cause: the three compat kwargs defects are one leak, and the two MCP/
  Studio request-shape improvements are one behaviour change.
- Folds v0.2.0 and everything older into the "Older releases" block, so only the
  three current releases are visible by default.
- v0.4.0: fold the second Feature bullet into the OpenAPI-coverage one, join the
  cover_image leak into the compat-kwarg fix, and merge the two small studio
  fixes into the error-handling bullet — nine bullets become six, one per
  category except Feature.
- v0.3.0/v0.3.1: trim wordy phrasing and group Feature items first.
@wangxingjun778 wangxingjun778 changed the title Feat/latest openapi [Feature] Add Agent-IDP, MCP, studio for new openapi Sep 1, 2026
@wangxingjun778
wangxingjun778 merged commit 33b5050 into main Sep 2, 2026
6 checks passed
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