@kortexya/reasoninglayer 8.0.0 → 8.2.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/dist/index.cjs +89 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +176 -20
- package/dist/index.d.ts +176 -20
- package/dist/index.js +89 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -7,7 +7,7 @@ var __export = (target, all) => {
|
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
// src/config.ts
|
|
10
|
-
var SDK_VERSION = "8.
|
|
10
|
+
var SDK_VERSION = "8.2.0";
|
|
11
11
|
function resolveConfig(config) {
|
|
12
12
|
if (!config.baseUrl) {
|
|
13
13
|
throw new Error("ClientConfig.baseUrl is required");
|
|
@@ -16968,6 +16968,23 @@ var Vocabulary = class {
|
|
|
16968
16968
|
format: "json",
|
|
16969
16969
|
...params
|
|
16970
16970
|
});
|
|
16971
|
+
/**
|
|
16972
|
+
* No description
|
|
16973
|
+
*
|
|
16974
|
+
* @tags vocabulary
|
|
16975
|
+
* @name LookupRecords
|
|
16976
|
+
* @summary `GET /api/v1/vocabulary/records` — the records of one view with the ids asked (#632). A client names the few records a finding, a conflict or a list cites without reading a whole release or change set; the view is the cached release or candidate view, so a lookup costs the ids asked.
|
|
16977
|
+
* @request GET:/api/v1/vocabulary/records
|
|
16978
|
+
* @secure
|
|
16979
|
+
*/
|
|
16980
|
+
lookupRecords = (query, params = {}) => this.http.request({
|
|
16981
|
+
path: `/api/v1/vocabulary/records`,
|
|
16982
|
+
method: "GET",
|
|
16983
|
+
query,
|
|
16984
|
+
secure: true,
|
|
16985
|
+
format: "json",
|
|
16986
|
+
...params
|
|
16987
|
+
});
|
|
16971
16988
|
/**
|
|
16972
16989
|
* No description
|
|
16973
16990
|
*
|
|
@@ -17111,7 +17128,7 @@ var Vocabulary = class {
|
|
|
17111
17128
|
*
|
|
17112
17129
|
* @tags vocabulary
|
|
17113
17130
|
* @name RevisionRecords
|
|
17114
|
-
* @summary `GET /api/v1/vocabulary/revisions/{revision_id}/records` — the records the revision's cumulative change set inserts or replaces, by id, optionally of one kind (#628). The revision answer counts them; this read pages them.
|
|
17131
|
+
* @summary `GET /api/v1/vocabulary/revisions/{revision_id}/records` — the records the revision's cumulative change set inserts or replaces, by id, optionally of one kind (#628). The revision answer counts them; this read pages them from the cached candidate view, so a page costs a page once the revision is indexed (#630).
|
|
17115
17132
|
* @request GET:/api/v1/vocabulary/revisions/{revision_id}/records
|
|
17116
17133
|
* @secure
|
|
17117
17134
|
*/
|
|
@@ -19590,6 +19607,7 @@ var RESPONSE_COMPONENTS = {
|
|
|
19590
19607
|
created_by: [1, 0],
|
|
19591
19608
|
minted_ids: [1, { object: {} }],
|
|
19592
19609
|
outcome: [1, 0],
|
|
19610
|
+
proposal_counts: [1, { object: {} }],
|
|
19593
19611
|
record_counts: [1, { object: {} }],
|
|
19594
19612
|
removals: [1, { array: 0 }],
|
|
19595
19613
|
replayed: [1, 0],
|
|
@@ -25353,6 +25371,14 @@ var RESPONSE_COMPONENTS = {
|
|
|
25353
25371
|
},
|
|
25354
25372
|
RecordEpisodeResponse: { object: { episode_id: [1, 0], message: [1, 0] } },
|
|
25355
25373
|
RecordFeatureChangeDto: { object: { feature: [1, 0] } },
|
|
25374
|
+
RecordLookupResponse: {
|
|
25375
|
+
object: {
|
|
25376
|
+
context: [2, "ContextRefDto"],
|
|
25377
|
+
items: [1, { array: 0 }],
|
|
25378
|
+
missing: [1, { array: 0 }],
|
|
25379
|
+
view: [1, "ViewRefDto"]
|
|
25380
|
+
}
|
|
25381
|
+
},
|
|
25356
25382
|
RecordPageResponse: { object: { items: [1, { array: 0 }], release_id: [1, 0] } },
|
|
25357
25383
|
RecordSafeHarborStatus: {
|
|
25358
25384
|
object: {
|
|
@@ -30580,6 +30606,11 @@ var RESPONSE_OPERATIONS = {
|
|
|
30580
30606
|
path: "/api/v1/workflows",
|
|
30581
30607
|
responses: { 200: "WorkflowListResponse" }
|
|
30582
30608
|
},
|
|
30609
|
+
lookupRecords: {
|
|
30610
|
+
method: "GET",
|
|
30611
|
+
path: "/api/v1/vocabulary/records",
|
|
30612
|
+
responses: { 200: "RecordLookupResponse" }
|
|
30613
|
+
},
|
|
30583
30614
|
markChoicePoint: {
|
|
30584
30615
|
method: "POST",
|
|
30585
30616
|
path: "/api/v1/execution/sessions/{session_id}/mark",
|
|
@@ -39307,14 +39338,16 @@ var NamespacesClient = class {
|
|
|
39307
39338
|
*
|
|
39308
39339
|
* @param namespaceId - Namespace UUID.
|
|
39309
39340
|
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
39310
|
-
* @returns The counters
|
|
39341
|
+
* @returns The engine's durable counters for the namespace since `countedSince`.
|
|
39311
39342
|
* @throws {ForbiddenError} 403 without a native `manage_answer_cache` grant.
|
|
39312
39343
|
* @throws {NotFoundError} 404 for a namespace not in this tenant.
|
|
39313
|
-
* @throws {ServiceUnavailableError} 503 when the namespace state or
|
|
39344
|
+
* @throws {ServiceUnavailableError} 503 when the namespace state, authority or savings storage is unavailable.
|
|
39314
39345
|
*
|
|
39315
39346
|
* @remarks
|
|
39316
39347
|
* `GET /api/v1/namespaces/{id}/answer-cache-savings`. The counters are
|
|
39317
|
-
*
|
|
39348
|
+
* durable and summed across engine processes and restarts; another
|
|
39349
|
+
* process's counts arrive within its five-second write interval. Token
|
|
39350
|
+
* savings are not measured
|
|
39318
39351
|
* (`tokenUsageMeasured: false`). Response mapped from snake_case.
|
|
39319
39352
|
*
|
|
39320
39353
|
* @example
|
|
@@ -42159,6 +42192,7 @@ function IngestionConfigDtoFromFrontToApi(model) {
|
|
|
42159
42192
|
previous_document_id: model.previousDocumentId,
|
|
42160
42193
|
reject_anonymized_references: model.rejectAnonymizedReferences,
|
|
42161
42194
|
skip_fingerprint: model.skipFingerprint,
|
|
42195
|
+
fresh_work: model.freshWork,
|
|
42162
42196
|
skip_relation_completion: model.skipRelationCompletion
|
|
42163
42197
|
};
|
|
42164
42198
|
}
|
|
@@ -42249,6 +42283,7 @@ function IngestionWorkCacheDtoFromApiToFront(dto) {
|
|
|
42249
42283
|
modelCalls: dto.model_calls,
|
|
42250
42284
|
reusedModelCalls: dto.reused_model_calls,
|
|
42251
42285
|
unkeyedModelCalls: dto.unkeyed_model_calls,
|
|
42286
|
+
bypassedModelCalls: dto.bypassed_model_calls ?? 0,
|
|
42252
42287
|
reusedRecordedTokenUsage: TokenUsageDtoFromApiToFront(dto.reused_recorded_token_usage)
|
|
42253
42288
|
};
|
|
42254
42289
|
}
|
|
@@ -71821,6 +71856,7 @@ function VocabularyCandidateRevisionFromApiToFront(dto) {
|
|
|
71821
71856
|
createdAt: dto.created_at,
|
|
71822
71857
|
changeReason: dto.change_reason,
|
|
71823
71858
|
recordCounts: dataMap(dto.record_counts),
|
|
71859
|
+
proposalCounts: dataMap(dto.proposal_counts),
|
|
71824
71860
|
removals: dto.removals,
|
|
71825
71861
|
mintedIds: dataMap(dto.minted_ids),
|
|
71826
71862
|
advisoryFindings: dto.advisory_findings.map(VocabularyFindingFromApiToFront),
|
|
@@ -72009,6 +72045,15 @@ function VocabularyRevisionRecordPageFromApiToFront(dto) {
|
|
|
72009
72045
|
if (present(dto.next_cursor)) out.nextCursor = dto.next_cursor;
|
|
72010
72046
|
return out;
|
|
72011
72047
|
}
|
|
72048
|
+
function VocabularyRecordLookupFromApiToFront(dto) {
|
|
72049
|
+
const out = {
|
|
72050
|
+
view: ViewRefFromApiToFront(dto.view),
|
|
72051
|
+
items: dto.items.map(VocabularyRecordViewFromApiToFront),
|
|
72052
|
+
missing: dto.missing
|
|
72053
|
+
};
|
|
72054
|
+
if (present(dto.context)) out.context = VocabularyContextRefFromApiToFront(dto.context);
|
|
72055
|
+
return out;
|
|
72056
|
+
}
|
|
72012
72057
|
function VocabularyActivationResultFromApiToFront(dto) {
|
|
72013
72058
|
const out = {
|
|
72014
72059
|
releaseId: dto.release_id,
|
|
@@ -73145,13 +73190,16 @@ var VocabularyClient = class {
|
|
|
73145
73190
|
*
|
|
73146
73191
|
* @remarks
|
|
73147
73192
|
* `GET /api/v1/vocabulary/revisions/{revision_id}`. The answer counts the
|
|
73148
|
-
* records by kind (`recordCounts`)
|
|
73149
|
-
*
|
|
73193
|
+
* records by kind (`recordCounts`) and the proposals among them
|
|
73194
|
+
* (`proposalCounts`); read the records with
|
|
73195
|
+
* {@link VocabularyClient.listRevisionRecords} or
|
|
73196
|
+
* {@link VocabularyClient.lookupRecords}.
|
|
73150
73197
|
*
|
|
73151
73198
|
* @example
|
|
73152
73199
|
* ```typescript
|
|
73153
73200
|
* const revision = await client.vocabulary.getRevision(revisionId);
|
|
73154
73201
|
* const conceptCount = revision.recordCounts['concept'] ?? 0;
|
|
73202
|
+
* const toAccept = Object.values(revision.proposalCounts).reduce((n, c) => n + c, 0);
|
|
73155
73203
|
* ```
|
|
73156
73204
|
*/
|
|
73157
73205
|
async getRevision(revisionId, requestOptions) {
|
|
@@ -73185,6 +73233,40 @@ var VocabularyClient = class {
|
|
|
73185
73233
|
const response = await this.api.revisionRecords(revisionId, wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73186
73234
|
return decodeResponse(response, VocabularyRevisionRecordPageFromApiToFront);
|
|
73187
73235
|
}
|
|
73236
|
+
/**
|
|
73237
|
+
* The records of one view with the ids asked: what a client needs to name
|
|
73238
|
+
* or open the few records a finding, a rebase conflict or a list cites,
|
|
73239
|
+
* without reading a whole release or change set.
|
|
73240
|
+
*
|
|
73241
|
+
* @param ids - The record ids (UUIDs): 1 to 500 distinct ids.
|
|
73242
|
+
* @param query - The view.
|
|
73243
|
+
* @param requestOptions - Per-call options (timeout, retries, signal, headers).
|
|
73244
|
+
* @returns The records the view holds, in the order asked and each once,
|
|
73245
|
+
* and the ids it does not hold.
|
|
73246
|
+
* @throws {@link NotFoundError} 404 for an unknown release or revision.
|
|
73247
|
+
* @throws {@link VocabularyRefusedError} 400 `invalid_request` (an id that is
|
|
73248
|
+
* not a UUID, no id, or more than 500); 409 `vocabulary_plugin_unavailable`.
|
|
73249
|
+
*
|
|
73250
|
+
* @remarks
|
|
73251
|
+
* `GET /api/v1/vocabulary/records?ids&view&release_id&revision_id`. An id
|
|
73252
|
+
* the candidate removes is `missing` in its candidate view. Duplicate ids
|
|
73253
|
+
* are answered once.
|
|
73254
|
+
*
|
|
73255
|
+
* @example
|
|
73256
|
+
* ```typescript
|
|
73257
|
+
* const { items, missing } = await client.vocabulary.lookupRecords(finding.subjects, {
|
|
73258
|
+
* view: { view: 'candidate', revisionId },
|
|
73259
|
+
* });
|
|
73260
|
+
* ```
|
|
73261
|
+
*/
|
|
73262
|
+
async lookupRecords(ids, query, requestOptions) {
|
|
73263
|
+
const wire = {
|
|
73264
|
+
...viewQuery(query?.view),
|
|
73265
|
+
ids: ids.join(",")
|
|
73266
|
+
};
|
|
73267
|
+
const response = await this.api.lookupRecords(wire, toRequestParams(requestOptions)).catch(rethrowVocabularyRefusal);
|
|
73268
|
+
return decodeResponse(response, VocabularyRecordLookupFromApiToFront);
|
|
73269
|
+
}
|
|
73188
73270
|
/**
|
|
73189
73271
|
* A revision against its baseline: records added, changed (with per-feature
|
|
73190
73272
|
* before/after values) and removed.
|