@vectros-ai/mcp-server 0.16.0 → 0.16.1

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/cli.mjs CHANGED
@@ -4493,7 +4493,7 @@ var AuthClient = class {
4493
4493
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/auth/token");
4494
4494
  }
4495
4495
  /**
4496
- * Invite a new member to one of your app contexts by email. Creates a pending user with a pre-resolved access profile (their permissions on accept) and signs an invitation token. This call is idempotent on the combination of context and email: re-inviting the same email in the same context rotates the token and resends the invitation rather than creating a duplicate — this requires the `users:r` and `users:u` scopes in addition to `users:c`, because resending rotates a credential on an existing invitation and invalidates any link already sent. Without them the collision returns 409 instead, with no invitation details and no change to the outstanding invitation. Returns HTTP 201 on a new invite or a successful resend. Returns 409 if that email already belongs to an active or suspended member of the app context, or already has an identity elsewhere in your account (an email can currently belong to only one tenant per account, i.e. your test and live environments cannot share an email). When `sendEmail` is false, the response includes the raw token and a ready-to-use accept link so you can deliver the invitation through your own email provider. Requires the `users:c` scope.
4496
+ * Invite a new member to one of your app contexts by email, OR grant an existing member access to an additional app context by inviting their same email again. Idempotent on the combination of context and email: re-inviting the same email into the SAME context rotates the token and resends the invitation rather than creating a duplicate — this requires the `users:r` and `users:u` scopes in addition to `users:c`, because resending rotates a credential on an existing invitation and invalidates any link already sent. Without them the collision returns 409 instead, with no invitation details and no change to the outstanding invitation. Inviting the SAME email into a DIFFERENT app context in this tenant, where that email already resolves to an existing member: if that member is active AND already has (or, once accepted, will have) a credential that works for the new context's own identity provider, this immediately grants them access to the new context (no email is sent — there is nothing to accept, `emailSent` is false) — this additionally requires the `users:r` scope (no `users:u`, since nothing is mutated), because the response names the existing member's userId, a fact about them your credential could not otherwise learn through this endpoint. If that active member's ONLY existing credential is for a DIFFERENT identity provider than the one the new context uses, a normal, independent invitation is created instead (its own new member id, a real token/accept link) — attaching them silently would leave no way for them to ever actually sign in to that context. If the existing member's original invitation is still pending, this attaches the new context's access to that same outstanding invitation and rotates its token (`users:r`+`users:u`, same as an ordinary resend — both the disclosure and the credential rotation apply here). A SUSPENDED member's email does not get new-context access this way — reactivate them explicitly first. Returns HTTP 201 in every one of those cases. Returns 409 if that email already belongs to an active or suspended member of THIS specific app context, already has a PENDING invitation for THIS specific app context, or resolves to an existing member elsewhere in the tenant and your token lacks the additional scope the grant/attach requires (`users:r`, or `users:r`+`users:u` for the still-pending case). An email that already has an identity in your OTHER tenant (test vs. live) is not a collision either — it creates an additional, independent membership in this tenant for that same identity. When `sendEmail` is false, the response includes the raw token and a ready-to-use accept link so you can deliver the invitation through your own email provider. Requires the `users:c` scope — or, for a credential scoped to a single app context, the `member-lifecycle` capability plus the matching `profiles:c`/`profiles:r`/`profiles:u` grant(s) in that context, as an equally sufficient alternative to every `users:c`/`users:r`/`users:u` requirement in this description.
4497
4497
  *
4498
4498
  * @param {Vectros.CreateInviteRequest} request
4499
4499
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -4564,7 +4564,7 @@ var AuthClient = class {
4564
4564
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/users/invite");
4565
4565
  }
4566
4566
  /**
4567
- * Resend an outstanding invitation, identified by its email and app context. Rotates the invitation token and extends its expiry, then (when `sendEmail` is true) re-delivers the email. Rotating the token invalidates any previously issued link for this invitation, so only the newest link works. The invitee's pending permissions are left unchanged. Because this rotates a credential on an existing invitation, it requires the `users:c`, `users:r` and `users:u` scopes.
4567
+ * Resend an outstanding invitation, identified by its email and app context. Rotates the invitation token and extends its expiry, then (when `sendEmail` is true) re-delivers the email. Rotating the token invalidates any previously issued link for this invitation, so only the newest link works. The invitee's pending permissions are left unchanged. Because this rotates a credential on an existing invitation, it requires the `users:c`, `users:r` and `users:u` scopes — or, for a credential scoped to a single app context, the `member-lifecycle` capability plus the matching `profiles:c`/`profiles:r`/`profiles:u` grant(s) in that context.
4568
4568
  *
4569
4569
  * @param {Vectros.CreateInviteRequest} request
4570
4570
  * @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -5437,7 +5437,21 @@ var DocumentsClient = class {
5437
5437
  return HttpResponsePromise.fromPromise(this.__lookupDocuments(request, requestOptions));
5438
5438
  }
5439
5439
  async __lookupDocuments(request, requestOptions) {
5440
- const { type: type_, field, value, from: from_, to, prefix, startFrom, limit, order, userId, scope } = request;
5440
+ const {
5441
+ type: type_,
5442
+ field,
5443
+ value,
5444
+ from: from_,
5445
+ to,
5446
+ prefix,
5447
+ sortFrom,
5448
+ sortTo,
5449
+ startFrom,
5450
+ limit,
5451
+ order,
5452
+ userId,
5453
+ scope
5454
+ } = request;
5441
5455
  const _queryParams = {
5442
5456
  type: type_,
5443
5457
  field,
@@ -5445,6 +5459,8 @@ var DocumentsClient = class {
5445
5459
  from: from_,
5446
5460
  to,
5447
5461
  prefix,
5462
+ sortFrom,
5463
+ sortTo,
5448
5464
  startFrom,
5449
5465
  limit,
5450
5466
  order: order != null ? order : void 0,
@@ -9254,8 +9270,8 @@ function warnOnSuboptimalKey(key, log) {
9254
9270
 
9255
9271
  // src/build-info.ts
9256
9272
  var BUILD_INFO = {
9257
- mcpServer: true ? "0.16.0" : "dev",
9258
- sdk: true ? "0.41.0" : "dev"
9273
+ mcpServer: true ? "0.16.1" : "dev",
9274
+ sdk: true ? "0.42.0" : "dev"
9259
9275
  };
9260
9276
  function formatBuildInfo() {
9261
9277
  return `vectros-mcp-server ${BUILD_INFO.mcpServer} (sdk ${BUILD_INFO.sdk})`;
@@ -10801,7 +10817,7 @@ var inputSchema19 = {
10801
10817
  var currentIdentity = ({ log, apiKey, environment }) => ({
10802
10818
  name: "current_identity",
10803
10819
  title: "Current identity (tenant + principal scope)",
10804
- description: "Describe the credential the MCP server is operating under. Returns tenantId, environment (staging|production), principalType (root_key|scoped_key|token), principalKeyId, principalLabel, and (for scoped credentials) allowedActions plus dataScope \u2014 the credential's verb+ownership reach as { userId, scopes[] }, where each scope is a `namespace:value` string (e.g. \"org:<uuid>\"). Note: this does not yet include granted_capabilities (member-lifecycle / forensic-read / context-directory-read / delegate-mint) \u2014 a separate reach dimension a scope clause can carry as of API 0.40.0 that /v1/ping does not report yet, so allowedActions+dataScope may understate a credential's true reach. Also reports mcpServerVersion (this server's own package version) and sdkVersion (the bundled @vectros-ai/sdk version) so a caller can tell what build it's talking to. Use this when the user asks 'what can you do here?', 'what tenant am I in?', or 'what version is this?'. Calls GET /v1/ping under the hood.",
10820
+ description: "Describe the credential the MCP server is operating under. Returns tenantId, environment (staging|production), principalType (root_key|scoped_key|token), principalKeyId, principalLabel, and (for scoped credentials) allowedActions plus dataScope \u2014 the credential's verb+ownership reach as { userId, scopes[] }, where each scope is a `namespace:value` string (e.g. \"org:<uuid>\"). Note: this does not yet include granted_capabilities (member-lifecycle / forensic-read / context-directory-read / delegate-mint, as of API 0.40.0, joined by delegate-principal-stamp in 0.42.0) \u2014 a separate reach dimension a scope clause can carry that /v1/ping does not report yet, so allowedActions+dataScope may understate a credential's true reach. Also reports mcpServerVersion (this server's own package version) and sdkVersion (the bundled @vectros-ai/sdk version) so a caller can tell what build it's talking to. Use this when the user asks 'what can you do here?', 'what tenant am I in?', or 'what version is this?'. Calls GET /v1/ping under the hood.",
10805
10821
  inputSchema: inputSchema19,
10806
10822
  handler: async () => {
10807
10823
  try {
@@ -11292,7 +11308,7 @@ var identityResource = ({ log, apiKey, environment }) => ({
11292
11308
  name: "identity",
11293
11309
  uri: "vectros://identity",
11294
11310
  title: "Current identity (tenant + principal scope)",
11295
- description: "The tenant + principal scope the MCP server is authenticated as. Returns the same payload as the `current_identity` tool: status, tenantId, environment, principalType, principalKeyId, principalLabel, (for scoped credentials) allowedActions + dataScope ({ userId, scopes[] }). Note: this does not yet include granted_capabilities (member-lifecycle / forensic-read / context-directory-read / delegate-mint) \u2014 a separate reach dimension a scope clause can carry as of API 0.40.0 that /v1/ping does not report yet, so allowedActions+dataScope may understate a credential's true reach. Also reports mcpServerVersion and sdkVersion (this build's own version and the bundled @vectros-ai/sdk version). The /v1/ping backing call ships the extended shape today; the version fields are always client-derived.",
11311
+ description: "The tenant + principal scope the MCP server is authenticated as. Returns the same payload as the `current_identity` tool: status, tenantId, environment, principalType, principalKeyId, principalLabel, (for scoped credentials) allowedActions + dataScope ({ userId, scopes[] }). Note: this does not yet include granted_capabilities (member-lifecycle / forensic-read / context-directory-read / delegate-mint, as of API 0.40.0, joined by delegate-principal-stamp in 0.42.0) \u2014 a separate reach dimension a scope clause can carry that /v1/ping does not report yet, so allowedActions+dataScope may understate a credential's true reach. Also reports mcpServerVersion and sdkVersion (this build's own version and the bundled @vectros-ai/sdk version). The /v1/ping backing call ships the extended shape today; the version fields are always client-derived.",
11296
11312
  mimeType: "application/json",
11297
11313
  read: async () => {
11298
11314
  const identity = await resolveIdentity({ log, apiKey, environment });