@tryvira/sdk 0.1.70 → 0.1.72

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 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(reviewState) {
390
+ discover(options = {}) {
381
391
  return this.request({
382
392
  method: "GET",
383
393
  path: "/v1/discovery/candidates",
384
- query: reviewState ? { reviewState } : void 0
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) {
@@ -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(reviewState?: string): Promise<ViraResponse<{
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[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvira/sdk",
3
- "version": "0.1.70",
3
+ "version": "0.1.72",
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"},