@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.js
CHANGED
|
@@ -1629,9 +1629,11 @@ __export(api_exports, {
|
|
|
1629
1629
|
BatchWriteRequest: () => BatchWriteRequest,
|
|
1630
1630
|
BatchWriteResult: () => BatchWriteResult,
|
|
1631
1631
|
ChatMessage: () => ChatMessage,
|
|
1632
|
+
ChatRequest: () => ChatRequest,
|
|
1632
1633
|
ConflictError: () => ConflictError,
|
|
1633
1634
|
ContentDeltaEvent: () => ContentDeltaEvent,
|
|
1634
1635
|
ContentTooLargeError: () => ContentTooLargeError,
|
|
1636
|
+
DocumentAskRequest: () => DocumentAskRequest,
|
|
1635
1637
|
DocumentContextEvent: () => DocumentContextEvent,
|
|
1636
1638
|
DocumentLookupRequest: () => DocumentLookupRequest,
|
|
1637
1639
|
DocumentPatchRequest: () => DocumentPatchRequest,
|
|
@@ -1662,8 +1664,10 @@ __export(api_exports, {
|
|
|
1662
1664
|
NotImplementedError: () => NotImplementedError,
|
|
1663
1665
|
PaymentRequiredError: () => PaymentRequiredError,
|
|
1664
1666
|
PingResponse: () => PingResponse,
|
|
1667
|
+
RagRequest: () => RagRequest,
|
|
1665
1668
|
RagSearch: () => RagSearch,
|
|
1666
1669
|
ReadAccessLogResponse: () => ReadAccessLogResponse,
|
|
1670
|
+
ReasoningDeltaEvent: () => ReasoningDeltaEvent,
|
|
1667
1671
|
RecordLookupRequest: () => RecordLookupRequest,
|
|
1668
1672
|
RecordRequest: () => RecordRequest,
|
|
1669
1673
|
RecordResponse: () => RecordResponse,
|
|
@@ -2019,7 +2023,33 @@ var ListUsersRequestOrder = {
|
|
|
2019
2023
|
Asc: "asc",
|
|
2020
2024
|
Desc: "desc"
|
|
2021
2025
|
};
|
|
2026
|
+
var ChatRequest;
|
|
2027
|
+
((ChatRequest2) => {
|
|
2028
|
+
ChatRequest2.Reasoning = {
|
|
2029
|
+
Omit: "omit",
|
|
2030
|
+
Stream: "stream"
|
|
2031
|
+
};
|
|
2032
|
+
})(ChatRequest || (ChatRequest = {}));
|
|
2033
|
+
var DocumentAskRequest;
|
|
2034
|
+
((DocumentAskRequest2) => {
|
|
2035
|
+
DocumentAskRequest2.Reasoning = {
|
|
2036
|
+
Omit: "omit",
|
|
2037
|
+
Stream: "stream"
|
|
2038
|
+
};
|
|
2039
|
+
})(DocumentAskRequest || (DocumentAskRequest = {}));
|
|
2040
|
+
var RagRequest;
|
|
2041
|
+
((RagRequest2) => {
|
|
2042
|
+
RagRequest2.Reasoning = {
|
|
2043
|
+
Omit: "omit",
|
|
2044
|
+
Stream: "stream"
|
|
2045
|
+
};
|
|
2046
|
+
})(RagRequest || (RagRequest = {}));
|
|
2022
2047
|
var inference_exports = {};
|
|
2048
|
+
__export(inference_exports, {
|
|
2049
|
+
ChatRequest: () => ChatRequest,
|
|
2050
|
+
DocumentAskRequest: () => DocumentAskRequest,
|
|
2051
|
+
RagRequest: () => RagRequest
|
|
2052
|
+
});
|
|
2023
2053
|
var BatchWriteRequest;
|
|
2024
2054
|
((BatchWriteRequest2) => {
|
|
2025
2055
|
BatchWriteRequest2.Atomicity = {
|
|
@@ -2292,6 +2322,12 @@ var ReadAccessLogResponse;
|
|
|
2292
2322
|
Rag: "rag"
|
|
2293
2323
|
};
|
|
2294
2324
|
})(ReadAccessLogResponse || (ReadAccessLogResponse = {}));
|
|
2325
|
+
var ReasoningDeltaEvent;
|
|
2326
|
+
((ReasoningDeltaEvent2) => {
|
|
2327
|
+
ReasoningDeltaEvent2.Event = {
|
|
2328
|
+
ReasoningDelta: "reasoning_delta"
|
|
2329
|
+
};
|
|
2330
|
+
})(ReasoningDeltaEvent || (ReasoningDeltaEvent = {}));
|
|
2295
2331
|
var RecordRequest;
|
|
2296
2332
|
((RecordRequest2) => {
|
|
2297
2333
|
RecordRequest2.Status = {
|
|
@@ -4186,7 +4222,7 @@ var AuthClient = class {
|
|
|
4186
4222
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/admin/keys/scoped");
|
|
4187
4223
|
}
|
|
4188
4224
|
/**
|
|
4189
|
-
* 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
|
|
4225
|
+
* 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.
|
|
4190
4226
|
*
|
|
4191
4227
|
* @param {Vectros.CreateScopedKeyRequest} request
|
|
4192
4228
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -4529,6 +4565,7 @@ var AuthClient = class {
|
|
|
4529
4565
|
* @throws {@link Vectros.BadRequestError}
|
|
4530
4566
|
* @throws {@link Vectros.ForbiddenError}
|
|
4531
4567
|
* @throws {@link Vectros.NotFoundError}
|
|
4568
|
+
* @throws {@link Vectros.ConflictError}
|
|
4532
4569
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
4533
4570
|
*
|
|
4534
4571
|
* @example
|
|
@@ -4581,6 +4618,8 @@ var AuthClient = class {
|
|
|
4581
4618
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
4582
4619
|
case 404:
|
|
4583
4620
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
4621
|
+
case 409:
|
|
4622
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
4584
4623
|
case 429:
|
|
4585
4624
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
4586
4625
|
default:
|
|
@@ -4664,6 +4703,8 @@ var AuthClient = class {
|
|
|
4664
4703
|
* @throws {@link Vectros.BadRequestError}
|
|
4665
4704
|
* @throws {@link Vectros.PaymentRequiredError}
|
|
4666
4705
|
* @throws {@link Vectros.ForbiddenError}
|
|
4706
|
+
* @throws {@link Vectros.NotFoundError}
|
|
4707
|
+
* @throws {@link Vectros.ConflictError}
|
|
4667
4708
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
4668
4709
|
*
|
|
4669
4710
|
* @example
|
|
@@ -4716,6 +4757,10 @@ var AuthClient = class {
|
|
|
4716
4757
|
throw new PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
4717
4758
|
case 403:
|
|
4718
4759
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
4760
|
+
case 404:
|
|
4761
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
4762
|
+
case 409:
|
|
4763
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
4719
4764
|
case 429:
|
|
4720
4765
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
4721
4766
|
default:
|
|
@@ -4804,6 +4849,7 @@ var AuthClient = class {
|
|
|
4804
4849
|
* @throws {@link Vectros.BadRequestError}
|
|
4805
4850
|
* @throws {@link Vectros.ForbiddenError}
|
|
4806
4851
|
* @throws {@link Vectros.NotFoundError}
|
|
4852
|
+
* @throws {@link Vectros.ConflictError}
|
|
4807
4853
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
4808
4854
|
*
|
|
4809
4855
|
* @example
|
|
@@ -4860,6 +4906,8 @@ var AuthClient = class {
|
|
|
4860
4906
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
4861
4907
|
case 404:
|
|
4862
4908
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
4909
|
+
case 409:
|
|
4910
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
4863
4911
|
case 429:
|
|
4864
4912
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
4865
4913
|
default:
|
|
@@ -4950,6 +4998,7 @@ var AuthClient = class {
|
|
|
4950
4998
|
* @throws {@link Vectros.BadRequestError}
|
|
4951
4999
|
* @throws {@link Vectros.ForbiddenError}
|
|
4952
5000
|
* @throws {@link Vectros.NotFoundError}
|
|
5001
|
+
* @throws {@link Vectros.ConflictError}
|
|
4953
5002
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
4954
5003
|
*
|
|
4955
5004
|
* @example
|
|
@@ -5000,6 +5049,8 @@ var AuthClient = class {
|
|
|
5000
5049
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
5001
5050
|
case 404:
|
|
5002
5051
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
5052
|
+
case 409:
|
|
5053
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
5003
5054
|
case 429:
|
|
5004
5055
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
5005
5056
|
default:
|
|
@@ -5146,13 +5197,14 @@ var AuthClient = class {
|
|
|
5146
5197
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/app-contexts/{contextId}");
|
|
5147
5198
|
}
|
|
5148
5199
|
/**
|
|
5149
|
-
* 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
|
|
5200
|
+
* 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.
|
|
5150
5201
|
*
|
|
5151
5202
|
* @param {Vectros.UpdateAppContextRequest} request
|
|
5152
5203
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
5153
5204
|
*
|
|
5154
5205
|
* @throws {@link Vectros.ForbiddenError}
|
|
5155
5206
|
* @throws {@link Vectros.NotFoundError}
|
|
5207
|
+
* @throws {@link Vectros.ConflictError}
|
|
5156
5208
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
5157
5209
|
*
|
|
5158
5210
|
* @example
|
|
@@ -5201,6 +5253,8 @@ var AuthClient = class {
|
|
|
5201
5253
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
5202
5254
|
case 404:
|
|
5203
5255
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
5256
|
+
case 409:
|
|
5257
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
5204
5258
|
case 429:
|
|
5205
5259
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
5206
5260
|
default:
|
|
@@ -5357,6 +5411,7 @@ var AuthClient = class {
|
|
|
5357
5411
|
*
|
|
5358
5412
|
* @throws {@link Vectros.ForbiddenError}
|
|
5359
5413
|
* @throws {@link Vectros.NotFoundError}
|
|
5414
|
+
* @throws {@link Vectros.ConflictError}
|
|
5360
5415
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
5361
5416
|
*
|
|
5362
5417
|
* @example
|
|
@@ -5409,6 +5464,8 @@ var AuthClient = class {
|
|
|
5409
5464
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
5410
5465
|
case 404:
|
|
5411
5466
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
5467
|
+
case 409:
|
|
5468
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
5412
5469
|
case 429:
|
|
5413
5470
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
5414
5471
|
default:
|
|
@@ -5434,6 +5491,7 @@ var AuthClient = class {
|
|
|
5434
5491
|
*
|
|
5435
5492
|
* @throws {@link Vectros.ForbiddenError}
|
|
5436
5493
|
* @throws {@link Vectros.NotFoundError}
|
|
5494
|
+
* @throws {@link Vectros.ConflictError}
|
|
5437
5495
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
5438
5496
|
*
|
|
5439
5497
|
* @example
|
|
@@ -5476,6 +5534,8 @@ var AuthClient = class {
|
|
|
5476
5534
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
5477
5535
|
case 404:
|
|
5478
5536
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
5537
|
+
case 409:
|
|
5538
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
5479
5539
|
case 429:
|
|
5480
5540
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
5481
5541
|
default:
|
|
@@ -5757,6 +5817,7 @@ var AuthClient = class {
|
|
|
5757
5817
|
* @throws {@link Vectros.BadRequestError}
|
|
5758
5818
|
* @throws {@link Vectros.ForbiddenError}
|
|
5759
5819
|
* @throws {@link Vectros.NotFoundError}
|
|
5820
|
+
* @throws {@link Vectros.ConflictError}
|
|
5760
5821
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
5761
5822
|
*
|
|
5762
5823
|
* @example
|
|
@@ -5803,6 +5864,8 @@ var AuthClient = class {
|
|
|
5803
5864
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
5804
5865
|
case 404:
|
|
5805
5866
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
5867
|
+
case 409:
|
|
5868
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
5806
5869
|
case 429:
|
|
5807
5870
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
5808
5871
|
default:
|
|
@@ -5816,7 +5879,7 @@ var AuthClient = class {
|
|
|
5816
5879
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v1/auth/issuers/{issuerId}");
|
|
5817
5880
|
}
|
|
5818
5881
|
/**
|
|
5819
|
-
* 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
|
|
5882
|
+
* 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.
|
|
5820
5883
|
*
|
|
5821
5884
|
* @param {Vectros.DeleteIssuerRequest} request
|
|
5822
5885
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -5942,7 +6005,7 @@ var AuthClient = class {
|
|
|
5942
6005
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/auth/issuers");
|
|
5943
6006
|
}
|
|
5944
6007
|
/**
|
|
5945
|
-
* 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
|
|
6008
|
+
* 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.
|
|
5946
6009
|
*
|
|
5947
6010
|
* @param {Vectros.IssuerRequest} request
|
|
5948
6011
|
* @param {AuthClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -6351,6 +6414,7 @@ var AuthClient = class {
|
|
|
6351
6414
|
* @throws {@link Vectros.BadRequestError}
|
|
6352
6415
|
* @throws {@link Vectros.ForbiddenError}
|
|
6353
6416
|
* @throws {@link Vectros.NotFoundError}
|
|
6417
|
+
* @throws {@link Vectros.ConflictError}
|
|
6354
6418
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
6355
6419
|
*
|
|
6356
6420
|
* @example
|
|
@@ -6398,6 +6462,8 @@ var AuthClient = class {
|
|
|
6398
6462
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
6399
6463
|
case 404:
|
|
6400
6464
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
6465
|
+
case 409:
|
|
6466
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
6401
6467
|
case 429:
|
|
6402
6468
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
6403
6469
|
default:
|
|
@@ -6497,6 +6563,7 @@ var AuthClient = class {
|
|
|
6497
6563
|
* @throws {@link Vectros.UnauthorizedError}
|
|
6498
6564
|
* @throws {@link Vectros.ForbiddenError}
|
|
6499
6565
|
* @throws {@link Vectros.NotFoundError}
|
|
6566
|
+
* @throws {@link Vectros.ContentTooLargeError}
|
|
6500
6567
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
6501
6568
|
*
|
|
6502
6569
|
* @example
|
|
@@ -6541,6 +6608,8 @@ var AuthClient = class {
|
|
|
6541
6608
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
6542
6609
|
case 404:
|
|
6543
6610
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
6611
|
+
case 413:
|
|
6612
|
+
throw new ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
6544
6613
|
case 429:
|
|
6545
6614
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
6546
6615
|
default:
|
|
@@ -6680,7 +6749,7 @@ var ComplianceClient = class {
|
|
|
6680
6749
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/erasure-requests/{id}");
|
|
6681
6750
|
}
|
|
6682
6751
|
/**
|
|
6683
|
-
*
|
|
6752
|
+
* 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.
|
|
6684
6753
|
*
|
|
6685
6754
|
* @param {Vectros.ExportRequest} request
|
|
6686
6755
|
* @param {ComplianceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -6741,7 +6810,7 @@ var ComplianceClient = class {
|
|
|
6741
6810
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/admin/export");
|
|
6742
6811
|
}
|
|
6743
6812
|
/**
|
|
6744
|
-
*
|
|
6813
|
+
* 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.
|
|
6745
6814
|
*
|
|
6746
6815
|
* @param {Vectros.GetExportRequest} request
|
|
6747
6816
|
* @param {ComplianceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -6872,6 +6941,8 @@ var DocumentsClient = class {
|
|
|
6872
6941
|
*
|
|
6873
6942
|
* @throws {@link Vectros.BadRequestError}
|
|
6874
6943
|
* @throws {@link Vectros.ForbiddenError}
|
|
6944
|
+
* @throws {@link Vectros.NotFoundError}
|
|
6945
|
+
* @throws {@link Vectros.ConflictError}
|
|
6875
6946
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
6876
6947
|
*
|
|
6877
6948
|
* @example
|
|
@@ -6923,6 +6994,10 @@ var DocumentsClient = class {
|
|
|
6923
6994
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
6924
6995
|
case 403:
|
|
6925
6996
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
6997
|
+
case 404:
|
|
6998
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
6999
|
+
case 409:
|
|
7000
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
6926
7001
|
case 429:
|
|
6927
7002
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
6928
7003
|
default:
|
|
@@ -7070,6 +7145,7 @@ var DocumentsClient = class {
|
|
|
7070
7145
|
* @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
7071
7146
|
*
|
|
7072
7147
|
* @throws {@link Vectros.NotFoundError}
|
|
7148
|
+
* @throws {@link Vectros.ConflictError}
|
|
7073
7149
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
7074
7150
|
*
|
|
7075
7151
|
* @example
|
|
@@ -7109,6 +7185,8 @@ var DocumentsClient = class {
|
|
|
7109
7185
|
switch (_response.error.statusCode) {
|
|
7110
7186
|
case 404:
|
|
7111
7187
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
7188
|
+
case 409:
|
|
7189
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
7112
7190
|
case 429:
|
|
7113
7191
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
7114
7192
|
default:
|
|
@@ -7401,7 +7479,7 @@ var DocumentsClient = class {
|
|
|
7401
7479
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/documents/{id}/download");
|
|
7402
7480
|
}
|
|
7403
7481
|
/**
|
|
7404
|
-
* Returns the document's full text body when it is retained:
|
|
7482
|
+
* 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.
|
|
7405
7483
|
*
|
|
7406
7484
|
* @param {Vectros.GetDocumentTextRequest} request
|
|
7407
7485
|
* @param {DocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -7521,6 +7599,7 @@ var DocumentsClient = class {
|
|
|
7521
7599
|
*
|
|
7522
7600
|
* @throws {@link Vectros.BadRequestError}
|
|
7523
7601
|
* @throws {@link Vectros.ForbiddenError}
|
|
7602
|
+
* @throws {@link Vectros.ConflictError}
|
|
7524
7603
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
7525
7604
|
*
|
|
7526
7605
|
* @example
|
|
@@ -7570,6 +7649,8 @@ var DocumentsClient = class {
|
|
|
7570
7649
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
7571
7650
|
case 403:
|
|
7572
7651
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
7652
|
+
case 409:
|
|
7653
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
7573
7654
|
case 429:
|
|
7574
7655
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
7575
7656
|
default:
|
|
@@ -7653,6 +7734,8 @@ var FoldersClient = class {
|
|
|
7653
7734
|
*
|
|
7654
7735
|
* @throws {@link Vectros.BadRequestError}
|
|
7655
7736
|
* @throws {@link Vectros.ForbiddenError}
|
|
7737
|
+
* @throws {@link Vectros.NotFoundError}
|
|
7738
|
+
* @throws {@link Vectros.ConflictError}
|
|
7656
7739
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
7657
7740
|
*
|
|
7658
7741
|
* @example
|
|
@@ -7702,6 +7785,10 @@ var FoldersClient = class {
|
|
|
7702
7785
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
7703
7786
|
case 403:
|
|
7704
7787
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
7788
|
+
case 404:
|
|
7789
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
7790
|
+
case 409:
|
|
7791
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
7705
7792
|
case 429:
|
|
7706
7793
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
7707
7794
|
default:
|
|
@@ -7777,6 +7864,7 @@ var FoldersClient = class {
|
|
|
7777
7864
|
*
|
|
7778
7865
|
* @throws {@link Vectros.ForbiddenError}
|
|
7779
7866
|
* @throws {@link Vectros.NotFoundError}
|
|
7867
|
+
* @throws {@link Vectros.ConflictError}
|
|
7780
7868
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
7781
7869
|
*
|
|
7782
7870
|
* @example
|
|
@@ -7824,6 +7912,8 @@ var FoldersClient = class {
|
|
|
7824
7912
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
7825
7913
|
case 404:
|
|
7826
7914
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
7915
|
+
case 409:
|
|
7916
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
7827
7917
|
case 429:
|
|
7828
7918
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
7829
7919
|
default:
|
|
@@ -7844,6 +7934,7 @@ var FoldersClient = class {
|
|
|
7844
7934
|
*
|
|
7845
7935
|
* @throws {@link Vectros.BadRequestError}
|
|
7846
7936
|
* @throws {@link Vectros.NotFoundError}
|
|
7937
|
+
* @throws {@link Vectros.ConflictError}
|
|
7847
7938
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
7848
7939
|
*
|
|
7849
7940
|
* @example
|
|
@@ -7885,6 +7976,8 @@ var FoldersClient = class {
|
|
|
7885
7976
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
7886
7977
|
case 404:
|
|
7887
7978
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
7979
|
+
case 409:
|
|
7980
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
7888
7981
|
case 429:
|
|
7889
7982
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
7890
7983
|
default:
|
|
@@ -7898,7 +7991,7 @@ var FoldersClient = class {
|
|
|
7898
7991
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v1/folders/{id}");
|
|
7899
7992
|
}
|
|
7900
7993
|
/**
|
|
7901
|
-
* 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
|
|
7994
|
+
* 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.
|
|
7902
7995
|
*
|
|
7903
7996
|
* @param {Vectros.PatchFolderRequest} request
|
|
7904
7997
|
* @param {FoldersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -8121,6 +8214,8 @@ var IdentityClient = class {
|
|
|
8121
8214
|
*
|
|
8122
8215
|
* @throws {@link Vectros.BadRequestError}
|
|
8123
8216
|
* @throws {@link Vectros.ForbiddenError}
|
|
8217
|
+
* @throws {@link Vectros.NotFoundError}
|
|
8218
|
+
* @throws {@link Vectros.ConflictError}
|
|
8124
8219
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
8125
8220
|
*
|
|
8126
8221
|
* @example
|
|
@@ -8173,6 +8268,10 @@ var IdentityClient = class {
|
|
|
8173
8268
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
8174
8269
|
case 403:
|
|
8175
8270
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
8271
|
+
case 404:
|
|
8272
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
8273
|
+
case 409:
|
|
8274
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
8176
8275
|
case 429:
|
|
8177
8276
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
8178
8277
|
default:
|
|
@@ -8253,6 +8352,7 @@ var IdentityClient = class {
|
|
|
8253
8352
|
*
|
|
8254
8353
|
* @throws {@link Vectros.BadRequestError}
|
|
8255
8354
|
* @throws {@link Vectros.NotFoundError}
|
|
8355
|
+
* @throws {@link Vectros.ConflictError}
|
|
8256
8356
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
8257
8357
|
*
|
|
8258
8358
|
* @example
|
|
@@ -8305,6 +8405,8 @@ var IdentityClient = class {
|
|
|
8305
8405
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
8306
8406
|
case 404:
|
|
8307
8407
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
8408
|
+
case 409:
|
|
8409
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
8308
8410
|
case 429:
|
|
8309
8411
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
8310
8412
|
default:
|
|
@@ -8324,6 +8426,7 @@ var IdentityClient = class {
|
|
|
8324
8426
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
8325
8427
|
*
|
|
8326
8428
|
* @throws {@link Vectros.NotFoundError}
|
|
8429
|
+
* @throws {@link Vectros.ConflictError}
|
|
8327
8430
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
8328
8431
|
*
|
|
8329
8432
|
* @example
|
|
@@ -8368,6 +8471,8 @@ var IdentityClient = class {
|
|
|
8368
8471
|
switch (_response.error.statusCode) {
|
|
8369
8472
|
case 404:
|
|
8370
8473
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
8474
|
+
case 409:
|
|
8475
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
8371
8476
|
case 429:
|
|
8372
8477
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
8373
8478
|
default:
|
|
@@ -8591,6 +8696,7 @@ var IdentityClient = class {
|
|
|
8591
8696
|
*
|
|
8592
8697
|
* @throws {@link Vectros.ForbiddenError}
|
|
8593
8698
|
* @throws {@link Vectros.NotFoundError}
|
|
8699
|
+
* @throws {@link Vectros.ConflictError}
|
|
8594
8700
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
8595
8701
|
*
|
|
8596
8702
|
* @example
|
|
@@ -8642,6 +8748,8 @@ var IdentityClient = class {
|
|
|
8642
8748
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
8643
8749
|
case 404:
|
|
8644
8750
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
8751
|
+
case 409:
|
|
8752
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
8645
8753
|
case 429:
|
|
8646
8754
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
8647
8755
|
default:
|
|
@@ -8662,6 +8770,7 @@ var IdentityClient = class {
|
|
|
8662
8770
|
*
|
|
8663
8771
|
* @throws {@link Vectros.ForbiddenError}
|
|
8664
8772
|
* @throws {@link Vectros.NotFoundError}
|
|
8773
|
+
* @throws {@link Vectros.ConflictError}
|
|
8665
8774
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
8666
8775
|
*
|
|
8667
8776
|
* @example
|
|
@@ -8706,6 +8815,8 @@ var IdentityClient = class {
|
|
|
8706
8815
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
8707
8816
|
case 404:
|
|
8708
8817
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
8818
|
+
case 409:
|
|
8819
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
8709
8820
|
case 429:
|
|
8710
8821
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
8711
8822
|
default:
|
|
@@ -8770,7 +8881,7 @@ var IdentityClient = class {
|
|
|
8770
8881
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/namespaces");
|
|
8771
8882
|
}
|
|
8772
8883
|
/**
|
|
8773
|
-
* 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
|
|
8884
|
+
* 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.
|
|
8774
8885
|
*
|
|
8775
8886
|
* @param {Vectros.RegisterNamespaceRequest} request
|
|
8776
8887
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -8912,6 +9023,7 @@ var IdentityClient = class {
|
|
|
8912
9023
|
*
|
|
8913
9024
|
* @throws {@link Vectros.BadRequestError}
|
|
8914
9025
|
* @throws {@link Vectros.ForbiddenError}
|
|
9026
|
+
* @throws {@link Vectros.ConflictError}
|
|
8915
9027
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
8916
9028
|
*
|
|
8917
9029
|
* @example
|
|
@@ -8961,6 +9073,8 @@ var IdentityClient = class {
|
|
|
8961
9073
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
8962
9074
|
case 403:
|
|
8963
9075
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
9076
|
+
case 409:
|
|
9077
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
8964
9078
|
case 429:
|
|
8965
9079
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
8966
9080
|
default:
|
|
@@ -9029,13 +9143,14 @@ var IdentityClient = class {
|
|
|
9029
9143
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/users/{id}");
|
|
9030
9144
|
}
|
|
9031
9145
|
/**
|
|
9032
|
-
* 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.
|
|
9146
|
+
* 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.
|
|
9033
9147
|
*
|
|
9034
9148
|
* @param {Vectros.UpdateUserRequest} request
|
|
9035
9149
|
* @param {IdentityClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
9036
9150
|
*
|
|
9037
9151
|
* @throws {@link Vectros.BadRequestError}
|
|
9038
9152
|
* @throws {@link Vectros.NotFoundError}
|
|
9153
|
+
* @throws {@link Vectros.ConflictError}
|
|
9039
9154
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
9040
9155
|
*
|
|
9041
9156
|
* @example
|
|
@@ -9083,6 +9198,8 @@ var IdentityClient = class {
|
|
|
9083
9198
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
9084
9199
|
case 404:
|
|
9085
9200
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
9201
|
+
case 409:
|
|
9202
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
9086
9203
|
case 429:
|
|
9087
9204
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
9088
9205
|
default:
|
|
@@ -9344,7 +9461,7 @@ var InferenceClient = class {
|
|
|
9344
9461
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
9345
9462
|
}
|
|
9346
9463
|
/**
|
|
9347
|
-
* Returns
|
|
9464
|
+
* 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`.
|
|
9348
9465
|
*
|
|
9349
9466
|
* @param {InferenceClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
9350
9467
|
*
|
|
@@ -9388,7 +9505,7 @@ var InferenceClient = class {
|
|
|
9388
9505
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/models");
|
|
9389
9506
|
}
|
|
9390
9507
|
/**
|
|
9391
|
-
* 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.
|
|
9508
|
+
* 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.
|
|
9392
9509
|
*/
|
|
9393
9510
|
chatInference(request, requestOptions) {
|
|
9394
9511
|
return HttpResponsePromise.fromPromise(this.__chatInference(request, requestOptions));
|
|
@@ -9441,10 +9558,14 @@ var InferenceClient = class {
|
|
|
9441
9558
|
throw new PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
9442
9559
|
case 403:
|
|
9443
9560
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
9561
|
+
case 404:
|
|
9562
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
9444
9563
|
case 413:
|
|
9445
9564
|
throw new ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
9446
9565
|
case 429:
|
|
9447
9566
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
9567
|
+
case 503:
|
|
9568
|
+
throw new ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
9448
9569
|
default:
|
|
9449
9570
|
throw new VectrosError({
|
|
9450
9571
|
statusCode: _response.error.statusCode,
|
|
@@ -9518,6 +9639,8 @@ var InferenceClient = class {
|
|
|
9518
9639
|
throw new ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
9519
9640
|
case 429:
|
|
9520
9641
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
9642
|
+
case 503:
|
|
9643
|
+
throw new ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
9521
9644
|
default:
|
|
9522
9645
|
throw new VectrosError({
|
|
9523
9646
|
statusCode: _response.error.statusCode,
|
|
@@ -9582,12 +9705,16 @@ var InferenceClient = class {
|
|
|
9582
9705
|
throw new PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
9583
9706
|
case 403:
|
|
9584
9707
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
9708
|
+
case 404:
|
|
9709
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
9585
9710
|
case 413:
|
|
9586
9711
|
throw new ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
9587
9712
|
case 429:
|
|
9588
9713
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
9589
9714
|
case 500:
|
|
9590
9715
|
throw new InternalServerError(_response.error.body, _response.rawResponse);
|
|
9716
|
+
case 503:
|
|
9717
|
+
throw new ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
9591
9718
|
default:
|
|
9592
9719
|
throw new VectrosError({
|
|
9593
9720
|
statusCode: _response.error.statusCode,
|
|
@@ -9665,7 +9792,7 @@ var RecordsClient = class {
|
|
|
9665
9792
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/records/batch-get");
|
|
9666
9793
|
}
|
|
9667
9794
|
/**
|
|
9668
|
-
* Reserved endpoint for batch lookup and reference resolution. The published response shape correlates results to each input and carries a per-item status envelope.
|
|
9795
|
+
* 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.
|
|
9669
9796
|
*
|
|
9670
9797
|
* @param {Vectros.BatchLookupRequest} request
|
|
9671
9798
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -9726,7 +9853,7 @@ var RecordsClient = class {
|
|
|
9726
9853
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/records/lookup/batch");
|
|
9727
9854
|
}
|
|
9728
9855
|
/**
|
|
9729
|
-
* Writes up to 50 records
|
|
9856
|
+
* 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.
|
|
9730
9857
|
*
|
|
9731
9858
|
* `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.
|
|
9732
9859
|
*
|
|
@@ -9865,6 +9992,8 @@ var RecordsClient = class {
|
|
|
9865
9992
|
*
|
|
9866
9993
|
* @throws {@link Vectros.BadRequestError}
|
|
9867
9994
|
* @throws {@link Vectros.ForbiddenError}
|
|
9995
|
+
* @throws {@link Vectros.NotFoundError}
|
|
9996
|
+
* @throws {@link Vectros.ConflictError}
|
|
9868
9997
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
9869
9998
|
*
|
|
9870
9999
|
* @example
|
|
@@ -9921,6 +10050,10 @@ var RecordsClient = class {
|
|
|
9921
10050
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
9922
10051
|
case 403:
|
|
9923
10052
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
10053
|
+
case 404:
|
|
10054
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
10055
|
+
case 409:
|
|
10056
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
9924
10057
|
case 429:
|
|
9925
10058
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
9926
10059
|
default:
|
|
@@ -10069,6 +10202,7 @@ var RecordsClient = class {
|
|
|
10069
10202
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
10070
10203
|
*
|
|
10071
10204
|
* @throws {@link Vectros.NotFoundError}
|
|
10205
|
+
* @throws {@link Vectros.ConflictError}
|
|
10072
10206
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
10073
10207
|
*
|
|
10074
10208
|
* @example
|
|
@@ -10108,6 +10242,8 @@ var RecordsClient = class {
|
|
|
10108
10242
|
switch (_response.error.statusCode) {
|
|
10109
10243
|
case 404:
|
|
10110
10244
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
10245
|
+
case 409:
|
|
10246
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
10111
10247
|
case 429:
|
|
10112
10248
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
10113
10249
|
default:
|
|
@@ -10121,7 +10257,7 @@ var RecordsClient = class {
|
|
|
10121
10257
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v1/records/{id}");
|
|
10122
10258
|
}
|
|
10123
10259
|
/**
|
|
10124
|
-
* 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
|
|
10260
|
+
* 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.
|
|
10125
10261
|
*
|
|
10126
10262
|
* @param {Vectros.PatchRecordRequest} request
|
|
10127
10263
|
* @param {RecordsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -10550,6 +10686,8 @@ var SchemasClient = class {
|
|
|
10550
10686
|
*
|
|
10551
10687
|
* @throws {@link Vectros.BadRequestError}
|
|
10552
10688
|
* @throws {@link Vectros.ForbiddenError}
|
|
10689
|
+
* @throws {@link Vectros.NotFoundError}
|
|
10690
|
+
* @throws {@link Vectros.ConflictError}
|
|
10553
10691
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
10554
10692
|
*
|
|
10555
10693
|
* @example
|
|
@@ -10619,6 +10757,10 @@ var SchemasClient = class {
|
|
|
10619
10757
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
10620
10758
|
case 403:
|
|
10621
10759
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
10760
|
+
case 404:
|
|
10761
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
10762
|
+
case 409:
|
|
10763
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
10622
10764
|
case 429:
|
|
10623
10765
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
10624
10766
|
default:
|
|
@@ -10762,7 +10904,7 @@ var SchemasClient = class {
|
|
|
10762
10904
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/v1/schemas/{id}");
|
|
10763
10905
|
}
|
|
10764
10906
|
/**
|
|
10765
|
-
* 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.
|
|
10907
|
+
* 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.
|
|
10766
10908
|
*
|
|
10767
10909
|
* @param {Vectros.DeleteSchemaRequest} request
|
|
10768
10910
|
* @param {SchemasClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -10889,7 +11031,7 @@ var ScriptsClient = class {
|
|
|
10889
11031
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
10890
11032
|
}
|
|
10891
11033
|
/**
|
|
10892
|
-
* 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
|
|
11034
|
+
* 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.
|
|
10893
11035
|
*
|
|
10894
11036
|
* **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.
|
|
10895
11037
|
*
|
|
@@ -11503,6 +11645,8 @@ var TriggersClient = class {
|
|
|
11503
11645
|
*
|
|
11504
11646
|
* @throws {@link Vectros.BadRequestError}
|
|
11505
11647
|
* @throws {@link Vectros.ForbiddenError}
|
|
11648
|
+
* @throws {@link Vectros.NotFoundError}
|
|
11649
|
+
* @throws {@link Vectros.ConflictError}
|
|
11506
11650
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
11507
11651
|
*
|
|
11508
11652
|
* @example
|
|
@@ -11560,6 +11704,10 @@ var TriggersClient = class {
|
|
|
11560
11704
|
throw new BadRequestError(_response.error.body, _response.rawResponse);
|
|
11561
11705
|
case 403:
|
|
11562
11706
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
11707
|
+
case 404:
|
|
11708
|
+
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
11709
|
+
case 409:
|
|
11710
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
11563
11711
|
case 429:
|
|
11564
11712
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
11565
11713
|
default:
|
|
@@ -11636,6 +11784,7 @@ var TriggersClient = class {
|
|
|
11636
11784
|
* @throws {@link Vectros.BadRequestError}
|
|
11637
11785
|
* @throws {@link Vectros.ForbiddenError}
|
|
11638
11786
|
* @throws {@link Vectros.NotFoundError}
|
|
11787
|
+
* @throws {@link Vectros.ConflictError}
|
|
11639
11788
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
11640
11789
|
*
|
|
11641
11790
|
* @example
|
|
@@ -11693,6 +11842,8 @@ var TriggersClient = class {
|
|
|
11693
11842
|
throw new ForbiddenError(_response.error.body, _response.rawResponse);
|
|
11694
11843
|
case 404:
|
|
11695
11844
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
11845
|
+
case 409:
|
|
11846
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
11696
11847
|
case 429:
|
|
11697
11848
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
11698
11849
|
default:
|
|
@@ -11712,6 +11863,7 @@ var TriggersClient = class {
|
|
|
11712
11863
|
* @param {TriggersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
11713
11864
|
*
|
|
11714
11865
|
* @throws {@link Vectros.NotFoundError}
|
|
11866
|
+
* @throws {@link Vectros.ConflictError}
|
|
11715
11867
|
* @throws {@link Vectros.TooManyRequestsError}
|
|
11716
11868
|
*
|
|
11717
11869
|
* @example
|
|
@@ -11751,6 +11903,8 @@ var TriggersClient = class {
|
|
|
11751
11903
|
switch (_response.error.statusCode) {
|
|
11752
11904
|
case 404:
|
|
11753
11905
|
throw new NotFoundError(_response.error.body, _response.rawResponse);
|
|
11906
|
+
case 409:
|
|
11907
|
+
throw new ConflictError(_response.error.body, _response.rawResponse);
|
|
11754
11908
|
case 429:
|
|
11755
11909
|
throw new TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
11756
11910
|
default:
|
|
@@ -12086,7 +12240,7 @@ var BlueprintSchemaSchema = import_zod.z.object({
|
|
|
12086
12240
|
// (`lintNamespacedScopeArrays`) — this `.max(MAX_SCOPE_DIMENSIONS)` is
|
|
12087
12241
|
// only the shape-level cap, not the grammar check.
|
|
12088
12242
|
// With a scoped token these must be consistent with the profile's dataScope
|
|
12089
|
-
// (
|
|
12243
|
+
// (the lints here check each entry's grammar only, not that consistency).
|
|
12090
12244
|
userId: import_zod.z.string().min(1).optional(),
|
|
12091
12245
|
scopes: import_zod.z.array(import_zod.z.string().min(1)).max(MAX_SCOPE_DIMENSIONS).optional(),
|
|
12092
12246
|
// The id of an existing schema this one is a CUSTOMIZATION of, when a schema
|
|
@@ -12452,8 +12606,8 @@ var IdentityDeclSchema = import_zod.z.object({
|
|
|
12452
12606
|
kind: IdentityKindSchema,
|
|
12453
12607
|
// safeDisplayString: `@vectros-ai/cli`'s `runBootstrapCli` and `blueprint plan` both print
|
|
12454
12608
|
// this RAW to stdout ("~ <name> (<kind>) — external id '<externalId>'"), immediately before
|
|
12455
|
-
// the "Apply this plan? [y/N]" confirmation gate itself — the highest-severity
|
|
12456
|
-
//
|
|
12609
|
+
// the "Apply this plan? [y/N]" confirmation gate itself — the highest-severity place to
|
|
12610
|
+
// close, since it sits at the confirmation prompt's own disclosure text, not merely
|
|
12457
12611
|
// somewhere upstream of it. `displayName` is wrapped too though not currently
|
|
12458
12612
|
// rendered in any preview (defense-in-depth, matching this file's practice for its adjacent
|
|
12459
12613
|
// sibling fields) — it does reach a platform API payload as an entity's `name`.
|
|
@@ -12799,7 +12953,7 @@ var SeedCommonShape = {
|
|
|
12799
12953
|
* seeds resolve a `reference` against (across surfaces: a record seed may
|
|
12800
12954
|
* reference a document seed by its externalId, and vice versa).
|
|
12801
12955
|
* `safeDisplayString`: not currently rendered in a plan-preview line (same as this schema's
|
|
12802
|
-
* `typeName` just above
|
|
12956
|
+
* `typeName` just above), but the same "costs nothing to close" standard
|
|
12803
12957
|
* applies — a short caller-supplied id, not free-form prose, so no YAML block-scalar
|
|
12804
12958
|
* collision risk like `description`'s.
|
|
12805
12959
|
*/
|
|
@@ -13464,10 +13618,10 @@ var BlueprintSchema = import_zod.z.object({
|
|
|
13464
13618
|
/** Stable blueprint id (the `--blueprint <name>` selector + idempotency key). */
|
|
13465
13619
|
name: safeDisplayString(import_zod.z.string().min(1)),
|
|
13466
13620
|
version: safeDisplayString(import_zod.z.string().min(1)),
|
|
13467
|
-
// NOT safeDisplayString — deliberately
|
|
13468
|
-
// blueprint
|
|
13621
|
+
// NOT safeDisplayString — deliberately: that wrap breaks real, multi-line-authored
|
|
13622
|
+
// blueprint `description`s. `description` is never interpolated into any
|
|
13469
13623
|
// rendered plan-preview line (`buildPlan`'s header prints
|
|
13470
|
-
// `name`/`version`/`contextId`, never `description`
|
|
13624
|
+
// `name`/`version`/`contextId`, never `description`), so
|
|
13471
13625
|
// wrapping it protected a sink that does not exist. It also actively broke real content:
|
|
13472
13626
|
// this is exactly the field authors reach for a YAML folded (`>`) or literal (`|`) block
|
|
13473
13627
|
// scalar to write, and clip chomping (the YAML default) always leaves exactly one trailing
|
|
@@ -13482,9 +13636,8 @@ var BlueprintSchema = import_zod.z.object({
|
|
|
13482
13636
|
/**
|
|
13483
13637
|
* Human-readable app-context name; defaults to `MCP — <name>` (see {@link contextNameOf})
|
|
13484
13638
|
* when absent. `safeDisplayString`: `contextNameOf` renders this raw into the FIRST line of
|
|
13485
|
-
* every `buildPlan` summary (the `context '...' (...)` step)
|
|
13486
|
-
*
|
|
13487
|
-
* `name`/`version`/`description` right above it.
|
|
13639
|
+
* every `buildPlan` summary (the `context '...' (...)` step); same shape as
|
|
13640
|
+
* `name`/`version` right above it.
|
|
13488
13641
|
*/
|
|
13489
13642
|
contextName: safeDisplayString(import_zod.z.string().min(1)).optional(),
|
|
13490
13643
|
/**
|
|
@@ -13579,9 +13732,8 @@ var BlueprintSchema = import_zod.z.object({
|
|
|
13579
13732
|
*/
|
|
13580
13733
|
identityProjectionClaims: import_zod.z.array(
|
|
13581
13734
|
// safeDisplayString: rendered raw into buildPlan's context step (`identity projection:
|
|
13582
|
-
// [...]`) — same rendered-plan-preview shape as `capturedClaims` (its structural pair
|
|
13583
|
-
//
|
|
13584
|
-
// applies (safeDisplayString's own `.refine` before the blank-name `.refine` below,
|
|
13735
|
+
// [...]`) — same rendered-plan-preview shape as `capturedClaims` (its structural pair);
|
|
13736
|
+
// the same ordering rule applies (safeDisplayString's own `.refine` before the blank-name `.refine` below,
|
|
13585
13737
|
// both after `.max` since `.refine` returns a ZodEffects with no `.max`).
|
|
13586
13738
|
safeDisplayString(
|
|
13587
13739
|
import_zod.z.string().max(MAX_CAPTURED_CLAIM_NAME_LENGTH, {
|
|
@@ -13786,7 +13938,7 @@ function deriveSuffix(contextId) {
|
|
|
13786
13938
|
var WHOLE_TOKEN_RE = /^\$\{\{\s*([A-Za-z_]\w*)\.([A-Za-z_]\w*)\s*\}\}$/;
|
|
13787
13939
|
var TOKEN_SCAN_RE = /\$\$\{\{|\$\{\{([\s\S]*?)\}\}|\$\{\{/g;
|
|
13788
13940
|
var INNER_REF_RE = /^([A-Za-z_]\w*)\.([A-Za-z_]\w*)$/;
|
|
13789
|
-
var DEFERRED_NAMESPACES = /* @__PURE__ */ new Set(["self", "identities", "under", "member"]);
|
|
13941
|
+
var DEFERRED_NAMESPACES = /* @__PURE__ */ new Set(["self", "identities", "under", "member", "input"]);
|
|
13790
13942
|
var DEFERRED_BARE_TOKENS = /* @__PURE__ */ new Set(["any"]);
|
|
13791
13943
|
var DEFERRED_NS_ALTERNATION = [...DEFERRED_NAMESPACES].join("|");
|
|
13792
13944
|
var DEFERRED_INNER_RE = new RegExp(
|
|
@@ -16355,14 +16507,14 @@ var COGNITO_ALLOWED_HOSTS = Object.values(PER_ENV).map(
|
|
|
16355
16507
|
);
|
|
16356
16508
|
var BAKED_CLIENT_IDS = {
|
|
16357
16509
|
staging: "61hjvm25kkjb1eei8t2d3jkcl8",
|
|
16358
|
-
//
|
|
16510
|
+
// deployed staging hosted UI client
|
|
16359
16511
|
production: "63eipeedjv78q653k45niih46f"
|
|
16360
|
-
//
|
|
16512
|
+
// deployed production hosted UI client
|
|
16361
16513
|
};
|
|
16362
16514
|
var MissingCognitoClientIdError = class extends Error {
|
|
16363
16515
|
constructor(env) {
|
|
16364
16516
|
super(
|
|
16365
|
-
`No Cognito client id for '${env}'. Set VECTROS_COGNITO_CLIENT_ID
|
|
16517
|
+
`No Cognito client id for '${env}'. Set VECTROS_COGNITO_CLIENT_ID to the public client id of the sign-in app.`
|
|
16366
16518
|
);
|
|
16367
16519
|
this.name = "MissingCognitoClientIdError";
|
|
16368
16520
|
}
|
|
@@ -16596,6 +16748,7 @@ async function resolveCognitoToken(env, explicit, deps = { readSession, refreshT
|
|
|
16596
16748
|
}
|
|
16597
16749
|
throw new MissingCredentialError(env);
|
|
16598
16750
|
}
|
|
16751
|
+
var DEFAULT_CONTEXT_ID = "default";
|
|
16599
16752
|
async function resolveAuthContext(opts) {
|
|
16600
16753
|
const baseUrl = envToBaseUrl(opts.env, opts.baseUrl ?? process.env.VECTROS_API_BASE_URL);
|
|
16601
16754
|
const cognitoToken = await resolveCognitoToken(opts.env, opts.token);
|
|
@@ -16605,7 +16758,7 @@ async function resolveAuthContext(opts) {
|
|
|
16605
16758
|
apiBaseUrl: baseUrl,
|
|
16606
16759
|
tenant,
|
|
16607
16760
|
...opts.context ? { contextId: opts.context } : {}
|
|
16608
|
-
}) : await mintContextToken({ cognitoToken, apiBaseUrl: baseUrl, contextId: opts.context ??
|
|
16761
|
+
}) : await mintContextToken({ cognitoToken, apiBaseUrl: baseUrl, contextId: opts.context ?? DEFAULT_CONTEXT_ID, tenant });
|
|
16609
16762
|
const client = new VectrosClient({ token: bridge.token, environment: baseUrl });
|
|
16610
16763
|
const identity = await resolveIdentity({ log: opts.log, apiKey: bridge.token, environment: baseUrl });
|
|
16611
16764
|
return {
|
|
@@ -17714,13 +17867,11 @@ function toSdkFields(blueprint, schemaIndex) {
|
|
|
17714
17867
|
searchable: f.searchable,
|
|
17715
17868
|
filterable: f.filterable,
|
|
17716
17869
|
// Forwarded explicitly, like every sibling here: this mapping is a named-property list, not a
|
|
17717
|
-
// spread, so an unforwarded field is dropped SILENTLY rather than failing
|
|
17718
|
-
// happened to `validation` before it was added below.
|
|
17870
|
+
// spread, so an unforwarded field is dropped SILENTLY rather than failing.
|
|
17719
17871
|
inline: f.inline,
|
|
17720
17872
|
description: f.description,
|
|
17721
17873
|
enumValues: mapEnumValues(f.enumValues),
|
|
17722
|
-
// Format passthrough
|
|
17723
|
-
// "smoking gun" toSdkFields mapped only six props). The platform
|
|
17874
|
+
// Format passthrough. The platform
|
|
17724
17875
|
// `SchemaRequest.FieldDef.validation` enforces these server-side. The
|
|
17725
17876
|
// typed blueprint ValidationRules narrows the SDK's free-form Record.
|
|
17726
17877
|
validation: f.validation,
|
|
@@ -17847,7 +17998,7 @@ async function provisionContext(client, input) {
|
|
|
17847
17998
|
externalId: blueprint.servicePrincipal.externalId,
|
|
17848
17999
|
type: "SERVICE",
|
|
17849
18000
|
// SDK 0.18+ (identity-access rework): UserRequest's free-form attribute bag
|
|
17850
|
-
//
|
|
18001
|
+
// is `payload` (arbitrary key/value).
|
|
17851
18002
|
payload: { displayName: blueprint.servicePrincipal.displayName }
|
|
17852
18003
|
}
|
|
17853
18004
|
});
|
|
@@ -18021,7 +18172,7 @@ async function runLoader(client, input) {
|
|
|
18021
18172
|
// them), so default to ['record'] when a blueprint omits it. The `as` keeps
|
|
18022
18173
|
// the literal default assignable to the SDK's enum-array type.
|
|
18023
18174
|
allowedSurfaces: s.allowedSurfaces ?? ["record"],
|
|
18024
|
-
// Format passthrough
|
|
18175
|
+
// Format passthrough. Ownership mirrors
|
|
18025
18176
|
// the SDK `SchemaRequest` shape 1:1: the principal `userId` plus `scopes`
|
|
18026
18177
|
// (namespaced parent edges `<ns>:<value>`; the flat orgId/clientId fields are gone).
|
|
18027
18178
|
renderHints: toRenderHintMap(s),
|
|
@@ -18872,10 +19023,8 @@ var OsKeychainSecretStore = class {
|
|
|
18872
19023
|
}
|
|
18873
19024
|
/**
|
|
18874
19025
|
* `present` or `unknown` — **never `absent`**: impossible through `getPassword`,
|
|
18875
|
-
* and held there by POLICY where other evidence exists
|
|
18876
|
-
*
|
|
18877
|
-
* tighten later", which the rest of this very docstring then disowns — the
|
|
18878
|
-
* widening procedure is spelled out below. State the real shape up front.)
|
|
19026
|
+
* and held there by POLICY where other evidence exists (the widening procedure
|
|
19027
|
+
* is spelled out below).
|
|
18879
19028
|
*
|
|
18880
19029
|
* Proving absence would require distinguishing "no such entry" from "I could not
|
|
18881
19030
|
* read it", and that information does not survive the binding: `get_password` is
|
|
@@ -18895,7 +19044,7 @@ var OsKeychainSecretStore = class {
|
|
|
18895
19044
|
* Linux collection `secret-tool` exits 1 while `getPassword` returns `null`, so
|
|
18896
19045
|
* the D-Bus layer reports the fault faithfully and `.ok()` is what discards it.
|
|
18897
19046
|
* A read with real error semantics could therefore make `absent` reachable — and
|
|
18898
|
-
* `find_credentials`
|
|
19047
|
+
* `find_credentials` HAS verified semantics on Linux: it throws
|
|
18899
19048
|
* `org.freedesktop.Secret.Error.IsLocked` against a locked collection (measured;
|
|
18900
19049
|
* see {@link OsKeychainSecretStore.deleteSecret} for the transcript). That is why
|
|
18901
19050
|
* `deleteSecret` may confirm a delete while this method may not.
|
|
@@ -18905,7 +19054,7 @@ var OsKeychainSecretStore = class {
|
|
|
18905
19054
|
* PRUNABLE, which is a behaviour change this CLI has not taken, and Windows'
|
|
18906
19055
|
* locked-store behaviour is unmeasured (it has no comparable lock state, so there
|
|
18907
19056
|
* is nothing yet to observe). Verify per-platform before widening; do not infer it
|
|
18908
|
-
* from a signature
|
|
19057
|
+
* from a signature.
|
|
18909
19058
|
*/
|
|
18910
19059
|
async presence(ref) {
|
|
18911
19060
|
try {
|
|
@@ -18936,10 +19085,8 @@ var OsKeychainSecretStore = class {
|
|
|
18936
19085
|
*
|
|
18937
19086
|
* MEASURED, not inferred — and the distinction is the whole point, because
|
|
18938
19087
|
* {@link OsKeychainSecretStore.presence} rightly forbids inferring a locked
|
|
18939
|
-
* store's behaviour from a `Result` signature
|
|
18940
|
-
*
|
|
18941
|
-
* precisely that, on the path that authorizes destruction. Being right by luck is
|
|
18942
|
-
* not being right. Against a real locked collection (`node:24-alpine`, non-root,
|
|
19088
|
+
* store's behaviour from a `Result` signature, and doing so on the path that
|
|
19089
|
+
* authorizes destruction would be right only by luck. Against a real locked collection (`node:24-alpine`, non-root,
|
|
18943
19090
|
* `dbus-run-session` + gnome-keyring, collection locked via
|
|
18944
19091
|
* `org.freedesktop.Secret.Service.Lock`):
|
|
18945
19092
|
*
|
|
@@ -18954,9 +19101,8 @@ var OsKeychainSecretStore = class {
|
|
|
18954
19101
|
* cached handle to it. CI cannot pin this half — it unlocks the collection so the rest of
|
|
18955
19102
|
* the suite can use it — so the evidence lives here rather than in a test.
|
|
18956
19103
|
*
|
|
18957
|
-
* The WINDOWS half of the same contract
|
|
18958
|
-
*
|
|
18959
|
-
* 2026-07-17): `findCredentials` enumerates `account` byte-for-byte as stored —
|
|
19104
|
+
* The WINDOWS half of the same contract is also measured (real Credential Manager,
|
|
19105
|
+
* real binding, throwaway service): `findCredentials` enumerates `account` byte-for-byte as stored —
|
|
18960
19106
|
* case preserved, 48-char refs intact — a confirmed delete empties the
|
|
18961
19107
|
* enumeration, and `deleteCredential` on a nonexistent ref returns the same
|
|
18962
19108
|
* meaningless `false` as Linux. So the `.some(c => c.account === ref)` comparison
|
|
@@ -19032,11 +19178,11 @@ var CryptoFileSecretStore = class {
|
|
|
19032
19178
|
/**
|
|
19033
19179
|
* The salt is the one file whose loss is UNRECOVERABLE — every `.enc` is scrypt'd
|
|
19034
19180
|
* against it, so replacing it silently re-keys the store and bricks them all. Two
|
|
19035
|
-
* rules follow
|
|
19181
|
+
* rules follow:
|
|
19036
19182
|
*
|
|
19037
19183
|
* - A present-but-short salt is treated exactly like a corrupt index
|
|
19038
19184
|
* ({@link readKeyring}): throw an actionable error, never silently replace.
|
|
19039
|
-
*
|
|
19185
|
+
* Regenerating it would convert one anomaly into every secret
|
|
19040
19186
|
* being permanently undecryptable — destruction dressed as repair.
|
|
19041
19187
|
* - Creation is temp + hard-link (atomic AND exclusive; below), with an
|
|
19042
19188
|
* exclusive-create (`wx`) fallback on no-hardlink filesystems. The link path
|
|
@@ -19187,9 +19333,8 @@ var CryptoFileSecretStore = class {
|
|
|
19187
19333
|
* EACCES, or the directory not being there AT ALL — answers false, i.e. "we know
|
|
19188
19334
|
* nothing".
|
|
19189
19335
|
*
|
|
19190
|
-
* A MISSING `secrets/` reads as "we know nothing", not as an honest empty
|
|
19191
|
-
*
|
|
19192
|
-
* looked right: nothing has ever been stored, so "no secret here" is true. Why it
|
|
19336
|
+
* A MISSING `secrets/` reads as "we know nothing", not as an honest empty. The
|
|
19337
|
+
* tempting reasoning — nothing has ever been stored, so "no secret here" is true —
|
|
19193
19338
|
* is wrong: this is only ever consulted about an entry that is IN the index and
|
|
19194
19339
|
* stamped `crypto-file` — meaning `setSecret` ran, and `setSecret` mkdir's
|
|
19195
19340
|
* `secrets/` before every write. So for the only entries that reach here, "the
|
|
@@ -19200,7 +19345,7 @@ var CryptoFileSecretStore = class {
|
|
|
19200
19345
|
* it went. Calling that `absent` invites `prune` to delete the entry and the only
|
|
19201
19346
|
* record of a keyId whose key is still live.
|
|
19202
19347
|
*
|
|
19203
|
-
* The fresh-install case
|
|
19348
|
+
* The fresh-install case needs no special handling: an install with nothing
|
|
19204
19349
|
* stored has no index entries either, so nothing asks.
|
|
19205
19350
|
*/
|
|
19206
19351
|
async secretsDirIntact() {
|
|
@@ -19317,10 +19462,9 @@ async function withIndexLock(dir, fn, timings = LOCK_OPTS) {
|
|
|
19317
19462
|
// Swallowing is the better answer. We cannot un-write what we already wrote;
|
|
19318
19463
|
// finishing is strictly better than crashing half-done.
|
|
19319
19464
|
//
|
|
19320
|
-
// What swallowing does NOT buy
|
|
19321
|
-
//
|
|
19322
|
-
//
|
|
19323
|
-
// delete a successor's lock. That detection runs on the mtime-refresh timer,
|
|
19465
|
+
// What swallowing does NOT buy is protection from our own release: the library
|
|
19466
|
+
// marks a lock released when it DETECTS a compromise, after which our release
|
|
19467
|
+
// below would be a no-op that cannot delete a successor's lock. That detection runs on the mtime-refresh timer,
|
|
19324
19468
|
// every `stale/2` — 2.5s at the shipping 5s — and this file's critical
|
|
19325
19469
|
// sections are ~1ms, so in practice the holder is gone before the first tick
|
|
19326
19470
|
// and nothing is ever detected. (The probe that observed the no-op ran at
|
|
@@ -19333,10 +19477,8 @@ async function withIndexLock(dir, fn, timings = LOCK_OPTS) {
|
|
|
19333
19477
|
// updateKeyring's identity re-check before each commit — which, per its own
|
|
19334
19478
|
// honesty note, narrows the lost-update window; it does not close it.
|
|
19335
19479
|
//
|
|
19336
|
-
// RESIDUAL, stated honestly
|
|
19337
|
-
//
|
|
19338
|
-
// compromised lock "requires our event loop to freeze past `stale`". It does
|
|
19339
|
-
// not. proper-lockfile's stale-break is `stat` -> judge stale -> `rmdir` ->
|
|
19480
|
+
// RESIDUAL, stated honestly: reaching a compromised lock does NOT require our
|
|
19481
|
+
// event loop to freeze past `stale`. proper-lockfile's stale-break is `stat` -> judge stale -> `rmdir` ->
|
|
19340
19482
|
// `mkdir`, and it never re-checks that the directory it removes is the one it
|
|
19341
19483
|
// judged: two waiters can both condemn one crash remnant, and the second's
|
|
19342
19484
|
// already-decided rmdir destroys the first's FRESH lock. Nothing freezes.
|
|
@@ -19353,10 +19495,10 @@ async function withIndexLock(dir, fn, timings = LOCK_OPTS) {
|
|
|
19353
19495
|
// round-trip. Rare, not impossible — and inherent to mtime-based locking of
|
|
19354
19496
|
// this shape.
|
|
19355
19497
|
//
|
|
19356
|
-
// Accepted KNOWINGLY.
|
|
19357
|
-
// behind a second mutex — the right idea —
|
|
19358
|
-
// breaker at 10s with no liveness check
|
|
19359
|
-
// injection at all, plus 0.57% of contended acquires dying on Windows EPERM.
|
|
19498
|
+
// Accepted KNOWINGLY. A hand-rolled lock that serialised the break
|
|
19499
|
+
// behind a second mutex — the right idea — hits a defect there: that mutex age-breaks a LIVE
|
|
19500
|
+
// breaker at 10s with no liveness check (`maxOccupancy = 2`, measured with no
|
|
19501
|
+
// injection at all), plus 0.57% of contended acquires dying on Windows EPERM.
|
|
19360
19502
|
// Trading a measured, reachable defect for one that needs injected lag to
|
|
19361
19503
|
// observe is the right trade; pretending it is zero is not. If it ever needs
|
|
19362
19504
|
// closing the fix is upstream (re-stat under the removal), NOT another
|
|
@@ -19486,8 +19628,8 @@ var Keyring = class _Keyring {
|
|
|
19486
19628
|
/**
|
|
19487
19629
|
* Where new secrets go, or undefined if the selected store isn't actually here.
|
|
19488
19630
|
*
|
|
19489
|
-
* That sounds impossible — the file store is always constructed —
|
|
19490
|
-
*
|
|
19631
|
+
* That sounds impossible — the file store is always constructed — so it is tempting
|
|
19632
|
+
* to cast the `undefined` away. That would be wrong:
|
|
19491
19633
|
* `new Keyring({ selection: { kind: 'os-keychain' } })` with no `keychainStore`
|
|
19492
19634
|
* names a store that was never supplied, and a cast does not conjure one. Return
|
|
19493
19635
|
* the honest type and let {@link storeSecretSomewhere} handle it, rather than
|
|
@@ -19665,7 +19807,7 @@ The key itself WAS created server-side and is live \u2014 its id is ${entry.keyI
|
|
|
19665
19807
|
* {@link storeSecretSomewhere} throws — i.e. only when no store on this machine
|
|
19666
19808
|
* will accept a write at all, which is the failure worth stopping for.
|
|
19667
19809
|
*
|
|
19668
|
-
* Still NOT a proof that {@link add} will succeed, and the gap is
|
|
19810
|
+
* Still NOT a proof that {@link add} will succeed, and the remaining gap is only the
|
|
19669
19811
|
* genuinely transient: a lock another process holds for longer than the retry
|
|
19670
19812
|
* budget, or a CAS race, either of which a retry actually fixes. What it DOES
|
|
19671
19813
|
* cover is every deterministic refusal — no writable secret store, and an index
|
|
@@ -19699,11 +19841,11 @@ The key itself WAS created server-side and is live \u2014 its id is ${entry.keyI
|
|
|
19699
19841
|
* delete, and no other store PROVED it still holds a copy.
|
|
19700
19842
|
*
|
|
19701
19843
|
* That is deliberately WEAKER than "proved gone everywhere", and saying the
|
|
19702
|
-
* stronger thing (
|
|
19844
|
+
* stronger thing ("PROVED gone") would hide a real residual:
|
|
19703
19845
|
* a non-home store vetoes only on `present`, and a LOCKED keychain answers
|
|
19704
19846
|
* `unknown` — so on the one state this store's model is built around, a stale copy behind a
|
|
19705
19847
|
* locked non-home store passes unvetoed. That is the chosen trade, not an
|
|
19706
|
-
* oversight: the alternative (veto on doubt)
|
|
19848
|
+
* oversight: the alternative (veto on doubt) would let an unrelated
|
|
19707
19849
|
* locked keychain block removal of file-store entries forever, with advice to
|
|
19708
19850
|
* unlock a store that never held the secret.
|
|
19709
19851
|
*
|
|
@@ -19764,7 +19906,7 @@ The key itself WAS created server-side and is live \u2014 its id is ${entry.keyI
|
|
|
19764
19906
|
* freshly minted `keyId` on every path (`issueOrRotateKey` either creates a new key
|
|
19765
19907
|
* or revokes-and-recreates, and both mint a new id), so `prior.secretRef !==
|
|
19766
19908
|
* stamped.secretRef` always holds and `add` always takes the `forgetEverywhere`
|
|
19767
|
-
* branch.
|
|
19909
|
+
* branch. That does not make this dead code — it is UNEXERCISED by `join`, and
|
|
19768
19910
|
* the distinction matters:
|
|
19769
19911
|
*
|
|
19770
19912
|
* - `add` is public and takes the entry as an argument, so "the caller supplies a
|
|
@@ -19831,10 +19973,10 @@ The key itself WAS created server-side and is live \u2014 its id is ${entry.keyI
|
|
|
19831
19973
|
* `keyId`, so dropping it while the `ssk_*` survives leaves a live, unrevokable
|
|
19832
19974
|
* credential on the machine.
|
|
19833
19975
|
*
|
|
19834
|
-
* The gate is the DELETE'S RESULT, not whether the store looked reachable.
|
|
19835
|
-
*
|
|
19976
|
+
* The gate is the DELETE'S RESULT, not whether the store looked reachable. A
|
|
19977
|
+
* reachability gate would not work, because a
|
|
19836
19978
|
* LOCKED keychain is perfectly reachable — it constructs, it answers, it just
|
|
19837
|
-
* won't do anything. The guard never
|
|
19979
|
+
* won't do anything. The guard would never fire, the delete would quietly fail, the row would be
|
|
19838
19980
|
* dropped. Reachability is a proxy; "is it gone?" is the question.
|
|
19839
19981
|
*
|
|
19840
19982
|
* The secret is destroyed BEFORE the index row, the opposite of {@link add}, and
|
|
@@ -19849,10 +19991,8 @@ The key itself WAS created server-side and is live \u2014 its id is ${entry.keyI
|
|
|
19849
19991
|
* for as long as a user takes to type would time out every other vectros process,
|
|
19850
19992
|
* including an MCP server trying to start. The lock buys nothing here anyway —
|
|
19851
19993
|
* `add` writes its secret outside the lock too, so the two secret-writes were
|
|
19852
|
-
* never serialised by it. So: the INITIAL read is unlocked (
|
|
19853
|
-
*
|
|
19854
|
-
* under a lock" — false too: the commit-time re-check below IS a read inside
|
|
19855
|
-
* `updateKeyring`'s lock). Delete outside the lock, then commit under it,
|
|
19994
|
+
* never serialised by it. So: the INITIAL read is unlocked (the commit-time
|
|
19995
|
+
* re-check below, by contrast, IS a read inside `updateKeyring`'s lock). Delete outside the lock, then commit under it,
|
|
19856
19996
|
* re-checking that the entry is still the one the unlocked read saw. That locked
|
|
19857
19997
|
* re-check is what stands in for having read under the lock to begin with.
|
|
19858
19998
|
*/
|
|
@@ -20002,18 +20142,17 @@ The key itself WAS created server-side and is live \u2014 its id is ${entry.keyI
|
|
|
20002
20142
|
* already HAS the secret, so every failure here is silent and leaves the machine
|
|
20003
20143
|
* as it found it, for the next read to retry.
|
|
20004
20144
|
*
|
|
20005
|
-
* "As it found it" is a promise about BOTH stores
|
|
20006
|
-
*
|
|
20007
|
-
*
|
|
20145
|
+
* "As it found it" is a promise about BOTH stores. Saying failure "simply leaves the
|
|
20146
|
+
* secret where it was" would be false for any abort path that returned after
|
|
20147
|
+
* `setSecret` had already landed a SECOND copy in
|
|
20008
20148
|
* the target and left it there — a copy of a live `ssk_*` that no index row names,
|
|
20009
20149
|
* i.e. the exact strand `forgetEverywhere` exists to prevent, produced by the
|
|
20010
20150
|
* function that migrates.
|
|
20011
20151
|
*
|
|
20012
20152
|
* So the target copy is treated as UNCOMMITTED until the migration actually lands,
|
|
20013
20153
|
* and `finally` clears it on every other route out. That is structural rather than
|
|
20014
|
-
* remembered:
|
|
20015
|
-
*
|
|
20016
|
-
* file a review round. The flag cannot be forgotten on a path added later.
|
|
20154
|
+
* remembered: a hand-written cleanup per abort path is precisely the shape that gets
|
|
20155
|
+
* forgotten on one of them. The flag cannot be forgotten on a path added later.
|
|
20017
20156
|
*
|
|
20018
20157
|
* The ordering is the rest of the design, and each step guards a different disaster:
|
|
20019
20158
|
* write the new copy; read it back (a write that silently didn't land would
|
|
@@ -22902,7 +23041,11 @@ async function runWhoami(options, deps = {}) {
|
|
|
22902
23041
|
self2 = null;
|
|
22903
23042
|
}
|
|
22904
23043
|
if (options.json) {
|
|
22905
|
-
const out =
|
|
23044
|
+
const out = {
|
|
23045
|
+
...identity,
|
|
23046
|
+
tenantType: auth.tenant,
|
|
23047
|
+
...self2 ? { userId: self2.userId, userPrincipalId: self2.principalId } : {}
|
|
23048
|
+
};
|
|
22906
23049
|
process.stdout.write(`${formatJson(out)}
|
|
22907
23050
|
`);
|
|
22908
23051
|
return 0;
|
|
@@ -22911,6 +23054,7 @@ async function runWhoami(options, deps = {}) {
|
|
|
22911
23054
|
process.stdout.write(
|
|
22912
23055
|
"\n" + formatKeyValues([
|
|
22913
23056
|
["tenant", identity.tenantId],
|
|
23057
|
+
["tenant type", auth.tenant],
|
|
22914
23058
|
["environment", identity.environment],
|
|
22915
23059
|
["principal", identity.principalType],
|
|
22916
23060
|
["principal id", identity.principalKeyId],
|
|
@@ -23719,6 +23863,12 @@ async function runAccessRevoke(opts, deps = {}) {
|
|
|
23719
23863
|
}
|
|
23720
23864
|
});
|
|
23721
23865
|
}
|
|
23866
|
+
function searchedContextNotice(principal, rows, tenant) {
|
|
23867
|
+
if (rows.some((r) => r.contextId !== void 0 && r.contextId !== DEFAULT_CONTEXT_ID)) return void 0;
|
|
23868
|
+
const tenantFlag = tenant === "test" ? " --tenant test" : "";
|
|
23869
|
+
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}
|
|
23870
|
+
`;
|
|
23871
|
+
}
|
|
23722
23872
|
async function runAccessList(opts, deps = {}) {
|
|
23723
23873
|
if (Boolean(opts.context) === Boolean(opts.principal)) {
|
|
23724
23874
|
process.stderr.write(" \u2716 Provide exactly one of --context <c> or --principal <p>.\n");
|
|
@@ -23742,9 +23892,11 @@ async function runAccessList(opts, deps = {}) {
|
|
|
23742
23892
|
) : await drainPages(
|
|
23743
23893
|
(startFrom) => client.auth.listProfilesForPrincipal({ principalId: principal, startFrom, limit: PAGE_LIMIT })
|
|
23744
23894
|
);
|
|
23895
|
+
const notice = opts.principal ? searchedContextNotice(opts.principal, rows, auth.tenant) : void 0;
|
|
23745
23896
|
if (opts.json) {
|
|
23746
23897
|
process.stdout.write(`${formatJson(rows)}
|
|
23747
23898
|
`);
|
|
23899
|
+
if (notice) process.stderr.write(notice);
|
|
23748
23900
|
return 0;
|
|
23749
23901
|
}
|
|
23750
23902
|
process.stdout.write(
|
|
@@ -23755,6 +23907,7 @@ async function runAccessList(opts, deps = {}) {
|
|
|
23755
23907
|
{ header: "status", get: (r) => r.status }
|
|
23756
23908
|
]) + "\n"
|
|
23757
23909
|
);
|
|
23910
|
+
if (notice) process.stderr.write(notice);
|
|
23758
23911
|
return 0;
|
|
23759
23912
|
} catch (err) {
|
|
23760
23913
|
process.stderr.write(` \u2716 access list failed: ${formatError(err)}
|
|
@@ -26936,9 +27089,9 @@ function emitJoined(opts) {
|
|
|
26936
27089
|
|
|
26937
27090
|
// src/build-info.ts
|
|
26938
27091
|
var BUILD_INFO = {
|
|
26939
|
-
cli: true ? "0.
|
|
26940
|
-
sdk: true ? "0.
|
|
26941
|
-
blueprints: true ? "0.20.
|
|
27092
|
+
cli: true ? "0.26.0" : "dev",
|
|
27093
|
+
sdk: true ? "0.48.0" : "dev",
|
|
27094
|
+
blueprints: true ? "0.20.3" : "dev"
|
|
26942
27095
|
};
|
|
26943
27096
|
function formatBuildInfo() {
|
|
26944
27097
|
return `vectros ${BUILD_INFO.cli} (sdk ${BUILD_INFO.sdk}, blueprints ${BUILD_INFO.blueprints})`;
|
|
@@ -26997,9 +27150,11 @@ function buildProgram(deps = {}) {
|
|
|
26997
27150
|
program.command("logout").description("Clear the stored login session.").action(async () => {
|
|
26998
27151
|
process.exitCode = await runLogout({ env: "production", json: false });
|
|
26999
27152
|
});
|
|
27000
|
-
const whoami = program.command("whoami").description("Show the authenticated session (tenant, env, principal).");
|
|
27153
|
+
const whoami = program.command("whoami").description("Show the authenticated session (tenant, env, principal).").option("--tenant <tenant>", "tenant to show: 'test' or 'live' (default live)");
|
|
27001
27154
|
addCommonAuthOptions(whoami).action(async (flags) => {
|
|
27002
|
-
|
|
27155
|
+
const tenant = parseTenantFlag(flags.tenant);
|
|
27156
|
+
if (tenant === TENANT_FLAG_INVALID) return;
|
|
27157
|
+
process.exitCode = await runWhoami({ ...toCommonOptions(flags), tenant }, deps);
|
|
27003
27158
|
});
|
|
27004
27159
|
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)");
|
|
27005
27160
|
addCommonAuthOptions(blueprintTest).action(
|