Repository navigation
v10.13.0
Built on Extension.js 4.1.33.
- The package exports
@extension.dev/mcp/hostedfor running the platform tools on a server.registerHostedToolsadds them to an MCP server instance, andcreateHostedServerbuilds one. Both take a request credential: the caller's token, the platform base, and the projects that token covers. The hosted set isextension_auth(status only),extension_workspace(info, projects and settings),extension_project_create(one project per call),extension_builds,extension_release_statusandextension_release_promote. Login, logout, publish, submit, share links and every local tool stay out of it. No hosted tool takesapiorprojectPath, and a call that passes one is refused before any request is sent. - Under a request credential, the platform tools send that token and read no stored login,
EXTENSION_DEV_TOKENorEXTENSION_DEV_PROJECT. Writing or removing a stored login is refused, and nothing is written to the login store. The local server still readsauth.jsonas before. - Under a request credential, every call to the platform names its project in the
x-extensiondev-projectheader: the project the call passes asprojectwhen the credential covers it, else the first project it covers. One connected-app token can cover several projects, and the platform needs the header to know which one a call is for. A 401 from the platform during the call is reported to the host throughonUnauthorized, so it can ask the client to sign in again. - Under a request credential,
extension_authstatus describes the connection instead of a stored login: it names the project the connection's token is signed in to, and its warning says the connection renews on its own and can be revoked under the project's Settings, Connected apps. It no longer says that CLI tokens last 7 days or that CI must re-mint them. extension_buildswithaction: "rebuild"asks for a workspace owner's approval when the platform requires one, as it does for a rebuild started through a connected app: the first call answersapproval-requiredwith the approval URL and the exact commit and environment the platform resolved, and the same call with thatapprovalId,buildIdset to the full commit sha and the samebuildEnvstarts the run once. A rebuild with anapprovalIdand a short or missing commit is refused before anything is sent. A used approval says the run may already exist and to readaction: "list"first. A rebuild with a CLI login still starts at once.- The project id that platform tools look up for a token is now cached under a hash of the server, the token and the project, never the token itself, and the cache keeps at most 512 entries.