@vectros-ai/mcp-server 0.17.1 → 0.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/server.ts
2
2
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
3
 
4
- // node_modules/@vectros-ai/sdk/dist/index.mjs
4
+ // ../../node_modules/@vectros-ai/sdk/dist/index.mjs
5
5
  var __defProp = Object.defineProperty;
6
6
  var __export = (target, all) => {
7
7
  for (var name in all)
@@ -3521,7 +3521,7 @@ var AuthClient = class {
3521
3521
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/app-contexts/{contextId}");
3522
3522
  }
3523
3523
  /**
3524
- * Updates the name, description, and/or companyName of an app context. This is a partial update: any field you omit (or send as null) keeps its existing value. The `contextId` is immutable and is taken from the URL path, so any `contextId` in the request body is ignored. Requires the `app-contexts:u` scope.
3524
+ * Updates an app context. This is a partial update: any field you omit (or send as null) keeps its existing value. The `contextId` is immutable and is taken from the URL path, so any `contextId` in the request body is ignored. Patchable fields: `name`, `description`, `companyName`; the per-principal metering trio (`meteringAxis`, `principalBurstLimit`, `principalUsageCap` — only takes effect for a partner with the corresponding account-level feature enabled); `readAccessLogDefault` (the PHI read-access-logging context default); and `identityProjectionClaims` (requires the platform provisioning capability on top of the ordinary scope below — see its own field description). Requires the `app-contexts:u` scope.
3525
3525
  *
3526
3526
  * @param {Vectros.UpdateAppContextRequest} request
3527
3527
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -4124,7 +4124,7 @@ var AuthClient = class {
4124
4124
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers/{issuerId}");
4125
4125
  }
4126
4126
  /**
4127
- * Updates the mutable fields of a registered issuer: `subClaim`, `emailClaim`, `userinfoUri`, `capturedClaims`, `restrictedToDomain` (a new non-blank value must already be a VERIFIED domain for your account; an empty string clears it back to domain-less; see `IssuerUpdateRequest.restrictedToDomain` for the full semantics), `status` (`active`/`suspended` — a suspended issuer's tokens are rejected identically to an unregistered issuer at exchange time), and `selfSignupPolicies`. Fields omitted from the body are left unchanged (partial update). `issuer`, `jwksUri`, `audience`, and `contextId` are trust-anchor / routing-pin fields and are immutable via this route — supplying a value that differs from the current registration is rejected with 400; supplying the current value back is a no-op. Rotating a trust anchor requires deleting and re-registering the issuer, which is itself refused while any user is bound through it. **`subClaim` is identity-determining, not merely cosmetic**: it names which verified JWT claim is read as the federated user's identifier, so changing it on an issuer that already has bound users would silently re-identify (or, under self-signup, orphan) every one of them — changing it is therefore refused once any user has bound through this issuer, the same guard `DELETE` already applies, and is only free before the first real login. Requires a root API key or the bootstrap's provisioning capability, gated identically to every other operation on this surface. A credential confined to one app context may only update an issuer registered in that context; naming one registered in another context returns 404, identically to a nonexistent issuerId. A root API key may update any issuer.
4127
+ * Updates the mutable fields of a registered issuer: `subClaim`, `emailClaim`, `userinfoUri`, `capturedClaims`, `restrictedToDomain` (a new non-blank value must already be a VERIFIED domain for your account; an empty string clears it back to domain-less; see `IssuerUpdateRequest.restrictedToDomain` for the full semantics), `status` (`active`/`suspended` — a registration awaiting verification (`pending_verification`) accepts no status change until it is verified; a suspended issuer's tokens are rejected identically to an unregistered issuer at exchange time), and `selfSignupPolicies`. Fields omitted from the body are left unchanged (partial update). `issuer`, `jwksUri`, `audience`, and `contextId` are trust-anchor / routing-pin fields and are immutable via this route — supplying a value that differs from the current registration is rejected with 400; supplying the current value back is a no-op. Rotating a trust anchor requires deleting and re-registering the issuer, which is itself refused while any user is bound through it. **`subClaim` is identity-determining, not merely cosmetic**: it names which verified JWT claim is read as the federated user's identifier, so changing it on an issuer that already has bound users would silently re-identify (or, under self-signup, orphan) every one of them — changing it is therefore refused once any user has bound through this issuer, the same guard `DELETE` already applies, and is only free before the first real login. Requires a root API key or the bootstrap's provisioning capability, gated identically to every other operation on this surface. A credential confined to one app context may only update an issuer registered in that context; naming one registered in another context returns 404, identically to a nonexistent issuerId. A root API key may update any issuer.
4128
4128
  *
4129
4129
  * @param {Vectros.IssuerUpdateRequest} request
4130
4130
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -4317,7 +4317,7 @@ var AuthClient = class {
4317
4317
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers");
4318
4318
  }
4319
4319
  /**
4320
- * Registers a trusted third-party IdP issuer that BYO-IdP token exchange (`POST /v1/auth/token/exchange`) may accept a `subject_token` from. Requires a root API key or the CLI bootstrap's provisioning capability — never an ordinary partner-grantable scope. A credential authorized only via the provisioning capability may register only against the app context it is bound to; naming a different one returns 403. A root API key is unaffected and may register against any of its contexts. Idempotent by `issuerId` within your tenant; the `(issuer, audience)` pair must not already be registered by a different issuerId/tenant. If `issuerId` collides with a registration owned by a different app context than the one you're confined to, the request fails with 400 rather than returning that context's configuration. An app context may have at most one active issuer — deregister the existing one first if you need to replace it. One issuer MAY serve several contexts today, each via its own registration row with a distinct `audience`. Optionally name `restrictedToDomain` to scope this registration's (issuer, audience) uniqueness to a specific VERIFIED domain rather than the bare pair — see that field's own description for the full contract, including why it does NOT protect a shared/consumer-IdP registration with no company-domain population.
4320
+ * Registers a trusted third-party IdP issuer that BYO-IdP token exchange (`POST /v1/auth/token/exchange`) may accept a `subject_token` from. Requires a root API key or the CLI bootstrap's provisioning capability — never an ordinary partner-grantable scope. A credential authorized only via the provisioning capability may register only against the app context it is bound to; naming a different one returns 403. A root API key is unaffected and may register against any of its contexts. A registration without `restrictedToDomain` is created `pending_verification` with a one-time challenge (`verificationClaim`, `verificationNonce`, `verificationExpiresAt`) and accepts no token until you prove you control the issuer with `POST /v1/auth/issuers/{issuerId}/verify`; it claims no `(issuer, audience)` pair until then, so registering never reveals whether another tenant holds one. A registration scoped to an already-verified domain with `restrictedToDomain` is `active` at once. Idempotent by `issuerId` within your tenant. If `issuerId` collides with a registration owned by a different app context than the one you're confined to, the request fails with 400 rather than returning that context's configuration. An app context may have at most one active issuer — deregister the existing one first if you need to replace it. One issuer MAY serve several contexts today, each via its own registration row with a distinct `audience`. Optionally name `restrictedToDomain` to scope this registration's (issuer, audience) uniqueness to a specific VERIFIED domain rather than the bare pair — see that field's own description. A domain-scoped registration proves control of the DOMAIN, not of the issuer itself: it routes only tokens carrying that domain's `hd` claim.
4321
4321
  *
4322
4322
  * @param {Vectros.IssuerRequest} request
4323
4323
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -4383,6 +4383,82 @@ var AuthClient = class {
4383
4383
  }
4384
4384
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/auth/issuers");
4385
4385
  }
4386
+ /**
4387
+ * Proves you administer the IdP application a `pending_verification` registration names, activating it. A registration created without `restrictedToDomain` accepts no tokens until this succeeds. Configure your IdP, with an admin-controlled rule (an Auth0 Action, an Okta inline hook, an Entra claims-mapping policy, a Keycloak protocol mapper), to add the registration's `verificationClaim` to the tokens it issues, set to its `verificationNonce`; sign in once; and send that token here. The `jwksUri` you registered must be exactly the `jwks_uri` your issuer's OpenID Connect discovery document (`<issuer>/.well-known/openid-configuration`) publishes, and the token must verify against that key set — an issuer that publishes no discovery document cannot be verified this way. The token is checked and discarded; it is never stored. The `(issuer, audience)` pair is claimed at this moment, so a pair another registration already holds is refused with 400. A challenge expires 7 days after registration; an expired registration cannot be verified — delete it and register again. Requires a root API key or the bootstrap's provisioning capability, gated identically to every other operation on this surface. A credential confined to one app context may only verify an issuer registered in that context; naming one registered in another context returns 404, identically to a nonexistent issuerId.
4388
+ *
4389
+ * @param {Vectros.IssuerVerifyRequest} request
4390
+ * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
4391
+ *
4392
+ * @throws {@link Vectros.BadRequestError}
4393
+ * @throws {@link Vectros.ForbiddenError}
4394
+ * @throws {@link Vectros.NotFoundError}
4395
+ * @throws {@link Vectros.ConflictError}
4396
+ * @throws {@link Vectros.TooManyRequestsError}
4397
+ *
4398
+ * @example
4399
+ * await client.auth.verifyIssuer({
4400
+ * issuerId: "auth0-prod",
4401
+ * token: "token"
4402
+ * })
4403
+ */
4404
+ verifyIssuer(request, requestOptions) {
4405
+ return HttpResponsePromise.fromPromise(this.__verifyIssuer(request, requestOptions));
4406
+ }
4407
+ async __verifyIssuer(request, requestOptions) {
4408
+ const { issuerId, ..._body } = request;
4409
+ const _authRequest = await this._options.authProvider.getAuthRequest();
4410
+ const _headers = mergeHeaders(
4411
+ _authRequest.headers,
4412
+ this._options?.headers,
4413
+ requestOptions?.headers
4414
+ );
4415
+ const _response = await fetcher({
4416
+ url: url_exports.join(
4417
+ await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
4418
+ `v1/auth/issuers/${url_exports.encodePathParam(issuerId)}/verify`
4419
+ ),
4420
+ method: "POST",
4421
+ headers: _headers,
4422
+ contentType: "application/json",
4423
+ queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
4424
+ requestType: "json",
4425
+ body: _body,
4426
+ timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
4427
+ maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
4428
+ abortSignal: requestOptions?.abortSignal,
4429
+ fetchFn: this._options?.fetch,
4430
+ logging: this._options.logging
4431
+ });
4432
+ if (_response.ok) {
4433
+ return { data: _response.body, rawResponse: _response.rawResponse };
4434
+ }
4435
+ if (_response.error.reason === "status-code") {
4436
+ switch (_response.error.statusCode) {
4437
+ case 400:
4438
+ throw new BadRequestError(_response.error.body, _response.rawResponse);
4439
+ case 403:
4440
+ throw new ForbiddenError(_response.error.body, _response.rawResponse);
4441
+ case 404:
4442
+ throw new NotFoundError(_response.error.body, _response.rawResponse);
4443
+ case 409:
4444
+ throw new ConflictError(_response.error.body, _response.rawResponse);
4445
+ case 429:
4446
+ throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
4447
+ default:
4448
+ throw new VectrosError({
4449
+ statusCode: _response.error.statusCode,
4450
+ body: _response.error.body,
4451
+ rawResponse: _response.rawResponse
4452
+ });
4453
+ }
4454
+ }
4455
+ return handleNonStatusCodeError(
4456
+ _response.error,
4457
+ _response.rawResponse,
4458
+ "POST",
4459
+ "/v1/auth/issuers/{issuerId}/verify"
4460
+ );
4461
+ }
4386
4462
  /**
4387
4463
  * Returns the identity bound to your credential — your account, principal type, key id, and scope details — so you can confirm who you are authenticated as and that the credential is valid. MCP clients use this to render "signed in as ..." in a chat UI without a separate identity endpoint.
4388
4464
  *
@@ -10181,8 +10257,8 @@ function warnOnSuboptimalKey(key, log) {
10181
10257
 
10182
10258
  // src/build-info.ts
10183
10259
  var BUILD_INFO = {
10184
- mcpServer: true ? "0.17.1" : "dev",
10185
- sdk: true ? "0.44.0" : "dev"
10260
+ mcpServer: true ? "0.17.2" : "dev",
10261
+ sdk: true ? "0.45.0" : "dev"
10186
10262
  };
10187
10263
 
10188
10264
  // src/log.ts