@tryvira/sdk 0.1.31 → 0.1.33

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 CHANGED
@@ -7,7 +7,7 @@ approved behavior, and resolve it at runtime.
7
7
  ## Install
8
8
 
9
9
  ```bash
10
- npm install @tryvira/sdk@0.1.29
10
+ npm install @tryvira/sdk@0.1.31
11
11
  ```
12
12
 
13
13
  Configure the organization, project, and environment for every request. Keep the API
@@ -110,19 +110,11 @@ const imported = await vira.importPack({
110
110
  });
111
111
 
112
112
  const packId = String(imported.body.pack.id);
113
- await vira.installPack(packId, { variables: {} });
113
+ await vira.installPack(packId, {});
114
114
  const evaluation = await vira.evaluatePack(packId, {
115
- candidateExecutionRequired: true,
116
- rubric: {
117
- taskCorrectness: 1,
118
- behaviorCompliance: 1,
119
- groundedness: 1,
120
- safetyAuthority: 1,
121
- usefulSpecificity: 1,
122
- },
123
- idempotencyKey: "pack:evaluate:support.billing:1.0.0",
115
+ evaluationId: "evaluation-from-vira-provider",
124
116
  });
125
- if (evaluation.body.passed !== true) throw new Error("Candidate evaluation failed");
117
+ if (evaluation.body.pack?.status !== "EVALUATED") throw new Error("Pack evaluation was not accepted");
126
118
  await vira.approvePack(packId);
127
119
  await vira.releasePack(packId);
128
120
  ```
package/dist/index.js CHANGED
@@ -721,10 +721,12 @@ var ViraClient = class {
721
721
  { idempotencyKey: options.idempotencyKey }
722
722
  );
723
723
  }
724
- /** Start a persisted OFF/current-ON (and optional candidate-ON) comparison. */
724
+ /** Request a server-executed OFF/current-ON/candidate-ON comparison.
725
+ * The server owns arm execution and receipts; callers cannot submit outputs.
726
+ */
725
727
  startComparativeEvaluation(input, options = {}) {
726
- if (!Array.isArray(input.comparativeCases) || input.comparativeCases.length === 0)
727
- throw new Error("SDK_COMPARATIVE_CASES_REQUIRED");
728
+ if (!input.comparisonPlan || typeof input.comparisonPlan !== "object")
729
+ throw new Error("SDK_COMPARISON_PLAN_REQUIRED");
728
730
  return this.startEvaluation(input, options);
729
731
  }
730
732
  evaluateQuality(input, options = {}) {
@@ -423,9 +423,11 @@ export declare class ViraClient {
423
423
  startEvaluation(input: ClientBody, options?: {
424
424
  idempotencyKey?: string;
425
425
  }): Promise<ViraResponse<ClientBody> | null>;
426
- /** Start a persisted OFF/current-ON (and optional candidate-ON) comparison. */
426
+ /** Request a server-executed OFF/current-ON/candidate-ON comparison.
427
+ * The server owns arm execution and receipts; callers cannot submit outputs.
428
+ */
427
429
  startComparativeEvaluation(input: ClientBody & {
428
- comparativeCases: readonly ClientBody[];
430
+ comparisonPlan: ClientBody;
429
431
  }, options?: {
430
432
  idempotencyKey?: string;
431
433
  }): Promise<ViraResponse<ClientBody> | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvira/sdk",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
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"},