@vectros-ai/mcp-server 0.14.0 → 0.15.0
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 +23 -0
- package/README.md +2 -2
- package/dist/cli-http.js +118 -62
- package/dist/cli-http.js.map +1 -1
- package/dist/cli-http.mjs +118 -62
- package/dist/cli-http.mjs.map +1 -1
- package/dist/cli.js +118 -62
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +118 -62
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +118 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +118 -62
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/cli-http.mjs
CHANGED
|
@@ -2824,7 +2824,7 @@ var AuthClient = class {
|
|
|
2824
2824
|
);
|
|
2825
2825
|
}
|
|
2826
2826
|
/**
|
|
2827
|
-
* Creates a new access profile under the given app context. This call is idempotent by `principalId`: if a profile with the same `principalId` already exists, the existing profile is returned (with status 200) instead of creating a duplicate. The response's `created` field (and the HTTP status — 201 when created, 200 when an existing profile was returned) tells the two apart. To overwrite an existing profile's `scopes`/`roleId`, `identityOverrides`, and `status` instead of returning it unchanged, set `?upsert=true` (this also requires the `profiles:u` scope, and applies the same `identityOverrides` bounds the update endpoint documents — a scoped credential may not repoint or clear an identity value it does not itself hold). You must provide exactly one of `scopes` (an inline list of scopes) or `roleId` (a reference to a role); supplying both, or neither, is rejected. `identityOverrides` is keyed by ownership namespace in `scope:<namespace>` form — `scope:org` and `scope:client` for the reserved namespaces, or any namespace you have registered — and may name at most two; any other key (including the account identifier or `userId`) is rejected. If you use a scoped credential, the profile's effective scopes may not exceed your own; a root API key (`sk_`) is exempt. Requires the `profiles:c` scope.
|
|
2827
|
+
* Creates a new access profile under the given app context. This call is idempotent by `principalId`: if a profile with the same `principalId` already exists, the existing profile is returned (with status 200) instead of creating a duplicate. The response's `created` field (and the HTTP status — 201 when created, 200 when an existing profile was returned) tells the two apart. To overwrite an existing profile's `scopes`/`roleId`, `identityOverrides`, and `status` instead of returning it unchanged, set `?upsert=true` (this also requires the `profiles:u` scope, and applies the same `identityOverrides` bounds the update endpoint documents — a scoped credential may not repoint or clear an identity value it does not itself hold). The `principalId` must name a principal that already exists: a `usr_` principal must be a live user in your tenant, so create the user before granting it a profile. A `usr_` id that names no such user is rejected, and no profile is created. `key_` principals are not checked this way. You must provide exactly one of `scopes` (an inline list of scopes) or `roleId` (a reference to a role); supplying both, or neither, is rejected. `identityOverrides` is keyed by ownership namespace in `scope:<namespace>` form — `scope:org` and `scope:client` for the reserved namespaces, or any namespace you have registered — and may name at most two; any other key (including the account identifier or `userId`) is rejected. If you use a scoped credential, the profile's effective scopes may not exceed your own; a root API key (`sk_`) is exempt. Requires the `profiles:c` scope.
|
|
2828
2828
|
*
|
|
2829
2829
|
* @param {Vectros.CreateAccessProfileRequest} request
|
|
2830
2830
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -3925,7 +3925,7 @@ var AuthClient = class {
|
|
|
3925
3925
|
);
|
|
3926
3926
|
}
|
|
3927
3927
|
/**
|
|
3928
|
-
* Returns full usage detail for the requested calendar month, broken down by category (search, documents, and records) with per-category credit estimates and a split between your live and test environments. Defaults to the current month when `year` and `month` are omitted. Requires the `billing:r` scope on scoped tokens; API keys always have access.
|
|
3928
|
+
* Returns full usage detail for the requested calendar month, broken down by category (search, documents, and records) with per-category credit estimates and a split between your live and test environments. Defaults to the current month when `year` and `month` are omitted. Requires the `billing:r` scope on scoped tokens; API keys always have access. **A token confined to a single app context sees only that context's usage**: totals, the environment split, and the `contexts` breakdown narrow to it, and the environment your context is not bound to is omitted (`null`), not zeroed. Only a token with cross-context reach sees your full account-wide totals. Two exceptions to the narrowing, since they have no per-context breakdown to narrow to: `reads.calls.used`/`reads.dataOut.bytes` (metered per account, not per context) read as `0` for a confined token rather than a narrowed figure — the corresponding overage-credit charge fields narrow correctly; and `credits.limit` stays your whole plan's ceiling, so `credits.remaining` may overstate the account's true remaining room.
|
|
3929
3929
|
*
|
|
3930
3930
|
* @param {Vectros.GetUsageRequest} request
|
|
3931
3931
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -3988,7 +3988,7 @@ var AuthClient = class {
|
|
|
3988
3988
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/usage");
|
|
3989
3989
|
}
|
|
3990
3990
|
/**
|
|
3991
|
-
* Retrieves a single registered issuer by issuerId. Requires a root API key or the bootstrap's provisioning capability.
|
|
3991
|
+
* Retrieves a single registered issuer by issuerId. Requires a root API key or the bootstrap's provisioning capability. A credential confined to one app context sees only an issuer registered in that context; naming one registered in another context returns 404, identically to a nonexistent issuerId. A root API key sees every context.
|
|
3992
3992
|
*
|
|
3993
3993
|
* @param {Vectros.GetIssuerRequest} request
|
|
3994
3994
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -4046,13 +4046,14 @@ var AuthClient = class {
|
|
|
4046
4046
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers/{issuerId}");
|
|
4047
4047
|
}
|
|
4048
4048
|
/**
|
|
4049
|
-
* Deregisters a trusted third-party IdP issuer. Requires a root API key or the bootstrap's provisioning capability.
|
|
4049
|
+
* Deregisters a trusted third-party IdP issuer. Requires a root API key or the bootstrap's provisioning capability. A credential confined to one app context may only deregister an issuer registered in that context; naming one registered in another context returns 404, identically to a nonexistent issuerId. A root API key may deregister any issuer. Refused if any user account was ever created or matched via this issuer (by a prior self-signup or accepted invite, through `POST /v1/auth/token/exchange`) — that access cannot be silently orphaned. Deactivate the affected users first if you intend to cut off their access, or register a replacement issuer before removing this one. An issuer that has never been used for an exchange (no bound users yet) can always be deregistered.
|
|
4050
4050
|
*
|
|
4051
4051
|
* @param {Vectros.DeleteIssuerRequest} request
|
|
4052
4052
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
4053
4053
|
*
|
|
4054
4054
|
* @throws {@link Vectros.ForbiddenError}
|
|
4055
4055
|
* @throws {@link Vectros.NotFoundError}
|
|
4056
|
+
* @throws {@link Vectros.ConflictError}
|
|
4056
4057
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
4057
4058
|
*
|
|
4058
4059
|
* @example
|
|
@@ -4094,6 +4095,8 @@ var AuthClient = class {
|
|
|
4094
4095
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
4095
4096
|
case 404:
|
|
4096
4097
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
4098
|
+
case 409:
|
|
4099
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
4097
4100
|
case 429:
|
|
4098
4101
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
4099
4102
|
default:
|
|
@@ -4112,7 +4115,7 @@ var AuthClient = class {
|
|
|
4112
4115
|
);
|
|
4113
4116
|
}
|
|
4114
4117
|
/**
|
|
4115
|
-
* Returns the issuers registered in your tenant. Requires a root API key or the bootstrap's provisioning capability. Returns a `{data, nextCursor}` envelope.
|
|
4118
|
+
* Returns the issuers registered in your tenant. Requires a root API key or the bootstrap's provisioning capability. A credential confined to one app context sees only the issuers registered in that context; a root API key sees every context. Returns a `{data, nextCursor}` envelope.
|
|
4116
4119
|
*
|
|
4117
4120
|
* @param {Vectros.ListIssuersRequest} request
|
|
4118
4121
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -4169,7 +4172,7 @@ var AuthClient = class {
|
|
|
4169
4172
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers");
|
|
4170
4173
|
}
|
|
4171
4174
|
/**
|
|
4172
|
-
* 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. Idempotent by `issuerId` within your tenant; the `(issuer, audience)` pair must not already be registered by a different issuerId/tenant.
|
|
4175
|
+
* 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. Idempotent by `issuerId` within your tenant; the `(issuer, audience)` pair must not already be registered by a different issuerId/tenant. 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`.
|
|
4173
4176
|
*
|
|
4174
4177
|
* @param {Vectros.IssuerRequest} request
|
|
4175
4178
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -4280,7 +4283,7 @@ var AuthClient = class {
|
|
|
4280
4283
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/ping");
|
|
4281
4284
|
}
|
|
4282
4285
|
/**
|
|
4283
|
-
* Returns the access profiles for the given principal across
|
|
4286
|
+
* Returns the access profiles for the given principal. Looking up your OWN principal — or holding the `context-directory-read` capability — returns the profiles across ALL of your contexts, letting you answer questions like "which apps does this user have access to?". A context-bound credential looking up a DIFFERENT principal instead sees only that principal's profile in your credential's own context (at most one result), never across contexts it has no authority over. Results are always confined to your account. Requires the `profiles:r` scope.
|
|
4284
4287
|
*
|
|
4285
4288
|
* @param {Vectros.ListProfilesForPrincipalRequest} request
|
|
4286
4289
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -4559,7 +4562,7 @@ var AuthClient = class {
|
|
|
4559
4562
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/users/invite/resend");
|
|
4560
4563
|
}
|
|
4561
4564
|
/**
|
|
4562
|
-
* RFC 8693 OAuth 2.0 Token Exchange. Trades a JWT issued by a third-party identity provider you've registered (`POST /v1/auth/issuers`) for a Vectros `st_*` scoped bearer token — no Vectros credential required to call this endpoint. The exchanged token's scope is resolved entirely server-side from the matched user's access profile; this endpoint accepts no caller-supplied scope, resource, or audience parameter (RFC 8693 §2.1's `resource`/`audience`/`scope` are not used in v1 — the registered `(issuer, audience)` pair alone pins the target tenant and app context). On a first-time login (no existing Vectros identity for this subject), two opt-in binding paths exist: `invite_token` (a `PENDING` sub-user invitation), and — if the registration declares one or more self-signup policies — `signup_type` (a brand-new user is created and bound to the policy's configured role). If `invite_token` is present at all, it is the ONLY path tried — a failed invite never falls through to self-signup. Neither field is required for a subject with an existing identity. Uses the OAuth-standard error envelope (`{"error":..., "error_description":...}`, RFC 6749 §5.2), NOT this API's usual `{"message":...}` shape — its client is generic OAuth tooling, not the Vectros SDK.
|
|
4565
|
+
* RFC 8693 OAuth 2.0 Token Exchange. Trades a JWT issued by a third-party identity provider you've registered (`POST /v1/auth/issuers`) for a Vectros `st_*` scoped bearer token — no Vectros credential required to call this endpoint. The exchanged token's scope is resolved entirely server-side from the matched user's access profile; this endpoint accepts no caller-supplied scope, resource, or audience parameter (RFC 8693 §2.1's `resource`/`audience`/`scope` are not used in v1 — the registered `(issuer, audience)` pair alone pins the target tenant and app context). On a first-time login (no existing Vectros identity for this subject), two opt-in binding paths exist: `invite_token` (a `PENDING` sub-user invitation), and — if the registration declares one or more self-signup policies — `signup_type` (a brand-new user is created and bound to the policy's configured role). If `invite_token` is present at all, it is the ONLY path tried — a failed invite never falls through to self-signup. Neither field is required for a subject with an existing identity. If your issuer is registered against more than one app context (each via its own audience), `context_id` selects which one to target; omit it when your token's `aud` claim matches only one registered context — the common case, unaffected by this field. Uses the OAuth-standard error envelope (`{"error":..., "error_description":...}`, RFC 6749 §5.2), NOT this API's usual `{"message":...}` shape — its client is generic OAuth tooling, not the Vectros SDK.
|
|
4563
4566
|
*
|
|
4564
4567
|
* @param {Vectros.TokenExchangeRequest} request
|
|
4565
4568
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -6101,6 +6104,7 @@ var IdentityClient = class {
|
|
|
6101
6104
|
* @example
|
|
6102
6105
|
* await client.identity.listEntities({
|
|
6103
6106
|
* namespace: "team",
|
|
6107
|
+
* contextId: "myapp",
|
|
6104
6108
|
* startFrom: "b3BhcXVlLWN1cnNvci1mcm9tLXRoZS1wcmV2aW91cy1wYWdl"
|
|
6105
6109
|
* })
|
|
6106
6110
|
*/
|
|
@@ -6110,6 +6114,7 @@ var IdentityClient = class {
|
|
|
6110
6114
|
async __listEntities(request, requestOptions) {
|
|
6111
6115
|
const {
|
|
6112
6116
|
namespace,
|
|
6117
|
+
contextId,
|
|
6113
6118
|
userId,
|
|
6114
6119
|
externalId,
|
|
6115
6120
|
scope,
|
|
@@ -6124,6 +6129,7 @@ var IdentityClient = class {
|
|
|
6124
6129
|
limit
|
|
6125
6130
|
} = request;
|
|
6126
6131
|
const _queryParams = {
|
|
6132
|
+
contextId,
|
|
6127
6133
|
userId,
|
|
6128
6134
|
externalId,
|
|
6129
6135
|
scope,
|
|
@@ -6182,6 +6188,7 @@ var IdentityClient = class {
|
|
|
6182
6188
|
* @example
|
|
6183
6189
|
* await client.identity.createEntity({
|
|
6184
6190
|
* namespace: "team",
|
|
6191
|
+
* contextId: "myapp",
|
|
6185
6192
|
* body: {
|
|
6186
6193
|
* externalId: "team_eng_platform"
|
|
6187
6194
|
* }
|
|
@@ -6191,9 +6198,10 @@ var IdentityClient = class {
|
|
|
6191
6198
|
return HttpResponsePromise.fromPromise(this.__createEntity(request, requestOptions));
|
|
6192
6199
|
}
|
|
6193
6200
|
async __createEntity(request, requestOptions) {
|
|
6194
|
-
const { namespace, upsert, body: _body } = request;
|
|
6201
|
+
const { namespace, upsert, contextId, body: _body } = request;
|
|
6195
6202
|
const _queryParams = {
|
|
6196
|
-
upsert
|
|
6203
|
+
upsert,
|
|
6204
|
+
contextId
|
|
6197
6205
|
};
|
|
6198
6206
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6199
6207
|
const _headers = mergeHeaders(
|
|
@@ -6250,14 +6258,18 @@ var IdentityClient = class {
|
|
|
6250
6258
|
* @example
|
|
6251
6259
|
* await client.identity.getEntity({
|
|
6252
6260
|
* namespace: "team",
|
|
6253
|
-
* id: "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
|
|
6261
|
+
* id: "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
|
|
6262
|
+
* contextId: "myapp"
|
|
6254
6263
|
* })
|
|
6255
6264
|
*/
|
|
6256
6265
|
getEntity(request, requestOptions) {
|
|
6257
6266
|
return HttpResponsePromise.fromPromise(this.__getEntity(request, requestOptions));
|
|
6258
6267
|
}
|
|
6259
6268
|
async __getEntity(request, requestOptions) {
|
|
6260
|
-
const { namespace, id } = request;
|
|
6269
|
+
const { namespace, id, contextId } = request;
|
|
6270
|
+
const _queryParams = {
|
|
6271
|
+
contextId
|
|
6272
|
+
};
|
|
6261
6273
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6262
6274
|
const _headers = mergeHeaders(
|
|
6263
6275
|
_authRequest.headers,
|
|
@@ -6271,7 +6283,7 @@ var IdentityClient = class {
|
|
|
6271
6283
|
),
|
|
6272
6284
|
method: "GET",
|
|
6273
6285
|
headers: _headers,
|
|
6274
|
-
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
6286
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
6275
6287
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
6276
6288
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
6277
6289
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -6308,6 +6320,7 @@ var IdentityClient = class {
|
|
|
6308
6320
|
* await client.identity.updateEntity({
|
|
6309
6321
|
* namespace: "team",
|
|
6310
6322
|
* id: "id",
|
|
6323
|
+
* contextId: "myapp",
|
|
6311
6324
|
* body: {
|
|
6312
6325
|
* externalId: "team_eng_platform"
|
|
6313
6326
|
* }
|
|
@@ -6317,7 +6330,10 @@ var IdentityClient = class {
|
|
|
6317
6330
|
return HttpResponsePromise.fromPromise(this.__updateEntity(request, requestOptions));
|
|
6318
6331
|
}
|
|
6319
6332
|
async __updateEntity(request, requestOptions) {
|
|
6320
|
-
const { namespace, id, body: _body } = request;
|
|
6333
|
+
const { namespace, id, contextId, body: _body } = request;
|
|
6334
|
+
const _queryParams = {
|
|
6335
|
+
contextId
|
|
6336
|
+
};
|
|
6321
6337
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6322
6338
|
const _headers = mergeHeaders(
|
|
6323
6339
|
_authRequest.headers,
|
|
@@ -6332,7 +6348,7 @@ var IdentityClient = class {
|
|
|
6332
6348
|
method: "PUT",
|
|
6333
6349
|
headers: _headers,
|
|
6334
6350
|
contentType: "application/json",
|
|
6335
|
-
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
6351
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
6336
6352
|
requestType: "json",
|
|
6337
6353
|
body: _body,
|
|
6338
6354
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
@@ -6372,14 +6388,18 @@ var IdentityClient = class {
|
|
|
6372
6388
|
* @example
|
|
6373
6389
|
* await client.identity.deleteEntity({
|
|
6374
6390
|
* namespace: "team",
|
|
6375
|
-
* id: "id"
|
|
6391
|
+
* id: "id",
|
|
6392
|
+
* contextId: "myapp"
|
|
6376
6393
|
* })
|
|
6377
6394
|
*/
|
|
6378
6395
|
deleteEntity(request, requestOptions) {
|
|
6379
6396
|
return HttpResponsePromise.fromPromise(this.__deleteEntity(request, requestOptions));
|
|
6380
6397
|
}
|
|
6381
6398
|
async __deleteEntity(request, requestOptions) {
|
|
6382
|
-
const { namespace, id } = request;
|
|
6399
|
+
const { namespace, id, contextId } = request;
|
|
6400
|
+
const _queryParams = {
|
|
6401
|
+
contextId
|
|
6402
|
+
};
|
|
6383
6403
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6384
6404
|
const _headers = mergeHeaders(
|
|
6385
6405
|
_authRequest.headers,
|
|
@@ -6393,7 +6413,7 @@ var IdentityClient = class {
|
|
|
6393
6413
|
),
|
|
6394
6414
|
method: "DELETE",
|
|
6395
6415
|
headers: _headers,
|
|
6396
|
-
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
6416
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
6397
6417
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
6398
6418
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
6399
6419
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -6436,6 +6456,7 @@ var IdentityClient = class {
|
|
|
6436
6456
|
* @example
|
|
6437
6457
|
* await client.identity.lookupEntities({
|
|
6438
6458
|
* namespace: "team",
|
|
6459
|
+
* contextId: "myapp",
|
|
6439
6460
|
* body: {
|
|
6440
6461
|
* type: "person_v1",
|
|
6441
6462
|
* field: "ssn"
|
|
@@ -6446,7 +6467,10 @@ var IdentityClient = class {
|
|
|
6446
6467
|
return HttpResponsePromise.fromPromise(this.__lookupEntities(request, requestOptions));
|
|
6447
6468
|
}
|
|
6448
6469
|
async __lookupEntities(request, requestOptions) {
|
|
6449
|
-
const { namespace, body: _body } = request;
|
|
6470
|
+
const { namespace, contextId, body: _body } = request;
|
|
6471
|
+
const _queryParams = {
|
|
6472
|
+
contextId
|
|
6473
|
+
};
|
|
6450
6474
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6451
6475
|
const _headers = mergeHeaders(
|
|
6452
6476
|
_authRequest.headers,
|
|
@@ -6461,7 +6485,7 @@ var IdentityClient = class {
|
|
|
6461
6485
|
method: "POST",
|
|
6462
6486
|
headers: _headers,
|
|
6463
6487
|
contentType: "application/json",
|
|
6464
|
-
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
6488
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
6465
6489
|
requestType: "json",
|
|
6466
6490
|
body: _body,
|
|
6467
6491
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
@@ -6505,15 +6529,17 @@ var IdentityClient = class {
|
|
|
6505
6529
|
* @example
|
|
6506
6530
|
* await client.identity.getEntityVersions({
|
|
6507
6531
|
* namespace: "team",
|
|
6508
|
-
* id: "id"
|
|
6532
|
+
* id: "id",
|
|
6533
|
+
* contextId: "myapp"
|
|
6509
6534
|
* })
|
|
6510
6535
|
*/
|
|
6511
6536
|
getEntityVersions(request, requestOptions) {
|
|
6512
6537
|
return HttpResponsePromise.fromPromise(this.__getEntityVersions(request, requestOptions));
|
|
6513
6538
|
}
|
|
6514
6539
|
async __getEntityVersions(request, requestOptions) {
|
|
6515
|
-
const { namespace, id, startFrom } = request;
|
|
6540
|
+
const { namespace, id, contextId, startFrom } = request;
|
|
6516
6541
|
const _queryParams = {
|
|
6542
|
+
contextId,
|
|
6517
6543
|
startFrom
|
|
6518
6544
|
};
|
|
6519
6545
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
@@ -6575,7 +6601,10 @@ var IdentityClient = class {
|
|
|
6575
6601
|
return HttpResponsePromise.fromPromise(this.__getNamespace(request, requestOptions));
|
|
6576
6602
|
}
|
|
6577
6603
|
async __getNamespace(request, requestOptions) {
|
|
6578
|
-
const { namespace } = request;
|
|
6604
|
+
const { namespace, contextId } = request;
|
|
6605
|
+
const _queryParams = {
|
|
6606
|
+
contextId
|
|
6607
|
+
};
|
|
6579
6608
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6580
6609
|
const _headers = mergeHeaders(
|
|
6581
6610
|
_authRequest.headers,
|
|
@@ -6589,7 +6618,7 @@ var IdentityClient = class {
|
|
|
6589
6618
|
),
|
|
6590
6619
|
method: "GET",
|
|
6591
6620
|
headers: _headers,
|
|
6592
|
-
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
6621
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
6593
6622
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
6594
6623
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
6595
6624
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -6614,7 +6643,7 @@ var IdentityClient = class {
|
|
|
6614
6643
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/namespaces/{namespace}");
|
|
6615
6644
|
}
|
|
6616
6645
|
/**
|
|
6617
|
-
* Updates the mutable fields (`entityBacked`, `defaultSchemaId`, `specificityRank`) of a registered namespace. The namespace name
|
|
6646
|
+
* Updates the mutable fields (`entityBacked`, `defaultSchemaId`, `specificityRank`) of a registered namespace. The namespace name and its `contextId` (which row is selected) are both immutable. Requires a root API key. `org` and `client` are updatable like any other namespace — there is no reserved-built-in exception.
|
|
6618
6647
|
*
|
|
6619
6648
|
* @param {Vectros.UpdateNamespaceRequest} request
|
|
6620
6649
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -6636,7 +6665,10 @@ var IdentityClient = class {
|
|
|
6636
6665
|
return HttpResponsePromise.fromPromise(this.__updateNamespace(request, requestOptions));
|
|
6637
6666
|
}
|
|
6638
6667
|
async __updateNamespace(request, requestOptions) {
|
|
6639
|
-
const { namespace, body: _body } = request;
|
|
6668
|
+
const { namespace, contextId, body: _body } = request;
|
|
6669
|
+
const _queryParams = {
|
|
6670
|
+
contextId
|
|
6671
|
+
};
|
|
6640
6672
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6641
6673
|
const _headers = mergeHeaders(
|
|
6642
6674
|
_authRequest.headers,
|
|
@@ -6651,7 +6683,7 @@ var IdentityClient = class {
|
|
|
6651
6683
|
method: "PUT",
|
|
6652
6684
|
headers: _headers,
|
|
6653
6685
|
contentType: "application/json",
|
|
6654
|
-
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
6686
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
6655
6687
|
requestType: "json",
|
|
6656
6688
|
body: _body,
|
|
6657
6689
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
@@ -6682,7 +6714,7 @@ var IdentityClient = class {
|
|
|
6682
6714
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v1/namespaces/{namespace}");
|
|
6683
6715
|
}
|
|
6684
6716
|
/**
|
|
6685
|
-
* Deletes a registered scope namespace. Requires a root API key.
|
|
6717
|
+
* Deletes a registered scope namespace. Requires a root API key. `org` and `client` are deletable like any other namespace — there is no reserved-built-in exception. A namespace that still has entities cannot be deleted (409) — delete its entities first; this keeps them reachable by the account-teardown and erasure sweeps.
|
|
6686
6718
|
*
|
|
6687
6719
|
* @param {Vectros.DeleteNamespaceRequest} request
|
|
6688
6720
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -6700,7 +6732,10 @@ var IdentityClient = class {
|
|
|
6700
6732
|
return HttpResponsePromise.fromPromise(this.__deleteNamespace(request, requestOptions));
|
|
6701
6733
|
}
|
|
6702
6734
|
async __deleteNamespace(request, requestOptions) {
|
|
6703
|
-
const { namespace } = request;
|
|
6735
|
+
const { namespace, contextId } = request;
|
|
6736
|
+
const _queryParams = {
|
|
6737
|
+
contextId
|
|
6738
|
+
};
|
|
6704
6739
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6705
6740
|
const _headers = mergeHeaders(
|
|
6706
6741
|
_authRequest.headers,
|
|
@@ -6714,7 +6749,7 @@ var IdentityClient = class {
|
|
|
6714
6749
|
),
|
|
6715
6750
|
method: "DELETE",
|
|
6716
6751
|
headers: _headers,
|
|
6717
|
-
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
6752
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
6718
6753
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
6719
6754
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
6720
6755
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -6743,7 +6778,7 @@ var IdentityClient = class {
|
|
|
6743
6778
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v1/namespaces/{namespace}");
|
|
6744
6779
|
}
|
|
6745
6780
|
/**
|
|
6746
|
-
* Returns the scope namespaces
|
|
6781
|
+
* Returns the scope namespaces in your account, including `org` and `client`, which are provisioned for you when the account is created. Returns a `{data, nextCursor}` envelope.
|
|
6747
6782
|
*
|
|
6748
6783
|
* @param {Vectros.ListNamespacesRequest} request
|
|
6749
6784
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -6755,10 +6790,11 @@ var IdentityClient = class {
|
|
|
6755
6790
|
return HttpResponsePromise.fromPromise(this.__listNamespaces(request, requestOptions));
|
|
6756
6791
|
}
|
|
6757
6792
|
async __listNamespaces(request = {}, requestOptions) {
|
|
6758
|
-
const { startFrom, limit } = request;
|
|
6793
|
+
const { startFrom, limit, contextId } = request;
|
|
6759
6794
|
const _queryParams = {
|
|
6760
6795
|
startFrom,
|
|
6761
|
-
limit
|
|
6796
|
+
limit,
|
|
6797
|
+
contextId
|
|
6762
6798
|
};
|
|
6763
6799
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6764
6800
|
const _headers = mergeHeaders(
|
|
@@ -6793,9 +6829,9 @@ var IdentityClient = class {
|
|
|
6793
6829
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/namespaces");
|
|
6794
6830
|
}
|
|
6795
6831
|
/**
|
|
6796
|
-
* Registers a new scope namespace and declares whether its values resolve to identity entities (`entityBacked`). Also requires `specificityRank`, an explicit, account-unique position in the specificity order used to break recordType schema-resolution ties. Requires a root API key
|
|
6832
|
+
* Registers a new scope namespace and declares whether its values resolve to identity entities (`entityBacked`). Also requires `specificityRank`, an explicit, account-unique position in the specificity order used to break recordType schema-resolution ties. Requires a root API key or the CLI bootstrap's provisioning capability — never an ordinary partner-grantable scope. `org` and `client` are provisioned when your account is created, so registering either returns the already-registered error.
|
|
6797
6833
|
*
|
|
6798
|
-
* @param {Vectros.
|
|
6834
|
+
* @param {Vectros.RegisterNamespaceRequest} request
|
|
6799
6835
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
6800
6836
|
*
|
|
6801
6837
|
* @throws {@link Vectros.BadRequestError}
|
|
@@ -6804,14 +6840,20 @@ var IdentityClient = class {
|
|
|
6804
6840
|
*
|
|
6805
6841
|
* @example
|
|
6806
6842
|
* await client.identity.registerNamespace({
|
|
6807
|
-
*
|
|
6808
|
-
*
|
|
6843
|
+
* body: {
|
|
6844
|
+
* namespace: "team",
|
|
6845
|
+
* specificityRank: 1500
|
|
6846
|
+
* }
|
|
6809
6847
|
* })
|
|
6810
6848
|
*/
|
|
6811
6849
|
registerNamespace(request, requestOptions) {
|
|
6812
6850
|
return HttpResponsePromise.fromPromise(this.__registerNamespace(request, requestOptions));
|
|
6813
6851
|
}
|
|
6814
6852
|
async __registerNamespace(request, requestOptions) {
|
|
6853
|
+
const { contextId, body: _body } = request;
|
|
6854
|
+
const _queryParams = {
|
|
6855
|
+
contextId
|
|
6856
|
+
};
|
|
6815
6857
|
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
6816
6858
|
const _headers = mergeHeaders(
|
|
6817
6859
|
_authRequest.headers,
|
|
@@ -6826,9 +6868,9 @@ var IdentityClient = class {
|
|
|
6826
6868
|
method: "POST",
|
|
6827
6869
|
headers: _headers,
|
|
6828
6870
|
contentType: "application/json",
|
|
6829
|
-
queryString: url_exports.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
6871
|
+
queryString: url_exports.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
|
|
6830
6872
|
requestType: "json",
|
|
6831
|
-
body:
|
|
6873
|
+
body: _body,
|
|
6832
6874
|
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1e3,
|
|
6833
6875
|
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
6834
6876
|
abortSignal: requestOptions?.abortSignal,
|
|
@@ -7113,12 +7155,13 @@ var IdentityClient = class {
|
|
|
7113
7155
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v1/users/{id}");
|
|
7114
7156
|
}
|
|
7115
7157
|
/**
|
|
7116
|
-
* Permanently deletes a user identity. This cannot be undone. If the user is a pending invitation, the associated access profile created for that invitation is also removed. Requires the `users:d` scope.
|
|
7158
|
+
* Permanently deletes a user identity. This cannot be undone. If the user is a pending invitation, the associated access profile created for that invitation is also removed. Requires the `users:d` scope. Deleting your account's last OWNER is refused (409) — an account must always retain at least one owner.
|
|
7117
7159
|
*
|
|
7118
7160
|
* @param {Vectros.DeleteUserRequest} request
|
|
7119
7161
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
7120
7162
|
*
|
|
7121
7163
|
* @throws {@link Vectros.NotFoundError}
|
|
7164
|
+
* @throws {@link Vectros.ConflictError}
|
|
7122
7165
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
7123
7166
|
*
|
|
7124
7167
|
* @example
|
|
@@ -7158,6 +7201,8 @@ var IdentityClient = class {
|
|
|
7158
7201
|
switch (_response.error.statusCode) {
|
|
7159
7202
|
case 404:
|
|
7160
7203
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
7204
|
+
case 409:
|
|
7205
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
7161
7206
|
case 429:
|
|
7162
7207
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
7163
7208
|
default:
|
|
@@ -9062,8 +9107,8 @@ function warnOnSuboptimalKey(key, log) {
|
|
|
9062
9107
|
|
|
9063
9108
|
// src/build-info.ts
|
|
9064
9109
|
var BUILD_INFO = {
|
|
9065
|
-
mcpServer: true ? "0.
|
|
9066
|
-
sdk: true ? "0.
|
|
9110
|
+
mcpServer: true ? "0.15.0" : "dev",
|
|
9111
|
+
sdk: true ? "0.40.0" : "dev"
|
|
9067
9112
|
};
|
|
9068
9113
|
|
|
9069
9114
|
// src/log.ts
|
|
@@ -9371,7 +9416,7 @@ var inputSchema = {
|
|
|
9371
9416
|
// Ownership.
|
|
9372
9417
|
userId: z.string().optional().describe("Restrict to content owned by this user (Vectros UUID)."),
|
|
9373
9418
|
scope: z.string().optional().describe(
|
|
9374
|
-
'Restrict to content carrying this scope value, in `namespace:value` form (e.g. "org:<uuid>", "client:<uuid>", "group:eng-team"). `org` and `client` are
|
|
9419
|
+
'Restrict to content carrying this scope value, in `namespace:value` form (e.g. "org:<uuid>", "client:<uuid>", "group:eng-team"). `org` and `client` are reserved namespace names, registered like any other; others are namespaces you registered yourself.'
|
|
9375
9420
|
),
|
|
9376
9421
|
// Date window.
|
|
9377
9422
|
createdAfter: z.string().optional().describe("Restrict to content created at/after this ISO 8601 UTC timestamp."),
|
|
@@ -9511,7 +9556,7 @@ var inputSchema2 = {
|
|
|
9511
9556
|
// List-mode args:
|
|
9512
9557
|
userId: z2.string().optional().describe("List mode: scope to records owned by this user."),
|
|
9513
9558
|
scope: z2.string().optional().describe(
|
|
9514
|
-
'List mode: filter to records carrying this scope value, in `namespace:value` form (e.g. "org:<uuid>", "client:<uuid>", "group:eng-team"). `org` and `client` are
|
|
9559
|
+
'List mode: filter to records carrying this scope value, in `namespace:value` form (e.g. "org:<uuid>", "client:<uuid>", "group:eng-team"). `org` and `client` are reserved namespace names, registered like any other; others are namespaces you registered yourself.'
|
|
9515
9560
|
),
|
|
9516
9561
|
startFrom: z2.string().optional().describe("Pagination cursor \u2014 pass the `nextCursor` from the previous page to fetch the next. Works in both list and lookup mode."),
|
|
9517
9562
|
limit: z2.number().int().min(1).max(MCP_MAX_LIMIT2).optional().describe(
|
|
@@ -9762,7 +9807,7 @@ var inputSchema4 = {
|
|
|
9762
9807
|
folderId: z4.string().optional().describe("Group this record into a folder."),
|
|
9763
9808
|
userId: z4.string().optional().describe("Owning user id."),
|
|
9764
9809
|
scopes: z4.array(z4.string()).optional().describe(
|
|
9765
|
-
'Scope ownership as `namespace:value` entries, at most 2 (e.g. ["org:<uuid>", "group:eng-team"]). `org` and `client` are
|
|
9810
|
+
'Scope ownership as `namespace:value` entries, at most 2 (e.g. ["org:<uuid>", "group:eng-team"]). `org` and `client` are reserved namespace names, registered like any other; others are namespaces you registered yourself. This is the record\'s COMPLETE scope declaration and values must come from the credential\'s own identity. An empty array `[]` creates a PRIVATE record owned by the calling user alone. Omit to stamp the credential\'s full identity \u2014 the default.'
|
|
9766
9811
|
)
|
|
9767
9812
|
};
|
|
9768
9813
|
var recordCreate = ({ client, log }) => ({
|
|
@@ -9886,7 +9931,7 @@ var inputSchema7 = {
|
|
|
9886
9931
|
// whole-tenant corpus.
|
|
9887
9932
|
userId: z7.string().optional().describe("Restrict retrieval to content owned by this user (Vectros UUID)."),
|
|
9888
9933
|
scope: z7.string().optional().describe(
|
|
9889
|
-
'Restrict retrieval to content carrying this scope value, in `namespace:value` form (e.g. "org:<uuid>", "client:<uuid>", "group:eng-team"). `org` and `client` are
|
|
9934
|
+
'Restrict retrieval to content carrying this scope value, in `namespace:value` form (e.g. "org:<uuid>", "client:<uuid>", "group:eng-team"). `org` and `client` are reserved namespace names, registered like any other; others are namespaces you registered yourself.'
|
|
9890
9935
|
),
|
|
9891
9936
|
folderId: z7.string().optional().describe("Restrict retrieval to this exact folder."),
|
|
9892
9937
|
rootFolderId: z7.string().optional().describe("Restrict retrieval to this folder and all its descendants."),
|
|
@@ -10060,7 +10105,7 @@ var inputSchema9 = {
|
|
|
10060
10105
|
"Filter to schemas visible to a specific user. Optional; default returns all schemas the credential can see."
|
|
10061
10106
|
),
|
|
10062
10107
|
scope: z9.string().optional().describe(
|
|
10063
|
-
'Filter to schemas carrying this scope value, in `namespace:value` form (e.g. "org:<uuid>", "group:eng-team"). `org` and `client` are
|
|
10108
|
+
'Filter to schemas carrying this scope value, in `namespace:value` form (e.g. "org:<uuid>", "group:eng-team"). `org` and `client` are reserved namespace names, registered like any other. Optional; default returns all schemas the credential can see.'
|
|
10064
10109
|
),
|
|
10065
10110
|
surface: z9.enum(["record", "document", "user", "entity"]).optional().describe(
|
|
10066
10111
|
"Filter to schemas bindable to this surface \u2014 e.g. `document` to list only document types, or `record` for record types. Identity entities in any namespace (org/client/one you registered) bind under the single `entity` surface; `user` and `entity` are account-wide. Optional."
|
|
@@ -10210,7 +10255,7 @@ var inputSchema11 = {
|
|
|
10210
10255
|
folderId: z11.string().optional().describe("List mode: only documents in this folder (Vectros folder id)."),
|
|
10211
10256
|
userId: z11.string().optional().describe("List mode: scope to documents owned by this user."),
|
|
10212
10257
|
scope: z11.string().optional().describe(
|
|
10213
|
-
'List mode: filter to documents carrying this scope value, in `namespace:value` form (e.g. "org:<uuid>", "client:<uuid>", "group:eng-team"). `org` and `client` are
|
|
10258
|
+
'List mode: filter to documents carrying this scope value, in `namespace:value` form (e.g. "org:<uuid>", "client:<uuid>", "group:eng-team"). `org` and `client` are reserved namespace names, registered like any other; others are namespaces you registered yourself.'
|
|
10214
10259
|
),
|
|
10215
10260
|
startFrom: z11.string().optional().describe("Pagination cursor \u2014 pass the `nextCursor` from the previous page to fetch the next. Works in both list and lookup mode."),
|
|
10216
10261
|
limit: z11.number().int().min(1).max(MCP_MAX_LIMIT3).optional().describe(
|
|
@@ -10321,7 +10366,7 @@ var inputSchema12 = {
|
|
|
10321
10366
|
),
|
|
10322
10367
|
userId: z12.string().optional().describe("Reassign the owning user (Vectros UUID)."),
|
|
10323
10368
|
scopes: z12.array(z12.string()).optional().describe(
|
|
10324
|
-
'Reassign scope ownership as `namespace:value` entries, at most 2 (e.g. ["org:<uuid>", "group:eng-team"]) \u2014 the COMPLETE new parent set. `org`/`client` are
|
|
10369
|
+
'Reassign scope ownership as `namespace:value` entries, at most 2 (e.g. ["org:<uuid>", "group:eng-team"]) \u2014 the COMPLETE new parent set. `org`/`client` are reserved namespace names, registered like any other. Omit to leave ownership unchanged; `[]` clears it (private to the owning user).'
|
|
10325
10370
|
),
|
|
10326
10371
|
expectedVersion: z12.number().int().optional().describe(
|
|
10327
10372
|
"Optimistic concurrency: the version you last read. If the document changed since, the update is refused as a conflict (re-read and retry). Omit for last-write-wins."
|
|
@@ -10405,7 +10450,7 @@ var inputSchema14 = {
|
|
|
10405
10450
|
parentId: z14.string().optional().describe("List mode: direct children of this folder (tree navigation). Omit for a flat tenant list."),
|
|
10406
10451
|
userId: z14.string().optional().describe("List mode: scope to folders owned by this user."),
|
|
10407
10452
|
scope: z14.string().optional().describe(
|
|
10408
|
-
'List mode: filter to folders carrying this scope value, in `namespace:value` form (e.g. "org:<uuid>", "client:<uuid>", "group:eng-team"). `org` and `client` are
|
|
10453
|
+
'List mode: filter to folders carrying this scope value, in `namespace:value` form (e.g. "org:<uuid>", "client:<uuid>", "group:eng-team"). `org` and `client` are reserved namespace names, registered like any other; others are namespaces you registered yourself.'
|
|
10409
10454
|
),
|
|
10410
10455
|
startFrom: z14.string().optional().describe("List mode: pagination cursor \u2014 pass the `nextCursor` from the previous page to fetch the next."),
|
|
10411
10456
|
limit: z14.number().int().min(1).max(MCP_MAX_LIMIT4).optional().describe(
|
|
@@ -10454,7 +10499,7 @@ var inputSchema15 = {
|
|
|
10454
10499
|
slug: z15.string().optional().describe("Optional stable slug (sibling-unique; idempotency key). Lowercase letters/digits/hyphens. Derived from name when omitted."),
|
|
10455
10500
|
userId: z15.string().optional().describe("Owning user (Vectros UUID)."),
|
|
10456
10501
|
scopes: z15.array(z15.string()).optional().describe(
|
|
10457
|
-
'Scope ownership as `namespace:value` entries, at most 2 (e.g. ["org:<uuid>", "group:eng-team"]). `org` and `client` are
|
|
10502
|
+
'Scope ownership as `namespace:value` entries, at most 2 (e.g. ["org:<uuid>", "group:eng-team"]). `org` and `client` are reserved namespace names, registered like any other; others are namespaces you registered yourself. This is the folder\'s COMPLETE scope declaration and values must come from the credential\'s own identity. An empty array `[]` creates a PRIVATE folder owned by the calling user alone. Omit to stamp the credential\'s full identity \u2014 the default.'
|
|
10458
10503
|
)
|
|
10459
10504
|
};
|
|
10460
10505
|
var folderCreate = ({ client, log }) => ({
|
|
@@ -10492,7 +10537,7 @@ var inputSchema16 = {
|
|
|
10492
10537
|
description: z16.string().optional().describe("New description. Omit to leave unchanged."),
|
|
10493
10538
|
userId: z16.string().optional().describe("Reassign the owning user (Vectros UUID)."),
|
|
10494
10539
|
scopes: z16.array(z16.string()).optional().describe(
|
|
10495
|
-
'Reassign scope ownership as `namespace:value` entries, at most 2 (e.g. ["org:<uuid>", "group:eng-team"]) \u2014 the COMPLETE new parent set. `org`/`client` are
|
|
10540
|
+
'Reassign scope ownership as `namespace:value` entries, at most 2 (e.g. ["org:<uuid>", "group:eng-team"]) \u2014 the COMPLETE new parent set. `org`/`client` are reserved namespace names, registered like any other. Omit to leave ownership unchanged; `[]` clears it (private to the owning user).'
|
|
10496
10541
|
),
|
|
10497
10542
|
expectedVersion: z16.number().int().optional().describe(
|
|
10498
10543
|
"Optimistic concurrency: the version you last read. If the folder changed since, the update is refused as a conflict (re-read and retry). Omit for last-write-wins."
|
|
@@ -10559,7 +10604,7 @@ var inputSchema18 = {
|
|
|
10559
10604
|
var currentIdentity = ({ log, apiKey, environment }) => ({
|
|
10560
10605
|
name: "current_identity",
|
|
10561
10606
|
title: "Current identity (tenant + principal scope)",
|
|
10562
|
-
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 reach as { userId, scopes[] }, where each scope is a `namespace:value` string (e.g. \"org:<uuid>\"). 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.",
|
|
10607
|
+
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.",
|
|
10563
10608
|
inputSchema: inputSchema18,
|
|
10564
10609
|
handler: async () => {
|
|
10565
10610
|
try {
|
|
@@ -10682,7 +10727,7 @@ var inputSchema19 = {
|
|
|
10682
10727
|
folderId: z18.string().optional().describe("Optional folder to ingest into. Default: tenant root."),
|
|
10683
10728
|
userId: z18.string().optional().describe("Owning user ID. Optional."),
|
|
10684
10729
|
scopes: z18.array(z18.string()).optional().describe(
|
|
10685
|
-
"TEXT MODE ONLY. Scope ownership as `namespace:value` entries, at most 2 (e.g. [\"org:<uuid>\", \"group:eng-team\"]). `org` and `client` are
|
|
10730
|
+
"TEXT MODE ONLY. Scope ownership as `namespace:value` entries, at most 2 (e.g. [\"org:<uuid>\", \"group:eng-team\"]). `org` and `client` are reserved namespace names, registered like any other; others are namespaces you registered yourself. This is the document's COMPLETE scope declaration and values must come from the credential's own identity. An empty array `[]` creates a PRIVATE document owned by the calling user alone. Omit to stamp the credential's full identity \u2014 the default. Rejected with `filePath` (file uploads do not accept a scope declaration): a file-uploaded document is stamped with the credential's full identity."
|
|
10686
10731
|
)
|
|
10687
10732
|
};
|
|
10688
10733
|
var documentIngest = ({ client, log, transport, ingestRoot }) => ({
|
|
@@ -10846,11 +10891,14 @@ var MCP_DEFAULT_LIMIT5 = 10;
|
|
|
10846
10891
|
var MCP_MAX_LIMIT5 = 100;
|
|
10847
10892
|
var inputSchema20 = {
|
|
10848
10893
|
kind: z19.string().describe(
|
|
10849
|
-
'Which principal to look up: "user" (the fixed principal surface), or an entity namespace \u2014 "org", "client" (
|
|
10894
|
+
'Which principal to look up: "user" (the fixed principal surface), or an entity namespace \u2014 "org", "client" (reserved, registered like any other), or a namespace you registered.'
|
|
10850
10895
|
),
|
|
10851
10896
|
externalId: z19.string().optional().describe(
|
|
10852
10897
|
"Resolve mode: your own stable identifier for the principal. Returns the single matching principal (with its Vectros UUID), or an empty array if none. The fastest path to the UUID the ownership filters need. Takes precedence if both this and a `field` lookup are supplied."
|
|
10853
10898
|
),
|
|
10899
|
+
contextId: z19.string().optional().describe(
|
|
10900
|
+
"Entity kinds only (not `user`, which is always tenant-wide): the app context to look up entities in, for a namespace registered as context-owned rather than tenant-wide. A context-confined credential's own context is used automatically without this; supply it to name a context explicitly (required for an unconfined/root credential to reach a context-owned namespace). Rejected if the namespace turns out to be tenant-wide."
|
|
10901
|
+
),
|
|
10854
10902
|
// Lookup-mode args — provide `field` plus EXACTLY ONE of: value | from+to | prefix.
|
|
10855
10903
|
type: z19.string().optional().describe('Lookup mode: the identity schema\'s record type (e.g. "person_v1"). Required with `field`.'),
|
|
10856
10904
|
field: z19.string().optional().describe('Lookup mode: name of the schema-declared lookup field to query by (e.g. "email").'),
|
|
@@ -10867,13 +10915,14 @@ var inputSchema20 = {
|
|
|
10867
10915
|
var lookupPrincipal = ({ client, log }) => ({
|
|
10868
10916
|
name: "lookup_principal",
|
|
10869
10917
|
title: "Look up a user identity or a namespaced identity entity",
|
|
10870
|
-
description: "Resolve a user, or an identity entity in a namespace (org/client/one you registered). Two modes:\n \u2022 Resolve by your own id: pass `externalId` \u2192 the matching principal incl. its Vectros UUID (the id the ownership filters on record_query / hybrid_search / rag_ask expect).\n \u2022 Lookup by a schema field: pass `type` and `field` plus exactly one of `value` (exact), `from`+`to` (range), or `prefix`. Sensitive-field-safe. (If both `externalId` and a `field` lookup are given, `externalId` wins.) Returns a `{ data, nextCursor }` page (default 10, max 100 \u2014 raise it in one call when you can accept the payload); a non-null `nextCursor` means more remain \u2014 pass it back as `startFrom`. Read-only \u2014 does not create or modify identities.",
|
|
10918
|
+
description: "Resolve a user, or an identity entity in a namespace (org/client/one you registered). Two modes:\n \u2022 Resolve by your own id: pass `externalId` \u2192 the matching principal incl. its Vectros UUID (the id the ownership filters on record_query / hybrid_search / rag_ask expect).\n \u2022 Lookup by a schema field: pass `type` and `field` plus exactly one of `value` (exact), `from`+`to` (range), or `prefix`. Sensitive-field-safe. (If both `externalId` and a `field` lookup are given, `externalId` wins.) For an entity kind, `contextId` names a specific app context when the namespace is context-owned rather than tenant-wide; a context-confined credential's own context is used automatically without it. Returns a `{ data, nextCursor }` page (default 10, max 100 \u2014 raise it in one call when you can accept the payload); a non-null `nextCursor` means more remain \u2014 pass it back as `startFrom`. Read-only \u2014 does not create or modify identities.",
|
|
10871
10919
|
inputSchema: inputSchema20,
|
|
10872
10920
|
handler: async (args) => {
|
|
10873
10921
|
const kind = args.kind;
|
|
10874
10922
|
const isUser = kind === "user";
|
|
10875
10923
|
const limit = args.limit ?? MCP_DEFAULT_LIMIT5;
|
|
10876
10924
|
const externalId = args.externalId;
|
|
10925
|
+
const contextId = args.contextId;
|
|
10877
10926
|
const type = args.type;
|
|
10878
10927
|
const field = args.field;
|
|
10879
10928
|
const value = args.value;
|
|
@@ -10882,11 +10931,18 @@ var lookupPrincipal = ({ client, log }) => ({
|
|
|
10882
10931
|
const prefix = args.prefix;
|
|
10883
10932
|
const order = args.order;
|
|
10884
10933
|
const startFrom = args.startFrom;
|
|
10934
|
+
if (contextId !== void 0 && isUser) {
|
|
10935
|
+
return toolError(
|
|
10936
|
+
"lookup_principal",
|
|
10937
|
+
new Error("'contextId' does not apply to kind 'user' \u2014 the user surface is always tenant-wide.")
|
|
10938
|
+
);
|
|
10939
|
+
}
|
|
10940
|
+
const contextIdArg = contextId !== void 0 ? { contextId } : {};
|
|
10885
10941
|
try {
|
|
10886
10942
|
let page;
|
|
10887
10943
|
if (externalId !== void 0) {
|
|
10888
|
-
page = isUser ? await client.identity.listUsers({ externalId, limit }) : await client.identity.listEntities({ namespace: kind, externalId, limit });
|
|
10889
|
-
log.debug({ tool: "lookup_principal", mode: "resolve", kind }, "lookup_principal resolve ok");
|
|
10944
|
+
page = isUser ? await client.identity.listUsers({ externalId, limit }) : await client.identity.listEntities({ namespace: kind, ...contextIdArg, externalId, limit });
|
|
10945
|
+
log.debug({ tool: "lookup_principal", mode: "resolve", kind, contextId }, "lookup_principal resolve ok");
|
|
10890
10946
|
} else if (field !== void 0) {
|
|
10891
10947
|
const hasEquality = value !== void 0;
|
|
10892
10948
|
const hasRange = from !== void 0 || to !== void 0;
|
|
@@ -10914,8 +10970,8 @@ var lookupPrincipal = ({ client, log }) => ({
|
|
|
10914
10970
|
);
|
|
10915
10971
|
}
|
|
10916
10972
|
const req = { type, field, value, from, to, prefix, order, startFrom, limit };
|
|
10917
|
-
page = isUser ? await client.identity.lookupUsers(req) : await client.identity.lookupEntities({ namespace: kind, body: req });
|
|
10918
|
-
log.debug({ tool: "lookup_principal", mode: "lookup", kind, type, field }, "lookup_principal lookup ok");
|
|
10973
|
+
page = isUser ? await client.identity.lookupUsers(req) : await client.identity.lookupEntities({ namespace: kind, ...contextIdArg, body: req });
|
|
10974
|
+
log.debug({ tool: "lookup_principal", mode: "lookup", kind, type, field, contextId }, "lookup_principal lookup ok");
|
|
10919
10975
|
} else {
|
|
10920
10976
|
return toolError(
|
|
10921
10977
|
"lookup_principal",
|
|
@@ -10926,7 +10982,7 @@ var lookupPrincipal = ({ client, log }) => ({
|
|
|
10926
10982
|
const nextCursor = page.nextCursor ?? null;
|
|
10927
10983
|
return { content: [{ type: "text", text: JSON.stringify({ data: principals, nextCursor }, null, 2) }] };
|
|
10928
10984
|
} catch (err) {
|
|
10929
|
-
log.warn({ tool: "lookup_principal", kind, err: String(err) }, "lookup_principal failed");
|
|
10985
|
+
log.warn({ tool: "lookup_principal", kind, contextId, err: String(err) }, "lookup_principal failed");
|
|
10930
10986
|
return toolError("lookup_principal", err);
|
|
10931
10987
|
}
|
|
10932
10988
|
}
|
|
@@ -11037,7 +11093,7 @@ var identityResource = ({ log, apiKey, environment }) => ({
|
|
|
11037
11093
|
name: "identity",
|
|
11038
11094
|
uri: "vectros://identity",
|
|
11039
11095
|
title: "Current identity (tenant + principal scope)",
|
|
11040
|
-
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[] }),
|
|
11096
|
+
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.",
|
|
11041
11097
|
mimeType: "application/json",
|
|
11042
11098
|
read: async () => {
|
|
11043
11099
|
const identity = await resolveIdentity({ log, apiKey, environment });
|