Class: BoundaryClient
@kortexya/reasoninglayer / BoundaryClient
Class: BoundaryClient
Section titled “Class: BoundaryClient”Defined in: src/resources/boundary.ts:32
Read and replace native per-space boundary policy using the caller’s identity.
Methods
Section titled “Methods”createSiteRequest()
Section titled “createSiteRequest()”createSiteRequest(
request,requestOptions?):Promise<SiteRequestFiled>
Defined in: src/resources/boundary.ts:139
Ask that the box declare one website for the caller’s Space.
Parameters
Section titled “Parameters”request
Section titled “request”The host, why the Space needs it, and where it is filed.
requestOptions?
Section titled “requestOptions?”Per-call cancellation, timeout and request options.
Returns
Section titled “Returns”Promise<SiteRequestFiled>
The request and whether it was created (false: an open request for the host is returned).
Throws
Section titled “Throws”When the engine refuses the request (403, 409, 422) or the store is unavailable (503).
Remarks
Section titled “Remarks”Uses POST /api/v1/boundary/site-requests. The request is a term the engine keeps; an admin decides it.
Example
Section titled “Example”const { request } = await client.boundary.createSiteRequest({ host: 'example.org', purpose: 'Supplier prices' });decide()
Section titled “decide()”decide(
request,requestOptions?):Promise<BoundaryDecision>
Defined in: src/resources/boundary.ts:46
Ask the engine to decide one outbound call.
Parameters
Section titled “Parameters”request
Section titled “request”The registry entry and circumstances of this call.
requestOptions?
Section titled “requestOptions?”Per-call cancellation, timeout and request options.
Returns
Section titled “Returns”Promise<BoundaryDecision>
The engine’s verdict and any associated restrictions, reason and quota.
Throws
Section titled “Throws”When the HTTP request fails.
Throws
Section titled “Throws”When the decision cannot be decoded.
Remarks
Section titled “Remarks”Sends snake_case JSON to POST /api/v1/boundary/decide.
The engine can count an admitted call against the entry’s daily quota.
Example
Section titled “Example”const decision = await client.boundary.decide({ entryId: 'web-search' });decideSiteRequest()
Section titled “decideSiteRequest()”decideSiteRequest(
id,decision,requestOptions?):Promise<SiteRequest>
Defined in: src/resources/boundary.ts:183
Approve or refuse a website request, as an admin.
Parameters
Section titled “Parameters”string
The request id.
decision
Section titled “decision”The decision, its reason and the terms acknowledgement.
requestOptions?
Section titled “requestOptions?”Per-call cancellation, timeout and request options.
Returns
Section titled “Returns”Promise<SiteRequest>
The decided request.
Throws
Section titled “Throws”When the caller may not decide (403), the request is unknown (404) or already decided (409).
Remarks
Section titled “Remarks”Uses POST /api/v1/boundary/site-requests/{id}/decision.
Example
Section titled “Example”await client.boundary.decideSiteRequest(id, { decision: 'approve', termsAcknowledged: true });getEffective()
Section titled “getEffective()”getEffective(
spaceId,requestOptions?):Promise<EffectiveBoundary>
Defined in: src/resources/boundary.ts:65
Read the effective restrictions computed by the engine.
Parameters
Section titled “Parameters”spaceId
Section titled “spaceId”string
Project/space identifier, or * for the admin cap.
requestOptions?
Section titled “requestOptions?”Per-call cancellation, timeout and request options.
Returns
Section titled “Returns”Promise<EffectiveBoundary>
Callable entries and their effective restrictions.
Throws
Section titled “Throws”If the caller is unauthorized or the engine refuses the read.
Remarks
Section titled “Remarks”Sends space_id as a query value; no policy is computed or cached in the SDK.
Example
Section titled “Example”const effective = await client.boundary.getEffective(spaceId);getPolicy()
Section titled “getPolicy()”getPolicy(
spaceId,requestOptions?):Promise<BoundaryPolicyView>
Defined in: src/resources/boundary.ts:81
Read one space’s stored policy section.
Parameters
Section titled “Parameters”spaceId
Section titled “spaceId”string
Project/space identifier, or * for the admin cap.
requestOptions?
Section titled “requestOptions?”Per-call cancellation, timeout and request options.
Returns
Section titled “Returns”Promise<BoundaryPolicyView>
The stored section, or null when inherited, and its version.
Throws
Section titled “Throws”If the caller is unauthorized or the read fails.
Remarks
Section titled “Remarks”The native JSON response is normalized to SDK casing.
Example
Section titled “Example”const stored = await client.boundary.getPolicy(spaceId);listAllSiteRequests()
Section titled “listAllSiteRequests()”listAllSiteRequests(
requestOptions?):Promise<SiteRequest[]>
Defined in: src/resources/boundary.ts:169
List every Space’s website requests, newest first: the admin queue.
Parameters
Section titled “Parameters”requestOptions?
Section titled “requestOptions?”Per-call cancellation, timeout and request options.
Returns
Section titled “Returns”Promise<SiteRequest[]>
The requests.
Throws
Section titled “Throws”When the caller is not an admin or the store is unavailable.
Remarks
Section titled “Remarks”Uses GET /api/v1/boundary/site-requests/all.
Example
Section titled “Example”const queue = await client.boundary.listAllSiteRequests();listSiteRequests()
Section titled “listSiteRequests()”listSiteRequests(
requestOptions?):Promise<SiteRequest[]>
Defined in: src/resources/boundary.ts:157
List the caller’s Space’s website requests, newest first.
Parameters
Section titled “Parameters”requestOptions?
Section titled “requestOptions?”Per-call cancellation, timeout and request options.
Returns
Section titled “Returns”Promise<SiteRequest[]>
The requests.
Throws
Section titled “Throws”When the read is refused or the store is unavailable.
Remarks
Section titled “Remarks”Uses GET /api/v1/boundary/site-requests.
Example
Section titled “Example”const requests = await client.boundary.listSiteRequests();putPolicy()
Section titled “putPolicy()”putPolicy(
spaceId,policy,requestOptions?):Promise<BoundaryPolicyView>
Defined in: src/resources/boundary.ts:99
Replace a boundary section; null clears it and restores inheritance.
Parameters
Section titled “Parameters”spaceId
Section titled “spaceId”string
Project/space identifier, or * for the admin cap.
policy
Section titled “policy”BoundaryPolicy | null
Replacement section, or null to clear it.
requestOptions?
Section titled “requestOptions?”Per-call cancellation, timeout and request options.
Returns
Section titled “Returns”Promise<BoundaryPolicyView>
The section and version stored by the engine.
Throws
Section titled “Throws”If authority or the registry ceiling refuses the change.
Remarks
Section titled “Remarks”Sends snake_case JSON with opaque entry and data-class keys preserved. A clear sends literal JSON null, not an absent body. All state remains in the native policy store.
Example
Section titled “Example”await client.boundary.putPolicy(spaceId, { denied: ['external-search'] });recordSiteRequestCommit()
Section titled “recordSiteRequestCommit()”recordSiteRequestCommit(
id,registryCommit,requestOptions?):Promise<SiteRequest>
Defined in: src/resources/boundary.ts:205
Record the reviewed boundary-registry commit that declared an approved site.
Parameters
Section titled “Parameters”string
The request id.
registryCommit
Section titled “registryCommit”string
The registry commit.
requestOptions?
Section titled “requestOptions?”Per-call cancellation, timeout and request options.
Returns
Section titled “Returns”Promise<SiteRequest>
The request with its commit.
Throws
Section titled “Throws”When the caller may not record it (403), the request is unknown (404) or not approved (409).
Remarks
Section titled “Remarks”Uses POST /api/v1/boundary/site-requests/{id}/registry-commit.
Example
Section titled “Example”await client.boundary.recordSiteRequestCommit(id, commitSha);