@tryvira/sdk 0.1.25 → 0.1.26
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.js +6 -1
- package/dist/js-client.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -653,7 +653,12 @@ var ViraClient = class {
|
|
|
653
653
|
}
|
|
654
654
|
createTeachAnalysis(evidenceIds, options = {}) {
|
|
655
655
|
if (!Array.isArray(evidenceIds) || evidenceIds.length < 1) throw new Error("SDK_TEACH_ANALYSIS_EVIDENCE_REQUIRED");
|
|
656
|
-
|
|
656
|
+
const body = { evidenceIds: [...evidenceIds] };
|
|
657
|
+
if (options.analysisId) body.analysisId = options.analysisId;
|
|
658
|
+
if (options.controlPointId) body.controlPointId = options.controlPointId;
|
|
659
|
+
if (options.summary) body.summary = options.summary;
|
|
660
|
+
const requestKey = JSON.stringify([evidenceIds, options.analysisId ?? "", options.controlPointId ?? "", options.summary ?? ""]);
|
|
661
|
+
return this.request({ method: "POST", path: "/v1/teach/analyses", body }, { idempotencyKey: options.idempotencyKey ?? `sdk:teach:analysis:${requestKey}` });
|
|
657
662
|
}
|
|
658
663
|
getTeachAnalysis(analysisId) {
|
|
659
664
|
required(analysisId, "SDK_TEACH_ANALYSIS_ID_REQUIRED");
|
package/dist/js-client.d.ts
CHANGED
|
@@ -382,6 +382,9 @@ export declare class ViraClient {
|
|
|
382
382
|
}): Promise<ViraResponse<ClientBody> | null>;
|
|
383
383
|
createTeachAnalysis(evidenceIds: readonly string[], options?: {
|
|
384
384
|
idempotencyKey?: string;
|
|
385
|
+
analysisId?: string;
|
|
386
|
+
controlPointId?: string;
|
|
387
|
+
summary?: string;
|
|
385
388
|
}): Promise<ViraResponse<ClientBody> | null>;
|
|
386
389
|
getTeachAnalysis(analysisId: string): Promise<ViraResponse<ClientBody> | null>;
|
|
387
390
|
createTeachProposal(input: ClientBody, options?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvira/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.26",
|
|
4
4
|
"description": "Typed Vira SDK for connect-once, observation and governed runtime execution.",
|
|
5
5
|
"keywords": ["vira", "ai-governance", "ai-runtime", "semantic-routing"],
|
|
6
6
|
"engines": {"node": ">=20"},
|