@tryvira/sdk 0.1.32 → 0.1.34
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/README.md +1 -2
- package/dist/index.js +8 -0
- package/dist/js-client.d.ts +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -110,10 +110,9 @@ const imported = await vira.importPack({
|
|
|
110
110
|
});
|
|
111
111
|
|
|
112
112
|
const packId = String(imported.body.pack.id);
|
|
113
|
-
await vira.installPack(packId, {
|
|
113
|
+
await vira.installPack(packId, {});
|
|
114
114
|
const evaluation = await vira.evaluatePack(packId, {
|
|
115
115
|
evaluationId: "evaluation-from-vira-provider",
|
|
116
|
-
idempotencyKey: "pack:evaluate:support.billing:1.0.0",
|
|
117
116
|
});
|
|
118
117
|
if (evaluation.body.pack?.status !== "EVALUATED") throw new Error("Pack evaluation was not accepted");
|
|
119
118
|
await vira.approvePack(packId);
|
package/dist/index.js
CHANGED
|
@@ -695,6 +695,14 @@ var ViraClient = class {
|
|
|
695
695
|
required(analysisId, "SDK_TEACH_ANALYSIS_ID_REQUIRED");
|
|
696
696
|
return this.request({ method: "GET", path: `/v1/teach/analyses/${encodeURIComponent(analysisId)}` });
|
|
697
697
|
}
|
|
698
|
+
createCrossConversationTeachAnalysis(input, options = {}) {
|
|
699
|
+
if (!Array.isArray(input.conversationRefs) || input.conversationRefs.length < 2) throw new Error("SDK_TEACH_CROSS_CONVERSATION_REFS_REQUIRED");
|
|
700
|
+
const body = { conversationRefs: input.conversationRefs };
|
|
701
|
+
if (input.analysisId) body.analysisId = input.analysisId;
|
|
702
|
+
if (input.controlPointId) body.controlPointId = input.controlPointId;
|
|
703
|
+
if (input.objective) body.objective = input.objective;
|
|
704
|
+
return this.request({ method: "POST", path: "/v1/teach/cross-conversation-analyses", body }, { idempotencyKey: options.idempotencyKey ?? `sdk:teach:cross-conversation:${JSON.stringify(body)}` });
|
|
705
|
+
}
|
|
698
706
|
createTeachProposal(input, options = {}) {
|
|
699
707
|
return this.request({ method: "POST", path: "/v1/teach/proposals", body: input }, { idempotencyKey: options.idempotencyKey });
|
|
700
708
|
}
|
package/dist/js-client.d.ts
CHANGED
|
@@ -409,6 +409,14 @@ export declare class ViraClient {
|
|
|
409
409
|
summary?: string;
|
|
410
410
|
}): Promise<ViraResponse<ClientBody> | null>;
|
|
411
411
|
getTeachAnalysis(analysisId: string): Promise<ViraResponse<ClientBody> | null>;
|
|
412
|
+
createCrossConversationTeachAnalysis(input: {
|
|
413
|
+
conversationRefs: readonly ClientBody[];
|
|
414
|
+
analysisId?: string;
|
|
415
|
+
controlPointId?: string;
|
|
416
|
+
objective?: string;
|
|
417
|
+
}, options?: {
|
|
418
|
+
idempotencyKey?: string;
|
|
419
|
+
}): Promise<ViraResponse<ClientBody> | null>;
|
|
412
420
|
createTeachProposal(input: ClientBody, options?: {
|
|
413
421
|
idempotencyKey?: string;
|
|
414
422
|
}): Promise<ViraResponse<ClientBody> | null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvira/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.34",
|
|
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"},
|