@xyo-network/xl1-providers 4.0.2 → 4.0.4

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.
@@ -1,14 +1,14 @@
1
1
  import { ProviderFactoryLocator } from '@xyo-network/xl1-protocol-sdk';
2
2
  /**
3
3
  * Builds an empty {@link ProviderFactoryLocator} whose context carries a default
4
- * {@link BaseConfig} — i.e. `BaseConfigZod.parse({})`.
4
+ * {@link LocatorConfig} — i.e. `LocatorConfigFieldsZod.parse({})`.
5
5
  *
6
- * The resulting config is the schema's defaults only: `chain`, `evm`, `log`,
7
- * `providers`, `remote`, `storage`, `telemetry`, and `validation` all populated
8
- * from `*ConfigZod.parse({})`. There is no
9
- * actor identity (no `name`, `accountPath`, or `healthCheckPort`) — that lives
10
- * on `ActorConfig`, not `BaseConfig`. Use this when you need a locator rooted
11
- * in protocol defaults rather than an actor's configuration.
6
+ * The resulting config is the schema's defaults only: `chain`, `connections`,
7
+ * `log`, `providerBindings`, `providers`, `telemetry`, and `validation` all
8
+ * populated from `*ConfigZod.parse({})`. There is no actor identity (no `name`,
9
+ * `accountPath`, or `healthCheckPort`) — that lives on `ActorConfig`, not
10
+ * locator process fields. Use this when you need a locator rooted in protocol
11
+ * defaults rather than an actor's configuration.
12
12
  *
13
13
  * No providers are registered on the returned locator and it is not frozen;
14
14
  * the caller is expected to register what they need and (optionally) freeze it.
@@ -1,9 +1,10 @@
1
1
  import type { ProviderMoniker } from '@xyo-network/xl1-protocol-model';
2
- import type { Config, CreatableProviderContext, DeepPartial, ProviderDescriptor, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-protocol-sdk';
2
+ import type { CreatableProviderContext, ProviderDescriptor, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-protocol-sdk';
3
3
  /** Options for building a locator from config-driven provider resolution. */
4
4
  export interface LocatorFromAdaptedConfigOptions {
5
5
  readonly candidates?: readonly ProviderDescriptor[];
6
- readonly config: DeepPartial<Config>;
6
+ /** Host, actor, or run-config slice — locator fields are parsed strictly. */
7
+ readonly config: unknown;
7
8
  readonly context?: Omit<CreatableProviderContext, 'config' | 'locator'>;
8
9
  readonly needs?: ReadonlySet<ProviderMoniker>;
9
10
  readonly validateDepsOnRegister?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"locatorFromAdaptedConfig.d.ts","sourceRoot":"","sources":["../../../src/locators/locatorFromAdaptedConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EACV,MAAM,EACN,wBAAwB,EACxB,WAAW,EACX,kBAAkB,EAClB,8BAA8B,EAC/B,MAAM,+BAA+B,CAAA;AAatC,6EAA6E;AAC7E,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;IACnD,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,wBAAwB,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAA;IACvE,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IAC7C,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAA;CAC1C;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,+BAA+B,GACvC,8BAA8B,CAuBhC"}
1
+ {"version":3,"file":"locatorFromAdaptedConfig.d.ts","sourceRoot":"","sources":["../../../src/locators/locatorFromAdaptedConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACtE,OAAO,KAAK,EACV,wBAAwB,EACxB,kBAAkB,EAClB,8BAA8B,EAC/B,MAAM,+BAA+B,CAAA;AAYtC,6EAA6E;AAC7E,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAA;IACnD,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,wBAAwB,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAA;IACvE,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,eAAe,CAAC,CAAA;IAC7C,QAAQ,CAAC,sBAAsB,CAAC,EAAE,OAAO,CAAA;CAC1C;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,+BAA+B,GACvC,8BAA8B,CAuBhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"remoteLocatorFromConfig.d.ts","sourceRoot":"","sources":["../../../src/locators/remoteLocatorFromConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,EACV,oCAAoC,EACpC,+BAA+B,EAChC,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAA;AAatG,MAAM,WAAW,eAAe;IAC9B,qBAAqB,CAAC,EAAE,+BAA+B,CAAA;IACvD,0BAA0B,CAAC,EAAE,oCAAoC,CAAA;CAClE;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,iBAAiB,EAC1B,sBAAsB,UAAQ,EAC9B,UAAU,CAAC,EAAE,eAAe,GAC3B,UAAU,CAAC,8BAA8B,CAAC,CA8C5C"}
1
+ {"version":3,"file":"remoteLocatorFromConfig.d.ts","sourceRoot":"","sources":["../../../src/locators/remoteLocatorFromConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,KAAK,EACV,oCAAoC,EACpC,+BAA+B,EAChC,MAAM,+BAA+B,CAAA;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAA;AAYtG,MAAM,WAAW,eAAe;IAC9B,qBAAqB,CAAC,EAAE,+BAA+B,CAAA;IACvD,0BAA0B,CAAC,EAAE,oCAAoC,CAAA;CAClE;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,iBAAiB,EAC1B,sBAAsB,UAAQ,EAC9B,UAAU,CAAC,EAAE,eAAe,GAC3B,UAAU,CAAC,8BAA8B,CAAC,CA8C5C"}
@@ -27,11 +27,11 @@ import { RestDataLakeRunner as RestDataLakeRunner3, RestDataLakeViewer as RestDa
27
27
 
28
28
  // src/locators/baseConfigFactoryLocator.ts
29
29
  import {
30
- BaseConfigZod,
30
+ LocatorConfigFieldsZod,
31
31
  ProviderFactoryLocator as ProviderFactoryLocator2
32
32
  } from "@xyo-network/xl1-protocol-sdk";
33
33
  async function baseConfigFactoryLocator() {
34
- const config = BaseConfigZod.parse({});
34
+ const config = LocatorConfigFieldsZod.parse({});
35
35
  return new ProviderFactoryLocator2({
36
36
  config,
37
37
  singletons: {},
@@ -142,9 +142,8 @@ SimpleXyoConnectionViewer = __decorateClass([
142
142
 
143
143
  // src/locators/remoteLocatorFromConfig.ts
144
144
  import {
145
- ConfigZod as ConfigZod2,
146
145
  needsFromConnectionTypes,
147
- normalizeConnectionsConfig as normalizeConnectionsConfig2,
146
+ parseLocatorConfigFields as parseLocatorConfigFields2,
148
147
  SimpleBlockValidationViewer as SimpleBlockValidationViewer2,
149
148
  SimpleStakeEventsViewer as SimpleStakeEventsViewer2,
150
149
  SimpleTransactionValidationViewer as SimpleTransactionValidationViewer2,
@@ -153,10 +152,9 @@ import {
153
152
 
154
153
  // src/locators/locatorFromAdaptedConfig.ts
155
154
  import {
156
- ConfigZod,
157
155
  locatorFromConfig,
158
156
  needsFromProviderBindings,
159
- normalizeConnectionsConfig,
157
+ parseLocatorConfigFields,
160
158
  ProviderFactoryLocator as ProviderFactoryLocator3,
161
159
  registerFactoriesFromPlan,
162
160
  resolveProvidersFromConfig
@@ -1528,7 +1526,7 @@ function allProviderCandidates() {
1528
1526
 
1529
1527
  // src/locators/locatorFromAdaptedConfig.ts
1530
1528
  function locatorFromAdaptedConfig(options) {
1531
- const adapted = ConfigZod.parse(normalizeConnectionsConfig(ConfigZod.parse(options.config)));
1529
+ const adapted = parseLocatorConfigFields(options.config);
1532
1530
  const needs = options.needs ?? needsFromProviderBindings(adapted);
1533
1531
  const candidates = options.candidates ?? allProviderCandidates();
1534
1532
  if (options.validateDepsOnRegister === true) {
@@ -1552,7 +1550,7 @@ function locatorFromAdaptedConfig(options) {
1552
1550
 
1553
1551
  // src/locators/remoteLocatorFromConfig.ts
1554
1552
  function remoteLocatorFromConfig(context, validateDepsOnRegister = false, validators) {
1555
- const config = ConfigZod2.parse(normalizeConnectionsConfig2(context.config));
1553
+ const config = parseLocatorConfigFields2(context.config);
1556
1554
  const locator = locatorFromAdaptedConfig({
1557
1555
  config,
1558
1556
  context: {