@tryvira/sdk 0.1.13 → 0.1.16

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/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Vira / Esad Türkel
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Vira / Esad Türkel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,90 +1,90 @@
1
- # @tryvira/sdk
2
-
3
- MIT-licensed client library. The Vira service, application, and backend remain
4
- proprietary and are governed separately.
5
-
6
- Typed JavaScript/TypeScript client for Vira's scoped control and runtime APIs.
7
-
8
- ## Install
9
-
10
- ```bash
11
- npm install @tryvira/sdk
12
- ```
13
-
14
- The client sends requests to Vira; it does not execute tools locally or create a second
15
- authority/telemetry store. Use a customer API key for hosted deployments and a local
16
- development key only with the local stack.
17
-
18
- ## Connect and record an observation
19
-
20
- ```ts
21
- import { ViraClient } from '@tryvira/sdk';
22
-
23
- const vira = new ViraClient({
24
- baseUrl: process.env.VIRA_CONTROL_URL ?? 'http://127.0.0.1:4185',
25
- apiKey: process.env.VIRA_API_KEY,
26
- });
27
-
28
- const connected = await vira.connectOnce({
29
- name: 'my-agent', systemType: 'custom-agent',
30
- organizationId: 'org', projectId: 'project', environmentId: 'local',
31
- adapterType: 'custom-node', adapterVersion: '1',
32
- });
33
-
34
- const systemId = String(connected?.body.system?.id);
35
- const connectionId = String(connected?.body.connection?.id);
36
- await vira.observe({
37
- eventId: `event-${Date.now()}`,
38
- eventType: 'model.response',
39
- aiSystemId: systemId,
40
- connectionId,
41
- payload: { message: 'A model response was produced.' },
42
- }, { idempotencyKey: `event-${Date.now()}` });
43
- ```
44
-
45
- ## Semantic and runtime resolution
46
-
47
- Semantic resolution finds an eligible governed target. Runtime resolution is the effectful
48
- boundary and therefore requires a released behavior point, scope and idempotency key.
49
-
50
- ```ts
51
- const semantic = await vira.resolveSemantic({
52
- input: 'answer a customer billing question',
53
- profile: { domain: 'support' },
54
- });
55
-
56
- const runtime = await vira.resolveRuntime({
57
- behaviorPoint: 'support.answer',
58
- executionBoundary: { organizationId: 'org', projectId: 'project', environmentId: 'local' },
59
- idempotencyKey: 'runtime-request-001',
60
- });
61
- ```
62
-
63
- Do not treat a semantic result as authorization. The server remains the authority and may
64
- abstain, deny or require a released revision.
65
-
66
- ## Packs and Strategy executions
67
-
68
- The normal pack lifecycle is import → install → evaluate → approve → release. Strategy
69
- execution starts only from an immutable, released artifact and can be continued with
70
- state/references when it reaches `WAITING_USER` or `WAITING_HOST`.
71
-
72
- ```ts
73
- const packs = await vira.listPacks();
74
- const imported = await vira.importPack({
75
- manifest: { id: 'example.pack', name: 'Example', version: '1.0.0' },
76
- objects: {},
77
- idempotencyKey: 'pack-import-001',
78
- });
79
- console.log(packs?.body, imported?.body);
80
-
81
- const continued = await vira.continueStrategyExecution('execution-id', {
82
- authorityDigest: 'digest-from-the-execution',
83
- state: { answer: 'approved' },
84
- references: { userInput: { answer: 'approved' } },
85
- });
86
- ```
87
-
88
- ## Documentation
89
-
90
- See the public Vira documentation at https://github.com/hrpering/tryvira.
1
+ # @tryvira/sdk
2
+
3
+ MIT-licensed client library. The Vira service, application, and backend remain
4
+ proprietary and are governed separately.
5
+
6
+ Typed JavaScript/TypeScript client for Vira's scoped control and runtime APIs.
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install @tryvira/sdk
12
+ ```
13
+
14
+ The client sends requests to Vira; it does not execute tools locally or create a second
15
+ authority/telemetry store. Use a customer API key for hosted deployments and a local
16
+ development key only with the local stack.
17
+
18
+ ## Connect and record an observation
19
+
20
+ ```ts
21
+ import { ViraClient } from '@tryvira/sdk';
22
+
23
+ const vira = new ViraClient({
24
+ baseUrl: process.env.VIRA_CONTROL_URL ?? 'http://127.0.0.1:4185',
25
+ apiKey: process.env.VIRA_API_KEY,
26
+ });
27
+
28
+ const connected = await vira.connectOnce({
29
+ name: 'my-agent', systemType: 'custom-agent',
30
+ organizationId: 'org', projectId: 'project', environmentId: 'local',
31
+ adapterType: 'custom-node', adapterVersion: '1',
32
+ });
33
+
34
+ const systemId = String(connected?.body.system?.id);
35
+ const connectionId = String(connected?.body.connection?.id);
36
+ await vira.observe({
37
+ eventId: `event-${Date.now()}`,
38
+ eventType: 'model.response',
39
+ aiSystemId: systemId,
40
+ connectionId,
41
+ payload: { message: 'A model response was produced.' },
42
+ }, { idempotencyKey: `event-${Date.now()}` });
43
+ ```
44
+
45
+ ## Semantic and runtime resolution
46
+
47
+ Semantic resolution finds an eligible governed target. Runtime resolution is the effectful
48
+ boundary and therefore requires a released behavior point, scope and idempotency key.
49
+
50
+ ```ts
51
+ const semantic = await vira.resolveSemantic({
52
+ input: 'answer a customer billing question',
53
+ profile: { domain: 'support' },
54
+ });
55
+
56
+ const runtime = await vira.resolveRuntime({
57
+ behaviorPoint: 'support.answer',
58
+ executionBoundary: { organizationId: 'org', projectId: 'project', environmentId: 'local' },
59
+ idempotencyKey: 'runtime-request-001',
60
+ });
61
+ ```
62
+
63
+ Do not treat a semantic result as authorization. The server remains the authority and may
64
+ abstain, deny or require a released revision.
65
+
66
+ ## Packs and Strategy executions
67
+
68
+ The normal pack lifecycle is import → install → evaluate → approve → release. Strategy
69
+ execution starts only from an immutable, released artifact and can be continued with
70
+ state/references when it reaches `WAITING_USER` or `WAITING_HOST`.
71
+
72
+ ```ts
73
+ const packs = await vira.listPacks();
74
+ const imported = await vira.importPack({
75
+ manifest: { id: 'example.pack', name: 'Example', version: '1.0.0' },
76
+ objects: {},
77
+ idempotencyKey: 'pack-import-001',
78
+ });
79
+ console.log(packs?.body, imported?.body);
80
+
81
+ const continued = await vira.continueStrategyExecution('execution-id', {
82
+ authorityDigest: 'digest-from-the-execution',
83
+ state: { answer: 'approved' },
84
+ references: { userInput: { answer: 'approved' } },
85
+ });
86
+ ```
87
+
88
+ ## Documentation
89
+
90
+ See the public Vira documentation at https://github.com/hrpering/tryvira.
package/dist/index.js CHANGED
@@ -17,6 +17,9 @@ var required = (value, code) => {
17
17
  };
18
18
  var wait = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
19
19
  var ViraClient = class {
20
+ evaluations;
21
+ teach;
22
+ packs;
20
23
  baseUrl;
21
24
  apiKey;
22
25
  fetcher;
@@ -38,6 +41,23 @@ var ViraClient = class {
38
41
  this.retries = Math.max(0, Math.min(options.retries ?? 2, 5));
39
42
  this.failureMode = options.failureMode ?? "throw";
40
43
  this.defaultHeaders = options.defaultHeaders ?? {};
44
+ this.evaluations = {
45
+ createPlan: (input, options2 = {}) => this.createEvaluationPlan(input, options2),
46
+ get: (id) => this.getEvaluation(id),
47
+ compare: (id) => this.getEvaluationComparison(id),
48
+ proposeImprovement: (id, input, options2 = {}) => this.createImprovementProposal(id, input, options2)
49
+ };
50
+ this.teach = {
51
+ review: (id, action = "request-review", options2 = {}) => this.reviewImprovementProposal(id, action, options2),
52
+ createCandidate: (input, options2 = {}) => this.createBehaviorRevisionCandidate(input, options2),
53
+ evaluateCandidate: (id, input, options2 = {}) => this.evaluateBehaviorRevisionCandidate(id, input, options2)
54
+ };
55
+ this.packs = {
56
+ createRevision: (input, options2 = {}) => this.createPackRevision(input, options2),
57
+ getRevision: (id) => this.getPackRevision(id),
58
+ diffRevision: (id) => this.getPackRevisionDiff(id),
59
+ transitionRevision: (id, transition, options2 = {}) => this.transitionPackRevision(id, transition, options2)
60
+ };
41
61
  }
42
62
  async request(request, options = {}) {
43
63
  const url = new URL(this.baseUrl + request.path);
@@ -283,13 +303,14 @@ var ViraClient = class {
283
303
  { idempotencyKey: `sdk:pack:evaluate:${packId}` }
284
304
  );
285
305
  }
286
- approvePack(packId) {
306
+ approvePack(packId, options = {}) {
287
307
  required(packId, "SDK_PACK_ID_REQUIRED");
308
+ const body = options.manualApproval ? { manualApproval: true, reason: required(options.reason ?? "", "SDK_MANUAL_PACK_APPROVAL_REASON_REQUIRED") } : {};
288
309
  return this.request(
289
310
  {
290
311
  method: "POST",
291
312
  path: `/v1/packs/${encodeURIComponent(packId)}/approve`,
292
- body: {}
313
+ body
293
314
  },
294
315
  { idempotencyKey: `sdk:pack:approve:${packId}` }
295
316
  );
@@ -639,6 +660,12 @@ var ViraClient = class {
639
660
  { idempotencyKey: options.idempotencyKey }
640
661
  );
641
662
  }
663
+ /** Start a persisted OFF/current-ON (and optional candidate-ON) comparison. */
664
+ startComparativeEvaluation(input, options = {}) {
665
+ if (!Array.isArray(input.comparativeCases) || input.comparativeCases.length === 0)
666
+ throw new Error("SDK_COMPARATIVE_CASES_REQUIRED");
667
+ return this.startEvaluation(input, options);
668
+ }
642
669
  evaluateQuality(input, options = {}) {
643
670
  return this.request(
644
671
  { method: "POST", path: "/v1/quality/evaluate", body: input },
@@ -652,6 +679,67 @@ var ViraClient = class {
652
679
  path: `/v1/evaluations/${encodeURIComponent(evaluationId)}`
653
680
  });
654
681
  }
682
+ getEvaluationComparison(evaluationId) {
683
+ required(evaluationId, "SDK_EVALUATION_ID_REQUIRED");
684
+ return this.request({
685
+ method: "GET",
686
+ path: `/v1/evaluations/${encodeURIComponent(evaluationId)}/comparison`
687
+ });
688
+ }
689
+ createEvaluationPlan(input, options = {}) {
690
+ return this.request({ method: "POST", path: "/v1/evaluation-plans", body: input }, { idempotencyKey: options.idempotencyKey });
691
+ }
692
+ getEvaluationPlan(planId) {
693
+ required(planId, "SDK_EVALUATION_PLAN_ID_REQUIRED");
694
+ return this.request({ method: "GET", path: `/v1/evaluation-plans/${encodeURIComponent(planId)}` });
695
+ }
696
+ sealEvaluationPlan(planId, options = {}) {
697
+ required(planId, "SDK_EVALUATION_PLAN_ID_REQUIRED");
698
+ return this.request({ method: "POST", path: `/v1/evaluation-plans/${encodeURIComponent(planId)}/seal`, body: {} }, { idempotencyKey: options.idempotencyKey ?? `sdk:evaluation-plan:seal:${planId}` });
699
+ }
700
+ createImprovementProposal(evaluationId, input, options = {}) {
701
+ required(evaluationId, "SDK_EVALUATION_ID_REQUIRED");
702
+ return this.request({ method: "POST", path: `/v1/evaluations/${encodeURIComponent(evaluationId)}/improvement-proposal`, body: input }, { idempotencyKey: options.idempotencyKey });
703
+ }
704
+ getImprovementProposal(proposalId) {
705
+ required(proposalId, "SDK_IMPROVEMENT_PROPOSAL_ID_REQUIRED");
706
+ return this.request({ method: "GET", path: `/v1/behavior-improvement-proposals/${encodeURIComponent(proposalId)}` });
707
+ }
708
+ reviewImprovementProposal(proposalId, action = "request-review", options = {}) {
709
+ required(proposalId, "SDK_IMPROVEMENT_PROPOSAL_ID_REQUIRED");
710
+ return this.request({ method: "POST", path: `/v1/behavior-improvement-proposals/${encodeURIComponent(proposalId)}`, body: { action } }, { idempotencyKey: options.idempotencyKey ?? `sdk:improvement-proposal:${action}:${proposalId}` });
711
+ }
712
+ createBehaviorRevisionCandidate(input, options = {}) {
713
+ return this.request({ method: "POST", path: "/v1/behavior-revision-candidates", body: input }, { idempotencyKey: options.idempotencyKey });
714
+ }
715
+ evaluateBehaviorRevisionCandidate(candidateId, input, options = {}) {
716
+ required(candidateId, "SDK_BEHAVIOR_CANDIDATE_ID_REQUIRED");
717
+ if (!Array.isArray(input.dataset) || input.dataset.length === 0) throw new Error("SDK_CANDIDATE_EVALUATION_DATASET_REQUIRED");
718
+ return this.request({ method: "POST", path: `/v1/behavior-revision-candidates/${encodeURIComponent(candidateId)}/evaluate`, body: input }, { idempotencyKey: options.idempotencyKey ?? `sdk:behavior-candidate:evaluate:${candidateId}` });
719
+ }
720
+ transitionBehaviorRevisionCandidate(candidateId, transition, input = {}, options = {}) {
721
+ required(candidateId, "SDK_BEHAVIOR_CANDIDATE_ID_REQUIRED");
722
+ return this.request({ method: "POST", path: `/v1/behavior-revision-candidates/${encodeURIComponent(candidateId)}/${transition}`, body: input }, { idempotencyKey: options.idempotencyKey ?? `sdk:behavior-candidate:${transition}:${candidateId}` });
723
+ }
724
+ createPackRevision(input, options = {}) {
725
+ return this.request({ method: "POST", path: "/v1/pack-revisions", body: input }, { idempotencyKey: options.idempotencyKey });
726
+ }
727
+ getPackRevision(revisionId) {
728
+ required(revisionId, "SDK_PACK_REVISION_ID_REQUIRED");
729
+ return this.request({ method: "GET", path: `/v1/pack-revisions/${encodeURIComponent(revisionId)}` });
730
+ }
731
+ getPackRevisionDiff(revisionId) {
732
+ required(revisionId, "SDK_PACK_REVISION_ID_REQUIRED");
733
+ return this.request({ method: "GET", path: `/v1/pack-revisions/${encodeURIComponent(revisionId)}/diff` });
734
+ }
735
+ transitionPackRevision(revisionId, transition, options = {}) {
736
+ required(revisionId, "SDK_PACK_REVISION_ID_REQUIRED");
737
+ return this.request({ method: "POST", path: `/v1/pack-revisions/${encodeURIComponent(revisionId)}/${transition}`, body: {} }, { idempotencyKey: options.idempotencyKey ?? `sdk:pack-revision:${transition}:${revisionId}` });
738
+ }
739
+ materializePackRevision(revisionId, input, options = {}) {
740
+ required(revisionId, "SDK_PACK_REVISION_ID_REQUIRED");
741
+ return this.request({ method: "POST", path: `/v1/pack-revisions/${encodeURIComponent(revisionId)}/materialize`, body: input }, { idempotencyKey: options.idempotencyKey ?? `sdk:pack-revision:materialize:${revisionId}` });
742
+ }
655
743
  createRelease(input, options = {}) {
656
744
  return this.request(
657
745
  { method: "POST", path: "/v1/releases", body: input },
@@ -662,6 +750,11 @@ var ViraClient = class {
662
750
  if (!input || typeof input !== "object" || !input.manualApproval) throw new Error("SDK_MANUAL_RELEASE_APPROVAL_REQUIRED");
663
751
  return this.createRelease(input, { idempotencyKey: options.idempotencyKey });
664
752
  }
753
+ releaseProgramManually(input, options = {}) {
754
+ required(input?.programId, "SDK_MANUAL_RELEASE_PROGRAM_REQUIRED");
755
+ required(input?.reason, "SDK_MANUAL_RELEASE_REASON_REQUIRED");
756
+ return this.request({ method: "POST", path: "/v1/releases/manual-program", body: { programId: input.programId, reason: input.reason } }, { idempotencyKey: options.idempotencyKey ?? `sdk:manual-release:${input.programId}` });
757
+ }
665
758
  recordDeploymentComparison(deploymentId, comparison, options = {}) {
666
759
  required(deploymentId, "SDK_DEPLOYMENT_ID_REQUIRED");
667
760
  return this.request(
@@ -59,6 +59,39 @@ export interface StrategyContinuationInput {
59
59
  state?: Readonly<Record<string, unknown>>;
60
60
  references?: Readonly<Record<string, unknown>>;
61
61
  }
62
+ export type ViraLearningNamespaces = {
63
+ evaluations: {
64
+ createPlan: (input: ClientBody, options?: {
65
+ idempotencyKey?: string;
66
+ }) => Promise<ViraResponse<ClientBody> | null>;
67
+ get: (id: string) => Promise<ViraResponse<ClientBody> | null>;
68
+ compare: (id: string) => Promise<ViraResponse<ClientBody> | null>;
69
+ proposeImprovement: (id: string, input: ClientBody, options?: {
70
+ idempotencyKey?: string;
71
+ }) => Promise<ViraResponse<ClientBody> | null>;
72
+ };
73
+ teach: {
74
+ review: (id: string, action?: 'request-review' | 'approve' | 'reject', options?: {
75
+ idempotencyKey?: string;
76
+ }) => Promise<ViraResponse<ClientBody> | null>;
77
+ createCandidate: (input: ClientBody, options?: {
78
+ idempotencyKey?: string;
79
+ }) => Promise<ViraResponse<ClientBody> | null>;
80
+ evaluateCandidate: (id: string, input: ClientBody, options?: {
81
+ idempotencyKey?: string;
82
+ }) => Promise<ViraResponse<ClientBody> | null>;
83
+ };
84
+ packs: {
85
+ createRevision: (input: ClientBody, options?: {
86
+ idempotencyKey?: string;
87
+ }) => Promise<ViraResponse<ClientBody> | null>;
88
+ getRevision: (id: string) => Promise<ViraResponse<ClientBody> | null>;
89
+ diffRevision: (id: string) => Promise<ViraResponse<ClientBody> | null>;
90
+ transitionRevision: (id: string, transition: 'validate' | 'request-approval' | 'approve' | 'release' | 'reject', options?: {
91
+ idempotencyKey?: string;
92
+ }) => Promise<ViraResponse<ClientBody> | null>;
93
+ };
94
+ };
62
95
  export declare class ViraApiError extends Error {
63
96
  readonly status: number;
64
97
  readonly body: unknown;
@@ -75,6 +108,9 @@ type ClientObservation = {
75
108
  };
76
109
  /** Small, authority-aware client over the existing versioned control API. */
77
110
  export declare class ViraClient {
111
+ readonly evaluations: ViraLearningNamespaces['evaluations'];
112
+ readonly teach: ViraLearningNamespaces['teach'];
113
+ readonly packs: ViraLearningNamespaces['packs'];
78
114
  private readonly baseUrl;
79
115
  private readonly apiKey?;
80
116
  private readonly fetcher;
@@ -200,7 +236,10 @@ export declare class ViraClient {
200
236
  score?: number;
201
237
  runId?: string;
202
238
  }): Promise<ViraResponse<ClientBody> | null>;
203
- approvePack(packId: string): Promise<ViraResponse<ClientBody> | null>;
239
+ approvePack(packId: string, options?: {
240
+ manualApproval?: boolean;
241
+ reason?: string;
242
+ }): Promise<ViraResponse<ClientBody> | null>;
204
243
  releasePack(packId: string): Promise<ViraResponse<ClientBody> | null>;
205
244
  previewPackUpgrade(packId: string, incoming: ClientBody): Promise<ViraResponse<ClientBody> | null>;
206
245
  executeRuntime(input: RuntimeRequest & Record<string, unknown>): Promise<ViraResponse<ClientBody> | null>;
@@ -352,16 +391,63 @@ export declare class ViraClient {
352
391
  startEvaluation(input: ClientBody, options?: {
353
392
  idempotencyKey?: string;
354
393
  }): Promise<ViraResponse<ClientBody> | null>;
394
+ /** Start a persisted OFF/current-ON (and optional candidate-ON) comparison. */
395
+ startComparativeEvaluation(input: ClientBody & {
396
+ comparativeCases: readonly ClientBody[];
397
+ }, options?: {
398
+ idempotencyKey?: string;
399
+ }): Promise<ViraResponse<ClientBody> | null>;
355
400
  evaluateQuality(input: ClientBody, options?: {
356
401
  idempotencyKey?: string;
357
402
  }): Promise<ViraResponse<ClientBody> | null>;
358
403
  getEvaluation(evaluationId: string): Promise<ViraResponse<ClientBody> | null>;
404
+ getEvaluationComparison(evaluationId: string): Promise<ViraResponse<ClientBody> | null>;
405
+ createEvaluationPlan(input: ClientBody, options?: {
406
+ idempotencyKey?: string;
407
+ }): Promise<ViraResponse<ClientBody> | null>;
408
+ getEvaluationPlan(planId: string): Promise<ViraResponse<ClientBody> | null>;
409
+ sealEvaluationPlan(planId: string, options?: {
410
+ idempotencyKey?: string;
411
+ }): Promise<ViraResponse<ClientBody> | null>;
412
+ createImprovementProposal(evaluationId: string, input: ClientBody, options?: {
413
+ idempotencyKey?: string;
414
+ }): Promise<ViraResponse<ClientBody> | null>;
415
+ getImprovementProposal(proposalId: string): Promise<ViraResponse<ClientBody> | null>;
416
+ reviewImprovementProposal(proposalId: string, action?: 'request-review' | 'approve' | 'reject', options?: {
417
+ idempotencyKey?: string;
418
+ }): Promise<ViraResponse<ClientBody> | null>;
419
+ createBehaviorRevisionCandidate(input: ClientBody, options?: {
420
+ idempotencyKey?: string;
421
+ }): Promise<ViraResponse<ClientBody> | null>;
422
+ evaluateBehaviorRevisionCandidate(candidateId: string, input: ClientBody, options?: {
423
+ idempotencyKey?: string;
424
+ }): Promise<ViraResponse<ClientBody> | null>;
425
+ transitionBehaviorRevisionCandidate(candidateId: string, transition: 'evaluate' | 'accept' | 'reject' | 'pack', input?: ClientBody, options?: {
426
+ idempotencyKey?: string;
427
+ }): Promise<ViraResponse<ClientBody> | null>;
428
+ createPackRevision(input: ClientBody, options?: {
429
+ idempotencyKey?: string;
430
+ }): Promise<ViraResponse<ClientBody> | null>;
431
+ getPackRevision(revisionId: string): Promise<ViraResponse<ClientBody> | null>;
432
+ getPackRevisionDiff(revisionId: string): Promise<ViraResponse<ClientBody> | null>;
433
+ transitionPackRevision(revisionId: string, transition: 'validate' | 'request-approval' | 'approve' | 'release' | 'reject', options?: {
434
+ idempotencyKey?: string;
435
+ }): Promise<ViraResponse<ClientBody> | null>;
436
+ materializePackRevision(revisionId: string, input: ClientBody, options?: {
437
+ idempotencyKey?: string;
438
+ }): Promise<ViraResponse<ClientBody> | null>;
359
439
  createRelease(input: ClientBody, options?: {
360
440
  idempotencyKey?: string;
361
441
  }): Promise<ViraResponse<ClientBody> | null>;
362
442
  createManualRelease(input: ClientBody, options?: {
363
443
  idempotencyKey?: string;
364
444
  }): Promise<ViraResponse<ClientBody> | null>;
445
+ releaseProgramManually(input: {
446
+ programId: string;
447
+ reason: string;
448
+ }, options?: {
449
+ idempotencyKey?: string;
450
+ }): Promise<ViraResponse<ClientBody> | null>;
365
451
  recordDeploymentComparison(deploymentId: string, comparison: ClientBody, options?: {
366
452
  idempotencyKey?: string;
367
453
  }): Promise<ViraResponse<ClientBody> | null>;
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
- {
2
- "name": "@tryvira/sdk",
3
- "version": "0.1.13",
4
- "description": "Typed Vira SDK for connect-once, observation and governed runtime execution.",
5
- "keywords": ["vira", "ai-governance", "ai-runtime", "semantic-routing"],
6
- "engines": {"node": ">=20"},
7
- "repository": {"type": "git", "url": "https://github.com/hrpering/tryvira.git"},
8
- "homepage": "https://github.com/hrpering/tryvira#readme",
9
- "bugs": {"url": "https://github.com/hrpering/tryvira/issues"},
10
- "type": "module",
11
- "main": "./dist/index.js",
12
- "types": "./dist/index.d.ts",
13
- "exports": {".": {"types": "./dist/index.d.ts", "import": "./dist/index.js"}},
14
- "files": ["dist/index.js", "dist/index.d.ts", "dist/js-client.d.ts", "README.md"],
15
- "publishConfig": {"access": "public"},
16
- "scripts": {"build": "node ../../scripts/build-publishable-packages.mjs sdk", "pack:check": "npm run build && npm pack --dry-run && npm run public:surface:smoke", "public:surface:smoke": "node ../../scripts/public-surface-contract-acceptance.mjs --sdk-package", "prepublishOnly": "npm run pack:check && npm run public:surface:smoke", "publish:public": "npm run pack:check && npm run public:surface:smoke && npm publish --access public"},
17
- "license": "MIT"
18
- }
1
+ {
2
+ "name": "@tryvira/sdk",
3
+ "version": "0.1.16",
4
+ "description": "Typed Vira SDK for connect-once, observation and governed runtime execution.",
5
+ "keywords": ["vira", "ai-governance", "ai-runtime", "semantic-routing"],
6
+ "engines": {"node": ">=20"},
7
+ "repository": {"type": "git", "url": "https://github.com/hrpering/tryvira.git"},
8
+ "homepage": "https://github.com/hrpering/tryvira#readme",
9
+ "bugs": {"url": "https://github.com/hrpering/tryvira/issues"},
10
+ "type": "module",
11
+ "main": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {".": {"types": "./dist/index.d.ts", "import": "./dist/index.js"}},
14
+ "files": ["dist/index.js", "dist/index.d.ts", "dist/js-client.d.ts", "README.md"],
15
+ "publishConfig": {"access": "public"},
16
+ "scripts": {"build": "node ../../scripts/build-publishable-packages.mjs sdk", "pack:check": "npm run build && npm pack --dry-run && npm run public:surface:smoke", "public:surface:smoke": "node ../../scripts/public-surface-contract-acceptance.mjs --sdk-package", "prepublishOnly": "npm run pack:check && npm run public:surface:smoke", "publish:public": "npm run pack:check && npm run public:surface:smoke && npm publish --access public"},
17
+ "license": "MIT"
18
+ }