@tryvira/opencode 0.1.65 → 0.1.67

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.
Files changed (2) hide show
  1. package/dist/index.js +24 -4
  2. package/package.json +17 -2
package/dist/index.js CHANGED
@@ -287,6 +287,16 @@ var ViraClient = class {
287
287
  return response;
288
288
  })();
289
289
  }
290
+ listObservations(input = {}) {
291
+ const query = new URLSearchParams();
292
+ if (input.limit !== void 0) query.set("limit", String(input.limit));
293
+ if (input.cursor) query.set("cursor", input.cursor);
294
+ return this.request({ method: "GET", path: `/v1/observations${query.size ? `?${query.toString()}` : ""}` });
295
+ }
296
+ getObservation(eventId) {
297
+ required(eventId, "SDK_OBSERVATION_ID_REQUIRED");
298
+ return this.request({ method: "GET", path: `/v1/observations/${encodeURIComponent(eventId)}` });
299
+ }
290
300
  trace(event, options = {}) {
291
301
  return this.observe({ ...event, eventType: "model.response" }, options);
292
302
  }
@@ -327,11 +337,11 @@ var ViraClient = class {
327
337
  { idempotencyKey: options.idempotencyKey }
328
338
  );
329
339
  }
330
- discover(reviewState) {
340
+ discover(options = {}) {
331
341
  return this.request({
332
342
  method: "GET",
333
343
  path: "/v1/discovery/candidates",
334
- query: reviewState ? { reviewState } : void 0
344
+ query: { ...options.reviewState ? { reviewState: options.reviewState } : {}, ...listQuery(options) }
335
345
  });
336
346
  }
337
347
  async createSignalDiscoveryProposal(input, options = {}) {
@@ -373,11 +383,12 @@ var ViraClient = class {
373
383
  path: `/v1/connections/${encodeURIComponent(connectionId)}`
374
384
  });
375
385
  }
376
- listSystemConnections(systemId) {
386
+ listSystemConnections(systemId, options = {}) {
377
387
  required(systemId, "SDK_SYSTEM_ID_REQUIRED");
378
388
  return this.request({
379
389
  method: "GET",
380
- path: `/v1/ai-systems/${encodeURIComponent(systemId)}/connections`
390
+ path: `/v1/ai-systems/${encodeURIComponent(systemId)}/connections`,
391
+ query: listQuery(options)
381
392
  });
382
393
  }
383
394
  inventory(systemId) {
@@ -394,6 +405,10 @@ var ViraClient = class {
394
405
  query: listQuery(options)
395
406
  });
396
407
  }
408
+ getPack(packId) {
409
+ required(packId, "SDK_PACK_ID_REQUIRED");
410
+ return this.request({ method: "GET", path: `/v1/packs/${encodeURIComponent(packId)}` });
411
+ }
397
412
  async deletePack(packId, options = {}) {
398
413
  required(packId, "SDK_PACK_ID_REQUIRED");
399
414
  const path = `/v1/packs/${encodeURIComponent(packId)}`;
@@ -518,6 +533,7 @@ var ViraClient = class {
518
533
  idempotencyKey: input.idempotencyKey
519
534
  });
520
535
  }
536
+ /** Classify input only; use resolveRuntime for one BehaviorPoint or resolveTaskRun/startTaskRun for TaskRun routing and execution. */
521
537
  resolveSemantic(input) {
522
538
  required(input.input, "SDK_SEMANTIC_INPUT_REQUIRED");
523
539
  const { idempotencyKey, requestId, ...body } = input;
@@ -963,6 +979,7 @@ var ViraClient = class {
963
979
  required(feedback, "SDK_TEACH_REQUEST_CHANGES_FEEDBACK_REQUIRED");
964
980
  return this.request({ method: "POST", path: `/v1/teach/proposals/${encodeURIComponent(proposalId)}/request-changes`, body: { feedback } }, { idempotencyKey: options.idempotencyKey ?? `sdk:teach:request-changes:${proposalId}:${feedback}` });
965
981
  }
982
+ /** Start a standalone or comparative evaluation; use evaluatePack for Pack lifecycle evaluation. */
966
983
  startEvaluation(input, options = {}) {
967
984
  return this.request(
968
985
  { method: "POST", path: "/v1/evaluations", body: input },
@@ -990,6 +1007,9 @@ var ViraClient = class {
990
1007
  path: `/v1/evaluations/${encodeURIComponent(evaluationId)}`
991
1008
  });
992
1009
  }
1010
+ listEvaluations(input = {}) {
1011
+ return this.request({ method: "GET", path: "/v1/evaluations", query: { ...input.limit === void 0 ? {} : { limit: String(input.limit) }, ...input.cursor ? { cursor: input.cursor } : {}, ...input.status ? { status: input.status } : {} } });
1012
+ }
993
1013
  getEvaluationComparison(evaluationId) {
994
1014
  required(evaluationId, "SDK_EVALUATION_ID_REQUIRED");
995
1015
  return this.request({
package/package.json CHANGED
@@ -1,7 +1,19 @@
1
1
  {
2
2
  "name": "@tryvira/opencode",
3
- "version": "0.1.65",
3
+ "version": "0.1.67",
4
4
  "description": "OpenCode host lifecycle integration for Vira",
5
+ "keywords": [
6
+ "opencode",
7
+ "opencode-plugin",
8
+ "vira",
9
+ "ai-governance",
10
+ "mcp"
11
+ ],
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/hrpering/tryvira.git"
15
+ },
16
+ "homepage": "https://tryvira.xyz",
5
17
  "type": "module",
6
18
  "main": "./dist/index.js",
7
19
  "exports": {
@@ -16,7 +28,7 @@
16
28
  "pack:check": "npm run build && node ../../scripts/opencode-plugin-smoke.mjs && node ../../scripts/opencode-plugin-host-acceptance.mjs"
17
29
  },
18
30
  "dependencies": {
19
- "@tryvira/sdk": "0.1.71"
31
+ "@tryvira/sdk": "0.1.74"
20
32
  },
21
33
  "peerDependencies": {
22
34
  "effect": "^4.0.0"
@@ -25,6 +37,9 @@
25
37
  "node": ">=20"
26
38
  },
27
39
  "license": "MIT",
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
28
43
  "devDependencies": {
29
44
  "@opencode/plugin": "^2.3.2"
30
45
  }