@vectros-ai/cli 0.25.0 → 0.26.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/AUTHORING.md +25 -12
- package/CHANGELOG.md +40 -0
- package/README.md +21 -6
- package/dist/cli.js +252 -97
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +252 -97
- package/dist/cli.mjs.map +1 -1
- package/package.json +4 -4
package/dist/cli.mjs
CHANGED
|
@@ -1634,9 +1634,11 @@ __export(api_exports, {
|
|
|
1634
1634
|
BatchWriteRequest: () => BatchWriteRequest,
|
|
1635
1635
|
BatchWriteResult: () => BatchWriteResult,
|
|
1636
1636
|
ChatMessage: () => ChatMessage,
|
|
1637
|
+
ChatRequest: () => ChatRequest,
|
|
1637
1638
|
ConflictError: () => ConflictError,
|
|
1638
1639
|
ContentDeltaEvent: () => ContentDeltaEvent,
|
|
1639
1640
|
ContentTooLargeError: () => ContentTooLargeError,
|
|
1641
|
+
DocumentAskRequest: () => DocumentAskRequest,
|
|
1640
1642
|
DocumentContextEvent: () => DocumentContextEvent,
|
|
1641
1643
|
DocumentLookupRequest: () => DocumentLookupRequest,
|
|
1642
1644
|
DocumentPatchRequest: () => DocumentPatchRequest,
|
|
@@ -1667,8 +1669,10 @@ __export(api_exports, {
|
|
|
1667
1669
|
NotImplementedError: () => NotImplementedError,
|
|
1668
1670
|
PaymentRequiredError: () => PaymentRequiredError,
|
|
1669
1671
|
PingResponse: () => PingResponse,
|
|
1672
|
+
RagRequest: () => RagRequest,
|
|
1670
1673
|
RagSearch: () => RagSearch,
|
|
1671
1674
|
ReadAccessLogResponse: () => ReadAccessLogResponse,
|
|
1675
|
+
ReasoningDeltaEvent: () => ReasoningDeltaEvent,
|
|
1672
1676
|
RecordLookupRequest: () => RecordLookupRequest,
|
|
1673
1677
|
RecordRequest: () => RecordRequest,
|
|
1674
1678
|
RecordResponse: () => RecordResponse,
|
|
@@ -2024,7 +2028,33 @@ var ListUsersRequestOrder = {
|
|
|
2024
2028
|
Asc: "asc",
|
|
2025
2029
|
Desc: "desc"
|
|
2026
2030
|
};
|
|
2031
|
+
var ChatRequest;
|
|
2032
|
+
((ChatRequest2) => {
|
|
2033
|
+
ChatRequest2.Reasoning = {
|
|
2034
|
+
Omit: "omit",
|
|
2035
|
+
Stream: "stream"
|
|
2036
|
+
};
|
|
2037
|
+
})(ChatRequest || (ChatRequest = {}));
|
|
2038
|
+
var DocumentAskRequest;
|
|
2039
|
+
((DocumentAskRequest2) => {
|
|
2040
|
+
DocumentAskRequest2.Reasoning = {
|
|
2041
|
+
Omit: "omit",
|
|
2042
|
+
Stream: "stream"
|
|
2043
|
+
};
|
|
2044
|
+
})(DocumentAskRequest || (DocumentAskRequest = {}));
|
|
2045
|
+
var RagRequest;
|
|
2046
|
+
((RagRequest2) => {
|
|
2047
|
+
RagRequest2.Reasoning = {
|
|
2048
|
+
Omit: "omit",
|
|
2049
|
+
Stream: "stream"
|
|
2050
|
+
};
|
|
2051
|
+
})(RagRequest || (RagRequest = {}));
|
|
2027
2052
|
var inference_exports = {};
|
|
2053
|
+
__export(inference_exports, {
|
|
2054
|
+
ChatRequest: () => ChatRequest,
|
|
2055
|
+
DocumentAskRequest: () => DocumentAskRequest,
|
|
2056
|
+
RagRequest: () => RagRequest
|
|
2057
|
+
});
|
|
2028
2058
|
var BatchWriteRequest;
|
|
2029
2059
|
((BatchWriteRequest2) => {
|
|
2030
2060
|
BatchWriteRequest2.Atomicity = {
|
|
@@ -2297,6 +2327,12 @@ var ReadAccessLogResponse;
|
|
|
2297
2327
|
Rag: "rag"
|
|
2298
2328
|
};
|
|
2299
2329
|
})(ReadAccessLogResponse || (ReadAccessLogResponse = {}));
|
|
2330
|
+
var ReasoningDeltaEvent;
|
|
2331
|
+
((ReasoningDeltaEvent2) => {
|
|
2332
|
+
ReasoningDeltaEvent2.Event = {
|
|
2333
|
+
ReasoningDelta: "reasoning_delta"
|
|
2334
|
+
};
|
|
2335
|
+
})(ReasoningDeltaEvent || (ReasoningDeltaEvent = {}));
|
|
2300
2336
|
var RecordRequest;
|
|
2301
2337
|
((RecordRequest2) => {
|
|
2302
2338
|
RecordRequest2.Status = {
|
|
@@ -4191,7 +4227,7 @@ var AuthClient = class {
|
|
|
4191
4227
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/admin/keys/scoped");
|
|
4192
4228
|
}
|
|
4193
4229
|
/**
|
|
4194
|
-
* Creates a scoped API key (an `ssk_*` secret) that inherits its permissions from an existing access profile in your account. The call is idempotent on the combination of tenant, context, user, and key name: re-issuing the same request returns the existing key WITHOUT re-disclosing its raw secret. The raw key is returned ONLY in this response — store it securely, as it cannot be retrieved again. Requires the `keys:c` scope. If you use a scoped credential, `keys:c` alone is not sufficient: because the minted key is durably bound to the profile you name, the profile's effective scopes may not exceed your own, and you may only mint against a profile whose `identityOverrides` values your own identity holds. Minting a key bound to your OWN principal needs nothing further; minting one bound to a DIFFERENT principal additionally requires the `delegate-mint` capability (`granted_capabilities`) on your credential — without it the request is refused. A root API key (`sk_`) is exempt from all three bounds. The profile you name must be `active` AND the user you name must not be `SUSPENDED`: either is refused with `409`, and no root exemption applies to that. Both refusals stop ISSUANCE only. Suspending the profile additionally stops credentials already bound to it, within about five minutes
|
|
4230
|
+
* Creates a scoped API key (an `ssk_*` secret) that inherits its permissions from an existing access profile in your account. The call is idempotent on the combination of tenant, context, user, and key name: re-issuing the same request returns the existing key WITHOUT re-disclosing its raw secret. The raw key is returned ONLY in this response — store it securely, as it cannot be retrieved again. Requires the `keys:c` scope. If you use a scoped credential, `keys:c` alone is not sufficient: because the minted key is durably bound to the profile you name, the profile's effective scopes may not exceed your own, and you may only mint against a profile whose `identityOverrides` values your own identity holds. Minting a key bound to your OWN principal needs nothing further; minting one bound to a DIFFERENT principal additionally requires the `delegate-mint` capability (`granted_capabilities`) on your credential — without it the request is refused. A root API key (`sk_`) is exempt from all three bounds. The profile you name must be `active` AND the user you name must not be `SUSPENDED`: either is refused with `409`, and no root exemption applies to that. Both refusals stop ISSUANCE only. Suspending the profile or the user additionally stops credentials already bound to it, within about five minutes. A `PENDING` user is fine.
|
|
4195
4231
|
*
|
|
4196
4232
|
* @param {Vectros.CreateScopedKeyRequest} request
|
|
4197
4233
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -4534,6 +4570,7 @@ var AuthClient = class {
|
|
|
4534
4570
|
* @throws {@link Vectros.BadRequestError}
|
|
4535
4571
|
* @throws {@link Vectros.ForbiddenError}
|
|
4536
4572
|
* @throws {@link Vectros.NotFoundError}
|
|
4573
|
+
* @throws {@link Vectros.ConflictError}
|
|
4537
4574
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
4538
4575
|
*
|
|
4539
4576
|
* @example
|
|
@@ -4586,6 +4623,8 @@ var AuthClient = class {
|
|
|
4586
4623
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
4587
4624
|
case 404:
|
|
4588
4625
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
4626
|
+
case 409:
|
|
4627
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
4589
4628
|
case 429:
|
|
4590
4629
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
4591
4630
|
default:
|
|
@@ -4669,6 +4708,8 @@ var AuthClient = class {
|
|
|
4669
4708
|
* @throws {@link Vectros.BadRequestError}
|
|
4670
4709
|
* @throws {@link Vectros.PaymentRequiredError}
|
|
4671
4710
|
* @throws {@link Vectros.ForbiddenError}
|
|
4711
|
+
* @throws {@link Vectros.NotFoundError}
|
|
4712
|
+
* @throws {@link Vectros.ConflictError}
|
|
4672
4713
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
4673
4714
|
*
|
|
4674
4715
|
* @example
|
|
@@ -4721,6 +4762,10 @@ var AuthClient = class {
|
|
|
4721
4762
|
throw new PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
4722
4763
|
case 403:
|
|
4723
4764
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
4765
|
+
case 404:
|
|
4766
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
4767
|
+
case 409:
|
|
4768
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
4724
4769
|
case 429:
|
|
4725
4770
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
4726
4771
|
default:
|
|
@@ -4809,6 +4854,7 @@ var AuthClient = class {
|
|
|
4809
4854
|
* @throws {@link Vectros.BadRequestError}
|
|
4810
4855
|
* @throws {@link Vectros.ForbiddenError}
|
|
4811
4856
|
* @throws {@link Vectros.NotFoundError}
|
|
4857
|
+
* @throws {@link Vectros.ConflictError}
|
|
4812
4858
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
4813
4859
|
*
|
|
4814
4860
|
* @example
|
|
@@ -4865,6 +4911,8 @@ var AuthClient = class {
|
|
|
4865
4911
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
4866
4912
|
case 404:
|
|
4867
4913
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
4914
|
+
case 409:
|
|
4915
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
4868
4916
|
case 429:
|
|
4869
4917
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
4870
4918
|
default:
|
|
@@ -4955,6 +5003,7 @@ var AuthClient = class {
|
|
|
4955
5003
|
* @throws {@link Vectros.BadRequestError}
|
|
4956
5004
|
* @throws {@link Vectros.ForbiddenError}
|
|
4957
5005
|
* @throws {@link Vectros.NotFoundError}
|
|
5006
|
+
* @throws {@link Vectros.ConflictError}
|
|
4958
5007
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
4959
5008
|
*
|
|
4960
5009
|
* @example
|
|
@@ -5005,6 +5054,8 @@ var AuthClient = class {
|
|
|
5005
5054
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
5006
5055
|
case 404:
|
|
5007
5056
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
5057
|
+
case 409:
|
|
5058
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
5008
5059
|
case 429:
|
|
5009
5060
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
5010
5061
|
default:
|
|
@@ -5151,13 +5202,14 @@ var AuthClient = class {
|
|
|
5151
5202
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/app-contexts/{contextId}");
|
|
5152
5203
|
}
|
|
5153
5204
|
/**
|
|
5154
|
-
* 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
|
|
5205
|
+
* 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 an account with the corresponding 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.
|
|
5155
5206
|
*
|
|
5156
5207
|
* @param {Vectros.UpdateAppContextRequest} request
|
|
5157
5208
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
5158
5209
|
*
|
|
5159
5210
|
* @throws {@link Vectros.ForbiddenError}
|
|
5160
5211
|
* @throws {@link Vectros.NotFoundError}
|
|
5212
|
+
* @throws {@link Vectros.ConflictError}
|
|
5161
5213
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
5162
5214
|
*
|
|
5163
5215
|
* @example
|
|
@@ -5206,6 +5258,8 @@ var AuthClient = class {
|
|
|
5206
5258
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
5207
5259
|
case 404:
|
|
5208
5260
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
5261
|
+
case 409:
|
|
5262
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
5209
5263
|
case 429:
|
|
5210
5264
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
5211
5265
|
default:
|
|
@@ -5362,6 +5416,7 @@ var AuthClient = class {
|
|
|
5362
5416
|
*
|
|
5363
5417
|
* @throws {@link Vectros.ForbiddenError}
|
|
5364
5418
|
* @throws {@link Vectros.NotFoundError}
|
|
5419
|
+
* @throws {@link Vectros.ConflictError}
|
|
5365
5420
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
5366
5421
|
*
|
|
5367
5422
|
* @example
|
|
@@ -5414,6 +5469,8 @@ var AuthClient = class {
|
|
|
5414
5469
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
5415
5470
|
case 404:
|
|
5416
5471
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
5472
|
+
case 409:
|
|
5473
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
5417
5474
|
case 429:
|
|
5418
5475
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
5419
5476
|
default:
|
|
@@ -5439,6 +5496,7 @@ var AuthClient = class {
|
|
|
5439
5496
|
*
|
|
5440
5497
|
* @throws {@link Vectros.ForbiddenError}
|
|
5441
5498
|
* @throws {@link Vectros.NotFoundError}
|
|
5499
|
+
* @throws {@link Vectros.ConflictError}
|
|
5442
5500
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
5443
5501
|
*
|
|
5444
5502
|
* @example
|
|
@@ -5481,6 +5539,8 @@ var AuthClient = class {
|
|
|
5481
5539
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
5482
5540
|
case 404:
|
|
5483
5541
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
5542
|
+
case 409:
|
|
5543
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
5484
5544
|
case 429:
|
|
5485
5545
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
5486
5546
|
default:
|
|
@@ -5762,6 +5822,7 @@ var AuthClient = class {
|
|
|
5762
5822
|
* @throws {@link Vectros.BadRequestError}
|
|
5763
5823
|
* @throws {@link Vectros.ForbiddenError}
|
|
5764
5824
|
* @throws {@link Vectros.NotFoundError}
|
|
5825
|
+
* @throws {@link Vectros.ConflictError}
|
|
5765
5826
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
5766
5827
|
*
|
|
5767
5828
|
* @example
|
|
@@ -5808,6 +5869,8 @@ var AuthClient = class {
|
|
|
5808
5869
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
5809
5870
|
case 404:
|
|
5810
5871
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
5872
|
+
case 409:
|
|
5873
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
5811
5874
|
case 429:
|
|
5812
5875
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
5813
5876
|
default:
|
|
@@ -5821,7 +5884,7 @@ var AuthClient = class {
|
|
|
5821
5884
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v1/auth/issuers/{issuerId}");
|
|
5822
5885
|
}
|
|
5823
5886
|
/**
|
|
5824
|
-
* 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. This is unconditional on the affected users' `status`: suspending them first does not lift the refusal. **A bound registration cannot be replaced, self-service, within its own app context**: registering a replacement issuer under a different issuerId in the SAME context also fails, because the context's one-active-issuer claim is released only when THIS registration is deleted. Two real options: suspend this issuer (stops new exchanges immediately) and register a replacement under a DIFFERENT app context — note that targets a different context, so this context's existing users/roles/access profiles are not carried over; or contact
|
|
5887
|
+
* 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. This is unconditional on the affected users' `status`: suspending them first does not lift the refusal. **A bound registration cannot be replaced, self-service, within its own app context**: registering a replacement issuer under a different issuerId in the SAME context also fails, because the context's one-active-issuer claim is released only when THIS registration is deleted. Two real options: suspend this issuer (stops new exchanges immediately) and register a replacement under a DIFFERENT app context — note that targets a different context, so this context's existing users/roles/access profiles are not carried over; or contact support, who can force-release this registration so a replacement may be registered in the SAME context under a new issuerId. **The support path is not a lighter-weight alternative to the first — it PERMANENTLY RETIRES this issuerId and leaves every bound user unable to ever exchange through it again; it does not preserve continuity for them any better than registering under a different context does.** An issuer that has never been used for an exchange (no bound users yet) can always be deregistered.
|
|
5825
5888
|
*
|
|
5826
5889
|
* @param {Vectros.DeleteIssuerRequest} request
|
|
5827
5890
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -5947,7 +6010,7 @@ var AuthClient = class {
|
|
|
5947
6010
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers");
|
|
5948
6011
|
}
|
|
5949
6012
|
/**
|
|
5950
|
-
* 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
|
|
6013
|
+
* 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 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, 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.
|
|
5951
6014
|
*
|
|
5952
6015
|
* @param {Vectros.IssuerRequest} request
|
|
5953
6016
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -6356,6 +6419,7 @@ var AuthClient = class {
|
|
|
6356
6419
|
* @throws {@link Vectros.BadRequestError}
|
|
6357
6420
|
* @throws {@link Vectros.ForbiddenError}
|
|
6358
6421
|
* @throws {@link Vectros.NotFoundError}
|
|
6422
|
+
* @throws {@link Vectros.ConflictError}
|
|
6359
6423
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
6360
6424
|
*
|
|
6361
6425
|
* @example
|
|
@@ -6403,6 +6467,8 @@ var AuthClient = class {
|
|
|
6403
6467
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
6404
6468
|
case 404:
|
|
6405
6469
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
6470
|
+
case 409:
|
|
6471
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
6406
6472
|
case 429:
|
|
6407
6473
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
6408
6474
|
default:
|
|
@@ -6502,6 +6568,7 @@ var AuthClient = class {
|
|
|
6502
6568
|
* @throws {@link Vectros.UnauthorizedError}
|
|
6503
6569
|
* @throws {@link Vectros.ForbiddenError}
|
|
6504
6570
|
* @throws {@link Vectros.NotFoundError}
|
|
6571
|
+
* @throws {@link Vectros.ContentTooLargeError}
|
|
6505
6572
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
6506
6573
|
*
|
|
6507
6574
|
* @example
|
|
@@ -6546,6 +6613,8 @@ var AuthClient = class {
|
|
|
6546
6613
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
6547
6614
|
case 404:
|
|
6548
6615
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
6616
|
+
case 413:
|
|
6617
|
+
throw new ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
6549
6618
|
case 429:
|
|
6550
6619
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
6551
6620
|
default:
|
|
@@ -6685,7 +6754,7 @@ var ComplianceClient = class {
|
|
|
6685
6754
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/erasure-requests/{id}");
|
|
6686
6755
|
}
|
|
6687
6756
|
/**
|
|
6688
|
-
*
|
|
6757
|
+
* Reserved: with a root API key this operation answers `501` and starts no job. The request and response shapes are published so that integrations can be written against them: a request names the contexts, or a single end-subject, to export, and the response carries an `exportJobId` that `GET /v1/admin/export/{id}` reports on. Requires a root API key — a scoped credential is rejected with 403.
|
|
6689
6758
|
*
|
|
6690
6759
|
* @param {Vectros.ExportRequest} request
|
|
6691
6760
|
* @param {ComplianceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -6746,7 +6815,7 @@ var ComplianceClient = class {
|
|
|
6746
6815
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/admin/export");
|
|
6747
6816
|
}
|
|
6748
6817
|
/**
|
|
6749
|
-
*
|
|
6818
|
+
* Reserved: with a root API key this operation answers `501`. Its response shape is the one the export operation above refers to: the job status, and a short-lived presigned download URL and a manifest (format version and per-context counts) for a completed job. Requires a root API key.
|
|
6750
6819
|
*
|
|
6751
6820
|
* @param {Vectros.GetExportRequest} request
|
|
6752
6821
|
* @param {ComplianceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -6877,6 +6946,8 @@ var DocumentsClient = class {
|
|
|
6877
6946
|
*
|
|
6878
6947
|
* @throws {@link Vectros.BadRequestError}
|
|
6879
6948
|
* @throws {@link Vectros.ForbiddenError}
|
|
6949
|
+
* @throws {@link Vectros.NotFoundError}
|
|
6950
|
+
* @throws {@link Vectros.ConflictError}
|
|
6880
6951
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
6881
6952
|
*
|
|
6882
6953
|
* @example
|
|
@@ -6928,6 +6999,10 @@ var DocumentsClient = class {
|
|
|
6928
6999
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
6929
7000
|
case 403:
|
|
6930
7001
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
7002
|
+
case 404:
|
|
7003
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
7004
|
+
case 409:
|
|
7005
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
6931
7006
|
case 429:
|
|
6932
7007
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
6933
7008
|
default:
|
|
@@ -7075,6 +7150,7 @@ var DocumentsClient = class {
|
|
|
7075
7150
|
* @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
7076
7151
|
*
|
|
7077
7152
|
* @throws {@link Vectros.NotFoundError}
|
|
7153
|
+
* @throws {@link Vectros.ConflictError}
|
|
7078
7154
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
7079
7155
|
*
|
|
7080
7156
|
* @example
|
|
@@ -7114,6 +7190,8 @@ var DocumentsClient = class {
|
|
|
7114
7190
|
switch (_response.error.statusCode) {
|
|
7115
7191
|
case 404:
|
|
7116
7192
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
7193
|
+
case 409:
|
|
7194
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
7117
7195
|
case 429:
|
|
7118
7196
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
7119
7197
|
default:
|
|
@@ -7406,7 +7484,7 @@ var DocumentsClient = class {
|
|
|
7406
7484
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/documents/{id}/download");
|
|
7407
7485
|
}
|
|
7408
7486
|
/**
|
|
7409
|
-
* Returns the document's full text body when it is retained:
|
|
7487
|
+
* Returns the document's full text body when it is retained: retained for text-ingested documents, and for file-uploaded documents unless they were uploaded with `storeText=false` (which discards the extracted text once indexing completes — the original file remains available via `GET /v1/documents/{id}/download`). Returns 404 when the document does not exist, its text was not retained, or extraction has not yet completed. Requires the `documents:r` scope.
|
|
7410
7488
|
*
|
|
7411
7489
|
* @param {Vectros.GetDocumentTextRequest} request
|
|
7412
7490
|
* @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -7526,6 +7604,7 @@ var DocumentsClient = class {
|
|
|
7526
7604
|
*
|
|
7527
7605
|
* @throws {@link Vectros.BadRequestError}
|
|
7528
7606
|
* @throws {@link Vectros.ForbiddenError}
|
|
7607
|
+
* @throws {@link Vectros.ConflictError}
|
|
7529
7608
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
7530
7609
|
*
|
|
7531
7610
|
* @example
|
|
@@ -7575,6 +7654,8 @@ var DocumentsClient = class {
|
|
|
7575
7654
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
7576
7655
|
case 403:
|
|
7577
7656
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
7657
|
+
case 409:
|
|
7658
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
7578
7659
|
case 429:
|
|
7579
7660
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
7580
7661
|
default:
|
|
@@ -7658,6 +7739,8 @@ var FoldersClient = class {
|
|
|
7658
7739
|
*
|
|
7659
7740
|
* @throws {@link Vectros.BadRequestError}
|
|
7660
7741
|
* @throws {@link Vectros.ForbiddenError}
|
|
7742
|
+
* @throws {@link Vectros.NotFoundError}
|
|
7743
|
+
* @throws {@link Vectros.ConflictError}
|
|
7661
7744
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
7662
7745
|
*
|
|
7663
7746
|
* @example
|
|
@@ -7707,6 +7790,10 @@ var FoldersClient = class {
|
|
|
7707
7790
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
7708
7791
|
case 403:
|
|
7709
7792
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
7793
|
+
case 404:
|
|
7794
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
7795
|
+
case 409:
|
|
7796
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
7710
7797
|
case 429:
|
|
7711
7798
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
7712
7799
|
default:
|
|
@@ -7782,6 +7869,7 @@ var FoldersClient = class {
|
|
|
7782
7869
|
*
|
|
7783
7870
|
* @throws {@link Vectros.ForbiddenError}
|
|
7784
7871
|
* @throws {@link Vectros.NotFoundError}
|
|
7872
|
+
* @throws {@link Vectros.ConflictError}
|
|
7785
7873
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
7786
7874
|
*
|
|
7787
7875
|
* @example
|
|
@@ -7829,6 +7917,8 @@ var FoldersClient = class {
|
|
|
7829
7917
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
7830
7918
|
case 404:
|
|
7831
7919
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
7920
|
+
case 409:
|
|
7921
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
7832
7922
|
case 429:
|
|
7833
7923
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
7834
7924
|
default:
|
|
@@ -7849,6 +7939,7 @@ var FoldersClient = class {
|
|
|
7849
7939
|
*
|
|
7850
7940
|
* @throws {@link Vectros.BadRequestError}
|
|
7851
7941
|
* @throws {@link Vectros.NotFoundError}
|
|
7942
|
+
* @throws {@link Vectros.ConflictError}
|
|
7852
7943
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
7853
7944
|
*
|
|
7854
7945
|
* @example
|
|
@@ -7890,6 +7981,8 @@ var FoldersClient = class {
|
|
|
7890
7981
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
7891
7982
|
case 404:
|
|
7892
7983
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
7984
|
+
case 409:
|
|
7985
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
7893
7986
|
case 429:
|
|
7894
7987
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
7895
7988
|
default:
|
|
@@ -7903,7 +7996,7 @@ var FoldersClient = class {
|
|
|
7903
7996
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v1/folders/{id}");
|
|
7904
7997
|
}
|
|
7905
7998
|
/**
|
|
7906
|
-
* Partially updates a folder using an RFC 7386 JSON Merge Patch. The `name`, `description`, and ownership fields (`userId`, `scopes`) are applied when present and left unchanged when omitted; sending any of these as null is rejected, because clearing a field is not supported
|
|
7999
|
+
* Partially updates a folder using an RFC 7386 JSON Merge Patch. The `name`, `description`, and ownership fields (`userId`, `scopes`) are applied when present and left unchanged when omitted; sending any of these as null is rejected, because clearing a field is not supported (omit it instead). `slug` and `parentFolderId` are immutable — a folder cannot be re-slugged or moved via the API — and the request is rejected if either is present. Pass `expectedVersion` for optimistic concurrency (you get a 409 if the folder changed since you last read it). Requires the `folders:u` scope.
|
|
7907
8000
|
*
|
|
7908
8001
|
* @param {Vectros.PatchFolderRequest} request
|
|
7909
8002
|
* @param {FoldersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -8126,6 +8219,8 @@ var IdentityClient = class {
|
|
|
8126
8219
|
*
|
|
8127
8220
|
* @throws {@link Vectros.BadRequestError}
|
|
8128
8221
|
* @throws {@link Vectros.ForbiddenError}
|
|
8222
|
+
* @throws {@link Vectros.NotFoundError}
|
|
8223
|
+
* @throws {@link Vectros.ConflictError}
|
|
8129
8224
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
8130
8225
|
*
|
|
8131
8226
|
* @example
|
|
@@ -8178,6 +8273,10 @@ var IdentityClient = class {
|
|
|
8178
8273
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
8179
8274
|
case 403:
|
|
8180
8275
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
8276
|
+
case 404:
|
|
8277
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
8278
|
+
case 409:
|
|
8279
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
8181
8280
|
case 429:
|
|
8182
8281
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
8183
8282
|
default:
|
|
@@ -8258,6 +8357,7 @@ var IdentityClient = class {
|
|
|
8258
8357
|
*
|
|
8259
8358
|
* @throws {@link Vectros.BadRequestError}
|
|
8260
8359
|
* @throws {@link Vectros.NotFoundError}
|
|
8360
|
+
* @throws {@link Vectros.ConflictError}
|
|
8261
8361
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
8262
8362
|
*
|
|
8263
8363
|
* @example
|
|
@@ -8310,6 +8410,8 @@ var IdentityClient = class {
|
|
|
8310
8410
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
8311
8411
|
case 404:
|
|
8312
8412
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
8413
|
+
case 409:
|
|
8414
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
8313
8415
|
case 429:
|
|
8314
8416
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
8315
8417
|
default:
|
|
@@ -8329,6 +8431,7 @@ var IdentityClient = class {
|
|
|
8329
8431
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
8330
8432
|
*
|
|
8331
8433
|
* @throws {@link Vectros.NotFoundError}
|
|
8434
|
+
* @throws {@link Vectros.ConflictError}
|
|
8332
8435
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
8333
8436
|
*
|
|
8334
8437
|
* @example
|
|
@@ -8373,6 +8476,8 @@ var IdentityClient = class {
|
|
|
8373
8476
|
switch (_response.error.statusCode) {
|
|
8374
8477
|
case 404:
|
|
8375
8478
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
8479
|
+
case 409:
|
|
8480
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
8376
8481
|
case 429:
|
|
8377
8482
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
8378
8483
|
default:
|
|
@@ -8596,6 +8701,7 @@ var IdentityClient = class {
|
|
|
8596
8701
|
*
|
|
8597
8702
|
* @throws {@link Vectros.ForbiddenError}
|
|
8598
8703
|
* @throws {@link Vectros.NotFoundError}
|
|
8704
|
+
* @throws {@link Vectros.ConflictError}
|
|
8599
8705
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
8600
8706
|
*
|
|
8601
8707
|
* @example
|
|
@@ -8647,6 +8753,8 @@ var IdentityClient = class {
|
|
|
8647
8753
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
8648
8754
|
case 404:
|
|
8649
8755
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
8756
|
+
case 409:
|
|
8757
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
8650
8758
|
case 429:
|
|
8651
8759
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
8652
8760
|
default:
|
|
@@ -8667,6 +8775,7 @@ var IdentityClient = class {
|
|
|
8667
8775
|
*
|
|
8668
8776
|
* @throws {@link Vectros.ForbiddenError}
|
|
8669
8777
|
* @throws {@link Vectros.NotFoundError}
|
|
8778
|
+
* @throws {@link Vectros.ConflictError}
|
|
8670
8779
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
8671
8780
|
*
|
|
8672
8781
|
* @example
|
|
@@ -8711,6 +8820,8 @@ var IdentityClient = class {
|
|
|
8711
8820
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
8712
8821
|
case 404:
|
|
8713
8822
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
8823
|
+
case 409:
|
|
8824
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
8714
8825
|
case 429:
|
|
8715
8826
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
8716
8827
|
default:
|
|
@@ -8775,7 +8886,7 @@ var IdentityClient = class {
|
|
|
8775
8886
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/namespaces");
|
|
8776
8887
|
}
|
|
8777
8888
|
/**
|
|
8778
|
-
* 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 one of the CLI bootstrap's two provisioning capabilities — never an ordinary
|
|
8889
|
+
* 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 one of the CLI bootstrap's two provisioning capabilities — never an ordinary grantable scope. A bootstrap credential's registration is confined to its own app context UNLESS it additionally holds the tenant-wide namespace-provisioning capability and `contextId` is omitted, in which case it may register a TENANT-WIDE namespace (visible to every context). `org` and `client` are reserved names, registered the same way as any other namespace.
|
|
8779
8890
|
*
|
|
8780
8891
|
* @param {Vectros.RegisterNamespaceRequest} request
|
|
8781
8892
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -8917,6 +9028,7 @@ var IdentityClient = class {
|
|
|
8917
9028
|
*
|
|
8918
9029
|
* @throws {@link Vectros.BadRequestError}
|
|
8919
9030
|
* @throws {@link Vectros.ForbiddenError}
|
|
9031
|
+
* @throws {@link Vectros.ConflictError}
|
|
8920
9032
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
8921
9033
|
*
|
|
8922
9034
|
* @example
|
|
@@ -8966,6 +9078,8 @@ var IdentityClient = class {
|
|
|
8966
9078
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
8967
9079
|
case 403:
|
|
8968
9080
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
9081
|
+
case 409:
|
|
9082
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
8969
9083
|
case 429:
|
|
8970
9084
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
8971
9085
|
default:
|
|
@@ -9034,13 +9148,14 @@ var IdentityClient = class {
|
|
|
9034
9148
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/users/{id}");
|
|
9035
9149
|
}
|
|
9036
9150
|
/**
|
|
9037
|
-
* Updates mutable fields on an existing user (such as email, status, payload, or schema binding). The `type` field is immutable after creation, and `email` cannot be changed while an invitation to that user is still outstanding — revoke the invitation, or invite the new address instead. This endpoint also activates an invited user: a PUT that moves a PENDING user to ACTIVE and carries `inviteToken`, `externalSubject`, and `emailVerifiedAttestation=true` completes the invitation. **`externalSubject` set this way is NOT an authentication binding and does not enable sign-in anywhere** — not the Vectros DevPortal/Admin App/web apps, and not `/v1/auth/token/exchange` either; both are granted only by the invitee authenticating themselves. If the invitee needs dev-portal/web-app access, send them the invitation link and let them accept it directly. If the invitee needs to sign in via token exchange, have them redeem `inviteToken` themselves at `/v1/auth/token/exchange` with their own credential — Vectros verifies it there and computes its own value for this field from the verified credential. The value you send here is stored exactly as-is, with no normalization, and does NOT automatically match or deduplicate against what a later token-exchange sign-in computes for the same real-world identity. Call this endpoint directly only if you run your own backend and want Vectros to record which of your own users a given account corresponds to — treat this field as informational for that purpose, not as a way to pre-authorize sign-in. Requires the `users:u` scope.
|
|
9151
|
+
* Updates mutable fields on an existing user (such as email, status, payload, or schema binding). The `type` field is immutable after creation, and `email` cannot be changed while an invitation to that user is still outstanding — revoke the invitation, or invite the new address instead. This endpoint also activates an invited user: a PUT that moves a PENDING user to ACTIVE and carries `inviteToken`, `externalSubject`, and `emailVerifiedAttestation=true` completes the invitation. **`externalSubject` set this way is NOT an authentication binding and does not enable sign-in anywhere** — not the Vectros DevPortal/Admin App/web apps, and not `/v1/auth/token/exchange` either; both are granted only by the invitee authenticating themselves. A subject stored through `PUT /v1/users/{id}` does not make the person a member of your account: it is ignored for the tenant claims in sign-in tokens, the developer portal's memberships list and tenant switching, and an ownership transfer. To give such a person access, delete the user and invite them again; accepting the invitation binds the subject and counts it. If the invitee needs dev-portal/web-app access, send them the invitation link and let them accept it directly. If the invitee needs to sign in via token exchange, have them redeem `inviteToken` themselves at `/v1/auth/token/exchange` with their own credential — Vectros verifies it there and computes its own value for this field from the verified credential. The value you send here is stored exactly as-is, with no normalization, and does NOT automatically match or deduplicate against what a later token-exchange sign-in computes for the same real-world identity. Call this endpoint directly only if you run your own backend and want Vectros to record which of your own users a given account corresponds to — treat this field as informational for that purpose, not as a way to pre-authorize sign-in. Requires the `users:u` scope.
|
|
9038
9152
|
*
|
|
9039
9153
|
* @param {Vectros.UpdateUserRequest} request
|
|
9040
9154
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
9041
9155
|
*
|
|
9042
9156
|
* @throws {@link Vectros.BadRequestError}
|
|
9043
9157
|
* @throws {@link Vectros.NotFoundError}
|
|
9158
|
+
* @throws {@link Vectros.ConflictError}
|
|
9044
9159
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
9045
9160
|
*
|
|
9046
9161
|
* @example
|
|
@@ -9088,6 +9203,8 @@ var IdentityClient = class {
|
|
|
9088
9203
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
9089
9204
|
case 404:
|
|
9090
9205
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
9206
|
+
case 409:
|
|
9207
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
9091
9208
|
case 429:
|
|
9092
9209
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
9093
9210
|
default:
|
|
@@ -9349,7 +9466,7 @@ var InferenceClient = class {
|
|
|
9349
9466
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
9350
9467
|
}
|
|
9351
9468
|
/**
|
|
9352
|
-
* Returns
|
|
9469
|
+
* Returns the whole platform model catalog, whatever your plan: `availableOn` names each model's plan tiers. Each entry also carries the context window and the credit rates per 1K input and output tokens: `regionPricing.base` for global-region requests, `regionPricing.us` for default requests, and `longContext` for prompts over its threshold. A model reached through a `providerAlias` is not listed. Use this to populate model pickers and to validate a request before calling `/v1/chat`, `/v1/rag`, or `/v1/documents/{id}/ask`.
|
|
9353
9470
|
*
|
|
9354
9471
|
* @param {InferenceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
9355
9472
|
*
|
|
@@ -9393,7 +9510,7 @@ var InferenceClient = class {
|
|
|
9393
9510
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/models");
|
|
9394
9511
|
}
|
|
9395
9512
|
/**
|
|
9396
|
-
* Streams a model response as Server-Sent Events (SSE). Send the full conversation history in the `messages` array; a message with role `system` is extracted and used as the system prompt.
|
|
9513
|
+
* Streams a model response as Server-Sent Events (SSE). Send the full conversation history in the `messages` array; a message with role `system` is extracted and used as the system prompt. On a pre-paid account, token cost is debited from your inference balance; usage-billed accounts accrue it for post-billing. A request routed through your own `providerAlias` incurs no Vectros token cost. A small per-call flat fee is charged to your monthly credit allowance, except when the call fails on the server side. Requires the `inference:r` scope.
|
|
9397
9514
|
*/
|
|
9398
9515
|
chatInference(request, requestOptions) {
|
|
9399
9516
|
return HttpResponsePromise.fromPromise(this.__chatInference(request, requestOptions));
|
|
@@ -9446,10 +9563,14 @@ var InferenceClient = class {
|
|
|
9446
9563
|
throw new PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
9447
9564
|
case 403:
|
|
9448
9565
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
9566
|
+
case 404:
|
|
9567
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
9449
9568
|
case 413:
|
|
9450
9569
|
throw new ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
9451
9570
|
case 429:
|
|
9452
9571
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
9572
|
+
case 503:
|
|
9573
|
+
throw new ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
9453
9574
|
default:
|
|
9454
9575
|
throw new VectrosError({
|
|
9455
9576
|
statusCode: _response.error.statusCode,
|
|
@@ -9523,6 +9644,8 @@ var InferenceClient = class {
|
|
|
9523
9644
|
throw new ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
9524
9645
|
case 429:
|
|
9525
9646
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
9647
|
+
case 503:
|
|
9648
|
+
throw new ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
9526
9649
|
default:
|
|
9527
9650
|
throw new VectrosError({
|
|
9528
9651
|
statusCode: _response.error.statusCode,
|
|
@@ -9587,12 +9710,16 @@ var InferenceClient = class {
|
|
|
9587
9710
|
throw new PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
9588
9711
|
case 403:
|
|
9589
9712
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
9713
|
+
case 404:
|
|
9714
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
9590
9715
|
case 413:
|
|
9591
9716
|
throw new ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
9592
9717
|
case 429:
|
|
9593
9718
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
9594
9719
|
case 500:
|
|
9595
9720
|
throw new InternalServerError(_response.error.body, _response.rawResponse);
|
|
9721
|
+
case 503:
|
|
9722
|
+
throw new ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
9596
9723
|
default:
|
|
9597
9724
|
throw new VectrosError({
|
|
9598
9725
|
statusCode: _response.error.statusCode,
|
|
@@ -9670,7 +9797,7 @@ var RecordsClient = class {
|
|
|
9670
9797
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/records/batch-get");
|
|
9671
9798
|
}
|
|
9672
9799
|
/**
|
|
9673
|
-
* Reserved endpoint for batch lookup and reference resolution. The published response shape correlates results to each input and carries a per-item status envelope.
|
|
9800
|
+
* Reserved endpoint for batch lookup and reference resolution. With the `records:r` scope it answers 501 (not implemented). The published response shape correlates results to each input and carries a per-item status envelope. Requires the `records:r` scope.
|
|
9674
9801
|
*
|
|
9675
9802
|
* @param {Vectros.BatchLookupRequest} request
|
|
9676
9803
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -9731,7 +9858,7 @@ var RecordsClient = class {
|
|
|
9731
9858
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/records/lookup/batch");
|
|
9732
9859
|
}
|
|
9733
9860
|
/**
|
|
9734
|
-
* Writes up to 50 records
|
|
9861
|
+
* Writes up to 50 records per request in `best_effort` mode and up to 50 with `atomicity: all_or_nothing`, in a single request. Each item in `items` has exactly the same shape, and goes through exactly the same validation, authorization and idempotency rules, as the body of a single `POST /v1/records` — including schema validation, `externalId` idempotency, unique-field enforcement, and the `records:c:<type>` scope check, which is applied per item against that item's own record type. A batch is not a way to write a type your credential could not write one at a time.
|
|
9735
9862
|
*
|
|
9736
9863
|
* `atomicity` selects how the batch commits. `best_effort` (the default) writes each item independently: some can succeed while others fail, and each item's own outcome is reported. `all_or_nothing` commits every item in one transaction — if any item fails, no record is created or updated at all, and every item that was itself fine reports `not_committed` while the ones that failed report why. Because the transaction is bounded by the number of underlying storage rows rather than by the number of records, a large `all_or_nothing` batch can be refused as too large to commit atomically even when it is within the item limit; the error says so, and nothing is written when it happens.
|
|
9737
9864
|
*
|
|
@@ -9870,6 +9997,8 @@ var RecordsClient = class {
|
|
|
9870
9997
|
*
|
|
9871
9998
|
* @throws {@link Vectros.BadRequestError}
|
|
9872
9999
|
* @throws {@link Vectros.ForbiddenError}
|
|
10000
|
+
* @throws {@link Vectros.NotFoundError}
|
|
10001
|
+
* @throws {@link Vectros.ConflictError}
|
|
9873
10002
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
9874
10003
|
*
|
|
9875
10004
|
* @example
|
|
@@ -9926,6 +10055,10 @@ var RecordsClient = class {
|
|
|
9926
10055
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
9927
10056
|
case 403:
|
|
9928
10057
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
10058
|
+
case 404:
|
|
10059
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
10060
|
+
case 409:
|
|
10061
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
9929
10062
|
case 429:
|
|
9930
10063
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
9931
10064
|
default:
|
|
@@ -10074,6 +10207,7 @@ var RecordsClient = class {
|
|
|
10074
10207
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
10075
10208
|
*
|
|
10076
10209
|
* @throws {@link Vectros.NotFoundError}
|
|
10210
|
+
* @throws {@link Vectros.ConflictError}
|
|
10077
10211
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
10078
10212
|
*
|
|
10079
10213
|
* @example
|
|
@@ -10113,6 +10247,8 @@ var RecordsClient = class {
|
|
|
10113
10247
|
switch (_response.error.statusCode) {
|
|
10114
10248
|
case 404:
|
|
10115
10249
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
10250
|
+
case 409:
|
|
10251
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
10116
10252
|
case 429:
|
|
10117
10253
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
10118
10254
|
default:
|
|
@@ -10126,7 +10262,7 @@ var RecordsClient = class {
|
|
|
10126
10262
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v1/records/{id}");
|
|
10127
10263
|
}
|
|
10128
10264
|
/**
|
|
10129
|
-
* Partially updates a record using an RFC 7386 JSON Merge Patch. The `payload` object is deep-merged into the existing payload: keys you send overwrite (recursing into nested objects), a key set to null is deleted, and keys you omit are left unchanged — so you can change a single field without re-sending the rest (unlike the full-replacement PUT). Top-level fields (`status`, `folderId`, `userId`, `scopes`) are set when present and left unchanged when omitted; sending a top-level field as null is rejected (clearing a top-level field is not supported
|
|
10265
|
+
* Partially updates a record using an RFC 7386 JSON Merge Patch. The `payload` object is deep-merged into the existing payload: keys you send overwrite (recursing into nested objects), a key set to null is deleted, and keys you omit are left unchanged — so you can change a single field without re-sending the rest (unlike the full-replacement PUT). Top-level fields (`status`, `folderId`, `userId`, `scopes`) are set when present and left unchanged when omitted; sending a top-level field as null is rejected (clearing a top-level field is not supported — omit it instead). `typeName`, `schemaId`, `externalId`, and `indexMode` are immutable and rejected if present. The merged result is validated against the schema. Pass `expectedVersion` to make the patch conditional (optimistic concurrency, 409 on conflict). Requires the `records:u:<type>` scope.
|
|
10130
10266
|
*
|
|
10131
10267
|
* @param {Vectros.PatchRecordRequest} request
|
|
10132
10268
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -10555,6 +10691,8 @@ var SchemasClient = class {
|
|
|
10555
10691
|
*
|
|
10556
10692
|
* @throws {@link Vectros.BadRequestError}
|
|
10557
10693
|
* @throws {@link Vectros.ForbiddenError}
|
|
10694
|
+
* @throws {@link Vectros.NotFoundError}
|
|
10695
|
+
* @throws {@link Vectros.ConflictError}
|
|
10558
10696
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
10559
10697
|
*
|
|
10560
10698
|
* @example
|
|
@@ -10624,6 +10762,10 @@ var SchemasClient = class {
|
|
|
10624
10762
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
10625
10763
|
case 403:
|
|
10626
10764
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
10765
|
+
case 404:
|
|
10766
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
10767
|
+
case 409:
|
|
10768
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
10627
10769
|
case 429:
|
|
10628
10770
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
10629
10771
|
default:
|
|
@@ -10767,7 +10909,7 @@ var SchemasClient = class {
|
|
|
10767
10909
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v1/schemas/{id}");
|
|
10768
10910
|
}
|
|
10769
10911
|
/**
|
|
10770
|
-
* Permanently deletes a record schema. The request is refused with 409 if records of this type still exist — delete those records first, since every record must reference a live schema. The same applies to documents bound to this schema (for a schema declaring the `document` surface) — delete those documents first. A lineage base (a schema other schemas declare `basedOn`) also cannot be deleted while any such variant still exists — delete the variant schema(s) first. It is likewise refused while any trigger rule fires off this schema — delete those trigger rules first. Requires the `schemas:d` scope.
|
|
10912
|
+
* Permanently deletes a record schema. The request is refused with 409 if records of this type still exist — delete those records first, since every record must reference a live schema. The same applies to documents bound to this schema (for a schema declaring the `document` surface) — delete those documents first. A lineage base (a schema other schemas declare `basedOn`) also cannot be deleted while any such variant still exists — delete the variant schema(s) first. It is likewise refused while any trigger rule fires off this schema — delete those trigger rules first — and, for a schema declaring the `user` or `entity` surface, while any user or entity bound to it still exists. Requires the `schemas:d` scope.
|
|
10771
10913
|
*
|
|
10772
10914
|
* @param {Vectros.DeleteSchemaRequest} request
|
|
10773
10915
|
* @param {SchemasClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -10894,7 +11036,7 @@ var ScriptsClient = class {
|
|
|
10894
11036
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
10895
11037
|
}
|
|
10896
11038
|
/**
|
|
10897
|
-
* Runs a script you previously pushed to `POST /v1/scripts`, under your own credential, and returns what it returned. Every write the script makes is buffered and committed as ONE transaction after the script finishes: either all of them land or none do, and the response is sent only after they have committed — so everything in `result` is committed state or the script's own computation over it. On any failure the body is the standard error envelope and nothing the script staged is committed: its rows are written only when the transaction commits, and a document body or a large payload is DECIDED at that point and WRITTEN to storage only after the commit, so an aborted execution leaves nothing behind. The one residual sits after a successful commit, outside this response: if storing a body fails then, the row exists and the body
|
|
11039
|
+
* Runs a script you previously pushed to `POST /v1/scripts`, under your own credential, and returns what it returned. Every write the script makes is buffered and committed as ONE transaction after the script finishes: either all of them land or none do, and the response is sent only after they have committed — so everything in `result` is committed state or the script's own computation over it. On any failure the body is the standard error envelope and nothing the script staged is committed: its rows are written only when the transaction commits, and a document body or a large payload is DECIDED at that point and WRITTEN to storage only after the commit, so an aborted execution leaves nothing behind. The one residual sits after a successful commit, outside this response: if storing a body fails then, the row exists and the body may not — so a `200` guarantees the rows, and a document's text should be read before it is relied on.
|
|
10898
11040
|
*
|
|
10899
11041
|
* **Permission.** Requires the `scripts:x` scope — the permission to *execute* — separate from the `scripts:c` permission to push scripts. Bare `scripts:x` grants every script in the context; `scripts:x:<name>` grants exactly that script name, every version of it. Execution discloses no source, so `scripts:r` is not needed. Inside the script, every read and write is enforced by your credential's data scopes exactly as the equivalent REST call would be — `scripts:x` alone can read and write nothing.
|
|
10900
11042
|
*
|
|
@@ -11508,6 +11650,8 @@ var TriggersClient = class {
|
|
|
11508
11650
|
*
|
|
11509
11651
|
* @throws {@link Vectros.BadRequestError}
|
|
11510
11652
|
* @throws {@link Vectros.ForbiddenError}
|
|
11653
|
+
* @throws {@link Vectros.NotFoundError}
|
|
11654
|
+
* @throws {@link Vectros.ConflictError}
|
|
11511
11655
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
11512
11656
|
*
|
|
11513
11657
|
* @example
|
|
@@ -11565,6 +11709,10 @@ var TriggersClient = class {
|
|
|
11565
11709
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
11566
11710
|
case 403:
|
|
11567
11711
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
11712
|
+
case 404:
|
|
11713
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
11714
|
+
case 409:
|
|
11715
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
11568
11716
|
case 429:
|
|
11569
11717
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
11570
11718
|
default:
|
|
@@ -11641,6 +11789,7 @@ var TriggersClient = class {
|
|
|
11641
11789
|
* @throws {@link Vectros.BadRequestError}
|
|
11642
11790
|
* @throws {@link Vectros.ForbiddenError}
|
|
11643
11791
|
* @throws {@link Vectros.NotFoundError}
|
|
11792
|
+
* @throws {@link Vectros.ConflictError}
|
|
11644
11793
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
11645
11794
|
*
|
|
11646
11795
|
* @example
|
|
@@ -11698,6 +11847,8 @@ var TriggersClient = class {
|
|
|
11698
11847
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
11699
11848
|
case 404:
|
|
11700
11849
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
11850
|
+
case 409:
|
|
11851
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
11701
11852
|
case 429:
|
|
11702
11853
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
11703
11854
|
default:
|
|
@@ -11717,6 +11868,7 @@ var TriggersClient = class {
|
|
|
11717
11868
|
* @param {TriggersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
11718
11869
|
*
|
|
11719
11870
|
* @throws {@link Vectros.NotFoundError}
|
|
11871
|
+
* @throws {@link Vectros.ConflictError}
|
|
11720
11872
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
11721
11873
|
*
|
|
11722
11874
|
* @example
|
|
@@ -11756,6 +11908,8 @@ var TriggersClient = class {
|
|
|
11756
11908
|
switch (_response.error.statusCode) {
|
|
11757
11909
|
case 404:
|
|
11758
11910
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
11911
|
+
case 409:
|
|
11912
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
11759
11913
|
case 429:
|
|
11760
11914
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
11761
11915
|
default:
|
|
@@ -12091,7 +12245,7 @@ var BlueprintSchemaSchema = z.object({
|
|
|
12091
12245
|
// (`lintNamespacedScopeArrays`) — this `.max(MAX_SCOPE_DIMENSIONS)` is
|
|
12092
12246
|
// only the shape-level cap, not the grammar check.
|
|
12093
12247
|
// With a scoped token these must be consistent with the profile's dataScope
|
|
12094
|
-
// (
|
|
12248
|
+
// (the lints here check each entry's grammar only, not that consistency).
|
|
12095
12249
|
userId: z.string().min(1).optional(),
|
|
12096
12250
|
scopes: z.array(z.string().min(1)).max(MAX_SCOPE_DIMENSIONS).optional(),
|
|
12097
12251
|
// The id of an existing schema this one is a CUSTOMIZATION of, when a schema
|
|
@@ -12457,8 +12611,8 @@ var IdentityDeclSchema = z.object({
|
|
|
12457
12611
|
kind: IdentityKindSchema,
|
|
12458
12612
|
// safeDisplayString: `@vectros-ai/cli`'s `runBootstrapCli` and `blueprint plan` both print
|
|
12459
12613
|
// this RAW to stdout ("~ <name> (<kind>) — external id '<externalId>'"), immediately before
|
|
12460
|
-
// the "Apply this plan? [y/N]" confirmation gate itself — the highest-severity
|
|
12461
|
-
//
|
|
12614
|
+
// the "Apply this plan? [y/N]" confirmation gate itself — the highest-severity place to
|
|
12615
|
+
// close, since it sits at the confirmation prompt's own disclosure text, not merely
|
|
12462
12616
|
// somewhere upstream of it. `displayName` is wrapped too though not currently
|
|
12463
12617
|
// rendered in any preview (defense-in-depth, matching this file's practice for its adjacent
|
|
12464
12618
|
// sibling fields) — it does reach a platform API payload as an entity's `name`.
|
|
@@ -12804,7 +12958,7 @@ var SeedCommonShape = {
|
|
|
12804
12958
|
* seeds resolve a `reference` against (across surfaces: a record seed may
|
|
12805
12959
|
* reference a document seed by its externalId, and vice versa).
|
|
12806
12960
|
* `safeDisplayString`: not currently rendered in a plan-preview line (same as this schema's
|
|
12807
|
-
* `typeName` just above
|
|
12961
|
+
* `typeName` just above), but the same "costs nothing to close" standard
|
|
12808
12962
|
* applies — a short caller-supplied id, not free-form prose, so no YAML block-scalar
|
|
12809
12963
|
* collision risk like `description`'s.
|
|
12810
12964
|
*/
|
|
@@ -13469,10 +13623,10 @@ var BlueprintSchema = z.object({
|
|
|
13469
13623
|
/** Stable blueprint id (the `--blueprint <name>` selector + idempotency key). */
|
|
13470
13624
|
name: safeDisplayString(z.string().min(1)),
|
|
13471
13625
|
version: safeDisplayString(z.string().min(1)),
|
|
13472
|
-
// NOT safeDisplayString — deliberately
|
|
13473
|
-
// blueprint
|
|
13626
|
+
// NOT safeDisplayString — deliberately: that wrap breaks real, multi-line-authored
|
|
13627
|
+
// blueprint `description`s. `description` is never interpolated into any
|
|
13474
13628
|
// rendered plan-preview line (`buildPlan`'s header prints
|
|
13475
|
-
// `name`/`version`/`contextId`, never `description`
|
|
13629
|
+
// `name`/`version`/`contextId`, never `description`), so
|
|
13476
13630
|
// wrapping it protected a sink that does not exist. It also actively broke real content:
|
|
13477
13631
|
// this is exactly the field authors reach for a YAML folded (`>`) or literal (`|`) block
|
|
13478
13632
|
// scalar to write, and clip chomping (the YAML default) always leaves exactly one trailing
|
|
@@ -13487,9 +13641,8 @@ var BlueprintSchema = z.object({
|
|
|
13487
13641
|
/**
|
|
13488
13642
|
* Human-readable app-context name; defaults to `MCP — <name>` (see {@link contextNameOf})
|
|
13489
13643
|
* when absent. `safeDisplayString`: `contextNameOf` renders this raw into the FIRST line of
|
|
13490
|
-
* every `buildPlan` summary (the `context '...' (...)` step)
|
|
13491
|
-
*
|
|
13492
|
-
* `name`/`version`/`description` right above it.
|
|
13644
|
+
* every `buildPlan` summary (the `context '...' (...)` step); same shape as
|
|
13645
|
+
* `name`/`version` right above it.
|
|
13493
13646
|
*/
|
|
13494
13647
|
contextName: safeDisplayString(z.string().min(1)).optional(),
|
|
13495
13648
|
/**
|
|
@@ -13584,9 +13737,8 @@ var BlueprintSchema = z.object({
|
|
|
13584
13737
|
*/
|
|
13585
13738
|
identityProjectionClaims: z.array(
|
|
13586
13739
|
// safeDisplayString: rendered raw into buildPlan's context step (`identity projection:
|
|
13587
|
-
// [...]`) — same rendered-plan-preview shape as `capturedClaims` (its structural pair
|
|
13588
|
-
//
|
|
13589
|
-
// applies (safeDisplayString's own `.refine` before the blank-name `.refine` below,
|
|
13740
|
+
// [...]`) — same rendered-plan-preview shape as `capturedClaims` (its structural pair);
|
|
13741
|
+
// the same ordering rule applies (safeDisplayString's own `.refine` before the blank-name `.refine` below,
|
|
13590
13742
|
// both after `.max` since `.refine` returns a ZodEffects with no `.max`).
|
|
13591
13743
|
safeDisplayString(
|
|
13592
13744
|
z.string().max(MAX_CAPTURED_CLAIM_NAME_LENGTH, {
|
|
@@ -13791,7 +13943,7 @@ function deriveSuffix(contextId) {
|
|
|
13791
13943
|
var WHOLE_TOKEN_RE = /^\$\{\{\s*([A-Za-z_]\w*)\.([A-Za-z_]\w*)\s*\}\}$/;
|
|
13792
13944
|
var TOKEN_SCAN_RE = /\$\$\{\{|\$\{\{([\s\S]*?)\}\}|\$\{\{/g;
|
|
13793
13945
|
var INNER_REF_RE = /^([A-Za-z_]\w*)\.([A-Za-z_]\w*)$/;
|
|
13794
|
-
var DEFERRED_NAMESPACES = /* @__PURE__ */ new Set(["self", "identities", "under", "member"]);
|
|
13946
|
+
var DEFERRED_NAMESPACES = /* @__PURE__ */ new Set(["self", "identities", "under", "member", "input"]);
|
|
13795
13947
|
var DEFERRED_BARE_TOKENS = /* @__PURE__ */ new Set(["any"]);
|
|
13796
13948
|
var DEFERRED_NS_ALTERNATION = [...DEFERRED_NAMESPACES].join("|");
|
|
13797
13949
|
var DEFERRED_INNER_RE = new RegExp(
|
|
@@ -16360,14 +16512,14 @@ var COGNITO_ALLOWED_HOSTS = Object.values(PER_ENV).map(
|
|
|
16360
16512
|
);
|
|
16361
16513
|
var BAKED_CLIENT_IDS = {
|
|
16362
16514
|
staging: "61hjvm25kkjb1eei8t2d3jkcl8",
|
|
16363
|
-
//
|
|
16515
|
+
// deployed staging hosted UI client
|
|
16364
16516
|
production: "63eipeedjv78q653k45niih46f"
|
|
16365
|
-
//
|
|
16517
|
+
// deployed production hosted UI client
|
|
16366
16518
|
};
|
|
16367
16519
|
var MissingCognitoClientIdError = class extends Error {
|
|
16368
16520
|
constructor(env) {
|
|
16369
16521
|
super(
|
|
16370
|
-
`No Cognito client id for '${env}'. Set VECTROS_COGNITO_CLIENT_ID
|
|
16522
|
+
`No Cognito client id for '${env}'. Set VECTROS_COGNITO_CLIENT_ID to the public client id of the sign-in app.`
|
|
16371
16523
|
);
|
|
16372
16524
|
this.name = "MissingCognitoClientIdError";
|
|
16373
16525
|
}
|
|
@@ -16601,6 +16753,7 @@ async function resolveCognitoToken(env, explicit, deps = { readSession, refreshT
|
|
|
16601
16753
|
}
|
|
16602
16754
|
throw new MissingCredentialError(env);
|
|
16603
16755
|
}
|
|
16756
|
+
var DEFAULT_CONTEXT_ID = "default";
|
|
16604
16757
|
async function resolveAuthContext(opts) {
|
|
16605
16758
|
const baseUrl = envToBaseUrl(opts.env, opts.baseUrl ?? process.env.VECTROS_API_BASE_URL);
|
|
16606
16759
|
const cognitoToken = await resolveCognitoToken(opts.env, opts.token);
|
|
@@ -16610,7 +16763,7 @@ async function resolveAuthContext(opts) {
|
|
|
16610
16763
|
apiBaseUrl: baseUrl,
|
|
16611
16764
|
tenant,
|
|
16612
16765
|
...opts.context ? { contextId: opts.context } : {}
|
|
16613
|
-
}) : await mintContextToken({ cognitoToken, apiBaseUrl: baseUrl, contextId: opts.context ??
|
|
16766
|
+
}) : await mintContextToken({ cognitoToken, apiBaseUrl: baseUrl, contextId: opts.context ?? DEFAULT_CONTEXT_ID, tenant });
|
|
16614
16767
|
const client = new VectrosClient({ token: bridge.token, environment: baseUrl });
|
|
16615
16768
|
const identity = await resolveIdentity({ log: opts.log, apiKey: bridge.token, environment: baseUrl });
|
|
16616
16769
|
return {
|
|
@@ -17719,13 +17872,11 @@ function toSdkFields(blueprint, schemaIndex) {
|
|
|
17719
17872
|
searchable: f.searchable,
|
|
17720
17873
|
filterable: f.filterable,
|
|
17721
17874
|
// Forwarded explicitly, like every sibling here: this mapping is a named-property list, not a
|
|
17722
|
-
// spread, so an unforwarded field is dropped SILENTLY rather than failing
|
|
17723
|
-
// happened to `validation` before it was added below.
|
|
17875
|
+
// spread, so an unforwarded field is dropped SILENTLY rather than failing.
|
|
17724
17876
|
inline: f.inline,
|
|
17725
17877
|
description: f.description,
|
|
17726
17878
|
enumValues: mapEnumValues(f.enumValues),
|
|
17727
|
-
// Format passthrough
|
|
17728
|
-
// "smoking gun" toSdkFields mapped only six props). The platform
|
|
17879
|
+
// Format passthrough. The platform
|
|
17729
17880
|
// `SchemaRequest.FieldDef.validation` enforces these server-side. The
|
|
17730
17881
|
// typed blueprint ValidationRules narrows the SDK's free-form Record.
|
|
17731
17882
|
validation: f.validation,
|
|
@@ -17852,7 +18003,7 @@ async function provisionContext(client, input) {
|
|
|
17852
18003
|
externalId: blueprint.servicePrincipal.externalId,
|
|
17853
18004
|
type: "SERVICE",
|
|
17854
18005
|
// SDK 0.18+ (identity-access rework): UserRequest's free-form attribute bag
|
|
17855
|
-
//
|
|
18006
|
+
// is `payload` (arbitrary key/value).
|
|
17856
18007
|
payload: { displayName: blueprint.servicePrincipal.displayName }
|
|
17857
18008
|
}
|
|
17858
18009
|
});
|
|
@@ -18026,7 +18177,7 @@ async function runLoader(client, input) {
|
|
|
18026
18177
|
// them), so default to ['record'] when a blueprint omits it. The `as` keeps
|
|
18027
18178
|
// the literal default assignable to the SDK's enum-array type.
|
|
18028
18179
|
allowedSurfaces: s.allowedSurfaces ?? ["record"],
|
|
18029
|
-
// Format passthrough
|
|
18180
|
+
// Format passthrough. Ownership mirrors
|
|
18030
18181
|
// the SDK `SchemaRequest` shape 1:1: the principal `userId` plus `scopes`
|
|
18031
18182
|
// (namespaced parent edges `<ns>:<value>`; the flat orgId/clientId fields are gone).
|
|
18032
18183
|
renderHints: toRenderHintMap(s),
|
|
@@ -18877,10 +19028,8 @@ var OsKeychainSecretStore = class {
|
|
|
18877
19028
|
}
|
|
18878
19029
|
/**
|
|
18879
19030
|
* `present` or `unknown` — **never `absent`**: impossible through `getPassword`,
|
|
18880
|
-
* and held there by POLICY where other evidence exists
|
|
18881
|
-
*
|
|
18882
|
-
* tighten later", which the rest of this very docstring then disowns — the
|
|
18883
|
-
* widening procedure is spelled out below. State the real shape up front.)
|
|
19031
|
+
* and held there by POLICY where other evidence exists (the widening procedure
|
|
19032
|
+
* is spelled out below).
|
|
18884
19033
|
*
|
|
18885
19034
|
* Proving absence would require distinguishing "no such entry" from "I could not
|
|
18886
19035
|
* read it", and that information does not survive the binding: `get_password` is
|
|
@@ -18900,7 +19049,7 @@ var OsKeychainSecretStore = class {
|
|
|
18900
19049
|
* Linux collection `secret-tool` exits 1 while `getPassword` returns `null`, so
|
|
18901
19050
|
* the D-Bus layer reports the fault faithfully and `.ok()` is what discards it.
|
|
18902
19051
|
* A read with real error semantics could therefore make `absent` reachable — and
|
|
18903
|
-
* `find_credentials`
|
|
19052
|
+
* `find_credentials` HAS verified semantics on Linux: it throws
|
|
18904
19053
|
* `org.freedesktop.Secret.Error.IsLocked` against a locked collection (measured;
|
|
18905
19054
|
* see {@link OsKeychainSecretStore.deleteSecret} for the transcript). That is why
|
|
18906
19055
|
* `deleteSecret` may confirm a delete while this method may not.
|
|
@@ -18910,7 +19059,7 @@ var OsKeychainSecretStore = class {
|
|
|
18910
19059
|
* PRUNABLE, which is a behaviour change this CLI has not taken, and Windows'
|
|
18911
19060
|
* locked-store behaviour is unmeasured (it has no comparable lock state, so there
|
|
18912
19061
|
* is nothing yet to observe). Verify per-platform before widening; do not infer it
|
|
18913
|
-
* from a signature
|
|
19062
|
+
* from a signature.
|
|
18914
19063
|
*/
|
|
18915
19064
|
async presence(ref) {
|
|
18916
19065
|
try {
|
|
@@ -18941,10 +19090,8 @@ var OsKeychainSecretStore = class {
|
|
|
18941
19090
|
*
|
|
18942
19091
|
* MEASURED, not inferred — and the distinction is the whole point, because
|
|
18943
19092
|
* {@link OsKeychainSecretStore.presence} rightly forbids inferring a locked
|
|
18944
|
-
* store's behaviour from a `Result` signature
|
|
18945
|
-
*
|
|
18946
|
-
* precisely that, on the path that authorizes destruction. Being right by luck is
|
|
18947
|
-
* not being right. Against a real locked collection (`node:24-alpine`, non-root,
|
|
19093
|
+
* store's behaviour from a `Result` signature, and doing so on the path that
|
|
19094
|
+
* authorizes destruction would be right only by luck. Against a real locked collection (`node:24-alpine`, non-root,
|
|
18948
19095
|
* `dbus-run-session` + gnome-keyring, collection locked via
|
|
18949
19096
|
* `org.freedesktop.Secret.Service.Lock`):
|
|
18950
19097
|
*
|
|
@@ -18959,9 +19106,8 @@ var OsKeychainSecretStore = class {
|
|
|
18959
19106
|
* cached handle to it. CI cannot pin this half — it unlocks the collection so the rest of
|
|
18960
19107
|
* the suite can use it — so the evidence lives here rather than in a test.
|
|
18961
19108
|
*
|
|
18962
|
-
* The WINDOWS half of the same contract
|
|
18963
|
-
*
|
|
18964
|
-
* 2026-07-17): `findCredentials` enumerates `account` byte-for-byte as stored —
|
|
19109
|
+
* The WINDOWS half of the same contract is also measured (real Credential Manager,
|
|
19110
|
+
* real binding, throwaway service): `findCredentials` enumerates `account` byte-for-byte as stored —
|
|
18965
19111
|
* case preserved, 48-char refs intact — a confirmed delete empties the
|
|
18966
19112
|
* enumeration, and `deleteCredential` on a nonexistent ref returns the same
|
|
18967
19113
|
* meaningless `false` as Linux. So the `.some(c => c.account === ref)` comparison
|
|
@@ -19037,11 +19183,11 @@ var CryptoFileSecretStore = class {
|
|
|
19037
19183
|
/**
|
|
19038
19184
|
* The salt is the one file whose loss is UNRECOVERABLE — every `.enc` is scrypt'd
|
|
19039
19185
|
* against it, so replacing it silently re-keys the store and bricks them all. Two
|
|
19040
|
-
* rules follow
|
|
19186
|
+
* rules follow:
|
|
19041
19187
|
*
|
|
19042
19188
|
* - A present-but-short salt is treated exactly like a corrupt index
|
|
19043
19189
|
* ({@link readKeyring}): throw an actionable error, never silently replace.
|
|
19044
|
-
*
|
|
19190
|
+
* Regenerating it would convert one anomaly into every secret
|
|
19045
19191
|
* being permanently undecryptable — destruction dressed as repair.
|
|
19046
19192
|
* - Creation is temp + hard-link (atomic AND exclusive; below), with an
|
|
19047
19193
|
* exclusive-create (`wx`) fallback on no-hardlink filesystems. The link path
|
|
@@ -19192,9 +19338,8 @@ var CryptoFileSecretStore = class {
|
|
|
19192
19338
|
* EACCES, or the directory not being there AT ALL — answers false, i.e. "we know
|
|
19193
19339
|
* nothing".
|
|
19194
19340
|
*
|
|
19195
|
-
* A MISSING `secrets/` reads as "we know nothing", not as an honest empty
|
|
19196
|
-
*
|
|
19197
|
-
* looked right: nothing has ever been stored, so "no secret here" is true. Why it
|
|
19341
|
+
* A MISSING `secrets/` reads as "we know nothing", not as an honest empty. The
|
|
19342
|
+
* tempting reasoning — nothing has ever been stored, so "no secret here" is true —
|
|
19198
19343
|
* is wrong: this is only ever consulted about an entry that is IN the index and
|
|
19199
19344
|
* stamped `crypto-file` — meaning `setSecret` ran, and `setSecret` mkdir's
|
|
19200
19345
|
* `secrets/` before every write. So for the only entries that reach here, "the
|
|
@@ -19205,7 +19350,7 @@ var CryptoFileSecretStore = class {
|
|
|
19205
19350
|
* it went. Calling that `absent` invites `prune` to delete the entry and the only
|
|
19206
19351
|
* record of a keyId whose key is still live.
|
|
19207
19352
|
*
|
|
19208
|
-
* The fresh-install case
|
|
19353
|
+
* The fresh-install case needs no special handling: an install with nothing
|
|
19209
19354
|
* stored has no index entries either, so nothing asks.
|
|
19210
19355
|
*/
|
|
19211
19356
|
async secretsDirIntact() {
|
|
@@ -19322,10 +19467,9 @@ async function withIndexLock(dir, fn, timings = LOCK_OPTS) {
|
|
|
19322
19467
|
// Swallowing is the better answer. We cannot un-write what we already wrote;
|
|
19323
19468
|
// finishing is strictly better than crashing half-done.
|
|
19324
19469
|
//
|
|
19325
|
-
// What swallowing does NOT buy
|
|
19326
|
-
//
|
|
19327
|
-
//
|
|
19328
|
-
// delete a successor's lock. That detection runs on the mtime-refresh timer,
|
|
19470
|
+
// What swallowing does NOT buy is protection from our own release: the library
|
|
19471
|
+
// marks a lock released when it DETECTS a compromise, after which our release
|
|
19472
|
+
// below would be a no-op that cannot delete a successor's lock. That detection runs on the mtime-refresh timer,
|
|
19329
19473
|
// every `stale/2` — 2.5s at the shipping 5s — and this file's critical
|
|
19330
19474
|
// sections are ~1ms, so in practice the holder is gone before the first tick
|
|
19331
19475
|
// and nothing is ever detected. (The probe that observed the no-op ran at
|
|
@@ -19338,10 +19482,8 @@ async function withIndexLock(dir, fn, timings = LOCK_OPTS) {
|
|
|
19338
19482
|
// updateKeyring's identity re-check before each commit — which, per its own
|
|
19339
19483
|
// honesty note, narrows the lost-update window; it does not close it.
|
|
19340
19484
|
//
|
|
19341
|
-
// RESIDUAL, stated honestly
|
|
19342
|
-
//
|
|
19343
|
-
// compromised lock "requires our event loop to freeze past `stale`". It does
|
|
19344
|
-
// not. proper-lockfile's stale-break is `stat` -> judge stale -> `rmdir` ->
|
|
19485
|
+
// RESIDUAL, stated honestly: reaching a compromised lock does NOT require our
|
|
19486
|
+
// event loop to freeze past `stale`. proper-lockfile's stale-break is `stat` -> judge stale -> `rmdir` ->
|
|
19345
19487
|
// `mkdir`, and it never re-checks that the directory it removes is the one it
|
|
19346
19488
|
// judged: two waiters can both condemn one crash remnant, and the second's
|
|
19347
19489
|
// already-decided rmdir destroys the first's FRESH lock. Nothing freezes.
|
|
@@ -19358,10 +19500,10 @@ async function withIndexLock(dir, fn, timings = LOCK_OPTS) {
|
|
|
19358
19500
|
// round-trip. Rare, not impossible — and inherent to mtime-based locking of
|
|
19359
19501
|
// this shape.
|
|
19360
19502
|
//
|
|
19361
|
-
// Accepted KNOWINGLY.
|
|
19362
|
-
// behind a second mutex — the right idea —
|
|
19363
|
-
// breaker at 10s with no liveness check
|
|
19364
|
-
// injection at all, plus 0.57% of contended acquires dying on Windows EPERM.
|
|
19503
|
+
// Accepted KNOWINGLY. A hand-rolled lock that serialised the break
|
|
19504
|
+
// behind a second mutex — the right idea — hits a defect there: that mutex age-breaks a LIVE
|
|
19505
|
+
// breaker at 10s with no liveness check (`maxOccupancy = 2`, measured with no
|
|
19506
|
+
// injection at all), plus 0.57% of contended acquires dying on Windows EPERM.
|
|
19365
19507
|
// Trading a measured, reachable defect for one that needs injected lag to
|
|
19366
19508
|
// observe is the right trade; pretending it is zero is not. If it ever needs
|
|
19367
19509
|
// closing the fix is upstream (re-stat under the removal), NOT another
|
|
@@ -19491,8 +19633,8 @@ var Keyring = class _Keyring {
|
|
|
19491
19633
|
/**
|
|
19492
19634
|
* Where new secrets go, or undefined if the selected store isn't actually here.
|
|
19493
19635
|
*
|
|
19494
|
-
* That sounds impossible — the file store is always constructed —
|
|
19495
|
-
*
|
|
19636
|
+
* That sounds impossible — the file store is always constructed — so it is tempting
|
|
19637
|
+
* to cast the `undefined` away. That would be wrong:
|
|
19496
19638
|
* `new Keyring({ selection: { kind: 'os-keychain' } })` with no `keychainStore`
|
|
19497
19639
|
* names a store that was never supplied, and a cast does not conjure one. Return
|
|
19498
19640
|
* the honest type and let {@link storeSecretSomewhere} handle it, rather than
|
|
@@ -19670,7 +19812,7 @@ The key itself WAS created server-side and is live \u2014 its id is ${entry.keyI
|
|
|
19670
19812
|
* {@link storeSecretSomewhere} throws — i.e. only when no store on this machine
|
|
19671
19813
|
* will accept a write at all, which is the failure worth stopping for.
|
|
19672
19814
|
*
|
|
19673
|
-
* Still NOT a proof that {@link add} will succeed, and the gap is
|
|
19815
|
+
* Still NOT a proof that {@link add} will succeed, and the remaining gap is only the
|
|
19674
19816
|
* genuinely transient: a lock another process holds for longer than the retry
|
|
19675
19817
|
* budget, or a CAS race, either of which a retry actually fixes. What it DOES
|
|
19676
19818
|
* cover is every deterministic refusal — no writable secret store, and an index
|
|
@@ -19704,11 +19846,11 @@ The key itself WAS created server-side and is live \u2014 its id is ${entry.keyI
|
|
|
19704
19846
|
* delete, and no other store PROVED it still holds a copy.
|
|
19705
19847
|
*
|
|
19706
19848
|
* That is deliberately WEAKER than "proved gone everywhere", and saying the
|
|
19707
|
-
* stronger thing (
|
|
19849
|
+
* stronger thing ("PROVED gone") would hide a real residual:
|
|
19708
19850
|
* a non-home store vetoes only on `present`, and a LOCKED keychain answers
|
|
19709
19851
|
* `unknown` — so on the one state this store's model is built around, a stale copy behind a
|
|
19710
19852
|
* locked non-home store passes unvetoed. That is the chosen trade, not an
|
|
19711
|
-
* oversight: the alternative (veto on doubt)
|
|
19853
|
+
* oversight: the alternative (veto on doubt) would let an unrelated
|
|
19712
19854
|
* locked keychain block removal of file-store entries forever, with advice to
|
|
19713
19855
|
* unlock a store that never held the secret.
|
|
19714
19856
|
*
|
|
@@ -19769,7 +19911,7 @@ The key itself WAS created server-side and is live \u2014 its id is ${entry.keyI
|
|
|
19769
19911
|
* freshly minted `keyId` on every path (`issueOrRotateKey` either creates a new key
|
|
19770
19912
|
* or revokes-and-recreates, and both mint a new id), so `prior.secretRef !==
|
|
19771
19913
|
* stamped.secretRef` always holds and `add` always takes the `forgetEverywhere`
|
|
19772
|
-
* branch.
|
|
19914
|
+
* branch. That does not make this dead code — it is UNEXERCISED by `join`, and
|
|
19773
19915
|
* the distinction matters:
|
|
19774
19916
|
*
|
|
19775
19917
|
* - `add` is public and takes the entry as an argument, so "the caller supplies a
|
|
@@ -19836,10 +19978,10 @@ The key itself WAS created server-side and is live \u2014 its id is ${entry.keyI
|
|
|
19836
19978
|
* `keyId`, so dropping it while the `ssk_*` survives leaves a live, unrevokable
|
|
19837
19979
|
* credential on the machine.
|
|
19838
19980
|
*
|
|
19839
|
-
* The gate is the DELETE'S RESULT, not whether the store looked reachable.
|
|
19840
|
-
*
|
|
19981
|
+
* The gate is the DELETE'S RESULT, not whether the store looked reachable. A
|
|
19982
|
+
* reachability gate would not work, because a
|
|
19841
19983
|
* LOCKED keychain is perfectly reachable — it constructs, it answers, it just
|
|
19842
|
-
* won't do anything. The guard never
|
|
19984
|
+
* won't do anything. The guard would never fire, the delete would quietly fail, the row would be
|
|
19843
19985
|
* dropped. Reachability is a proxy; "is it gone?" is the question.
|
|
19844
19986
|
*
|
|
19845
19987
|
* The secret is destroyed BEFORE the index row, the opposite of {@link add}, and
|
|
@@ -19854,10 +19996,8 @@ The key itself WAS created server-side and is live \u2014 its id is ${entry.keyI
|
|
|
19854
19996
|
* for as long as a user takes to type would time out every other vectros process,
|
|
19855
19997
|
* including an MCP server trying to start. The lock buys nothing here anyway —
|
|
19856
19998
|
* `add` writes its secret outside the lock too, so the two secret-writes were
|
|
19857
|
-
* never serialised by it. So: the INITIAL read is unlocked (
|
|
19858
|
-
*
|
|
19859
|
-
* under a lock" — false too: the commit-time re-check below IS a read inside
|
|
19860
|
-
* `updateKeyring`'s lock). Delete outside the lock, then commit under it,
|
|
19999
|
+
* never serialised by it. So: the INITIAL read is unlocked (the commit-time
|
|
20000
|
+
* re-check below, by contrast, IS a read inside `updateKeyring`'s lock). Delete outside the lock, then commit under it,
|
|
19861
20001
|
* re-checking that the entry is still the one the unlocked read saw. That locked
|
|
19862
20002
|
* re-check is what stands in for having read under the lock to begin with.
|
|
19863
20003
|
*/
|
|
@@ -20007,18 +20147,17 @@ The key itself WAS created server-side and is live \u2014 its id is ${entry.keyI
|
|
|
20007
20147
|
* already HAS the secret, so every failure here is silent and leaves the machine
|
|
20008
20148
|
* as it found it, for the next read to retry.
|
|
20009
20149
|
*
|
|
20010
|
-
* "As it found it" is a promise about BOTH stores
|
|
20011
|
-
*
|
|
20012
|
-
*
|
|
20150
|
+
* "As it found it" is a promise about BOTH stores. Saying failure "simply leaves the
|
|
20151
|
+
* secret where it was" would be false for any abort path that returned after
|
|
20152
|
+
* `setSecret` had already landed a SECOND copy in
|
|
20013
20153
|
* the target and left it there — a copy of a live `ssk_*` that no index row names,
|
|
20014
20154
|
* i.e. the exact strand `forgetEverywhere` exists to prevent, produced by the
|
|
20015
20155
|
* function that migrates.
|
|
20016
20156
|
*
|
|
20017
20157
|
* So the target copy is treated as UNCOMMITTED until the migration actually lands,
|
|
20018
20158
|
* and `finally` clears it on every other route out. That is structural rather than
|
|
20019
|
-
* remembered:
|
|
20020
|
-
*
|
|
20021
|
-
* file a review round. The flag cannot be forgotten on a path added later.
|
|
20159
|
+
* remembered: a hand-written cleanup per abort path is precisely the shape that gets
|
|
20160
|
+
* forgotten on one of them. The flag cannot be forgotten on a path added later.
|
|
20022
20161
|
*
|
|
20023
20162
|
* The ordering is the rest of the design, and each step guards a different disaster:
|
|
20024
20163
|
* write the new copy; read it back (a write that silently didn't land would
|
|
@@ -22907,7 +23046,11 @@ async function runWhoami(options, deps = {}) {
|
|
|
22907
23046
|
self2 = null;
|
|
22908
23047
|
}
|
|
22909
23048
|
if (options.json) {
|
|
22910
|
-
const out =
|
|
23049
|
+
const out = {
|
|
23050
|
+
...identity,
|
|
23051
|
+
tenantType: auth.tenant,
|
|
23052
|
+
...self2 ? { userId: self2.userId, userPrincipalId: self2.principalId } : {}
|
|
23053
|
+
};
|
|
22911
23054
|
process.stdout.write(`${formatJson(out)}
|
|
22912
23055
|
`);
|
|
22913
23056
|
return 0;
|
|
@@ -22916,6 +23059,7 @@ async function runWhoami(options, deps = {}) {
|
|
|
22916
23059
|
process.stdout.write(
|
|
22917
23060
|
"\n" + formatKeyValues([
|
|
22918
23061
|
["tenant", identity.tenantId],
|
|
23062
|
+
["tenant type", auth.tenant],
|
|
22919
23063
|
["environment", identity.environment],
|
|
22920
23064
|
["principal", identity.principalType],
|
|
22921
23065
|
["principal id", identity.principalKeyId],
|
|
@@ -23724,6 +23868,12 @@ async function runAccessRevoke(opts, deps = {}) {
|
|
|
23724
23868
|
}
|
|
23725
23869
|
});
|
|
23726
23870
|
}
|
|
23871
|
+
function searchedContextNotice(principal, rows, tenant) {
|
|
23872
|
+
if (rows.some((r) => r.contextId !== void 0 && r.contextId !== DEFAULT_CONTEXT_ID)) return void 0;
|
|
23873
|
+
const tenantFlag = tenant === "test" ? " --tenant test" : "";
|
|
23874
|
+
return ` \u2139 Listed with a token pinned to context '${DEFAULT_CONTEXT_ID}' (${tenant} tenant). Depending on the caller, the platform may not look beyond that context, so a grant in another context may be missing; an empty result means none in '${DEFAULT_CONTEXT_ID}'. Check a context with: vectros access get --principal ${principal} --context <c>${tenantFlag}
|
|
23875
|
+
`;
|
|
23876
|
+
}
|
|
23727
23877
|
async function runAccessList(opts, deps = {}) {
|
|
23728
23878
|
if (Boolean(opts.context) === Boolean(opts.principal)) {
|
|
23729
23879
|
process.stderr.write(" \u2716 Provide exactly one of --context <c> or --principal <p>.\n");
|
|
@@ -23747,9 +23897,11 @@ async function runAccessList(opts, deps = {}) {
|
|
|
23747
23897
|
) : await drainPages(
|
|
23748
23898
|
(startFrom) => client.auth.listProfilesForPrincipal({ principalId: principal, startFrom, limit: PAGE_LIMIT })
|
|
23749
23899
|
);
|
|
23900
|
+
const notice = opts.principal ? searchedContextNotice(opts.principal, rows, auth.tenant) : void 0;
|
|
23750
23901
|
if (opts.json) {
|
|
23751
23902
|
process.stdout.write(`${formatJson(rows)}
|
|
23752
23903
|
`);
|
|
23904
|
+
if (notice) process.stderr.write(notice);
|
|
23753
23905
|
return 0;
|
|
23754
23906
|
}
|
|
23755
23907
|
process.stdout.write(
|
|
@@ -23760,6 +23912,7 @@ async function runAccessList(opts, deps = {}) {
|
|
|
23760
23912
|
{ header: "status", get: (r) => r.status }
|
|
23761
23913
|
]) + "\n"
|
|
23762
23914
|
);
|
|
23915
|
+
if (notice) process.stderr.write(notice);
|
|
23763
23916
|
return 0;
|
|
23764
23917
|
} catch (err) {
|
|
23765
23918
|
process.stderr.write(` \u2716 access list failed: ${formatError(err)}
|
|
@@ -26941,9 +27094,9 @@ function emitJoined(opts) {
|
|
|
26941
27094
|
|
|
26942
27095
|
// src/build-info.ts
|
|
26943
27096
|
var BUILD_INFO = {
|
|
26944
|
-
cli: true ? "0.
|
|
26945
|
-
sdk: true ? "0.
|
|
26946
|
-
blueprints: true ? "0.20.
|
|
27097
|
+
cli: true ? "0.26.0" : "dev",
|
|
27098
|
+
sdk: true ? "0.48.0" : "dev",
|
|
27099
|
+
blueprints: true ? "0.20.3" : "dev"
|
|
26947
27100
|
};
|
|
26948
27101
|
function formatBuildInfo() {
|
|
26949
27102
|
return `vectros ${BUILD_INFO.cli} (sdk ${BUILD_INFO.sdk}, blueprints ${BUILD_INFO.blueprints})`;
|
|
@@ -27002,9 +27155,11 @@ function buildProgram(deps = {}) {
|
|
|
27002
27155
|
program.command("logout").description("Clear the stored login session.").action(async () => {
|
|
27003
27156
|
process.exitCode = await runLogout({ env: "production", json: false });
|
|
27004
27157
|
});
|
|
27005
|
-
const whoami = program.command("whoami").description("Show the authenticated session (tenant, env, principal).");
|
|
27158
|
+
const whoami = program.command("whoami").description("Show the authenticated session (tenant, env, principal).").option("--tenant <tenant>", "tenant to show: 'test' or 'live' (default live)");
|
|
27006
27159
|
addCommonAuthOptions(whoami).action(async (flags) => {
|
|
27007
|
-
|
|
27160
|
+
const tenant = parseTenantFlag(flags.tenant);
|
|
27161
|
+
if (tenant === TENANT_FLAG_INVALID) return;
|
|
27162
|
+
process.exitCode = await runWhoami({ ...toCommonOptions(flags), tenant }, deps);
|
|
27008
27163
|
});
|
|
27009
27164
|
const blueprintTest = program.command("blueprint-test").description("Apply a blueprint to a live env, assert it provisioned a working credential, then tear it down.").argument("<file>", "blueprint file path (./my.yaml) or a bundled blueprint name").option("--keep", "leave the provisioned graph in place (skip teardown) for inspection").option("--tenant <tenant>", "target tenant for the run: 'test' or 'live' (default live)");
|
|
27010
27165
|
addCommonAuthOptions(blueprintTest).action(
|