@tryvira/sdk 0.1.53 → 0.1.55

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.
@@ -52,6 +52,7 @@ export interface FrameworkRuntimeCore {
52
52
  authorizeAction(input: {
53
53
  executionId: string;
54
54
  sessionId: string;
55
+ dataVersion: string;
55
56
  scope: {
56
57
  organizationId: string;
57
58
  projectId: string;
package/dist/index.js CHANGED
@@ -494,12 +494,18 @@ var ViraClient = class {
494
494
  required(input.scope.environmentId, "SDK_ACTION_ENVIRONMENT_REQUIRED");
495
495
  required(input.executionId, "SDK_ACTION_EXECUTION_REQUIRED");
496
496
  required(input.sessionId, "SDK_ACTION_SESSION_REQUIRED");
497
+ required(input.dataVersion, "SDK_ACTION_DATA_VERSION_REQUIRED");
497
498
  return this.request({
498
499
  method: "POST",
499
500
  path: "/v1/runtime/actions/authorize",
500
- body: { executionId: input.executionId, sessionId: input.sessionId, scope: input.scope, context: input.context, proposal: input.proposal, ...input.approval ? { approval: input.approval } : {} }
501
+ body: { executionId: input.executionId, sessionId: input.sessionId, dataVersion: input.dataVersion, scope: input.scope, context: input.context, proposal: input.proposal, ...input.approval ? { approval: input.approval } : {} }
501
502
  });
502
503
  }
504
+ async createHostActionApproval(input) {
505
+ required(input.sessionId, "SDK_ACTION_SESSION_REQUIRED");
506
+ required(input.dataVersion, "SDK_ACTION_DATA_VERSION_REQUIRED");
507
+ return this.request({ method: "POST", path: "/v1/runtime/actions/approvals", body: { sessionId: input.sessionId, dataVersion: input.dataVersion, proposal: input.proposal, confirmed: input.confirmed === true, ...input.ttlSeconds !== void 0 ? { ttlSeconds: input.ttlSeconds } : {} } });
508
+ }
503
509
  listBehaviorStrategies() {
504
510
  return this.request({
505
511
  method: "GET",
@@ -373,6 +373,7 @@ export declare class ViraClient {
373
373
  authorizeHostAction(input: {
374
374
  executionId: string;
375
375
  sessionId: string;
376
+ dataVersion: string;
376
377
  scope: {
377
378
  organizationId: string;
378
379
  projectId: string;
@@ -382,6 +383,13 @@ export declare class ViraClient {
382
383
  proposal: Record<string, unknown>;
383
384
  approval?: Record<string, unknown>;
384
385
  }): Promise<ViraResponse<ClientBody> | null>;
386
+ createHostActionApproval(input: {
387
+ sessionId: string;
388
+ dataVersion: string;
389
+ proposal: Record<string, unknown>;
390
+ confirmed?: boolean;
391
+ ttlSeconds?: number;
392
+ }): Promise<ViraResponse<ClientBody> | null>;
385
393
  listBehaviorStrategies(): Promise<ViraResponse<ClientBody> | null>;
386
394
  deleteBehaviorStrategy(strategyId: string, options?: {
387
395
  confirm?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvira/sdk",
3
- "version": "0.1.53",
3
+ "version": "0.1.55",
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"},