@tryvira/opencode 0.1.79 → 0.1.81

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
@@ -84,6 +84,17 @@ var retryAfterMs = (value, now = Date.now()) => {
84
84
  const date5 = Date.parse(value);
85
85
  return Number.isFinite(date5) && date5 > now ? Math.min(date5 - now, 12e4) : 0;
86
86
  };
87
+ function notifyTransport(observer, method, status, error62, started, attempt) {
88
+ if (!observer) return;
89
+ try {
90
+ const known = ["GET", "POST", "PUT", "PATCH", "DELETE"];
91
+ const outcome = status === 429 ? "http_429" : status !== void 0 ? status >= 200 && status < 600 ? "http_" + Math.floor(status / 100) + "xx" : "http_other" : error62 instanceof Error && ["AbortError", "TimeoutError"].includes(error62.name) ? "timeout" : "transport_error";
92
+ const event = Object.freeze({ method: known.includes(method) ? method : "OTHER", outcome, durationMs: Math.max(0, performance.now() - started), attempt: attempt + 1 });
93
+ void Promise.resolve(observer(event)).catch(() => {
94
+ });
95
+ } catch {
96
+ }
97
+ }
87
98
  var ViraClient = class {
88
99
  evaluations;
89
100
  teach;
@@ -93,6 +104,7 @@ var ViraClient = class {
93
104
  apiCredentialProvider;
94
105
  operatorDelegationTokenProvider;
95
106
  fetcher;
107
+ transportObserver;
96
108
  timeoutMs;
97
109
  retries;
98
110
  failureMode;
@@ -104,6 +116,7 @@ var ViraClient = class {
104
116
  this.apiCredentialProvider = options.apiCredentialProvider ?? options.accessTokenProvider;
105
117
  this.operatorDelegationTokenProvider = options.operatorDelegationTokenProvider;
106
118
  this.fetcher = options.fetcher ?? fetch;
119
+ this.transportObserver = options.transportObserver;
107
120
  this.timeoutMs = Math.max(
108
121
  1e3,
109
122
  Math.min(options.timeoutMs ?? 15e3, 12e4)
@@ -173,6 +186,11 @@ var ViraClient = class {
173
186
  if (options.limit !== void 0 && !Number.isFinite(options.limit)) throw new Error("SDK_NOTIFICATION_LIMIT_INVALID");
174
187
  return this.request({ method: "GET", path: "/v1/notifications/inbox", query: { ...limit === void 0 ? {} : { limit: String(limit) }, ...options.cursor ? { cursor: options.cursor } : {}, ...options.search ? { search: options.search } : {} } });
175
188
  }
189
+ readNotificationUpdates(options = {}) {
190
+ const count = options.count ?? 32;
191
+ if (!Number.isSafeInteger(count) || count < 1 || count > 100) throw new Error("SDK_NOTIFICATION_UPDATES_COUNT_INVALID");
192
+ return this.request({ method: "GET", path: "/v1/notifications/updates", query: { afterId: options.afterId ?? "latest", count: String(count) } });
193
+ }
176
194
  markInboxRead(notificationId, options = {}) {
177
195
  if (!notificationId.trim()) throw new Error("SDK_NOTIFICATION_ID_REQUIRED");
178
196
  return this.request({ method: "POST", path: `/v1/notifications/${encodeURIComponent(notificationId)}/read`, body: {} }, { idempotencyKey: options.idempotencyKey ?? `sdk:inbox-read:${notificationId}` });
@@ -255,6 +273,8 @@ var ViraClient = class {
255
273
  for (let attempt = 0; attempt < attempts; attempt += 1) {
256
274
  const controller = new AbortController();
257
275
  const timer = setTimeout(() => controller.abort(), this.timeoutMs);
276
+ const started = this.transportObserver ? performance.now() : 0;
277
+ let reported = false;
258
278
  try {
259
279
  const response = await this.fetcher(url2, {
260
280
  method: request.method,
@@ -264,6 +284,8 @@ var ViraClient = class {
264
284
  ...operatorOperation ? { redirect: "error", credentials: "omit" } : {}
265
285
  });
266
286
  const raw = await response.text();
287
+ notifyTransport(this.transportObserver, request.method, response.status, void 0, started, attempt);
288
+ reported = true;
267
289
  let body = null;
268
290
  try {
269
291
  body = raw ? JSON.parse(raw) : null;
@@ -290,6 +312,7 @@ var ViraClient = class {
290
312
  }
291
313
  return { status: response.status, body, requestId };
292
314
  } catch (error62) {
315
+ if (!reported) notifyTransport(this.transportObserver, request.method, void 0, error62, started, attempt);
293
316
  lastError = error62;
294
317
  if (error62 instanceof ViraApiError) throw error62;
295
318
  if (attempt + 1 < attempts) {
@@ -743,6 +766,24 @@ var ViraClient = class {
743
766
  return response;
744
767
  })();
745
768
  }
769
+ /** Explicit opt-in upload through the existing scoped observation authority.
770
+ * Do not call automatically from a transport observer (recursive reporting).
771
+ * May be subject to observation quotas and negotiated latency capability.
772
+ */
773
+ reportTransportLatency(input2, options = {}) {
774
+ if (!Number.isFinite(input2.durationMs) || input2.durationMs < 0 || input2.durationMs > 36e5) throw Error("SDK_TRANSPORT_LATENCY_INVALID");
775
+ return this.observe({
776
+ organizationId: input2.organizationId,
777
+ projectId: input2.projectId,
778
+ environmentId: input2.environmentId,
779
+ ...input2.organizationUnitId ? { organizationUnitId: input2.organizationUnitId } : {},
780
+ eventId: input2.eventId,
781
+ eventType: "latency",
782
+ aiSystemId: input2.aiSystemId,
783
+ connectionId: input2.connectionId,
784
+ payload: { latencyMs: input2.durationMs }
785
+ }, options);
786
+ }
746
787
  listObservations(input2 = {}) {
747
788
  const query = new URLSearchParams();
748
789
  if (input2.limit !== void 0) query.set("limit", String(input2.limit));
@@ -2474,7 +2515,7 @@ function createViraHostRuntime(client, config2) {
2474
2515
  // ../runtime/src/accelerator-v4/composite-hook-session.ts
2475
2516
  import { createHash as createHash2, createHmac } from "node:crypto";
2476
2517
 
2477
- // ../../node_modules/zod/v4/classic/external.js
2518
+
2478
2519
  var external_exports = {};
2479
2520
  __export(external_exports, {
2480
2521
  $brand: () => $brand,
@@ -2737,7 +2778,7 @@ __export(external_exports, {
2737
2778
  xor: () => xor
2738
2779
  });
2739
2780
 
2740
- // ../../node_modules/zod/v4/core/index.js
2781
+
2741
2782
  var core_exports2 = {};
2742
2783
  __export(core_exports2, {
2743
2784
  $ZodAny: () => $ZodAny,
@@ -3054,7 +3095,7 @@ __export(core_exports2, {
3054
3095
  withParser: () => withParser
3055
3096
  });
3056
3097
 
3057
- // ../../node_modules/zod/v4/core/util.js
3098
+
3058
3099
  var util_exports = {};
3059
3100
  __export(util_exports, {
3060
3101
  BIGINT_FORMAT_RANGES: () => BIGINT_FORMAT_RANGES,
@@ -3910,7 +3951,7 @@ function constantCatch(value) {
3910
3951
  return fn;
3911
3952
  }
3912
3953
 
3913
- // ../../node_modules/zod/v4/core/core.js
3954
+
3914
3955
  var _a;
3915
3956
  var NEVER = /* @__PURE__ */ Object.freeze({
3916
3957
  status: "aborted"
@@ -4032,7 +4073,7 @@ function config(newConfig) {
4032
4073
  return globalConfig;
4033
4074
  }
4034
4075
 
4035
- // ../../node_modules/zod/v4/core/errors.js
4076
+
4036
4077
  function _getMessage() {
4037
4078
  const internals = this._zod;
4038
4079
  internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
@@ -4224,7 +4265,7 @@ function prettifyError(error62) {
4224
4265
  return lines.join("\n");
4225
4266
  }
4226
4267
 
4227
- // ../../node_modules/zod/v4/core/parse.js
4268
+
4228
4269
  function finalizeParams(callee, params) {
4229
4270
  return { callee: params?.callee ?? callee, Err: params?.Err };
4230
4271
  }
@@ -4384,7 +4425,7 @@ var _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
4384
4425
  };
4385
4426
  var safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
4386
4427
 
4387
- // ../../node_modules/zod/v4/core/regexes.js
4428
+
4388
4429
  var regexes_exports = {};
4389
4430
  __export(regexes_exports, {
4390
4431
  anyString: () => anyString,
@@ -4556,7 +4597,7 @@ var sha512_hex = /^[0-9a-fA-F]{128}$/;
4556
4597
  var sha512_base64 = /* @__PURE__ */ fixedBase64(86, "==");
4557
4598
  var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
4558
4599
 
4559
- // ../../node_modules/zod/v4/core/checks.js
4600
+
4560
4601
  var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
4561
4602
  var _a3;
4562
4603
  inst._zod ?? (inst._zod = {});
@@ -5032,7 +5073,7 @@ var $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (ins
5032
5073
  };
5033
5074
  });
5034
5075
 
5035
- // ../../node_modules/zod/v4/core/doc.js
5076
+
5036
5077
  var Doc = class {
5037
5078
  constructor(args = [], closed = {}) {
5038
5079
  this.content = [];
@@ -5073,14 +5114,14 @@ ${content.join("\n")}
5073
5114
  }
5074
5115
  };
5075
5116
 
5076
- // ../../node_modules/zod/v4/core/versions.js
5117
+
5077
5118
  var version = {
5078
5119
  major: 4,
5079
5120
  minor: 6,
5080
5121
  patch: 7
5081
5122
  };
5082
5123
 
5083
- // ../../node_modules/zod/v4/core/schemas.js
5124
+
5084
5125
  var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
5085
5126
  var _a3;
5086
5127
  inst ?? (inst = {});
@@ -7522,7 +7563,7 @@ function handleRefineResult(result, payload, input2, inst) {
7522
7563
  }
7523
7564
  }
7524
7565
 
7525
- // ../../node_modules/zod/v4/core/memoizer.js
7566
+
7526
7567
  var $ZodCyclicError = class extends Error {
7527
7568
  constructor() {
7528
7569
  super(`Cannot parse a reference cycle that closes through a transform`);
@@ -7799,7 +7840,7 @@ function isBackEdge(ctx, value) {
7799
7840
  return backEdges !== void 0 && isRef(value) && backEdges.has(value);
7800
7841
  }
7801
7842
 
7802
- // ../../node_modules/zod/v4/locales/index.js
7843
+
7803
7844
  var locales_exports = {};
7804
7845
  __export(locales_exports, {
7805
7846
  ar: () => ar_default,
@@ -7867,7 +7908,7 @@ __export(locales_exports, {
7867
7908
  zhTW: () => zh_TW_default
7868
7909
  });
7869
7910
 
7870
- // ../../node_modules/zod/v4/locales/ar.js
7911
+
7871
7912
  var error = () => {
7872
7913
  const Sizable = {
7873
7914
  string: { unit: "\u062D\u0631\u0641", verb: "\u0623\u0646 \u064A\u062D\u0648\u064A" },
@@ -7979,7 +8020,7 @@ function ar_default() {
7979
8020
  };
7980
8021
  }
7981
8022
 
7982
- // ../../node_modules/zod/v4/locales/az.js
8023
+
7983
8024
  var error2 = () => {
7984
8025
  const Sizable = {
7985
8026
  string: { unit: "simvol", verb: "olmal\u0131d\u0131r" },
@@ -8090,7 +8131,7 @@ function az_default() {
8090
8131
  };
8091
8132
  }
8092
8133
 
8093
- // ../../node_modules/zod/v4/locales/be.js
8134
+
8094
8135
  function getBelarusianPlural(count, one, few, many) {
8095
8136
  const absCount = Math.abs(count);
8096
8137
  const lastDigit = absCount % 10;
@@ -8259,7 +8300,7 @@ function be_default() {
8259
8300
  };
8260
8301
  }
8261
8302
 
8262
- // ../../node_modules/zod/v4/locales/bg.js
8303
+
8263
8304
  var error4 = () => {
8264
8305
  const Sizable = {
8265
8306
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0430", verb: "\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430" },
@@ -8385,7 +8426,7 @@ function bg_default() {
8385
8426
  };
8386
8427
  }
8387
8428
 
8388
- // ../../node_modules/zod/v4/locales/bn.js
8429
+
8389
8430
  var error5 = () => {
8390
8431
  const Sizable = {
8391
8432
  string: { unit: "\u0985\u0995\u09CD\u09B7\u09B0", verb: "\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7" },
@@ -8499,7 +8540,7 @@ function bn_default() {
8499
8540
  };
8500
8541
  }
8501
8542
 
8502
- // ../../node_modules/zod/v4/locales/ca.js
8543
+
8503
8544
  var error6 = () => {
8504
8545
  const Sizable = {
8505
8546
  string: { unit: "car\xE0cters", verb: "contenir" },
@@ -8613,7 +8654,7 @@ function ca_default() {
8613
8654
  };
8614
8655
  }
8615
8656
 
8616
- // ../../node_modules/zod/v4/locales/ckb.js
8657
+
8617
8658
  var error7 = () => {
8618
8659
  const Sizable = {
8619
8660
  string: { unit: "\u067E\u06CC\u062A", verb: "\u0628\u06CE\u062A" },
@@ -8746,7 +8787,7 @@ function ckb_default() {
8746
8787
  };
8747
8788
  }
8748
8789
 
8749
- // ../../node_modules/zod/v4/locales/cs.js
8790
+
8750
8791
  var error8 = () => {
8751
8792
  const Sizable = {
8752
8793
  string: { unit: "znak\u016F", verb: "m\xEDt" },
@@ -8863,7 +8904,7 @@ function cs_default() {
8863
8904
  };
8864
8905
  }
8865
8906
 
8866
- // ../../node_modules/zod/v4/locales/da.js
8907
+
8867
8908
  var error9 = () => {
8868
8909
  const Sizable = {
8869
8910
  string: { unit: "tegn", verb: "havde" },
@@ -8984,7 +9025,7 @@ function da_default() {
8984
9025
  };
8985
9026
  }
8986
9027
 
8987
- // ../../node_modules/zod/v4/locales/de.js
9028
+
8988
9029
  var error10 = () => {
8989
9030
  const Sizable = {
8990
9031
  string: { unit: "Zeichen", verb: "zu haben" },
@@ -9098,7 +9139,7 @@ function de_default() {
9098
9139
  };
9099
9140
  }
9100
9141
 
9101
- // ../../node_modules/zod/v4/locales/el.js
9142
+
9102
9143
  var error11 = () => {
9103
9144
  const Sizable = {
9104
9145
  string: { unit: "\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2", verb: "\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9" },
@@ -9211,7 +9252,7 @@ function el_default() {
9211
9252
  };
9212
9253
  }
9213
9254
 
9214
- // ../../node_modules/zod/v4/locales/en.js
9255
+
9215
9256
  var error12 = () => {
9216
9257
  const Sizable = {
9217
9258
  string: { unit: "characters", verb: "to have" },
@@ -9336,7 +9377,7 @@ function en_default() {
9336
9377
  };
9337
9378
  }
9338
9379
 
9339
- // ../../node_modules/zod/v4/locales/eo.js
9380
+
9340
9381
  var error13 = () => {
9341
9382
  const Sizable = {
9342
9383
  string: { unit: "karaktrojn", verb: "havi" },
@@ -9451,7 +9492,7 @@ function eo_default() {
9451
9492
  };
9452
9493
  }
9453
9494
 
9454
- // ../../node_modules/zod/v4/locales/es.js
9495
+
9455
9496
  var error14 = () => {
9456
9497
  const Sizable = {
9457
9498
  string: { unit: "caracteres", verb: "tener" },
@@ -9588,7 +9629,7 @@ function es_default() {
9588
9629
  };
9589
9630
  }
9590
9631
 
9591
- // ../../node_modules/zod/v4/locales/fa.js
9632
+
9592
9633
  var error15 = () => {
9593
9634
  const Sizable = {
9594
9635
  string: { unit: "\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631", verb: "\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F" },
@@ -9708,7 +9749,7 @@ function fa_default() {
9708
9749
  };
9709
9750
  }
9710
9751
 
9711
- // ../../node_modules/zod/v4/locales/fi.js
9752
+
9712
9753
  var error16 = () => {
9713
9754
  const Sizable = {
9714
9755
  string: { unit: "merkki\xE4", subject: "merkkijonon" },
@@ -9826,7 +9867,7 @@ function fi_default() {
9826
9867
  };
9827
9868
  }
9828
9869
 
9829
- // ../../node_modules/zod/v4/locales/fr.js
9870
+
9830
9871
  var error17 = () => {
9831
9872
  const Sizable = {
9832
9873
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -9956,7 +9997,7 @@ function fr_default() {
9956
9997
  };
9957
9998
  }
9958
9999
 
9959
- // ../../node_modules/zod/v4/locales/fr-CA.js
10000
+
9960
10001
  var error18 = () => {
9961
10002
  const Sizable = {
9962
10003
  string: { unit: "caract\xE8res", verb: "avoir" },
@@ -10069,7 +10110,7 @@ function fr_CA_default() {
10069
10110
  };
10070
10111
  }
10071
10112
 
10072
- // ../../node_modules/zod/v4/locales/gu.js
10113
+
10073
10114
  var error19 = () => {
10074
10115
  const Sizable = {
10075
10116
  string: { unit: "\u0A85\u0A95\u0ACD\u0AB7\u0AB0", verb: "\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F" },
@@ -10183,7 +10224,7 @@ function gu_default() {
10183
10224
  };
10184
10225
  }
10185
10226
 
10186
- // ../../node_modules/zod/v4/locales/he.js
10227
+
10187
10228
  var error20 = () => {
10188
10229
  const TypeNames = {
10189
10230
  string: { label: "\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA", gender: "f" },
@@ -10385,7 +10426,7 @@ function he_default() {
10385
10426
  };
10386
10427
  }
10387
10428
 
10388
- // ../../node_modules/zod/v4/locales/hi.js
10429
+
10389
10430
  var error21 = () => {
10390
10431
  const Sizable = {
10391
10432
  string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F" },
@@ -10497,7 +10538,7 @@ function hi_default() {
10497
10538
  };
10498
10539
  }
10499
10540
 
10500
- // ../../node_modules/zod/v4/locales/hr.js
10541
+
10501
10542
  var error22 = () => {
10502
10543
  const Sizable = {
10503
10544
  string: { unit: "znakova", verb: "imati" },
@@ -10624,7 +10665,7 @@ function hr_default() {
10624
10665
  };
10625
10666
  }
10626
10667
 
10627
- // ../../node_modules/zod/v4/locales/hu.js
10668
+
10628
10669
  var error23 = () => {
10629
10670
  const Sizable = {
10630
10671
  string: { unit: "karakter", verb: "legyen" },
@@ -10738,7 +10779,7 @@ function hu_default() {
10738
10779
  };
10739
10780
  }
10740
10781
 
10741
- // ../../node_modules/zod/v4/locales/hy.js
10782
+
10742
10783
  function getArmenianPlural(count, one, many) {
10743
10784
  return Math.abs(count) === 1 ? one : many;
10744
10785
  }
@@ -10897,7 +10938,7 @@ function hy_default() {
10897
10938
  };
10898
10939
  }
10899
10940
 
10900
- // ../../node_modules/zod/v4/locales/id.js
10941
+
10901
10942
  var error25 = () => {
10902
10943
  const Sizable = {
10903
10944
  string: { unit: "karakter", verb: "memiliki" },
@@ -11009,7 +11050,7 @@ function id_default() {
11009
11050
  };
11010
11051
  }
11011
11052
 
11012
- // ../../node_modules/zod/v4/locales/is.js
11053
+
11013
11054
  var error26 = () => {
11014
11055
  const Sizable = {
11015
11056
  string: { unit: "stafi", verb: "a\xF0 hafa" },
@@ -11124,7 +11165,7 @@ function is_default() {
11124
11165
  };
11125
11166
  }
11126
11167
 
11127
- // ../../node_modules/zod/v4/locales/it.js
11168
+
11128
11169
  var error27 = () => {
11129
11170
  const Sizable = {
11130
11171
  string: { unit: "caratteri", verb: "avere" },
@@ -11238,7 +11279,7 @@ function it_default() {
11238
11279
  };
11239
11280
  }
11240
11281
 
11241
- // ../../node_modules/zod/v4/locales/ja.js
11282
+
11242
11283
  var error28 = () => {
11243
11284
  const Sizable = {
11244
11285
  string: { unit: "\u6587\u5B57", verb: "\u3067\u3042\u308B" },
@@ -11351,7 +11392,7 @@ function ja_default() {
11351
11392
  };
11352
11393
  }
11353
11394
 
11354
- // ../../node_modules/zod/v4/locales/ka.js
11395
+
11355
11396
  var error29 = () => {
11356
11397
  const Sizable = {
11357
11398
  string: { unit: "\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD", verb: "\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1" },
@@ -11469,7 +11510,7 @@ function ka_default() {
11469
11510
  };
11470
11511
  }
11471
11512
 
11472
- // ../../node_modules/zod/v4/locales/km.js
11513
+
11473
11514
  var error30 = () => {
11474
11515
  const Sizable = {
11475
11516
  string: { unit: "\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A", verb: "\u1782\u17BD\u179A\u1798\u17B6\u1793" },
@@ -11585,12 +11626,12 @@ function km_default() {
11585
11626
  };
11586
11627
  }
11587
11628
 
11588
- // ../../node_modules/zod/v4/locales/kh.js
11629
+
11589
11630
  function kh_default() {
11590
11631
  return km_default();
11591
11632
  }
11592
11633
 
11593
- // ../../node_modules/zod/v4/locales/kn.js
11634
+
11594
11635
  var error31 = () => {
11595
11636
  const Sizable = {
11596
11637
  string: { unit: "\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1", verb: "\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1" },
@@ -11706,7 +11747,7 @@ function kn_default() {
11706
11747
  };
11707
11748
  }
11708
11749
 
11709
- // ../../node_modules/zod/v4/locales/ko.js
11750
+
11710
11751
  var error32 = () => {
11711
11752
  const Sizable = {
11712
11753
  string: { unit: "\uBB38\uC790", verb: "to have" },
@@ -11823,7 +11864,7 @@ function ko_default() {
11823
11864
  };
11824
11865
  }
11825
11866
 
11826
- // ../../node_modules/zod/v4/locales/lt.js
11867
+
11827
11868
  var capitalizeFirstCharacter = (text3) => {
11828
11869
  return text3.charAt(0).toUpperCase() + text3.slice(1);
11829
11870
  };
@@ -12031,7 +12072,7 @@ function lt_default() {
12031
12072
  };
12032
12073
  }
12033
12074
 
12034
- // ../../node_modules/zod/v4/locales/mk.js
12075
+
12035
12076
  var error34 = () => {
12036
12077
  const Sizable = {
12037
12078
  string: { unit: "\u0437\u043D\u0430\u0446\u0438", verb: "\u0434\u0430 \u0438\u043C\u0430\u0430\u0442" },
@@ -12146,7 +12187,7 @@ function mk_default() {
12146
12187
  };
12147
12188
  }
12148
12189
 
12149
- // ../../node_modules/zod/v4/locales/ms.js
12190
+
12150
12191
  var error35 = () => {
12151
12192
  const Sizable = {
12152
12193
  string: { unit: "aksara", verb: "mempunyai" },
@@ -12259,7 +12300,7 @@ function ms_default() {
12259
12300
  };
12260
12301
  }
12261
12302
 
12262
- // ../../node_modules/zod/v4/locales/ne.js
12303
+
12263
12304
  var error36 = () => {
12264
12305
  const Sizable = {
12265
12306
  string: { unit: "\u0905\u0915\u094D\u0937\u0930", verb: "\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B" },
@@ -12371,7 +12412,7 @@ function ne_default() {
12371
12412
  };
12372
12413
  }
12373
12414
 
12374
- // ../../node_modules/zod/v4/locales/nl.js
12415
+
12375
12416
  var error37 = () => {
12376
12417
  const Sizable = {
12377
12418
  string: { unit: "tekens", verb: "heeft" },
@@ -12487,7 +12528,7 @@ function nl_default() {
12487
12528
  };
12488
12529
  }
12489
12530
 
12490
- // ../../node_modules/zod/v4/locales/nn.js
12531
+
12491
12532
  var error38 = () => {
12492
12533
  const Sizable = {
12493
12534
  string: { unit: "teikn", verb: "\xE5 ha" },
@@ -12601,7 +12642,7 @@ function nn_default() {
12601
12642
  };
12602
12643
  }
12603
12644
 
12604
- // ../../node_modules/zod/v4/locales/no.js
12645
+
12605
12646
  var error39 = () => {
12606
12647
  const Sizable = {
12607
12648
  string: { unit: "tegn", verb: "\xE5 ha" },
@@ -12715,7 +12756,7 @@ function no_default() {
12715
12756
  };
12716
12757
  }
12717
12758
 
12718
- // ../../node_modules/zod/v4/locales/ota.js
12759
+
12719
12760
  var error40 = () => {
12720
12761
  const Sizable = {
12721
12762
  string: { unit: "harf", verb: "olmal\u0131d\u0131r" },
@@ -12830,7 +12871,7 @@ function ota_default() {
12830
12871
  };
12831
12872
  }
12832
12873
 
12833
- // ../../node_modules/zod/v4/locales/ps.js
12874
+
12834
12875
  var error41 = () => {
12835
12876
  const Sizable = {
12836
12877
  string: { unit: "\u062A\u0648\u06A9\u064A", verb: "\u0648\u0644\u0631\u064A" },
@@ -12950,7 +12991,7 @@ function ps_default() {
12950
12991
  };
12951
12992
  }
12952
12993
 
12953
- // ../../node_modules/zod/v4/locales/pl.js
12994
+
12954
12995
  var error42 = () => {
12955
12996
  const Sizable = {
12956
12997
  string: { unit: "znak\xF3w", verb: "mie\u0107" },
@@ -13065,7 +13106,7 @@ function pl_default() {
13065
13106
  };
13066
13107
  }
13067
13108
 
13068
- // ../../node_modules/zod/v4/locales/pt.js
13109
+
13069
13110
  var error43 = () => {
13070
13111
  const Sizable = {
13071
13112
  string: { unit: "caracteres" },
@@ -13209,7 +13250,7 @@ function pt_default() {
13209
13250
  };
13210
13251
  }
13211
13252
 
13212
- // ../../node_modules/zod/v4/locales/pt-BR.js
13253
+
13213
13254
  var error44 = () => {
13214
13255
  const Sizable = {
13215
13256
  string: { unit: "caracteres" },
@@ -13354,7 +13395,7 @@ function pt_BR_default() {
13354
13395
  };
13355
13396
  }
13356
13397
 
13357
- // ../../node_modules/zod/v4/locales/ro.js
13398
+
13358
13399
  var error45 = () => {
13359
13400
  const Sizable = {
13360
13401
  string: { unit: "caractere", verb: "s\u0103 aib\u0103" },
@@ -13477,7 +13518,7 @@ function ro_default() {
13477
13518
  };
13478
13519
  }
13479
13520
 
13480
- // ../../node_modules/zod/v4/locales/ru.js
13521
+
13481
13522
  function getRussianPlural(count, one, few, many) {
13482
13523
  const absCount = Math.abs(count);
13483
13524
  const lastDigit = absCount % 10;
@@ -13646,7 +13687,7 @@ function ru_default() {
13646
13687
  };
13647
13688
  }
13648
13689
 
13649
- // ../../node_modules/zod/v4/locales/sk.js
13690
+
13650
13691
  var error47 = () => {
13651
13692
  const Sizable = {
13652
13693
  string: { unit: "znakov", verb: "ma\u0165" },
@@ -13763,7 +13804,7 @@ function sk_default() {
13763
13804
  };
13764
13805
  }
13765
13806
 
13766
- // ../../node_modules/zod/v4/locales/sl.js
13807
+
13767
13808
  var error48 = () => {
13768
13809
  const Sizable = {
13769
13810
  string: { unit: "znakov", verb: "imeti" },
@@ -13878,7 +13919,7 @@ function sl_default() {
13878
13919
  };
13879
13920
  }
13880
13921
 
13881
- // ../../node_modules/zod/v4/locales/sv.js
13922
+
13882
13923
  var error49 = () => {
13883
13924
  const Sizable = {
13884
13925
  string: { unit: "tecken", verb: "att ha" },
@@ -13994,7 +14035,7 @@ function sv_default() {
13994
14035
  };
13995
14036
  }
13996
14037
 
13997
- // ../../node_modules/zod/v4/locales/ta.js
14038
+
13998
14039
  var error50 = () => {
13999
14040
  const Sizable = {
14000
14041
  string: { unit: "\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD", verb: "\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD" },
@@ -14110,7 +14151,7 @@ function ta_default() {
14110
14151
  };
14111
14152
  }
14112
14153
 
14113
- // ../../node_modules/zod/v4/locales/tg.js
14154
+
14114
14155
  var error51 = () => {
14115
14156
  const Sizable = {
14116
14157
  string: { unit: "\u0430\u043B\u043E\u043C\u0430\u0442", verb: "\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434" },
@@ -14227,7 +14268,7 @@ function tg_default() {
14227
14268
  };
14228
14269
  }
14229
14270
 
14230
- // ../../node_modules/zod/v4/locales/th.js
14271
+
14231
14272
  var error52 = () => {
14232
14273
  const Sizable = {
14233
14274
  string: { unit: "\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23", verb: "\u0E04\u0E27\u0E23\u0E21\u0E35" },
@@ -14343,7 +14384,7 @@ function th_default() {
14343
14384
  };
14344
14385
  }
14345
14386
 
14346
- // ../../node_modules/zod/v4/locales/tk.js
14387
+
14347
14388
  var error53 = () => {
14348
14389
  const Sizable = {
14349
14390
  string: { unit: "simwol", verb: "bolmaly" },
@@ -14451,7 +14492,7 @@ function tk_default() {
14451
14492
  };
14452
14493
  }
14453
14494
 
14454
- // ../../node_modules/zod/v4/locales/tr.js
14495
+
14455
14496
  var error54 = () => {
14456
14497
  const Sizable = {
14457
14498
  string: { unit: "karakter", verb: "olmal\u0131" },
@@ -14562,7 +14603,7 @@ function tr_default() {
14562
14603
  };
14563
14604
  }
14564
14605
 
14565
- // ../../node_modules/zod/v4/locales/uk.js
14606
+
14566
14607
  var error55 = () => {
14567
14608
  const Sizable = {
14568
14609
  string: { unit: "\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432", verb: "\u043C\u0430\u0442\u0438\u043C\u0435" },
@@ -14676,12 +14717,12 @@ function uk_default() {
14676
14717
  };
14677
14718
  }
14678
14719
 
14679
- // ../../node_modules/zod/v4/locales/ua.js
14720
+
14680
14721
  function ua_default() {
14681
14722
  return uk_default();
14682
14723
  }
14683
14724
 
14684
- // ../../node_modules/zod/v4/locales/ur.js
14725
+
14685
14726
  var error56 = () => {
14686
14727
  const Sizable = {
14687
14728
  string: { unit: "\u062D\u0631\u0648\u0641", verb: "\u06C1\u0648\u0646\u0627" },
@@ -14797,7 +14838,7 @@ function ur_default() {
14797
14838
  };
14798
14839
  }
14799
14840
 
14800
- // ../../node_modules/zod/v4/locales/uz.js
14841
+
14801
14842
  var error57 = () => {
14802
14843
  const Sizable = {
14803
14844
  string: { unit: "belgi", verb: "bo\u2018lishi kerak" },
@@ -14911,7 +14952,7 @@ function uz_default() {
14911
14952
  };
14912
14953
  }
14913
14954
 
14914
- // ../../node_modules/zod/v4/locales/vi.js
14955
+
14915
14956
  var error58 = () => {
14916
14957
  const Sizable = {
14917
14958
  string: { unit: "k\xFD t\u1EF1", verb: "c\xF3" },
@@ -15025,7 +15066,7 @@ function vi_default() {
15025
15066
  };
15026
15067
  }
15027
15068
 
15028
- // ../../node_modules/zod/v4/locales/zh-CN.js
15069
+
15029
15070
  var error59 = () => {
15030
15071
  const Sizable = {
15031
15072
  string: { unit: "\u5B57\u7B26", verb: "\u5305\u542B" },
@@ -15140,7 +15181,7 @@ function zh_CN_default() {
15140
15181
  };
15141
15182
  }
15142
15183
 
15143
- // ../../node_modules/zod/v4/locales/zh-TW.js
15184
+
15144
15185
  var error60 = () => {
15145
15186
  const Sizable = {
15146
15187
  string: { unit: "\u5B57\u5143", verb: "\u64C1\u6709" },
@@ -15253,7 +15294,7 @@ function zh_TW_default() {
15253
15294
  };
15254
15295
  }
15255
15296
 
15256
- // ../../node_modules/zod/v4/locales/yo.js
15297
+
15257
15298
  var error61 = () => {
15258
15299
  const Sizable = {
15259
15300
  string: { unit: "\xE0mi", verb: "n\xED" },
@@ -15366,7 +15407,7 @@ function yo_default() {
15366
15407
  };
15367
15408
  }
15368
15409
 
15369
- // ../../node_modules/zod/v4/core/registries.js
15410
+
15370
15411
  var _a2;
15371
15412
  var $output = /* @__PURE__ */ Symbol("ZodOutput");
15372
15413
  var $input = /* @__PURE__ */ Symbol("ZodInput");
@@ -15416,7 +15457,7 @@ function registry() {
15416
15457
  (_a2 = globalThis).__zod_globalRegistry ?? (_a2.__zod_globalRegistry = registry());
15417
15458
  var globalRegistry = globalThis.__zod_globalRegistry;
15418
15459
 
15419
- // ../../node_modules/zod/v4/core/compile.js
15460
+
15420
15461
  var INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
15421
15462
  var FALLBACK_FLAG = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
15422
15463
  var ZodCompileAsyncError = class extends Error {
@@ -17026,7 +17067,7 @@ function generateTransformCheck(doc, ctx, schema, accessor) {
17026
17067
  return accessor;
17027
17068
  }
17028
17069
 
17029
- // ../../node_modules/zod/v4/core/api.js
17070
+
17030
17071
  function snapshotChecks(def) {
17031
17072
  if (def.checks)
17032
17073
  def.checks = [...def.checks];
@@ -18085,7 +18126,7 @@ function _stringFormat(Class2, format, fnOrRegex, _params = {}) {
18085
18126
  return inst;
18086
18127
  }
18087
18128
 
18088
- // ../../node_modules/zod/v4/core/to-json-schema.js
18129
+
18089
18130
  function assignProps(target, ...sources) {
18090
18131
  for (const source of sources) {
18091
18132
  for (const key of Reflect.ownKeys(source)) {
@@ -18615,7 +18656,7 @@ var createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) =
18615
18656
  return finalize(ctx, schema);
18616
18657
  };
18617
18658
 
18618
- // ../../node_modules/zod/v4/core/json-schema-processors.js
18659
+
18619
18660
  var narrowMin = (agg, key, value) => {
18620
18661
  if (agg[key] === void 0 || value > agg[key])
18621
18662
  agg[key] = value;
@@ -19363,7 +19404,7 @@ function toJSONSchema(input2, params) {
19363
19404
  return finalize(ctx, input2);
19364
19405
  }
19365
19406
 
19366
- // ../../node_modules/zod/v4/core/json-schema-generator.js
19407
+
19367
19408
  var JSONSchemaGenerator = class {
19368
19409
  /** @deprecated Access via ctx instead */
19369
19410
  get metadataRegistry() {
@@ -19441,10 +19482,10 @@ var JSONSchemaGenerator = class {
19441
19482
  }
19442
19483
  };
19443
19484
 
19444
- // ../../node_modules/zod/v4/core/json-schema.js
19485
+
19445
19486
  var json_schema_exports = {};
19446
19487
 
19447
- // ../../node_modules/zod/v4/classic/schemas.js
19488
+
19448
19489
  var schemas_exports2 = {};
19449
19490
  __export(schemas_exports2, {
19450
19491
  ZodAny: () => ZodAny,
@@ -19625,7 +19666,7 @@ __export(schemas_exports2, {
19625
19666
  xor: () => xor
19626
19667
  });
19627
19668
 
19628
- // ../../node_modules/zod/v4/classic/checks.js
19669
+
19629
19670
  var checks_exports2 = {};
19630
19671
  __export(checks_exports2, {
19631
19672
  endsWith: () => _endsWith,
@@ -19660,7 +19701,7 @@ __export(checks_exports2, {
19660
19701
  uppercase: () => _uppercase
19661
19702
  });
19662
19703
 
19663
- // ../../node_modules/zod/v4/classic/errors.js
19704
+
19664
19705
  var _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
19665
19706
  function _lazyMethod(proto, key, make) {
19666
19707
  Object.defineProperty(proto, key, {
@@ -19706,7 +19747,7 @@ var ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer2, void 0
19706
19747
  Parent: Error
19707
19748
  });
19708
19749
 
19709
- // ../../node_modules/zod/v4/classic/parse.js
19750
+
19710
19751
  var parse2 = /* @__PURE__ */ _parse(ZodRealError);
19711
19752
  var parseAsync2 = /* @__PURE__ */ _parseAsync(ZodRealError);
19712
19753
  var safeParse2 = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -19720,7 +19761,7 @@ var safeDecode2 = /* @__PURE__ */ _safeDecode(ZodRealError);
19720
19761
  var safeEncodeAsync2 = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
19721
19762
  var safeDecodeAsync2 = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
19722
19763
 
19723
- // ../../node_modules/zod/v4/classic/schemas.js
19764
+
19724
19765
  function _ensureDefaultLocale() {
19725
19766
  if (!globalConfig.localeError)
19726
19767
  config(en_default());
@@ -21185,7 +21226,7 @@ function preprocess(fn, schema) {
21185
21226
  });
21186
21227
  }
21187
21228
 
21188
- // ../../node_modules/zod/v4/classic/compat.js
21229
+
21189
21230
  var ZodIssueCode = {
21190
21231
  invalid_type: "invalid_type",
21191
21232
  too_big: "too_big",
@@ -21211,7 +21252,7 @@ var ZodFirstPartyTypeKind;
21211
21252
  /* @__PURE__ */ (function(ZodFirstPartyTypeKind2) {
21212
21253
  })(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));
21213
21254
 
21214
- // ../../node_modules/zod/v4/classic/iso.js
21255
+
21215
21256
  var iso_exports = {};
21216
21257
  __export(iso_exports, {
21217
21258
  ZodISODate: () => ZodISODate,
@@ -21236,7 +21277,7 @@ function duration2(params) {
21236
21277
  return _isoDuration(ZodISODuration, params);
21237
21278
  }
21238
21279
 
21239
- // ../../node_modules/zod/v4/classic/from-json-schema.js
21280
+
21240
21281
  var z = {
21241
21282
  ...schemas_exports2,
21242
21283
  ...checks_exports2,
@@ -21969,7 +22010,7 @@ function fromJSONSchema(schema, params) {
21969
22010
  return convertSchema(normalized, ctx);
21970
22011
  }
21971
22012
 
21972
- // ../../node_modules/zod/v4/core/visit.js
22013
+
21973
22014
  var RESOLVING = /* @__PURE__ */ Symbol("z.visit/resolving");
21974
22015
  function visit(schema, fnOrHandlers) {
21975
22016
  const fn = typeof fnOrHandlers === "function" ? fnOrHandlers : (node2, rewritten) => {
@@ -22124,7 +22165,7 @@ function visit(schema, fnOrHandlers) {
22124
22165
  return run(schema);
22125
22166
  }
22126
22167
 
22127
- // ../../node_modules/zod/v4/classic/deep-partial.js
22168
+
22128
22169
  function deepPartial(schema) {
22129
22170
  return visit(schema, {
22130
22171
  object: (s) => s.partial(),
@@ -22136,7 +22177,7 @@ function deepPartial(schema) {
22136
22177
  });
22137
22178
  }
22138
22179
 
22139
- // ../../node_modules/zod/v4/classic/in-out.js
22180
+
22140
22181
  function withChecks(side, checks) {
22141
22182
  if (!checks?.length)
22142
22183
  return side;
@@ -22166,7 +22207,7 @@ function output(schema) {
22166
22207
  });
22167
22208
  }
22168
22209
 
22169
- // ../../node_modules/zod/v4/classic/coerce.js
22210
+
22170
22211
  var coerce_exports = {};
22171
22212
  __export(coerce_exports, {
22172
22213
  bigint: () => bigint3,
@@ -22793,7 +22834,7 @@ var v2Plugin = Plugin.define({
22793
22834
  const apiKey = options.apiKey ?? env("VIRA_API_KEY");
22794
22835
  const machine = isOpenCodeMachineCredential(options, apiKey);
22795
22836
  const allowInsecureLocalhost = options.allowInsecureLocalhost ?? env("VIRA_ALLOW_INSECURE_LOCALHOST") === "true";
22796
- const client = new ViraClient({ baseUrl: required3(apiUrl, "VIRA_HOST_API_URL_REQUIRED"), apiKey, apiCredentialProvider: options.apiCredentialProvider ?? options.accessTokenProvider, allowInsecureLocalhost, organizationUnitId: options.organizationUnitId ?? env("VIRA_ORGANIZATION_UNIT_ID") });
22837
+ const client = new ViraClient({ baseUrl: required3(apiUrl, "VIRA_HOST_API_URL_REQUIRED"), apiKey, apiCredentialProvider: options.apiCredentialProvider ?? options.accessTokenProvider, transportObserver: options.transportObserver, allowInsecureLocalhost, organizationUnitId: options.organizationUnitId ?? env("VIRA_ORGANIZATION_UNIT_ID") });
22797
22838
  let scope;
22798
22839
  try {
22799
22840
  scope = await resolveOpenCodeCredentialScope(client, options, machine);
@@ -23137,7 +23178,7 @@ var v1Runtime = async (options) => {
23137
23178
  const machine = isOpenCodeMachineCredential(options, options.apiKey ?? env("VIRA_API_KEY"));
23138
23179
  const configuredTimeout = Number(options.timeoutMs ?? env("VIRA_HOST_TIMEOUT_MS") ?? 3e4);
23139
23180
  const timeoutMs = Number.isFinite(configuredTimeout) ? configuredTimeout : 3e4;
23140
- const client = new ViraClient({ baseUrl: required3(options.apiUrl ?? env("VIRA_CONTROL_URL") ?? env("VIRA_API_URL"), "VIRA_HOST_API_URL_REQUIRED"), apiKey: options.apiKey ?? env("VIRA_API_KEY"), apiCredentialProvider: options.apiCredentialProvider ?? options.accessTokenProvider, timeoutMs, allowInsecureLocalhost: options.allowInsecureLocalhost ?? env("VIRA_ALLOW_INSECURE_LOCALHOST") === "true", organizationUnitId: options.organizationUnitId ?? env("VIRA_ORGANIZATION_UNIT_ID") });
23181
+ const client = new ViraClient({ baseUrl: required3(options.apiUrl ?? env("VIRA_CONTROL_URL") ?? env("VIRA_API_URL"), "VIRA_HOST_API_URL_REQUIRED"), apiKey: options.apiKey ?? env("VIRA_API_KEY"), apiCredentialProvider: options.apiCredentialProvider ?? options.accessTokenProvider, transportObserver: options.transportObserver, timeoutMs, allowInsecureLocalhost: options.allowInsecureLocalhost ?? env("VIRA_ALLOW_INSECURE_LOCALHOST") === "true", organizationUnitId: options.organizationUnitId ?? env("VIRA_ORGANIZATION_UNIT_ID") });
23141
23182
  let scope;
23142
23183
  try {
23143
23184
  scope = await resolveOpenCodeCredentialScope(client, options, machine);