@tryvira/sdk 0.1.71 → 0.1.73
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/index.js +17 -4
- package/dist/js-client.d.ts +14 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -337,6 +337,16 @@ var ViraClient = class {
|
|
|
337
337
|
return response;
|
|
338
338
|
})();
|
|
339
339
|
}
|
|
340
|
+
listObservations(input = {}) {
|
|
341
|
+
const query = new URLSearchParams();
|
|
342
|
+
if (input.limit !== void 0) query.set("limit", String(input.limit));
|
|
343
|
+
if (input.cursor) query.set("cursor", input.cursor);
|
|
344
|
+
return this.request({ method: "GET", path: `/v1/observations${query.size ? `?${query.toString()}` : ""}` });
|
|
345
|
+
}
|
|
346
|
+
getObservation(eventId) {
|
|
347
|
+
required(eventId, "SDK_OBSERVATION_ID_REQUIRED");
|
|
348
|
+
return this.request({ method: "GET", path: `/v1/observations/${encodeURIComponent(eventId)}` });
|
|
349
|
+
}
|
|
340
350
|
trace(event, options = {}) {
|
|
341
351
|
return this.observe({ ...event, eventType: "model.response" }, options);
|
|
342
352
|
}
|
|
@@ -377,11 +387,11 @@ var ViraClient = class {
|
|
|
377
387
|
{ idempotencyKey: options.idempotencyKey }
|
|
378
388
|
);
|
|
379
389
|
}
|
|
380
|
-
discover(
|
|
390
|
+
discover(options = {}) {
|
|
381
391
|
return this.request({
|
|
382
392
|
method: "GET",
|
|
383
393
|
path: "/v1/discovery/candidates",
|
|
384
|
-
query: reviewState ? { reviewState } :
|
|
394
|
+
query: { ...options.reviewState ? { reviewState: options.reviewState } : {}, ...listQuery(options) }
|
|
385
395
|
});
|
|
386
396
|
}
|
|
387
397
|
async createSignalDiscoveryProposal(input, options = {}) {
|
|
@@ -423,11 +433,12 @@ var ViraClient = class {
|
|
|
423
433
|
path: `/v1/connections/${encodeURIComponent(connectionId)}`
|
|
424
434
|
});
|
|
425
435
|
}
|
|
426
|
-
listSystemConnections(systemId) {
|
|
436
|
+
listSystemConnections(systemId, options = {}) {
|
|
427
437
|
required(systemId, "SDK_SYSTEM_ID_REQUIRED");
|
|
428
438
|
return this.request({
|
|
429
439
|
method: "GET",
|
|
430
|
-
path: `/v1/ai-systems/${encodeURIComponent(systemId)}/connections
|
|
440
|
+
path: `/v1/ai-systems/${encodeURIComponent(systemId)}/connections`,
|
|
441
|
+
query: listQuery(options)
|
|
431
442
|
});
|
|
432
443
|
}
|
|
433
444
|
inventory(systemId) {
|
|
@@ -568,6 +579,7 @@ var ViraClient = class {
|
|
|
568
579
|
idempotencyKey: input.idempotencyKey
|
|
569
580
|
});
|
|
570
581
|
}
|
|
582
|
+
/** Classify input only; use resolveRuntime for one BehaviorPoint or resolveTaskRun/startTaskRun for TaskRun routing and execution. */
|
|
571
583
|
resolveSemantic(input) {
|
|
572
584
|
required(input.input, "SDK_SEMANTIC_INPUT_REQUIRED");
|
|
573
585
|
const { idempotencyKey, requestId, ...body } = input;
|
|
@@ -1013,6 +1025,7 @@ var ViraClient = class {
|
|
|
1013
1025
|
required(feedback, "SDK_TEACH_REQUEST_CHANGES_FEEDBACK_REQUIRED");
|
|
1014
1026
|
return this.request({ method: "POST", path: `/v1/teach/proposals/${encodeURIComponent(proposalId)}/request-changes`, body: { feedback } }, { idempotencyKey: options.idempotencyKey ?? `sdk:teach:request-changes:${proposalId}:${feedback}` });
|
|
1015
1027
|
}
|
|
1028
|
+
/** Start a standalone or comparative evaluation; use evaluatePack for Pack lifecycle evaluation. */
|
|
1016
1029
|
startEvaluation(input, options = {}) {
|
|
1017
1030
|
return this.request(
|
|
1018
1031
|
{ method: "POST", path: "/v1/evaluations", body: input },
|
package/dist/js-client.d.ts
CHANGED
|
@@ -268,6 +268,11 @@ export declare class ViraClient {
|
|
|
268
268
|
observe(event: ClientObservation, options?: {
|
|
269
269
|
idempotencyKey?: string;
|
|
270
270
|
}): Promise<ViraResponse<ClientBody> | null>;
|
|
271
|
+
listObservations(input?: {
|
|
272
|
+
limit?: number;
|
|
273
|
+
cursor?: string;
|
|
274
|
+
}): Promise<ViraResponse<ClientBody> | null>;
|
|
275
|
+
getObservation(eventId: string): Promise<ViraResponse<ClientBody> | null>;
|
|
271
276
|
trace(event: ClientObservationScope & {
|
|
272
277
|
eventId: string;
|
|
273
278
|
aiSystemId: string;
|
|
@@ -318,7 +323,12 @@ export declare class ViraClient {
|
|
|
318
323
|
observeSdk(delivery: ClientBody, options?: {
|
|
319
324
|
idempotencyKey?: string;
|
|
320
325
|
}): Promise<ViraResponse<ClientBody> | null>;
|
|
321
|
-
discover(
|
|
326
|
+
discover(options?: {
|
|
327
|
+
reviewState?: string;
|
|
328
|
+
limit?: number;
|
|
329
|
+
cursor?: string;
|
|
330
|
+
search?: string;
|
|
331
|
+
}): Promise<ViraResponse<{
|
|
322
332
|
candidates: readonly ClientBody[];
|
|
323
333
|
}> | null>;
|
|
324
334
|
createSignalDiscoveryProposal(input: ClientBody, options?: {
|
|
@@ -339,7 +349,7 @@ export declare class ViraClient {
|
|
|
339
349
|
}): Promise<ViraResponse<ClientBody> | null>;
|
|
340
350
|
connectionHealth(connectionId: string): Promise<ViraResponse<ClientBody> | null>;
|
|
341
351
|
getConnection(connectionId: string): Promise<ViraResponse<ClientBody> | null>;
|
|
342
|
-
listSystemConnections(systemId: string): Promise<ViraResponse<ClientBody> | null>;
|
|
352
|
+
listSystemConnections(systemId: string, options?: ScopedListOptions): Promise<ViraResponse<ClientBody> | null>;
|
|
343
353
|
inventory(systemId: string): Promise<ViraResponse<ClientBody> | null>;
|
|
344
354
|
listPacks(options?: ScopedListOptions): Promise<ViraResponse<{
|
|
345
355
|
packs: readonly ClientBody[];
|
|
@@ -387,6 +397,7 @@ export declare class ViraClient {
|
|
|
387
397
|
semanticContext?: Record<string, unknown>;
|
|
388
398
|
idempotencyKey?: string;
|
|
389
399
|
}): Promise<ViraResponse<RuntimeResolution> | null>;
|
|
400
|
+
/** Classify input only; use resolveRuntime for one BehaviorPoint or resolveTaskRun/startTaskRun for TaskRun routing and execution. */
|
|
390
401
|
resolveSemantic(input: {
|
|
391
402
|
input: string;
|
|
392
403
|
profile?: Record<string, unknown>;
|
|
@@ -634,6 +645,7 @@ export declare class ViraClient {
|
|
|
634
645
|
requestTeachProposalChanges(proposalId: string, feedback: string, options?: {
|
|
635
646
|
idempotencyKey?: string;
|
|
636
647
|
}): Promise<ViraResponse<ClientBody> | null>;
|
|
648
|
+
/** Start a standalone or comparative evaluation; use evaluatePack for Pack lifecycle evaluation. */
|
|
637
649
|
startEvaluation(input: ClientBody, options?: {
|
|
638
650
|
idempotencyKey?: string;
|
|
639
651
|
}): 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.73",
|
|
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"},
|