@ariestools/aries-chain-serve 0.1.22 → 0.2.0

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/bin/chainServer.mjs +192 -249
  2. package/package.json +13 -14
@@ -18,7 +18,7 @@ var __exportAll = (all, no_symbols) => {
18
18
  return target;
19
19
  };
20
20
  //#endregion
21
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/util.js
21
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
22
22
  function getEnumValues(entries) {
23
23
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
24
24
  return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
@@ -433,7 +433,6 @@ function members(proto, table) {
433
433
  });
434
434
  else defineBound(proto, key, desc.value);
435
435
  }
436
- for (const sym of Object.getOwnPropertySymbols(table)) defineBound(proto, sym, table[sym]);
437
436
  }
438
437
  /** Shadows a prototype member with an own value, so a getter that builds from the instance runs once. */
439
438
  function own(inst, key, value, enumerable = true) {
@@ -574,7 +573,7 @@ function constantCatch(value) {
574
573
  return fn;
575
574
  }
576
575
  //#endregion
577
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/core.js
576
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/core.js
578
577
  var _a$1;
579
578
  const _zodDesc = {
580
579
  value: void 0,
@@ -619,8 +618,7 @@ function $constructor(name, initializer, proto, params) {
619
618
  } finally {
620
619
  _zodDesc.value = void 0;
621
620
  }
622
- }
623
- if (inst._zod.traits.has(name)) return;
621
+ } else if (inst._zod.traits.has(name)) return;
624
622
  inst._zod.traits.add(name);
625
623
  initializer(inst, def);
626
624
  if (initialized) {
@@ -681,7 +679,7 @@ function config(newConfig) {
681
679
  return globalConfig;
682
680
  }
683
681
  //#endregion
684
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/errors.js
682
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/errors.js
685
683
  function _getMessage() {
686
684
  const internals = this._zod;
687
685
  internals.message ?? (internals.message = JSON.stringify(internals.def, jsonStringifyReplacer, 2));
@@ -797,7 +795,7 @@ function formatError$1(error, mapper = (issue) => issue.message) {
797
795
  return fieldErrors;
798
796
  }
799
797
  //#endregion
800
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/parse.js
798
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/parse.js
801
799
  function finalizeParams(callee, params) {
802
800
  return {
803
801
  callee: params?.callee ?? callee,
@@ -1004,7 +1002,7 @@ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
1004
1002
  return _safeParseAsync(_Err)(schema, value, _ctx);
1005
1003
  };
1006
1004
  //#endregion
1007
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/regexes.js
1005
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js
1008
1006
  var regexes_exports = /* @__PURE__ */ __exportAll({
1009
1007
  anyString: () => anyString,
1010
1008
  base64: () => base64$1,
@@ -1017,6 +1015,7 @@ var regexes_exports = /* @__PURE__ */ __exportAll({
1017
1015
  creditCard: () => creditCard$1,
1018
1016
  cuid: () => cuid$1,
1019
1017
  cuid2: () => cuid2$1,
1018
+ currencyCode: () => currencyCode$1,
1020
1019
  date: () => date$2,
1021
1020
  datetime: () => datetime$1,
1022
1021
  domain: () => domain,
@@ -1129,6 +1128,7 @@ const domain = /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+
1129
1128
  const httpProtocol = /^https?$/;
1130
1129
  const e164$1 = /^\+[1-9]\d{6,14}$/;
1131
1130
  const creditCard$1 = /^\d(?:[ -]?\d){11,18}$/;
1131
+ const currencyCode$1 = /^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/;
1132
1132
  const iban$1 = /^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/;
1133
1133
  const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
1134
1134
  /** Anchors a pattern source. The interpolation lives here rather than at the call site because
@@ -1191,7 +1191,7 @@ const sha512_hex = /^[0-9a-fA-F]{128}$/;
1191
1191
  const sha512_base64 = /*@__PURE__*/ fixedBase64(86, "==");
1192
1192
  const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);
1193
1193
  //#endregion
1194
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/checks.js
1194
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/checks.js
1195
1195
  const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
1196
1196
  var _a;
1197
1197
  inst._zod ?? (inst._zod = {});
@@ -1586,6 +1586,38 @@ const $ZodCheckProperty = /*@__PURE__*/ $constructor("$ZodCheckProperty", (inst,
1586
1586
  handleCheckPropertyResult(result, payload, def.property);
1587
1587
  };
1588
1588
  });
1589
+ const $ZodCheckProperties = /*@__PURE__*/ $constructor("$ZodCheckProperties", (inst, def) => {
1590
+ $ZodCheck.init(inst, def);
1591
+ hide(inst, Symbol.iterator, function* () {
1592
+ yield inst;
1593
+ });
1594
+ let entries;
1595
+ inst._zod.check = (payload) => {
1596
+ if (payload.value == null) {
1597
+ payload.issues.push({
1598
+ expected: "object",
1599
+ code: "invalid_type",
1600
+ input: payload.value,
1601
+ inst
1602
+ });
1603
+ return;
1604
+ }
1605
+ entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
1606
+ const input = payload.value;
1607
+ let proms;
1608
+ for (const [key, schema] of entries) {
1609
+ const result = schema._zod.run({
1610
+ value: input[key],
1611
+ issues: []
1612
+ }, {});
1613
+ if (result instanceof Promise) {
1614
+ proms ?? (proms = []);
1615
+ proms.push(result.then((result) => handleCheckPropertyResult(result, payload, key)));
1616
+ } else handleCheckPropertyResult(result, payload, key);
1617
+ }
1618
+ if (proms) return Promise.all(proms).then(() => void 0);
1619
+ };
1620
+ });
1589
1621
  const $ZodCheckMimeType = /*@__PURE__*/ $constructor("$ZodCheckMimeType", (inst, def) => {
1590
1622
  $ZodCheck.init(inst, def);
1591
1623
  const mimeSet = new Set(def.mime);
@@ -1607,7 +1639,7 @@ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (ins
1607
1639
  };
1608
1640
  });
1609
1641
  //#endregion
1610
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/doc.js
1642
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/doc.js
1611
1643
  var Doc = class {
1612
1644
  constructor(args = [], closed = {}) {
1613
1645
  this.content = [];
@@ -1641,14 +1673,14 @@ var Doc = class {
1641
1673
  }
1642
1674
  };
1643
1675
  //#endregion
1644
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/versions.js
1676
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.js
1645
1677
  const version = {
1646
1678
  major: 4,
1647
1679
  minor: 6,
1648
- patch: 2
1680
+ patch: 5
1649
1681
  };
1650
1682
  //#endregion
1651
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/schemas.js
1683
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/schemas.js
1652
1684
  const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
1653
1685
  var _a;
1654
1686
  inst ?? (inst = {});
@@ -1808,10 +1840,27 @@ const $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
1808
1840
  def.pattern ?? (def.pattern = email$1);
1809
1841
  $ZodStringFormat.init(inst, def);
1810
1842
  });
1811
- /** Parses a URL for `$ZodURL`, applying the one guard the URL constructor cannot express. Returns the parsed URL, or a code naming the stage that rejected it — the runtime needs that distinction to pick an issue note, and compiled code only needs to know it is not a URL. */
1843
+ function canParseURL(input) {
1844
+ try {
1845
+ if (typeof URL !== "undefined" && typeof URL.canParse === "function") return URL.canParse(input);
1846
+ new URL(input);
1847
+ return true;
1848
+ } catch {
1849
+ return false;
1850
+ }
1851
+ }
1852
+ function validateURL(trimmed, def) {
1853
+ if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) || 2;
1854
+ return parseURLObject(trimmed, def);
1855
+ }
1856
+ /** Parses a URL while preserving the non-normalizing HTTP guard. */
1812
1857
  function parseURLObject(trimmed, def) {
1813
1858
  if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) return 1;
1814
1859
  try {
1860
+ if (typeof URL !== "undefined") {
1861
+ const URLStatic = URL;
1862
+ if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? 2;
1863
+ }
1815
1864
  return new URL(trimmed);
1816
1865
  } catch {
1817
1866
  return 2;
@@ -1835,7 +1884,7 @@ const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
1835
1884
  inst._zod.check = (payload) => {
1836
1885
  try {
1837
1886
  const trimmed = payload.value.trim();
1838
- const url = parseURLObject(trimmed, def);
1887
+ const url = validateURL(trimmed, def);
1839
1888
  if (url === 1) {
1840
1889
  payload.issues.push({
1841
1890
  code: "invalid_format",
@@ -1857,6 +1906,10 @@ const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
1857
1906
  });
1858
1907
  return;
1859
1908
  }
1909
+ if (url === true) {
1910
+ payload.value = stripTabAndNewline(trimmed);
1911
+ return;
1912
+ }
1860
1913
  if (def.hostname && !urlHostnameOk(url, def.hostname)) payload.issues.push({
1861
1914
  code: "invalid_format",
1862
1915
  format: "url",
@@ -1946,12 +1999,7 @@ const $ZodIPv4 = /*@__PURE__*/ $constructor("$ZodIPv4", (inst, def) => {
1946
1999
  const ipv6Alphabet = /^[0-9a-fA-F:.]+$/;
1947
2000
  function isValidIPv6(value) {
1948
2001
  if (!ipv6Alphabet.test(value)) return false;
1949
- try {
1950
- new URL(`http://[${value}]`);
1951
- return true;
1952
- } catch {
1953
- return false;
1954
- }
2002
+ return canParseURL(`http://[${value}]`);
1955
2003
  }
1956
2004
  const $ZodIPv6 = /*@__PURE__*/ $constructor("$ZodIPv6", (inst, def) => {
1957
2005
  def.pattern ?? (def.pattern = ipv6$1);
@@ -3773,67 +3821,8 @@ function handleRefineResult(result, payload, input, inst) {
3773
3821
  payload.issues.push(issue(_iss));
3774
3822
  }
3775
3823
  }
3776
- function handlePropertiesResult(result, payload, key) {
3777
- if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
3778
- }
3779
- const $ZodProperties = /*@__PURE__*/ $constructor("$ZodProperties", (inst, def) => {
3780
- $ZodType.init(inst, def);
3781
- $ZodCheck.init(inst, def);
3782
- const memo = globalConfig.memoizer;
3783
- memo?.attach(inst);
3784
- let entries;
3785
- const runShape = (payload, ctx) => {
3786
- entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));
3787
- const input = payload.value;
3788
- let proms;
3789
- for (const [key, schema] of entries) {
3790
- const result = schema._zod.run({
3791
- value: input[key],
3792
- issues: []
3793
- }, ctx);
3794
- if (result instanceof Promise) {
3795
- proms ?? (proms = []);
3796
- proms.push(result.then((result) => handlePropertiesResult(result, payload, key)));
3797
- } else handlePropertiesResult(result, payload, key);
3798
- }
3799
- if (proms) return Promise.all(proms).then(() => void 0);
3800
- };
3801
- inst._zod.parse = (payload, ctx) => {
3802
- const input = payload.value;
3803
- if (input === null || typeof input !== "object" && typeof input !== "function") {
3804
- payload.issues.push({
3805
- expected: "object",
3806
- code: "invalid_type",
3807
- input,
3808
- inst
3809
- });
3810
- return payload;
3811
- }
3812
- if (ctx.direction === "backward") ctx = {
3813
- ...ctx,
3814
- direction: "forward"
3815
- };
3816
- if (memo) memo.alloc(inst, payload, input, ctx);
3817
- const result = runShape(payload, ctx);
3818
- return result instanceof Promise ? result.then(() => payload) : payload;
3819
- };
3820
- inst._zod.check = (payload) => {
3821
- if (payload.value == null) {
3822
- payload.issues.push({
3823
- expected: "object",
3824
- code: "invalid_type",
3825
- input: payload.value,
3826
- inst
3827
- });
3828
- return;
3829
- }
3830
- return runShape(payload, {});
3831
- };
3832
- }, { *[Symbol.iterator]() {
3833
- yield this;
3834
- } });
3835
3824
  //#endregion
3836
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/memoizer.js
3825
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/memoizer.js
3837
3826
  var $ZodCyclicError = class extends Error {
3838
3827
  constructor() {
3839
3828
  super(`Cannot parse a reference cycle that closes through a transform`);
@@ -3844,7 +3833,7 @@ var $ZodCyclicError = class extends Error {
3844
3833
  const STATE = "~memo";
3845
3834
  const NO_ISSUES = [];
3846
3835
  function isRef(value) {
3847
- return value !== null && (typeof value === "object" || typeof value === "function");
3836
+ return value !== null && typeof value === "object";
3848
3837
  }
3849
3838
  function cloneIssues(issues) {
3850
3839
  return issues.map((iss) => iss.path ? {
@@ -3891,9 +3880,6 @@ function isRecursive(inst, stack, resolve) {
3891
3880
  check(def.catchall);
3892
3881
  break;
3893
3882
  }
3894
- case "properties":
3895
- merge(shape(def.shape, false));
3896
- break;
3897
3883
  case "array":
3898
3884
  check(def.element);
3899
3885
  break;
@@ -4089,7 +4075,7 @@ function isBackEdge(ctx, value) {
4089
4075
  return backEdges !== void 0 && isRef(value) && backEdges.has(value);
4090
4076
  }
4091
4077
  //#endregion
4092
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/locales/en.js
4078
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/en.js
4093
4079
  const error = () => {
4094
4080
  const Sizable = {
4095
4081
  string: {
@@ -4144,6 +4130,7 @@ const error = () => {
4144
4130
  base64url: "base64url-encoded string",
4145
4131
  json_string: "JSON string",
4146
4132
  e164: "E.164 number",
4133
+ currency_code: "currency code",
4147
4134
  credit_card: "credit card number",
4148
4135
  iban: "IBAN",
4149
4136
  jwt: "JWT",
@@ -4196,7 +4183,7 @@ function en_default() {
4196
4183
  return { localeError: error() };
4197
4184
  }
4198
4185
  //#endregion
4199
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/registries.js
4186
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/registries.js
4200
4187
  var _a;
4201
4188
  var $ZodRegistry = class {
4202
4189
  constructor() {
@@ -4243,13 +4230,17 @@ function registry() {
4243
4230
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
4244
4231
  const globalRegistry = globalThis.__zod_globalRegistry;
4245
4232
  //#endregion
4246
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/api.js
4233
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.js
4234
+ function snapshotChecks(def) {
4235
+ if (def.checks) def.checks = [...def.checks];
4236
+ return def;
4237
+ }
4247
4238
  // @__NO_SIDE_EFFECTS__
4248
4239
  function _string(Class, params) {
4249
- return new Class({
4240
+ return new Class(snapshotChecks({
4250
4241
  type: "string",
4251
4242
  ...normalizeParams(params)
4252
- });
4243
+ }));
4253
4244
  }
4254
4245
  // @__NO_SIDE_EFFECTS__
4255
4246
  function _email(Class, params) {
@@ -4551,11 +4542,11 @@ function _isoDuration(Class, params) {
4551
4542
  }
4552
4543
  // @__NO_SIDE_EFFECTS__
4553
4544
  function _number(Class, params) {
4554
- return new Class({
4545
+ return new Class(snapshotChecks({
4555
4546
  type: "number",
4556
4547
  checks: [],
4557
4548
  ...normalizeParams(params)
4558
- });
4549
+ }));
4559
4550
  }
4560
4551
  // @__NO_SIDE_EFFECTS__
4561
4552
  function _int(Class, params) {
@@ -4868,9 +4859,8 @@ function _property(property, schema, params) {
4868
4859
  });
4869
4860
  }
4870
4861
  // @__NO_SIDE_EFFECTS__
4871
- function _properties(Class, shape, params) {
4872
- return new Class({
4873
- type: "properties",
4862
+ function _properties(shape, params) {
4863
+ return new $ZodCheckProperties({
4874
4864
  check: "properties",
4875
4865
  shape,
4876
4866
  ...normalizeParams(params)
@@ -5079,7 +5069,7 @@ function _stringFormat(Class, format, fnOrRegex, _params = {}) {
5079
5069
  return new Class(def);
5080
5070
  }
5081
5071
  //#endregion
5082
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/to-json-schema.js
5072
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.js
5083
5073
  function assignProps(target, ...sources) {
5084
5074
  for (const source of sources) for (const key of Reflect.ownKeys(source)) if (Object.prototype.propertyIsEnumerable.call(source, key)) assignProp(target, key, source[key]);
5085
5075
  return target;
@@ -5523,7 +5513,7 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
5523
5513
  return finalize(ctx, schema);
5524
5514
  };
5525
5515
  //#endregion
5526
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/core/json-schema-processors.js
5516
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.js
5527
5517
  const narrowMin = (agg, key, value) => {
5528
5518
  if (agg[key] === void 0 || value > agg[key]) agg[key] = value;
5529
5519
  };
@@ -5793,13 +5783,12 @@ const objectProcessor = (schema, ctx, _json, params) => {
5793
5783
  key
5794
5784
  ]
5795
5785
  }));
5796
- const allKeys = new Set(Object.keys(shape));
5797
- const requiredKeys = new Set([...allKeys].filter((key) => {
5786
+ const requiredKeys = [];
5787
+ for (const key of Object.keys(shape)) {
5798
5788
  const field = def.shape[key];
5799
- if (ctx.io === "input") return inputOptin(field) === void 0;
5800
- else return field._zod.optout === void 0;
5801
- }));
5802
- if (requiredKeys.size > 0) json.required = Array.from(requiredKeys);
5789
+ if (ctx.io === "input" ? inputOptin(field) === void 0 : field._zod.optout === void 0) requiredKeys.push(key);
5790
+ }
5791
+ if (requiredKeys.length > 0) json.required = requiredKeys;
5803
5792
  if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
5804
5793
  else if (!def.catchall) {
5805
5794
  if (ctx.io === "output") json.additionalProperties = false;
@@ -6093,7 +6082,7 @@ const lazyProcessor = (schema, ctx, _json, params) => {
6093
6082
  seen.ref = innerType;
6094
6083
  };
6095
6084
  //#endregion
6096
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/classic/checks.js
6085
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/checks.js
6097
6086
  var checks_exports = /* @__PURE__ */ __exportAll({
6098
6087
  endsWith: () => _endsWith,
6099
6088
  gt: () => _gt,
@@ -6115,6 +6104,7 @@ var checks_exports = /* @__PURE__ */ __exportAll({
6115
6104
  normalize: () => _normalize,
6116
6105
  overwrite: () => _overwrite,
6117
6106
  positive: () => _positive,
6107
+ properties: () => _properties,
6118
6108
  property: () => _property,
6119
6109
  regex: () => _regex,
6120
6110
  size: () => _size,
@@ -6126,7 +6116,7 @@ var checks_exports = /* @__PURE__ */ __exportAll({
6126
6116
  uppercase: () => _uppercase
6127
6117
  });
6128
6118
  //#endregion
6129
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/classic/errors.js
6119
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.js
6130
6120
  const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
6131
6121
  function _lazyMethod(proto, key, make) {
6132
6122
  Object.defineProperty(proto, key, {
@@ -6176,7 +6166,7 @@ const initializer = (inst, issues) => {
6176
6166
  };
6177
6167
  const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
6178
6168
  //#endregion
6179
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/classic/parse.js
6169
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/parse.js
6180
6170
  const parse = /* @__PURE__ */ _parse(ZodRealError);
6181
6171
  const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
6182
6172
  const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
@@ -6190,7 +6180,7 @@ const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
6190
6180
  const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
6191
6181
  const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
6192
6182
  //#endregion
6193
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/classic/schemas.js
6183
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
6194
6184
  var schemas_exports = /* @__PURE__ */ __exportAll({
6195
6185
  ZodAny: () => ZodAny,
6196
6186
  ZodArray: () => ZodArray,
@@ -6248,7 +6238,6 @@ var schemas_exports = /* @__PURE__ */ __exportAll({
6248
6238
  ZodPrefault: () => ZodPrefault,
6249
6239
  ZodPreprocess: () => ZodPreprocess,
6250
6240
  ZodPromise: () => ZodPromise,
6251
- ZodProperties: () => ZodProperties,
6252
6241
  ZodReadonly: () => ZodReadonly,
6253
6242
  ZodRecord: () => ZodRecord,
6254
6243
  ZodSet: () => ZodSet,
@@ -6286,6 +6275,7 @@ var schemas_exports = /* @__PURE__ */ __exportAll({
6286
6275
  creditCard: () => creditCard,
6287
6276
  cuid: () => cuid,
6288
6277
  cuid2: () => cuid2,
6278
+ currencyCode: () => currencyCode,
6289
6279
  custom: () => custom,
6290
6280
  date: () => date$1,
6291
6281
  describe: () => describe,
@@ -6340,7 +6330,6 @@ var schemas_exports = /* @__PURE__ */ __exportAll({
6340
6330
  prefault: () => prefault,
6341
6331
  preprocess: () => preprocess,
6342
6332
  promise: () => promise,
6343
- properties: () => properties,
6344
6333
  readonly: () => readonly,
6345
6334
  record: () => record$1,
6346
6335
  refine: () => refine$1,
@@ -6902,6 +6891,9 @@ function hostname(_params) {
6902
6891
  function hex(_params) {
6903
6892
  return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "hex", hex$1, _params);
6904
6893
  }
6894
+ function currencyCode(_params) {
6895
+ return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "currency_code", currencyCode$1, _params);
6896
+ }
6905
6897
  function hash(alg, params) {
6906
6898
  const format = `${alg}_${params?.enc ?? "hex"}`;
6907
6899
  const regex = regexes_exports[format];
@@ -7739,14 +7731,6 @@ const ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
7739
7731
  ZodType.init(inst, def);
7740
7732
  inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
7741
7733
  });
7742
- const ZodProperties = /*@__PURE__*/ $constructor("ZodProperties", (inst, def) => {
7743
- _ensureDefaultMemoizer();
7744
- $ZodProperties.init(inst, def);
7745
- ZodType.init(inst, def);
7746
- });
7747
- function properties(shape, params) {
7748
- return /* @__PURE__ */ _properties(ZodProperties, shape, params);
7749
- }
7750
7734
  function check(fn) {
7751
7735
  const ch = new $ZodCheck({ check: "custom" });
7752
7736
  ch._zod.check = fn;
@@ -7766,7 +7750,7 @@ const meta = meta$1;
7766
7750
  const ZodInstanceOf = /*@__PURE__*/ $constructor("ZodInstanceOf", (inst, def) => {
7767
7751
  ZodCustom.init(inst, def);
7768
7752
  }, { properties(shape, params) {
7769
- return this.check(properties(shape, params));
7753
+ return this.check(/* @__PURE__ */ _properties(shape, params));
7770
7754
  } });
7771
7755
  function _instanceof(cls, params = {}) {
7772
7756
  const inst = new ZodInstanceOf({
@@ -7814,7 +7798,7 @@ function preprocess(fn, schema) {
7814
7798
  });
7815
7799
  }
7816
7800
  //#endregion
7817
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/classic/compat.js
7801
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/compat.js
7818
7802
  /** @deprecated Do not use. Stub definition, only included for zod-to-json-schema compatibility. */
7819
7803
  var ZodFirstPartyTypeKind;
7820
7804
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
@@ -7823,10 +7807,14 @@ ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
7823
7807
  ...checks_exports
7824
7808
  });
7825
7809
  //#endregion
7826
- //#region ../../node_modules/.pnpm/@ariestools+provider-model@1.3.0_zod@4.6.2/node_modules/@ariestools/provider-model/dist/neutral/index.mjs
7810
+ //#region ../../node_modules/.pnpm/@ariestools+provider-model@2.0.0_zod@4.6.5/node_modules/@ariestools/provider-model/dist/neutral/index.mjs
7827
7811
  var ConnectionConfigZod = looseObject({ type: string$1().min(1) });
7828
7812
  var ConnectionsConfigZod = record$1(string$1(), ConnectionConfigZod).default({});
7829
- strictObject({ dependencies: array$1(string$1().min(1)).default([]) });
7813
+ var ProviderMonikerZod = string$1().min(1);
7814
+ strictObject({
7815
+ dependencies: array$1(ProviderMonikerZod).default([]),
7816
+ optionalDependencies: array$1(ProviderMonikerZod).optional()
7817
+ });
7830
7818
  var ProviderBindingConfigZod = strictObject({
7831
7819
  connection: string$1().min(1).optional(),
7832
7820
  options: record$1(string$1(), unknown()).optional(),
@@ -7837,7 +7825,7 @@ var ProviderConfigFieldsZod = object({
7837
7825
  providerBindings: record$1(string$1(), ProviderBindingConfigZod).default({})
7838
7826
  });
7839
7827
  //#endregion
7840
- //#region ../../node_modules/.pnpm/zod@4.6.2/node_modules/zod/v4/mini/schemas.js
7828
+ //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/mini/schemas.js
7841
7829
  const ZodMiniType = /*@__PURE__*/ $constructor("ZodMiniType", (inst, def) => {
7842
7830
  if (!inst._zod) throw new Error("Uninitialized schema in ZodMiniType.");
7843
7831
  $ZodType.init(inst, def);
@@ -9433,19 +9421,19 @@ const API_NAME = "trace";
9433
9421
  }
9434
9422
  }).getInstance();
9435
9423
  //#endregion
9436
- //#region ../../node_modules/.pnpm/@ariestools+telemetry@8.3.0_@opentelemetry+api@1.9.1/node_modules/@ariestools/telemetry/dist/neutral/index.mjs
9437
- var color$1 = (open, close = 39) => {
9424
+ //#region ../../node_modules/.pnpm/@ariestools+telemetry@9.0.1_@opentelemetry+api@1.9.1/node_modules/@ariestools/telemetry/dist/neutral/index.mjs
9425
+ var color = (open, close = 39) => {
9438
9426
  return (value) => `\x1B[${open}m${value}\x1B[${close}m`;
9439
9427
  };
9440
- var logColors$1 = {
9441
- green: color$1(32),
9442
- grey: color$1(90),
9443
- magenta: color$1(35),
9444
- red: color$1(31),
9445
- white: color$1(37),
9446
- yellow: color$1(33)
9428
+ var logColors = {
9429
+ green: color(32),
9430
+ grey: color(90),
9431
+ magenta: color(35),
9432
+ red: color(31),
9433
+ white: color(37),
9434
+ yellow: color(33)
9447
9435
  };
9448
- function spanDurationInMillis$1(span2) {
9436
+ function spanDurationInMillis(span2) {
9449
9437
  return span2.duration[0] * 1e3 + span2.duration[1] / 1e6;
9450
9438
  }
9451
9439
  (class _XyConsoleSpanExporterImplementation {
@@ -9459,11 +9447,11 @@ function spanDurationInMillis$1(span2) {
9459
9447
  ];
9460
9448
  /** Chalk color functions corresponding to each log level. */
9461
9449
  static logLevelToChalkColor = [
9462
- logColors$1.grey,
9463
- logColors$1.white,
9464
- logColors$1.green,
9465
- logColors$1.yellow,
9466
- logColors$1.red
9450
+ logColors.grey,
9451
+ logColors.white,
9452
+ logColors.green,
9453
+ logColors.yellow,
9454
+ logColors.red
9467
9455
  ];
9468
9456
  logger;
9469
9457
  _logLevel;
@@ -9479,8 +9467,8 @@ function spanDurationInMillis$1(span2) {
9479
9467
  for (const span2 of spans) {
9480
9468
  const spanLevel = this.spanLevel(span2);
9481
9469
  if (spanLevel < this.logLevel) continue;
9482
- const duration = spanDurationInMillis$1(span2);
9483
- this.logger.log(logColors$1.grey([
9470
+ const duration = spanDurationInMillis(span2);
9471
+ this.logger.log(logColors.grey([
9484
9472
  `Span [${span2.name}]`,
9485
9473
  this.logColor(spanLevel)(`${duration}ms`),
9486
9474
  `TraceId: ${span2.spanContext().traceId}`
@@ -9497,7 +9485,7 @@ function spanDurationInMillis$1(span2) {
9497
9485
  * @returns A chalk color function.
9498
9486
  */
9499
9487
  logColor(level) {
9500
- return _XyConsoleSpanExporterImplementation.logLevelToChalkColor[level] ?? logColors$1.magenta;
9488
+ return _XyConsoleSpanExporterImplementation.logLevelToChalkColor[level] ?? logColors.magenta;
9501
9489
  }
9502
9490
  shutdown() {
9503
9491
  return Promise.resolve();
@@ -9509,7 +9497,7 @@ function spanDurationInMillis$1(span2) {
9509
9497
  */
9510
9498
  spanLevel(span2) {
9511
9499
  let logLevel = 0;
9512
- const duration = spanDurationInMillis$1(span2);
9500
+ const duration = spanDurationInMillis(span2);
9513
9501
  for (let x = _XyConsoleSpanExporterImplementation.durationToLogLevel.length - 1; x >= 0; x--) if (duration > _XyConsoleSpanExporterImplementation.durationToLogLevel[x]) {
9514
9502
  logLevel = x;
9515
9503
  break;
@@ -9518,7 +9506,7 @@ function spanDurationInMillis$1(span2) {
9518
9506
  }
9519
9507
  });
9520
9508
  //#endregion
9521
- //#region ../../node_modules/.pnpm/@ariestools+sdk@8.3.0_@opentelemetry+api@1.9.1_zod@4.6.2/node_modules/@ariestools/sdk/dist/node/index.mjs
9509
+ //#region ../../node_modules/.pnpm/@ariestools+sdk@9.0.1_@opentelemetry+api@1.9.1_zod@4.6.5/node_modules/@ariestools/sdk/dist/node/index.mjs
9522
9510
  var __defProp$1 = Object.defineProperty;
9523
9511
  var __getOwnPropDesc$1 = Object.getOwnPropertyDescriptor;
9524
9512
  var __decorateClass$1 = (decorators, target, key, kind) => {
@@ -9681,8 +9669,15 @@ function abortError(signal) {
9681
9669
  cause: reason
9682
9670
  });
9683
9671
  }
9684
- function readChunk(reader, signal) {
9685
- if (signal == null) return reader.read();
9672
+ function responseTooLargeError(response) {
9673
+ return new FetchError("Response body exceeds maxResponseBytes", {
9674
+ type: "response-too-large",
9675
+ status: response.status,
9676
+ statusText: response.statusText
9677
+ });
9678
+ }
9679
+ function unlessAborted(start, signal) {
9680
+ if (signal == null) return start();
9686
9681
  return new Promise((resolve, reject) => {
9687
9682
  let settled = false;
9688
9683
  const finish = (outcome) => {
@@ -9699,7 +9694,7 @@ function readChunk(reader, signal) {
9699
9694
  return;
9700
9695
  }
9701
9696
  try {
9702
- reader.read().then((value) => signal.aborted ? onAbort() : finish({ value })).catch((error) => finish({ error }));
9697
+ start().then((value) => signal.aborted ? onAbort() : finish({ value })).catch((error) => finish({ error }));
9703
9698
  } catch (error) {
9704
9699
  finish({ error });
9705
9700
  }
@@ -9718,7 +9713,7 @@ async function readStreamText(reader, maxResponseBytes, signal, response) {
9718
9713
  let failure;
9719
9714
  try {
9720
9715
  while (true) {
9721
- const result = await readChunk(reader, signal);
9716
+ const result = await unlessAborted(() => reader.read(), signal);
9722
9717
  if (signal?.aborted === true) throw abortError(signal);
9723
9718
  if (result.done) {
9724
9719
  parts.push(decoder.decode());
@@ -9728,11 +9723,7 @@ async function readStreamText(reader, maxResponseBytes, signal, response) {
9728
9723
  const chunk = result.value;
9729
9724
  if (!ArrayBuffer.isView(chunk) || Object.prototype.toString.call(chunk) !== "[object Uint8Array]") throw new TypeError("Response body chunks must be Uint8Array values");
9730
9725
  if (maxResponseBytes !== void 0) {
9731
- if (chunk.byteLength > maxResponseBytes - bytes) throw new FetchError("Response body exceeds maxResponseBytes", {
9732
- type: "response-too-large",
9733
- status: response.status,
9734
- statusText: response.statusText
9735
- });
9726
+ if (chunk.byteLength > maxResponseBytes - bytes) throw responseTooLargeError(response);
9736
9727
  bytes += chunk.byteLength;
9737
9728
  }
9738
9729
  const text = decoder.decode(chunk, { stream: true });
@@ -9746,6 +9737,17 @@ async function readStreamText(reader, maxResponseBytes, signal, response) {
9746
9737
  reader.releaseLock();
9747
9738
  }
9748
9739
  }
9740
+ function isReadableStream(body) {
9741
+ return typeof body === "object" && body !== null && "getReader" in body && typeof body.getReader === "function";
9742
+ }
9743
+ async function readBufferedText(response, maxResponseBytes, signal) {
9744
+ const text = await unlessAborted(() => response.text(), signal);
9745
+ if (signal?.aborted === true) throw abortError(signal);
9746
+ if (maxResponseBytes !== void 0) {
9747
+ if (new TextEncoder().encode(text).byteLength > maxResponseBytes) throw responseTooLargeError(response);
9748
+ }
9749
+ return text;
9750
+ }
9749
9751
  async function readResponseText(response, options = {}) {
9750
9752
  const { maxResponseBytes, signal } = options;
9751
9753
  validateMaxResponseBytes(maxResponseBytes);
@@ -9756,7 +9758,8 @@ async function readResponseText(response, options = {}) {
9756
9758
  if (signal?.aborted === true) throw abortError(signal);
9757
9759
  return "";
9758
9760
  }
9759
- return await readStreamText(body.getReader(), maxResponseBytes, signal, response);
9761
+ if (isReadableStream(body)) return await readStreamText(body.getReader(), maxResponseBytes, signal, response);
9762
+ return await readBufferedText(response, maxResponseBytes, signal);
9760
9763
  }
9761
9764
  function contextualizeReadError(error, context, options) {
9762
9765
  const failure = toFetchError(error, context);
@@ -11071,8 +11074,6 @@ var AbstractCreatableWithFactory = class extends AbstractCreatable {
11071
11074
  }
11072
11075
  };
11073
11076
  AbstractCreatableWithFactory = __decorateClass$1([creatable()], AbstractCreatableWithFactory);
11074
- Math.PI / 180;
11075
- 180 / Math.PI;
11076
11077
  var AsTypeFactory = {
11077
11078
  create: (typeCheck) => {
11078
11079
  const func = (value, assertOrConfig, config) => {
@@ -11115,92 +11116,7 @@ var JsonValueZod = /* @__PURE__ */ _lazy(() => /* @__PURE__ */ union([
11115
11116
  ]));
11116
11117
  globalThis.crypto?.subtle;
11117
11118
  //#endregion
11118
- //#region ../../node_modules/.pnpm/@ariestools+telemetry@8.1.9_@opentelemetry+api@1.9.1/node_modules/@ariestools/telemetry/dist/neutral/index.mjs
11119
- var color = (open, close = 39) => {
11120
- return (value) => `\x1B[${open}m${value}\x1B[${close}m`;
11121
- };
11122
- var logColors = {
11123
- green: color(32),
11124
- grey: color(90),
11125
- magenta: color(35),
11126
- red: color(31),
11127
- white: color(37),
11128
- yellow: color(33)
11129
- };
11130
- function spanDurationInMillis(span2) {
11131
- return span2.duration[0] * 1e3 + span2.duration[1] / 1e6;
11132
- }
11133
- (class _XyConsoleSpanExporterImplementation {
11134
- /** Duration thresholds (in ms) that map to increasing log levels. */
11135
- static durationToLogLevel = [
11136
- 0,
11137
- 1,
11138
- 10,
11139
- 100,
11140
- 1e3
11141
- ];
11142
- /** Chalk color functions corresponding to each log level. */
11143
- static logLevelToChalkColor = [
11144
- logColors.grey,
11145
- logColors.white,
11146
- logColors.green,
11147
- logColors.yellow,
11148
- logColors.red
11149
- ];
11150
- logger;
11151
- _logLevel;
11152
- constructor(logLevel = 0, logger = console) {
11153
- this._logLevel = logLevel;
11154
- this.logger = logger;
11155
- }
11156
- /** The minimum log level required for a span to be exported. */
11157
- get logLevel() {
11158
- return this._logLevel;
11159
- }
11160
- export(spans, resultCallback) {
11161
- for (const span2 of spans) {
11162
- const spanLevel = this.spanLevel(span2);
11163
- if (spanLevel < this.logLevel) continue;
11164
- const duration = spanDurationInMillis(span2);
11165
- this.logger.log(logColors.grey([
11166
- `Span [${span2.name}]`,
11167
- this.logColor(spanLevel)(`${duration}ms`),
11168
- `TraceId: ${span2.spanContext().traceId}`
11169
- ].join(", ")));
11170
- }
11171
- resultCallback?.({ code: 0 });
11172
- }
11173
- forceFlush() {
11174
- return Promise.resolve();
11175
- }
11176
- /**
11177
- * Returns the chalk color function for the given log level.
11178
- * @param level - The log level index.
11179
- * @returns A chalk color function.
11180
- */
11181
- logColor(level) {
11182
- return _XyConsoleSpanExporterImplementation.logLevelToChalkColor[level] ?? logColors.magenta;
11183
- }
11184
- shutdown() {
11185
- return Promise.resolve();
11186
- }
11187
- /**
11188
- * Determines the log level of a span based on its duration.
11189
- * @param span - The span to evaluate.
11190
- * @returns The numeric log level (index into durationToLogLevel).
11191
- */
11192
- spanLevel(span2) {
11193
- let logLevel = 0;
11194
- const duration = spanDurationInMillis(span2);
11195
- for (let x = _XyConsoleSpanExporterImplementation.durationToLogLevel.length - 1; x >= 0; x--) if (duration > _XyConsoleSpanExporterImplementation.durationToLogLevel[x]) {
11196
- logLevel = x;
11197
- break;
11198
- }
11199
- return logLevel;
11200
- }
11201
- });
11202
- //#endregion
11203
- //#region ../../node_modules/.pnpm/@ariestools+actor@1.3.0_@ariestools+sdk@8.3.0_@opentelemetry+api@1.9.1_zod@4.6.2__@opentelemetry+api@1.9.1_zod@4.6.2/node_modules/@ariestools/actor/dist/neutral/index.mjs
11119
+ //#region ../../node_modules/.pnpm/@ariestools+actor@2.0.0_@ariestools+sdk@9.0.1_@opentelemetry+api@1.9.1_zod@4.6.5__@opentelemetry+api@1.9.1_zod@4.6.5/node_modules/@ariestools/actor/dist/neutral/index.mjs
11204
11120
  var __defProp = Object.defineProperty;
11205
11121
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
11206
11122
  var __decorateClass = (decorators, target, key, kind) => {
@@ -11209,6 +11125,25 @@ var __decorateClass = (decorators, target, key, kind) => {
11209
11125
  if (kind && result) __defProp(target, key, result);
11210
11126
  return result;
11211
11127
  };
11128
+ async function traceActorLifecycle(observers, stage, actor, work) {
11129
+ const completions = [];
11130
+ for (const observer of observers) try {
11131
+ completions.push(observer(stage, actor));
11132
+ } catch {}
11133
+ const finish = (outcome) => {
11134
+ for (const complete of completions) try {
11135
+ Promise.resolve(complete(outcome)).catch(() => {});
11136
+ } catch {}
11137
+ };
11138
+ try {
11139
+ const result = await work();
11140
+ finish(result === false ? "failed" : "completed");
11141
+ return result;
11142
+ } catch (error) {
11143
+ finish("failed");
11144
+ throw error;
11145
+ }
11146
+ }
11212
11147
  function isSupervisedActor(actor) {
11213
11148
  const candidate = actor;
11214
11149
  return typeof candidate.runReadyHandler === "function" && typeof candidate.whenReady === "function" && "readyState" in actor;
@@ -11220,6 +11155,7 @@ var Orchestrator = class extends AbstractCreatable {
11220
11155
  attemptedActors = /* @__PURE__ */ new Set();
11221
11156
  inFlightStarts = /* @__PURE__ */ new Map();
11222
11157
  isTerminalShutdown = false;
11158
+ lifecycleObservers = /* @__PURE__ */ new Set();
11223
11159
  shutdownPromise;
11224
11160
  get readyState() {
11225
11161
  if (this.actors.length === 0) return "pending";
@@ -11233,6 +11169,13 @@ var Orchestrator = class extends AbstractCreatable {
11233
11169
  isShuttingDown() {
11234
11170
  return this.shuttingDown;
11235
11171
  }
11172
+ /** Observe actual lifecycle operations without changing supervision policy. */
11173
+ observeLifecycle(observer) {
11174
+ this.lifecycleObservers.add(observer);
11175
+ return () => {
11176
+ this.lifecycleObservers.delete(observer);
11177
+ };
11178
+ }
11236
11179
  /**
11237
11180
  * Registers an actor.
11238
11181
  * (We won't activate the actor until `start()` is called.)
@@ -11264,7 +11207,7 @@ var Orchestrator = class extends AbstractCreatable {
11264
11207
  }
11265
11208
  if (isSupervisedActor(actor)) (async () => {
11266
11209
  try {
11267
- await actor.runReadyHandler();
11210
+ await traceActorLifecycle(this.lifecycleObservers.values().toArray(), "ready", actor, async () => await actor.runReadyHandler());
11268
11211
  } catch (err) {
11269
11212
  this.logError(`[Orchestrator] Actor [${actor.name}] readyHandler failed: ${formatError(err)}`);
11270
11213
  }
@@ -11325,7 +11268,7 @@ var Orchestrator = class extends AbstractCreatable {
11325
11268
  }
11326
11269
  for (const actor of this.actors) if (isSupervisedActor(actor)) (async () => {
11327
11270
  try {
11328
- await actor.runReadyHandler();
11271
+ await traceActorLifecycle(this.lifecycleObservers.values().toArray(), "ready", actor, async () => await actor.runReadyHandler());
11329
11272
  } catch (err) {
11330
11273
  this.logError(`[Orchestrator] Actor [${actor.name}] readyHandler failed: ${formatError(err)}`);
11331
11274
  }
@@ -11405,7 +11348,7 @@ var Orchestrator = class extends AbstractCreatable {
11405
11348
  startActor(actor) {
11406
11349
  const existing = this.inFlightStarts.get(actor);
11407
11350
  if (existing !== void 0) return existing;
11408
- const trackedStart = Promise.resolve().then(async () => await actor.start()).finally(() => {
11351
+ const trackedStart = Promise.resolve().then(async () => await traceActorLifecycle(this.lifecycleObservers.values().toArray(), "start", actor, async () => await actor.start())).finally(() => {
11409
11352
  if (this.inFlightStarts.get(actor) === trackedStart) this.inFlightStarts.delete(actor);
11410
11353
  });
11411
11354
  this.inFlightStarts.set(actor, trackedStart);
@@ -11429,7 +11372,7 @@ var Orchestrator = class extends AbstractCreatable {
11429
11372
  }
11430
11373
  }
11431
11374
  async stopAttemptedActors(actors = [...this.attemptedActors]) {
11432
- const results = await Promise.allSettled(actors.map((actor) => this.stopActor(actor)));
11375
+ const results = await Promise.allSettled(actors.map(async (actor) => await traceActorLifecycle(this.lifecycleObservers.values().toArray(), "stop", actor, async () => await this.stopActor(actor))));
11433
11376
  const errors = [];
11434
11377
  for (const [index, result] of results.entries()) {
11435
11378
  const actor = actors[index];
@@ -11453,8 +11396,8 @@ ${err.stack}` : "";
11453
11396
  return String(err);
11454
11397
  }
11455
11398
  //#endregion
11456
- //#region ../../node_modules/.pnpm/@ariestools+actor-system@1.3.0_@ariestools+sdk@8.3.0_@opentelemetry+api@1.9.1_zod@4.6.2_6fc20aaf3429d662cc94765bda4c28c6/node_modules/@ariestools/actor-system/dist/neutral/index.mjs
11457
- var ActorSystemSelectionZod = strictObject({
11399
+ //#region ../../node_modules/.pnpm/@ariestools+actor-engine@2.0.0_@ariestools+sdk@9.0.1_@opentelemetry+api@1.9.1_zod@4.6.5_2b61bbfd264e3c480d92886f2c92cd0f/node_modules/@ariestools/actor-engine/dist/neutral/index.mjs
11400
+ var ActorEngineSelectionZod = strictObject({
11458
11401
  config: unknown().optional(),
11459
11402
  host: string$1().min(1).optional(),
11460
11403
  id: string$1().min(1).optional(),
@@ -11472,9 +11415,9 @@ var ActorSystemSelectionZod = strictObject({
11472
11415
  path: ["name"]
11473
11416
  });
11474
11417
  });
11475
- ProviderConfigFieldsZod.extend({ actors: array$1(ActorSystemSelectionZod).default([]) });
11418
+ ProviderConfigFieldsZod.extend({ actors: array$1(ActorEngineSelectionZod).default([]) });
11476
11419
  //#endregion
11477
- //#region ../../node_modules/.pnpm/@ariestools+cli-kit@1.2.3_@ariestools+actor-model@1.3.0_@ariestools+sdk@8.3.0_@opentele_b27e97704f6c21835803309fe3951ddb/node_modules/@ariestools/cli-kit/dist/node/index.mjs
11420
+ //#region ../../node_modules/.pnpm/@ariestools+cli-kit@2.0.1_@ariestools+actor-model@2.0.0_@ariestools+sdk@9.0.1_@opentele_c5aa5735122b0635be68b42196f05dd1/node_modules/@ariestools/cli-kit/dist/node/index.mjs
11478
11421
  async function runServiceUntilInterrupt(host, stop) {
11479
11422
  await new Promise((resolve, reject) => {
11480
11423
  const dispose = host.onInterrupt(async () => {
@@ -11489,7 +11432,7 @@ async function runServiceUntilInterrupt(host, stop) {
11489
11432
  });
11490
11433
  }
11491
11434
  //#endregion
11492
- //#region ../../node_modules/.pnpm/@ariestools+cli-kit-node@1.2.3_@ariestools+actor-model@1.3.0_@ariestools+sdk@8.3.0_@ope_d237c79c83ad8f127ba774e4cf8e1673/node_modules/@ariestools/cli-kit-node/dist/node/index.mjs
11435
+ //#region ../../node_modules/.pnpm/@ariestools+cli-kit-node@2.0.1_@ariestools+actor-model@2.0.0_@ariestools+sdk@9.0.1_@ope_5b74c0d688aa74d26c2f7d16c9a53eac/node_modules/@ariestools/cli-kit-node/dist/node/index.mjs
11493
11436
  function resolveEnvironmentValue(key, layers) {
11494
11437
  for (const layer of layers) {
11495
11438
  if (!Object.hasOwn(layer, key)) continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ariestools/aries-chain-serve",
3
- "version": "0.1.22",
3
+ "version": "0.2.0",
4
4
  "description": "Aries chain REST server: serves the XL1 published-chain S3 layout from one origin with /blocks, /state, /indexes subfolders",
5
5
  "keywords": [
6
6
  "ariestools",
@@ -38,23 +38,22 @@
38
38
  "s3rver": "~3.7.1"
39
39
  },
40
40
  "devDependencies": {
41
- "@ariestools/actor-model": "~1.3.0",
42
- "@ariestools/actor-system": "~1.3.0",
43
- "@ariestools/cli-kit": "~1.2.3",
44
- "@ariestools/cli-kit-node": "~1.2.3",
45
- "@ariestools/toolchain": "~10.0.6",
46
- "@ariestools/tsconfig": "~10.0.6",
47
- "@aws-sdk/client-s3": "~3.1131.0",
48
- "@types/node": "~26.5.1",
41
+ "@ariestools/actor-model": "~2.0.0",
42
+ "@ariestools/actor-system": "~2.0.0",
43
+ "@ariestools/cli-kit": "~2.0.1",
44
+ "@ariestools/cli-kit-node": "~2.0.1",
45
+ "@ariestools/toolchain": "~10.0.8",
46
+ "@ariestools/tsconfig": "~10.0.8",
47
+ "@aws-sdk/client-s3": "~3.1144.0",
48
+ "@types/node": "~26.6.3",
49
49
  "@types/s3rver": "~3.7.4",
50
- "rolldown": "~1.2.8",
50
+ "rolldown": "~1.2.12",
51
51
  "typescript": "~6.0.3",
52
- "vite": "~8.3.0",
53
- "vitest": "~5.0.0",
54
- "zod": "~4.6.2"
52
+ "vite": "~8.3.1",
53
+ "vitest": "~5.0.3"
55
54
  },
56
55
  "engines": {
57
- "node": ">=18.17.1"
56
+ "node": ">=26"
58
57
  },
59
58
  "engineStrict": true,
60
59
  "publishConfig": {