@tryvira/sdk 0.1.56 → 0.1.57
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/host-lifecycle.d.ts +5 -0
- package/dist/index.js +6 -4
- package/dist/js-client.d.ts +10 -0
- package/package.json +1 -1
package/dist/host-lifecycle.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ export interface HostModelRequest extends HostSessionIdentity {
|
|
|
28
28
|
traceId?: string;
|
|
29
29
|
turnId?: string;
|
|
30
30
|
sequence?: number;
|
|
31
|
+
signalAttestationRefs?: readonly {
|
|
32
|
+
stableKey: string;
|
|
33
|
+
mappingId: string;
|
|
34
|
+
eventId: string;
|
|
35
|
+
}[];
|
|
31
36
|
}
|
|
32
37
|
export interface HostToolProposal extends HostSessionIdentity {
|
|
33
38
|
requestId: string;
|
package/dist/index.js
CHANGED
|
@@ -430,7 +430,8 @@ var ViraClient = class {
|
|
|
430
430
|
body: {
|
|
431
431
|
...input.behaviorPoint ? { behaviorPoint: input.behaviorPoint } : {},
|
|
432
432
|
...input.executionBoundary ? { executionBoundary: input.executionBoundary } : {},
|
|
433
|
-
...input.semanticContext ? { semanticContext: input.semanticContext } : {}
|
|
433
|
+
...input.semanticContext ? { semanticContext: input.semanticContext } : {},
|
|
434
|
+
...input.signalAttestationRefs ? { signalAttestationRefs: input.signalAttestationRefs } : {}
|
|
434
435
|
}
|
|
435
436
|
},
|
|
436
437
|
{
|
|
@@ -479,11 +480,12 @@ var ViraClient = class {
|
|
|
479
480
|
behaviorPoint,
|
|
480
481
|
capsule: firstCapsule,
|
|
481
482
|
...input.requestId ? { requestId: input.requestId } : {},
|
|
482
|
-
...input.sessionId ? { conversationId: input.sessionId } : {}
|
|
483
|
+
...input.sessionId ? { conversationId: input.sessionId } : {},
|
|
484
|
+
...input.signalAttestationRefs ? { signalAttestationRefs: input.signalAttestationRefs } : {}
|
|
483
485
|
},
|
|
484
486
|
idempotencyKey: input.idempotencyKey ? `sdk:runtime:${input.idempotencyKey}` : void 0
|
|
485
487
|
}) : await this.resolveRuntime({
|
|
486
|
-
semanticContext: { taskKey: receipt.taskKey, behaviorPoint, capsule: firstCapsule, ...input.requestId ? { requestId: input.requestId } : {}, ...input.sessionId ? { conversationId: input.sessionId } : {} },
|
|
488
|
+
semanticContext: { taskKey: receipt.taskKey, behaviorPoint, capsule: firstCapsule, ...input.requestId ? { requestId: input.requestId } : {}, ...input.sessionId ? { conversationId: input.sessionId } : {}, ...input.signalAttestationRefs ? { signalAttestationRefs: input.signalAttestationRefs } : {} },
|
|
487
489
|
idempotencyKey: input.idempotencyKey ? `sdk:runtime:${input.idempotencyKey}` : void 0
|
|
488
490
|
});
|
|
489
491
|
return { semantic, runtime };
|
|
@@ -1306,7 +1308,7 @@ function createViraHostRuntime(client, config) {
|
|
|
1306
1308
|
if (mode === "off") return { status: "off" };
|
|
1307
1309
|
if (!capabilities.canInjectContext) return { status: "unavailable", reasonCode: "HOST_CONTEXT_INJECTION_UNSUPPORTED" };
|
|
1308
1310
|
await connectOnce();
|
|
1309
|
-
const semantic = await withTimeout(client.resolveSemanticRuntime({ input: request.input, sessionId: request.sessionId ?? request.conversationId, requestId: request.requestId }), timeoutMs, "SDK_HOST_RESOLVE_TIMEOUT");
|
|
1311
|
+
const semantic = await withTimeout(client.resolveSemanticRuntime({ input: request.input, sessionId: request.sessionId ?? request.conversationId, requestId: request.requestId, signalAttestationRefs: request.signalAttestationRefs }), timeoutMs, "SDK_HOST_RESOLVE_TIMEOUT");
|
|
1310
1312
|
if (!semantic) return { status: "unavailable", reasonCode: "VIRA_SEMANTIC_UNAVAILABLE" };
|
|
1311
1313
|
const semanticBody = bodyOf(semantic.semantic);
|
|
1312
1314
|
const receipt = semanticBody.receipt && typeof semanticBody.receipt === "object" ? semanticBody.receipt : {};
|
package/dist/js-client.d.ts
CHANGED
|
@@ -339,6 +339,11 @@ export declare class ViraClient {
|
|
|
339
339
|
behaviorPoint?: string;
|
|
340
340
|
executionBoundary?: Record<string, unknown>;
|
|
341
341
|
semanticContext?: Record<string, unknown>;
|
|
342
|
+
signalAttestationRefs?: readonly {
|
|
343
|
+
stableKey: string;
|
|
344
|
+
mappingId: string;
|
|
345
|
+
eventId: string;
|
|
346
|
+
}[];
|
|
342
347
|
idempotencyKey?: string;
|
|
343
348
|
}): Promise<ViraResponse<RuntimeResolution> | null>;
|
|
344
349
|
/** Resolve a runtime route from a governed execution boundary and semantic context. */
|
|
@@ -365,6 +370,11 @@ export declare class ViraClient {
|
|
|
365
370
|
timeoutMs?: number;
|
|
366
371
|
requestId?: string;
|
|
367
372
|
executionBoundary?: Record<string, unknown>;
|
|
373
|
+
signalAttestationRefs?: readonly {
|
|
374
|
+
stableKey: string;
|
|
375
|
+
mappingId: string;
|
|
376
|
+
eventId: string;
|
|
377
|
+
}[];
|
|
368
378
|
idempotencyKey?: string;
|
|
369
379
|
}): Promise<{
|
|
370
380
|
semantic: ViraResponse<ClientBody>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvira/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.57",
|
|
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"},
|