@tryvira/sdk 0.1.54 → 0.1.56
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/dist/framework-adapters.d.ts +1 -0
- package/dist/index.js +8 -2
- package/dist/js-client.d.ts +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -494,16 +494,22 @@ 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
|
}
|
|
503
504
|
async createHostActionApproval(input) {
|
|
504
505
|
required(input.sessionId, "SDK_ACTION_SESSION_REQUIRED");
|
|
505
506
|
required(input.dataVersion, "SDK_ACTION_DATA_VERSION_REQUIRED");
|
|
506
|
-
|
|
507
|
+
required(input.confirmation.proposalId, "SDK_ACTION_CONFIRMATION_PROPOSAL_REQUIRED");
|
|
508
|
+
required(input.confirmation.toolName, "SDK_ACTION_CONFIRMATION_TOOL_REQUIRED");
|
|
509
|
+
required(input.confirmation.argumentsDigest, "SDK_ACTION_CONFIRMATION_ARGUMENTS_REQUIRED");
|
|
510
|
+
required(input.confirmation.requestContextDigest, "SDK_ACTION_CONFIRMATION_CONTEXT_REQUIRED");
|
|
511
|
+
required(input.confirmation.acknowledgedAt, "SDK_ACTION_CONFIRMATION_TIME_REQUIRED");
|
|
512
|
+
return this.request({ method: "POST", path: "/v1/runtime/actions/approvals", body: { sessionId: input.sessionId, dataVersion: input.dataVersion, proposal: input.proposal, confirmation: input.confirmation, ...input.ttlSeconds !== void 0 ? { ttlSeconds: input.ttlSeconds } : {} } });
|
|
507
513
|
}
|
|
508
514
|
listBehaviorStrategies() {
|
|
509
515
|
return this.request({
|
package/dist/js-client.d.ts
CHANGED
|
@@ -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;
|
|
@@ -386,7 +387,13 @@ export declare class ViraClient {
|
|
|
386
387
|
sessionId: string;
|
|
387
388
|
dataVersion: string;
|
|
388
389
|
proposal: Record<string, unknown>;
|
|
389
|
-
|
|
390
|
+
confirmation: {
|
|
391
|
+
proposalId: string;
|
|
392
|
+
toolName: string;
|
|
393
|
+
argumentsDigest: string;
|
|
394
|
+
requestContextDigest: string;
|
|
395
|
+
acknowledgedAt: string;
|
|
396
|
+
};
|
|
390
397
|
ttlSeconds?: number;
|
|
391
398
|
}): Promise<ViraResponse<ClientBody> | null>;
|
|
392
399
|
listBehaviorStrategies(): 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.56",
|
|
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"},
|