@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/CHANGELOG.md +9 -0
- package/dist/cli-http.js +82 -6
- package/dist/cli-http.js.map +1 -1
- package/dist/cli-http.mjs +82 -6
- package/dist/cli-http.mjs.map +1 -1
- package/dist/cli.js +82 -6
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +82 -6
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +82 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +82 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -42,7 +42,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
42
42
|
// src/server.ts
|
|
43
43
|
var import_server = require("@modelcontextprotocol/sdk/server/index.js");
|
|
44
44
|
|
|
45
|
-
// node_modules/@vectros-ai/sdk/dist/index.mjs
|
|
45
|
+
// ../../node_modules/@vectros-ai/sdk/dist/index.mjs
|
|
46
46
|
var __defProp2 = Object.defineProperty;
|
|
47
47
|
var __export2 = (target, all) => {
|
|
48
48
|
for (var name in all)
|
|
@@ -3562,7 +3562,7 @@ var AuthClient = class {
|
|
|
3562
3562
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/app-contexts/{contextId}");
|
|
3563
3563
|
}
|
|
3564
3564
|
/**
|
|
3565
|
-
* Updates
|
|
3565
|
+
* 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.
|
|
3566
3566
|
*
|
|
3567
3567
|
* @param {Vectros.UpdateAppContextRequest} request
|
|
3568
3568
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -4165,7 +4165,7 @@ var AuthClient = class {
|
|
|
4165
4165
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers/{issuerId}");
|
|
4166
4166
|
}
|
|
4167
4167
|
/**
|
|
4168
|
-
* 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.
|
|
4168
|
+
* 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.
|
|
4169
4169
|
*
|
|
4170
4170
|
* @param {Vectros.IssuerUpdateRequest} request
|
|
4171
4171
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -4358,7 +4358,7 @@ var AuthClient = class {
|
|
|
4358
4358
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers");
|
|
4359
4359
|
}
|
|
4360
4360
|
/**
|
|
4361
|
-
* 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.
|
|
4361
|
+
* 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.
|
|
4362
4362
|
*
|
|
4363
4363
|
* @param {Vectros.IssuerRequest} request
|
|
4364
4364
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -4424,6 +4424,82 @@ var AuthClient = class {
|
|
|
4424
4424
|
}
|
|
4425
4425
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/auth/issuers");
|
|
4426
4426
|
}
|
|
4427
|
+
/**
|
|
4428
|
+
* 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.
|
|
4429
|
+
*
|
|
4430
|
+
* @param {Vectros.IssuerVerifyRequest} request
|
|
4431
|
+
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4432
|
+
*
|
|
4433
|
+
* @throws {@link Vectros.BadRequestError}
|
|
4434
|
+
* @throws {@link Vectros.ForbiddenError}
|
|
4435
|
+
* @throws {@link Vectros.NotFoundError}
|
|
4436
|
+
* @throws {@link Vectros.ConflictError}
|
|
4437
|
+
* @throws {@link Vectros.TooManyRequestsError}
|
|
4438
|
+
*
|
|
4439
|
+
* @example
|
|
4440
|
+
* await client.auth.verifyIssuer({
|
|
4441
|
+
* issuerId: "auth0-prod",
|
|
4442
|
+
* token: "token"
|
|
4443
|
+
* })
|
|
4444
|
+
*/
|
|
4445
|
+
verifyIssuer(request, requestOptions) {
|
|
4446
|
+
return HttpResponsePromise.fromPromise(this.__verifyIssuer(request, requestOptions));
|
|
4447
|
+
}
|
|
4448
|
+
async __verifyIssuer(request, requestOptions) {
|
|
4449
|
+
const { issuerId, ..._body } = request;
|
|
4450
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
4451
|
+
const _headers = mergeHeaders(
|
|
4452
|
+
_authRequest.headers,
|
|
4453
|
+
this._options?.headers,
|
|
4454
|
+
requestOptions?.headers
|
|
4455
|
+
);
|
|
4456
|
+
const _response = await fetcher({
|
|
4457
|
+
url: url_exports.join(
|
|
4458
|
+
await Supplier.get(this._options.baseUrl) ?? await Supplier.get(this._options.environment),
|
|
4459
|
+
`v1/auth/issuers/${url_exports.encodePathParam(issuerId)}/verify`
|
|
4460
|
+
),
|
|
4461
|
+
method: "POST",
|
|
4462
|
+
headers: _headers,
|
|
4463
|
+
contentType: "application/json",
|
|
4464
|
+
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
4465
|
+
requestType: "json",
|
|
4466
|
+
body: _body,
|
|
4467
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
4468
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
4469
|
+
abortSignal: requestOptions?.abortSignal,
|
|
4470
|
+
fetchFn: this._options?.fetch,
|
|
4471
|
+
logging: this._options.logging
|
|
4472
|
+
});
|
|
4473
|
+
if (_response.ok) {
|
|
4474
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
4475
|
+
}
|
|
4476
|
+
if (_response.error.reason === "status-code") {
|
|
4477
|
+
switch (_response.error.statusCode) {
|
|
4478
|
+
case 400:
|
|
4479
|
+
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
4480
|
+
case 403:
|
|
4481
|
+
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
4482
|
+
case 404:
|
|
4483
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
4484
|
+
case 409:
|
|
4485
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
4486
|
+
case 429:
|
|
4487
|
+
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
4488
|
+
default:
|
|
4489
|
+
throw new VectrosError({
|
|
4490
|
+
statusCode: _response.error.statusCode,
|
|
4491
|
+
body: _response.error.body,
|
|
4492
|
+
rawResponse: _response.rawResponse
|
|
4493
|
+
});
|
|
4494
|
+
}
|
|
4495
|
+
}
|
|
4496
|
+
return handleNonStatusCodeError(
|
|
4497
|
+
_response.error,
|
|
4498
|
+
_response.rawResponse,
|
|
4499
|
+
"POST",
|
|
4500
|
+
"/v1/auth/issuers/{issuerId}/verify"
|
|
4501
|
+
);
|
|
4502
|
+
}
|
|
4427
4503
|
/**
|
|
4428
4504
|
* 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.
|
|
4429
4505
|
*
|
|
@@ -10217,8 +10293,8 @@ function warnOnSuboptimalKey(key, log) {
|
|
|
10217
10293
|
|
|
10218
10294
|
// src/build-info.ts
|
|
10219
10295
|
var BUILD_INFO = {
|
|
10220
|
-
mcpServer: true ? "0.17.
|
|
10221
|
-
sdk: true ? "0.
|
|
10296
|
+
mcpServer: true ? "0.17.2" : "dev",
|
|
10297
|
+
sdk: true ? "0.45.0" : "dev"
|
|
10222
10298
|
};
|
|
10223
10299
|
|
|
10224
10300
|
// src/log.ts
|