@tryvira/sdk 0.1.4 → 0.1.6

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,6 +1,21 @@
1
- Vira Proprietary Software
1
+ MIT License
2
2
 
3
- Copyright (c) 2026 Vira / Esad Türkel. All rights reserved.
3
+ Copyright (c) 2026 Vira / Esad Türkel
4
4
 
5
- No license is granted to use, copy, modify, distribute, sublicense, or sell
6
- this software except under a separate written agreement with Vira.
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,7 +1,7 @@
1
1
  # @tryvira/sdk
2
2
 
3
- Proprietary Vira software. All rights reserved. Use is subject to a separate
4
- commercial or written agreement with Vira.
3
+ MIT-licensed client library. The Vira service, application, and backend remain
4
+ proprietary and are governed separately.
5
5
 
6
6
  Typed JavaScript/TypeScript client for Vira's scoped control and runtime APIs.
7
7
 
package/dist/index.js CHANGED
@@ -112,6 +112,13 @@ var ViraClient = class {
112
112
  idempotencyKey: input.idempotencyKey
113
113
  });
114
114
  }
115
+ listAISystems() {
116
+ return this.request({ method: "GET", path: "/v1/ai-systems" });
117
+ }
118
+ getAISystem(systemId) {
119
+ required(systemId, "SDK_SYSTEM_ID_REQUIRED");
120
+ return this.request({ method: "GET", path: `/v1/ai-systems/${encodeURIComponent(systemId)}` });
121
+ }
115
122
  connectAdapter(systemId, input) {
116
123
  required(systemId, "SDK_SYSTEM_ID_REQUIRED");
117
124
  const body = {
@@ -406,6 +413,21 @@ var ViraClient = class {
406
413
  body: { definition, ...id ? { id } : {} }
407
414
  });
408
415
  }
416
+ listSemanticTasks() {
417
+ return this.request({ method: "GET", path: "/v1/semantic-tasks" });
418
+ }
419
+ createSemanticTask(task, options = {}) {
420
+ required(task?.taskKey, "SDK_SEMANTIC_TASK_KEY_REQUIRED");
421
+ return this.request({ method: "POST", path: "/v1/semantic-tasks", body: { ...task, ...options.id ? { id: options.id } : {} } }, { idempotencyKey: options.idempotencyKey ?? `sdk:semantic-task:${task.taskKey}` });
422
+ }
423
+ listBehaviorPoints() {
424
+ return this.request({ method: "GET", path: "/v1/behavior-points" });
425
+ }
426
+ createBehaviorPoint(point, options = {}) {
427
+ required(point?.key, "SDK_BEHAVIOR_POINT_KEY_REQUIRED");
428
+ if (!point.taskId && !point.taskIds?.length) throw new Error("SDK_BEHAVIOR_POINT_TASK_REQUIRED");
429
+ return this.request({ method: "POST", path: "/v1/behavior-points", body: { ...point, ...options.id ? { id: options.id } : {} } }, { idempotencyKey: options.idempotencyKey ?? `sdk:behavior-point:${point.key}` });
430
+ }
409
431
  createBehaviorStrategyVariant(strategyId, variant, options = {}) {
410
432
  required(strategyId, "SDK_STRATEGY_ID_REQUIRED");
411
433
  if (!variant || typeof variant !== "object")
@@ -427,6 +449,10 @@ var ViraClient = class {
427
449
  body: {}
428
450
  });
429
451
  }
452
+ activateBehaviorStrategy(strategyId) {
453
+ required(strategyId, "SDK_STRATEGY_ID_REQUIRED");
454
+ return this.request({ method: "POST", path: `/v1/behavior-strategies/${encodeURIComponent(strategyId)}/activate`, body: {} });
455
+ }
430
456
  simulateBehaviorStrategy(strategyId, initialState = {}) {
431
457
  required(strategyId, "SDK_STRATEGY_ID_REQUIRED");
432
458
  return this.request({
@@ -509,6 +535,10 @@ var ViraClient = class {
509
535
  path: "/v1/behavior-programs"
510
536
  });
511
537
  }
538
+ listCapabilities(options = {}) {
539
+ const query = options.surface ? `?surface=${encodeURIComponent(options.surface)}` : "";
540
+ return this.request({ method: "GET", path: `/v1/capabilities${query}` });
541
+ }
512
542
  getBehaviorProgram(programId) {
513
543
  required(programId, "SDK_PROGRAM_ID_REQUIRED");
514
544
  return this.request({
@@ -580,6 +610,13 @@ var ViraClient = class {
580
610
  { idempotencyKey: options.idempotencyKey }
581
611
  );
582
612
  }
613
+ createTeachProposal(input, options = {}) {
614
+ return this.request({ method: "POST", path: "/v1/teach/proposals", body: input }, { idempotencyKey: options.idempotencyKey });
615
+ }
616
+ transitionTeachProposal(proposalId, transition, input = {}, options = {}) {
617
+ required(proposalId, "SDK_TEACH_PROPOSAL_ID_REQUIRED");
618
+ return this.request({ method: "POST", path: `/v1/teach/proposals/${encodeURIComponent(proposalId)}/${transition}`, body: input }, { idempotencyKey: options.idempotencyKey ?? `sdk:teach:${transition}:${proposalId}` });
619
+ }
583
620
  startEvaluation(input, options = {}) {
584
621
  return this.request(
585
622
  { method: "POST", path: "/v1/evaluations", body: input },
@@ -73,6 +73,8 @@ export declare class ViraClient {
73
73
  }): Promise<ViraResponse<{
74
74
  system: ClientBody;
75
75
  }> | null>;
76
+ listAISystems(): Promise<ViraResponse<ClientBody> | null>;
77
+ getAISystem(systemId: string): Promise<ViraResponse<ClientBody> | null>;
76
78
  connectAdapter(systemId: string, input: {
77
79
  adapterType: string;
78
80
  adapterVersion: string;
@@ -215,10 +217,33 @@ export declare class ViraClient {
215
217
  listBehaviorStrategies(): Promise<ViraResponse<ClientBody> | null>;
216
218
  getBehaviorStrategy(strategyId: string): Promise<ViraResponse<ClientBody> | null>;
217
219
  createBehaviorStrategy(definition: Record<string, unknown>, id?: string): Promise<ViraResponse<ClientBody> | null>;
220
+ listSemanticTasks(): Promise<ViraResponse<ClientBody> | null>;
221
+ createSemanticTask(task: {
222
+ taskKey: string;
223
+ description?: string;
224
+ version?: number;
225
+ aliases?: readonly string[];
226
+ examples?: readonly string[];
227
+ negativeExamples?: readonly string[];
228
+ }, options?: {
229
+ id?: string;
230
+ idempotencyKey?: string;
231
+ }): Promise<ViraResponse<ClientBody> | null>;
232
+ listBehaviorPoints(): Promise<ViraResponse<ClientBody> | null>;
233
+ createBehaviorPoint(point: {
234
+ key: string;
235
+ taskId?: string;
236
+ taskIds?: readonly string[];
237
+ constraints?: unknown;
238
+ }, options?: {
239
+ id?: string;
240
+ idempotencyKey?: string;
241
+ }): Promise<ViraResponse<ClientBody> | null>;
218
242
  createBehaviorStrategyVariant(strategyId: string, variant: Record<string, unknown>, options?: {
219
243
  idempotencyKey?: string;
220
244
  }): Promise<ViraResponse<ClientBody> | null>;
221
245
  validateBehaviorStrategy(strategyId: string): Promise<ViraResponse<ClientBody> | null>;
246
+ activateBehaviorStrategy(strategyId: string): Promise<ViraResponse<ClientBody> | null>;
222
247
  simulateBehaviorStrategy(strategyId: string, initialState?: Record<string, unknown>): Promise<ViraResponse<ClientBody> | null>;
223
248
  startStrategyExecution(input: {
224
249
  artifactDigest: string;
@@ -249,6 +274,12 @@ export declare class ViraClient {
249
274
  listBehaviorPrograms(): Promise<ViraResponse<{
250
275
  programs: readonly ClientBody[];
251
276
  }> | null>;
277
+ listCapabilities(options?: {
278
+ surface?: 'studio' | 'sdk' | 'python' | 'mcp' | 'api';
279
+ }): Promise<ViraResponse<{
280
+ capabilities: readonly ClientBody[];
281
+ scope: ClientBody;
282
+ }> | null>;
252
283
  getBehaviorProgram(programId: string): Promise<ViraResponse<{
253
284
  program: ClientBody;
254
285
  }> | null>;
@@ -275,6 +306,12 @@ export declare class ViraClient {
275
306
  submitTeachEvidence(evidence: ClientBody, options?: {
276
307
  idempotencyKey?: string;
277
308
  }): Promise<ViraResponse<ClientBody> | null>;
309
+ createTeachProposal(input: ClientBody, options?: {
310
+ idempotencyKey?: string;
311
+ }): Promise<ViraResponse<ClientBody> | null>;
312
+ transitionTeachProposal(proposalId: string, transition: 'review' | 'evaluate' | 'promote', input?: ClientBody, options?: {
313
+ idempotencyKey?: string;
314
+ }): Promise<ViraResponse<ClientBody> | null>;
278
315
  startEvaluation(input: ClientBody, options?: {
279
316
  idempotencyKey?: string;
280
317
  }): Promise<ViraResponse<ClientBody> | null>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvira/sdk",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
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"},
@@ -14,5 +14,5 @@
14
14
  "files": ["dist/index.js", "dist/index.d.ts", "dist/js-client.d.ts", "README.md"],
15
15
  "publishConfig": {"access": "public"},
16
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": "UNLICENSED"
17
+ "license": "MIT"
18
18
  }