@xyo-network/xl1-cli-lib 1.23.2 → 2.0.1

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.
@@ -145,6 +145,7 @@ import {
145
145
  } from "@xyo-network/xl1-sdk";
146
146
  import yargs from "yargs";
147
147
  import { hideBin } from "yargs/helpers";
148
+ import { z } from "zod/mini";
148
149
 
149
150
  // src/commands/start/startCommand.ts
150
151
  import { getApiActor } from "@xyo-network/chain-api";
@@ -410,7 +411,7 @@ var XL1LogoColorizedAscii = `\x1B[38;2;128;128;128m\xA0\xA0\xA0\xA0\xA0\xA0\xA0\
410
411
 
411
412
  // src/optionsFromGlobalZodRegistry.ts
412
413
  import { isUsageMeta } from "@xyo-network/xl1-sdk";
413
- import { globalRegistry } from "zod";
414
+ import { globalRegistry } from "zod/mini";
414
415
  var usageMetaToOptions = (meta) => {
415
416
  return meta;
416
417
  };
@@ -426,7 +427,7 @@ var optionsFromGlobalZodRegistry = () => {
426
427
  };
427
428
 
428
429
  // src/runCLI.ts
429
- var DEFAULT_HEALTH_CHECK_PORT = 9090;
430
+ var DEFAULT_HEALTH_CHECK_PORT = 9099;
430
431
  function defaultScrapePortForActors(actors) {
431
432
  const primary = actors[0];
432
433
  const key = primary === "rewardRedemption" ? "rewardRedemptionApi" : primary;
@@ -435,7 +436,7 @@ function defaultScrapePortForActors(actors) {
435
436
  var configuration;
436
437
  var skipInsecureConfirm = false;
437
438
  var dumpProviders = false;
438
- var version = isDefined3("1.23.2") ? "1.23.2" : "unknown";
439
+ var version = isDefined3("2.0.1") ? "2.0.1" : "unknown";
439
440
  function getConfiguration() {
440
441
  return configuration;
441
442
  }
@@ -458,7 +459,7 @@ async function getLocatorsFromConfig(actors, configuration2) {
458
459
  if (existingConfig) {
459
460
  actorConfigs.push(existingConfig);
460
461
  } else {
461
- const actorConfig = ActorConfigZod.loose().parse({ name: actorName });
462
+ const actorConfig = z.looseObject(ActorConfigZod.shape).parse({ name: actorName });
462
463
  actorConfigs.push(actorConfig);
463
464
  }
464
465
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/configMiddleware.ts", "../../src/initLogger.ts", "../../src/runCLI.ts", "../../src/commands/start/startCommand.ts", "../../src/commands/withDeprecationWarning.ts", "../../src/dumpProviders.ts", "../../src/images.ts", "../../src/optionsFromGlobalZodRegistry.ts", "../../src/start.ts"],
4
- "sourcesContent": ["import { createDeepMerge, isDefined } from '@xylabs/sdk-js'\nimport {\n ActorMnemonicNotAllowedError,\n assertNoActorMnemonics,\n ConfigFileNotFoundError,\n tryParseConfig,\n} from '@xyo-network/chain-orchestration'\nimport type { Config } from '@xyo-network/xl1-sdk'\nimport {\n ConfigZod, isZodError, resolveConfig,\n} from '@xyo-network/xl1-sdk'\n\nconst deepMerge = createDeepMerge({ arrayStrategy: 'concat' })\ntype ConfigWithMnemonic = Config & { mnemonic?: string }\n\nconst REDACTED = '[REDACTED]'\n\n/**\n * Names that always redact, regardless of nesting level. `connectionString` is\n * included because Mongo connection URIs commonly embed `user:password@host`.\n */\nconst REDACTED_KEY_NAMES = new Set<string>(['mnemonic', 'connectionString'])\n\n/**\n * Suffix-matched key names that redact. Catches any future `*PrivateKey`,\n * `*Secret`, or `*Password` field without us having to enumerate them here.\n */\nconst REDACTED_KEY_SUFFIX = /(PrivateKey|Secret|Password)$/i\n\nfunction shouldRedactKey(key: string): boolean {\n if (REDACTED_KEY_NAMES.has(key)) return true\n return REDACTED_KEY_SUFFIX.test(key)\n}\n\n/**\n * Returns a deep clone of `config` with secret-bearing leaf values replaced by\n * `'[REDACTED]'`. Walks plain objects and arrays. Leaves primitives, dates,\n * and other non-plain values untouched (other than via `structuredClone`).\n */\nexport function redactConfig<T>(config: T): T {\n const cloned = structuredClone(config) as unknown\n redactInPlace(cloned)\n return cloned as T\n}\n\nfunction redactInPlace(node: unknown): void {\n if (Array.isArray(node)) {\n for (const item of node) redactInPlace(item)\n return\n }\n if (node === null || typeof node !== 'object') return\n const obj = node as Record<string, unknown>\n for (const key of Object.keys(obj)) {\n if (shouldRedactKey(key) && obj[key] !== undefined && obj[key] !== null) {\n obj[key] = REDACTED\n } else {\n redactInPlace(obj[key])\n }\n }\n}\n\n/**\n * Yargs `.env()` with `dot-notation` turns `XL1_ACTORS__0__NAME=foo` into\n * `{ actors: { '0': { name: 'foo' } } }` \u2014 an object keyed by string indices\n * rather than an array. Normalize that back into an array so ConfigZod's\n * `actors` array schema accepts it.\n */\nfunction coerceActorsArray(argv: Record<string, unknown>): Record<string, unknown> {\n const actors = argv.actors\n if (actors === undefined || Array.isArray(actors)) return argv\n if (typeof actors !== 'object' || actors === null) return argv\n const entries = Object.entries(actors as Record<string, unknown>)\n const numericEntries = entries\n .map(([key, value]) => [Number(key), value] as const)\n .filter(([key]) => Number.isInteger(key) && key >= 0)\n if (numericEntries.length !== entries.length) return argv\n const asArray: unknown[] = []\n for (const [key, value] of numericEntries) asArray[key] = value\n return { ...argv, actors: asArray }\n}\n\nfunction safeParseOrThrow(input: unknown): Config {\n const result = ConfigZod.safeParse(input)\n if (!result.success) throw result.error\n return result.data as Config\n}\n\nasync function buildFinalConfig(argv: Record<string, unknown>): Promise<ConfigWithMnemonic> {\n // Parse the various config sources\n const configPath = argv.config as string | undefined\n const parsedConfigFile = await tryParseConfig({ configPath }) as ConfigWithMnemonic // Config file\n const rootMnemonicFromFile = typeof parsedConfigFile.mnemonic === 'string' ? parsedConfigFile.mnemonic : undefined\n const normalizedArgv = coerceActorsArray(argv)\n const parsedConfigArgs = ConfigZod.safeParse(normalizedArgv).data ?? {} // Command-line arguments & ENV VARs\n const rootMnemonicFromArgs = typeof normalizedArgv.mnemonic === 'string' ? normalizedArgv.mnemonic : undefined\n // Deep merge with precedence\n // TODO: Would like precedence to be defaults < file < ENV < CLI Args\n // but there is currently no way to determine which are defaults vs\n // user-supplied CLI Args since we set the CLI args to the defaults\n // and receive a flattened object. We might need to manually invoke\n // the parser without the defaults to achieve this.\n const mergedConfig = safeParseOrThrow(deepMerge(parsedConfigFile, parsedConfigArgs))\n const validated = safeParseOrThrow(resolveConfig(safeParseOrThrow(mergedConfig)))\n const rootMnemonic = rootMnemonicFromArgs ?? rootMnemonicFromFile\n return isDefined(rootMnemonic) ? { ...validated, mnemonic: rootMnemonic } : validated\n}\n\nexport async function configMiddleware(argv: Record<string, unknown>, setConfiguration: (config: Config) => void): Promise<void> {\n try {\n const finalConfig = await buildFinalConfig(argv)\n // Hard-fail if any actor was configured with its own mnemonic. Mnemonics\n // must live at the root; actors pick their wallet via accountPath.\n assertNoActorMnemonics(finalConfig)\n setConfiguration(finalConfig as Config)\n\n // Check if user wants to dump config and exit. Default behavior redacts\n // secrets (mnemonics, private keys, passwords, connection strings). Pass\n // `--with-secrets` to see the raw values \u2014 useful only on a developer box.\n if (argv['dump-config']) {\n const withSecrets = Boolean(argv['with-secrets'])\n const output = withSecrets ? finalConfig : redactConfig(finalConfig)\n console.log(JSON.stringify(output, null, 2))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n } catch (err) {\n if (err instanceof ConfigFileNotFoundError) {\n console.error(`${err.message}. Check the path passed to --config/-c and try again.`)\n } else if (err instanceof ActorMnemonicNotAllowedError) {\n console.error(err.message)\n } else if (isZodError(err)) {\n console.error(`Zod error: ${err.message}`)\n } else {\n console.error(`Error parsing configuration: ${err}`)\n }\n if (!(err instanceof ConfigFileNotFoundError) && !(err instanceof ActorMnemonicNotAllowedError)) {\n console.error(`Stack: ${err instanceof Error ? err.stack : 'N/A'}`)\n }\n throw new Error('Invalid configuration', { cause: err })\n }\n}\n", "import type { Logger, LogLevelValue } from '@xylabs/sdk-js'\nimport {\n Base,\n ConsoleLogger, isDefined,\n LogLevel, SilentLogger,\n} from '@xylabs/sdk-js'\nimport type { BaseConfig } from '@xyo-network/xl1-sdk'\n\nexport const initLogger = (config: BaseConfig): Logger => {\n let logger: Logger\n if (config.log.silent) {\n logger = new SilentLogger()\n } else {\n let level: LogLevelValue | undefined\n if (isDefined(config.log.logLevel)) {\n const parsed = LogLevel[config.log.logLevel.toLowerCase() as keyof typeof LogLevel]\n if (isDefined(parsed)) level = parsed\n }\n logger = new ConsoleLogger(level)\n }\n Base.defaultLogger = logger\n return logger\n}\n", "import { stdin as input, stdout as output } from 'node:process'\nimport { createInterface } from 'node:readline/promises'\n\nimport { isDefined } from '@xylabs/sdk-js'\nimport { apiCommand } from '@xyo-network/chain-api'\nimport { bridgeCommand } from '@xyo-network/chain-bridge'\nimport { finalizerCommand } from '@xyo-network/chain-finalizer'\nimport { mempoolCommand } from '@xyo-network/chain-mempool'\nimport {\n contextFromConfigWithoutLocator, detectDerivationPathCollisions, formatWalletReport, initializeResolvedWalletReport,\n locatorsFromConfig, Orchestrator,\n} from '@xyo-network/chain-orchestration'\nimport { initHealthEndpoints } from '@xyo-network/chain-orchestration-express'\nimport { producerCommand } from '@xyo-network/chain-producer'\nimport { rewardRedemptionCommand } from '@xyo-network/chain-reward-redemption'\nimport type { ActorConfig, Config } from '@xyo-network/xl1-sdk'\nimport {\n ActorConfigZod, ConfigZod, DefaultMetricsScrapePorts,\n} from '@xyo-network/xl1-sdk'\nimport type { Argv } from 'yargs'\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\n\nimport { startCommand, withDeprecationWarning } from './commands/index.ts'\nimport { configMiddleware } from './configMiddleware.ts'\nimport { formatProviderTree } from './dumpProviders.ts'\nimport { XL1LogoColorizedAscii } from './images.ts'\nimport { initLogger } from './initLogger.ts'\nimport { optionsFromGlobalZodRegistry } from './optionsFromGlobalZodRegistry.ts'\n\n/** Version string injected by Rollup at build time. */\ndeclare const __VERSION__: string\n\nconst DEFAULT_HEALTH_CHECK_PORT = 9090\n\n/**\n * Maps a CLI actor name to its registered Prometheus scrape port. The CLI-level\n * exporter (one per process) defaults to the port of the first requested actor\n * so that running, e.g., `xl1 start producer` and `xl1 start api` side-by-side\n * doesn't fight over a single shared default.\n */\nfunction defaultScrapePortForActors(actors: readonly string[]): number {\n const primary = actors[0]\n const key = primary === 'rewardRedemption' ? 'rewardRedemptionApi' : primary\n return (DefaultMetricsScrapePorts as Record<string, number>)[key] ?? DefaultMetricsScrapePorts.producer\n}\n\n/**\n * The configuration that will be used throughout the CLI.\n * This is materialized after parsing the command-line arguments,\n * environment variables, and defaults.\n */\nlet configuration: Config\nlet skipInsecureConfirm = false\nlet dumpProviders = false\n\nconst version = isDefined(__VERSION__) ? __VERSION__ : 'unknown'\n\nfunction getConfiguration(): Config {\n return configuration\n}\n\nasync function promptForInsecureGenesisConfirmation(logger: ReturnType<typeof initLogger>) {\n if (!input.isTTY || !output.isTTY) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped because this session is not a TTY.')\n return\n }\n const rl = createInterface({ input, output })\n try {\n await rl.question('Insecure genesis reward wallet is active. Hit RETURN to continue.')\n } finally {\n rl.close()\n }\n}\n\nasync function getLocatorsFromConfig(actors: string[], configuration: Config) {\n const actorConfigs: ActorConfig[] = []\n for (const actorName of actors) {\n const existingConfig = configuration.actors.find(actor => actor.name === actorName)\n if (existingConfig) {\n actorConfigs.push(existingConfig)\n } else {\n const actorConfig = ActorConfigZod.loose().parse({ name: actorName })\n actorConfigs.push(actorConfig)\n }\n }\n\n const config = ConfigZod.parse({ ...configuration, actors: actorConfigs })\n\n const logger = initLogger(configuration)\n const orchestrator = await Orchestrator.create({ logger })\n const collision = detectDerivationPathCollisions(actors, configuration)\n if (collision) throw collision\n const walletReport = await initializeResolvedWalletReport(actors, configuration)\n logger.info(formatWalletReport(walletReport))\n const serviceName = actors.length === 1 ? `xl1-${actors[0]}` : 'xl1-cli'\n const context = await contextFromConfigWithoutLocator(config, logger, serviceName, version, defaultScrapePortForActors(actors))\n if (skipInsecureConfirm) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped via --skip-insecure-confirm.')\n }\n const onInsecureGenesisConfirm = skipInsecureConfirm\n ? undefined\n : async () => await promptForInsecureGenesisConfirmation(logger)\n const locators = await locatorsFromConfig(context, config, onInsecureGenesisConfirm)\n\n // `--dump-providers`: render the locator map and halt before the actor's\n // runner starts. Health endpoints and the SIGINT handler below are skipped.\n if (dumpProviders) {\n console.log(formatProviderTree(locators))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n\n const healthCheckPort = configuration.healthCheckPort ?? DEFAULT_HEALTH_CHECK_PORT\n const healthServer = healthCheckPort > 0 && context.statusReporter !== undefined\n ? await initHealthEndpoints({\n logger,\n port: healthCheckPort,\n readiness: orchestrator,\n statusMonitor: context.statusReporter,\n })\n : undefined\n\n // Handle cancellation (Ctrl+C)\n process.on('SIGINT', () => {\n void (async () => {\n try {\n logger.log('\\nSIGINT received. Attempting graceful shutdown...')\n healthServer?.close()\n await orchestrator?.stop()\n logger.log('Orchestrator stopped, exiting now.')\n process.exit(0)\n } catch (err) {\n logger.error('Error stopping orchestrator:', err)\n process.exit(1)\n }\n })()\n })\n return { locators, orchestrator }\n}\n\n// Main entry point\nexport async function runCLI() {\n // Parse command-line arguments using Yargs\n const y = yargs(hideBin(process.argv)) as Argv<Config>\n const argv = y\n .usage(`\n\uD83D\uDE80 XL1 Node CLI (${version})\n${XL1LogoColorizedAscii}\nRun various components of the XL1 ecosystem.\n\nUsage:\n$0 <command> [options]`)\n .parserConfiguration({\n 'dot-notation': true, // foo.bar \u2192 { foo: { bar } }\n 'parse-numbers': false, // Don't auto-parse numbers to allow strings like \"0x1\"\n 'populate--': true, // Populate -- with all options so we can detected user-supplied vs defaults\n })\n .env('XL1')\n .scriptName('xl1')\n .middleware(async (argv) => {\n await configMiddleware(argv, (config) => {\n configuration = config\n })\n skipInsecureConfirm = Boolean(argv['skip-insecure-confirm'])\n dumpProviders = Boolean(argv['dump-providers'])\n })\n .options(optionsFromGlobalZodRegistry())\n .wrap(y.terminalWidth())\n .command(withDeprecationWarning(apiCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(bridgeCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(finalizerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(mempoolCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(producerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(rewardRedemptionCommand(getConfiguration, getLocatorsFromConfig)))\n .command(startCommand(getConfiguration, getLocatorsFromConfig))\n .options({\n 'config': {\n type: 'string',\n description: 'Path to a config file to use instead of the default search.',\n alias: 'c',\n },\n 'mnemonic': {\n type: 'string',\n description: 'Shared root mnemonic used by actors that do not define their own mnemonic.',\n },\n 'dump-config': {\n type: 'boolean',\n description: 'Just process the configuration and print the resolved config to stdout, then exit. Secrets are redacted unless --with-secrets is also passed.',\n default: false,\n },\n 'with-secrets': {\n type: 'boolean',\n description: 'When used with --dump-config, print raw secret values (mnemonic, private keys, passwords) instead of \"[REDACTED]\". Use only on a developer machine.',\n default: false,\n },\n 'dump-providers': {\n type: 'boolean',\n description: 'Run the normal command flow up to provider locator construction, print the per-actor provider tree (with duplicate detection), then exit.',\n default: false,\n },\n 'skip-insecure-confirm': {\n type: 'boolean',\n description: 'Skip the interactive RETURN confirmation when the built-in dev mnemonic / insecure genesis reward wallet is active.',\n default: false,\n },\n })\n .help()\n .alias('help', 'h')\n .version(version)\n .argv\n\n await argv\n}\n", "import { getApiActor } from '@xyo-network/chain-api'\nimport { getBridgeActor } from '@xyo-network/chain-bridge'\nimport { getFinalizerActor } from '@xyo-network/chain-finalizer'\nimport { getMempoolActor } from '@xyo-network/chain-mempool'\nimport type {\n ActorInstanceV3, GetLocatorsFromConfig, OrchestratorInstance,\n} from '@xyo-network/chain-orchestration'\nimport {\n ApiConfigZod,\n BridgeConfigZod,\n FinalizerConfigZod,\n MempoolConfigZod,\n ProducerConfigZod,\n RewardRedemptionConfigZod,\n} from '@xyo-network/chain-orchestration'\nimport { getProducerActor } from '@xyo-network/chain-producer'\nimport { getRewardRedemptionActor } from '@xyo-network/chain-reward-redemption'\nimport type { Config, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\nimport type {\n ArgumentsCamelCase, Argv, CommandModule,\n} from 'yargs'\n\nimport { initLogger } from '../../initLogger.ts'\n\ninterface StartArgs {\n actors?: string[]\n}\n\nconst KNOWN_ACTORS = ['api', 'bridge', 'finalizer', 'mempool', 'producer', 'rewardRedemption'] as const\n\nconst BOOT_TIMEOUT_MS = 60_000\n\nfunction getActorsFromConfig(configuration: Config): string[] | undefined {\n const enabledActors = configuration.actors\n .filter(actor => actor.enabled !== false)\n .map(actor => actor.name)\n return enabledActors.length > 0 ? enabledActors : undefined\n}\n\nfunction getDefaultActors(): string[] {\n return ['api', 'producer', 'finalizer']\n}\n\nasync function buildActor(\n name: string,\n locator: ProviderFactoryLocatorInstance,\n): Promise<ActorInstanceV3> {\n switch (name) {\n case 'api': {\n const config = ApiConfigZod.parse(locator.context.config)\n return await getApiActor(config, locator)\n }\n case 'bridge': {\n const config = BridgeConfigZod.parse(locator.context.config)\n return await getBridgeActor(config, locator)\n }\n case 'mempool': {\n const config = MempoolConfigZod.parse(locator.context.config)\n return await getMempoolActor(config, locator)\n }\n case 'producer': {\n const config = ProducerConfigZod.parse(locator.context.config)\n return await getProducerActor(config, locator)\n }\n case 'rewardRedemption': {\n const config = RewardRedemptionConfigZod.parse(locator.context.config)\n return await getRewardRedemptionActor(config, locator)\n }\n case 'finalizer': {\n const config = FinalizerConfigZod.parse(locator.context.config)\n return await getFinalizerActor(config, locator)\n }\n default: {\n throw new Error(`Unknown actor: ${name}`)\n }\n }\n}\n\nasync function bootActors(\n requestedActors: string[],\n locators: Record<string, ProviderFactoryLocatorInstance>,\n orchestrator: OrchestratorInstance,\n configuration: Config,\n): Promise<void> {\n const startedAt = Date.now()\n const actors = await Promise.all(requestedActors.map(name => buildActor(name, locators[name])))\n for (const actor of actors) {\n await orchestrator.registerActor(actor)\n }\n await orchestrator.start()\n await orchestrator.whenReady(BOOT_TIMEOUT_MS)\n const ms = Date.now() - startedAt\n initLogger(configuration).info(`[xl1] system ready (${requestedActors.join('/')} in ${ms}ms)`)\n}\n\nexport function startCommand(getConfiguration: () => Config, getLocatorsFromConfig: GetLocatorsFromConfig): CommandModule {\n return {\n command: ['start [actors..]', '$0'],\n describe: 'Run a full XL1 Node',\n builder: (yargs: Argv) => {\n return yargs\n .positional('actors', {\n type: 'string',\n array: true,\n choices: KNOWN_ACTORS,\n description: 'Actors to start (e.g. xl1 start api producer or xl1 start api,producer)',\n coerce: (values: string[]) => values.flatMap(v => v.split(',')),\n })\n .option('actors', {\n type: 'array',\n string: true,\n choices: KNOWN_ACTORS,\n description: 'List of actors to start (e.g. --actors api producer finalizer). Defaults to api, producer, and finalizer.',\n })\n },\n handler: async (argv: ArgumentsCamelCase<StartArgs>) => {\n const configuration = getConfiguration()\n const requestedActors = argv.actors !== undefined && argv.actors.length > 0\n ? argv.actors\n : getActorsFromConfig(configuration) ?? getDefaultActors()\n const { locators, orchestrator } = await getLocatorsFromConfig(requestedActors, configuration)\n await bootActors(requestedActors, locators, orchestrator, configuration)\n },\n }\n}\n", "import { delay } from '@xylabs/sdk-js'\nimport type { CommandModule } from 'yargs'\n\nexport function withDeprecationWarning(module: CommandModule): CommandModule {\n const { deprecated, handler } = module\n if (typeof deprecated === 'string') {\n return {\n ...module,\n handler: async (argv) => {\n console.warn(`[deprecated] ${deprecated}`)\n await delay(3000)\n return handler(argv)\n },\n }\n }\n return module\n}\n", "import type { ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\n\n/**\n * One row in the per-actor provider tree. Captures the moniker (registry key),\n * the implementation class, the dependency monikers the factory declared, the\n * factory scope, and a `count` of how many times an identical fingerprint\n * appeared in the same moniker bucket. The registry can hold the same factory\n * more than once (e.g. via merges or multi-moniker registrations); collapsing\n * keeps the tree readable while still surfacing the multiplicity.\n */\ninterface ProviderEntry {\n count: number\n dependencies: readonly string[]\n moniker: string\n providerName: string\n scope: string\n}\n\nconst CANONICAL_ACTOR_ORDER: readonly string[] = [\n '_root', 'producer', 'finalizer', 'api', 'mempool', 'bridge', 'rewardRedemption',\n]\n\n/**\n * Enumerates the providers registered directly on a single locator. Does not\n * walk the parent chain \u2014 each locator is reported on its own so that a reader\n * can see exactly which providers a given actor contributed versus what it\n * inherits from `_root`.\n */\nfunction enumerateLocator(locator: ProviderFactoryLocatorInstance): ProviderEntry[] {\n const collapsed = new Map<string, ProviderEntry>()\n const registry = locator.registry as Record<string, unknown[] | undefined>\n for (const moniker of Object.keys(registry)) {\n const factories = registry[moniker]\n if (!factories) continue\n for (const factory of factories) {\n const f = factory as { dependencies?: readonly string[]; providerName?: string; scope?: string }\n const providerName = f.providerName ?? '<unknown>'\n const scope = f.scope ?? '<unknown>'\n const dependencies = f.dependencies ?? []\n const fingerprint = `${moniker}|${providerName}|${scope}|${dependencies.join(',')}`\n const existing = collapsed.get(fingerprint)\n if (existing) {\n existing.count += 1\n } else {\n collapsed.set(fingerprint, {\n count: 1, dependencies, moniker, providerName, scope,\n })\n }\n }\n }\n return [...collapsed.values()].toSorted((a, b) => a.moniker.localeCompare(b.moniker) || a.providerName.localeCompare(b.providerName))\n}\n\nfunction buildOwnerIndex(perActor: ReadonlyMap<string, readonly ProviderEntry[]>): Map<string, Set<string>> {\n const monikerOwners = new Map<string, Set<string>>()\n for (const [actorName, entries] of perActor) {\n for (const entry of entries) {\n let owners = monikerOwners.get(entry.moniker)\n if (!owners) {\n owners = new Set()\n monikerOwners.set(entry.moniker, owners)\n }\n owners.add(actorName)\n }\n }\n return monikerOwners\n}\n\nfunction renderDuplicatesSummary(monikerOwners: ReadonlyMap<string, ReadonlySet<string>>): string[] {\n const duplicates = [...monikerOwners.entries()]\n .filter(([, owners]) => owners.size > 1)\n .map(([moniker, owners]) => ({ moniker, owners: [...owners].toSorted().map(formatGroupForDisplay) }))\n .toSorted((a, b) => a.moniker.localeCompare(b.moniker))\n if (duplicates.length === 0) return []\n const lines = ['Duplicate monikers (registered by more than one locator):']\n for (const { moniker, owners } of duplicates) {\n lines.push(` - ${moniker}: ${owners.join(', ')}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Groups actor names whose locators share the same `registry` object reference.\n * Under the shared-locator architecture (Option B), api/mempool/finalizer all\n * point to view locators that share one underlying registry \u2014 without this\n * grouping, the dump would print the same factory set N times and falsely\n * report every moniker as \"duplicate across actors.\"\n */\nfunction groupActorsBySharedRegistry(\n locators: Record<string, ProviderFactoryLocatorInstance>,\n): { actorNames: readonly string[]; locator: ProviderFactoryLocatorInstance }[] {\n const groups: { actorNames: string[]; locator: ProviderFactoryLocatorInstance; registry: unknown }[] = []\n for (const actorName of Object.keys(locators)) {\n const locator = locators[actorName]\n const existing = groups.find(g => g.registry === locator.registry)\n if (existing) {\n existing.actorNames.push(actorName)\n } else {\n groups.push({\n actorNames: [actorName], locator, registry: locator.registry,\n })\n }\n }\n return groups\n}\n\n/**\n * Stable id for a registry-sharing group: sorted, comma-joined actor names.\n * Used as the key in `monikerOwners`. Multi-actor group ids contain commas;\n * we display them parenthesized in the `also in:` annotation.\n */\nfunction groupId(actorNames: readonly string[]): string {\n return [...actorNames].toSorted().join(',')\n}\n\nfunction formatGroupForDisplay(groupKey: string): string {\n const members = groupKey.split(',')\n return members.length === 1 ? members[0] : `(${members.join(', ')})`\n}\n\nfunction renderGroupSection(\n actorNames: readonly string[],\n entries: readonly ProviderEntry[],\n monikerOwners: ReadonlyMap<string, ReadonlySet<string>>,\n): string[] {\n const sortedActors = [...actorNames].toSorted()\n const ownGroupKey = groupId(sortedActors)\n const heading = sortedActors.length === 1\n ? `Providers for actor: ${sortedActors[0]} (${entries.length} registered)`\n : `Providers shared by actors: ${sortedActors.join(', ')} (${entries.length} registered)`\n const lines: string[] = [heading]\n if (entries.length === 0) {\n lines.push(' (none)', '')\n return lines\n }\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]\n const isLast = i === entries.length - 1\n const branch = isLast ? '\u2514\u2500\u2500' : '\u251C\u2500\u2500'\n const owners = monikerOwners.get(entry.moniker) ?? new Set<string>()\n const otherOwners = [...owners]\n .filter(o => o !== ownGroupKey)\n .toSorted()\n .map(formatGroupForDisplay)\n const dupNote = otherOwners.length > 0 ? ` \u26A0 also in: ${otherOwners.join(', ')}` : ''\n const depsNote = entry.dependencies.length > 0 ? `, deps: [${entry.dependencies.join(', ')}]` : ''\n const countNote = entry.count > 1 ? ` (\u00D7${entry.count})` : ''\n lines.push(` ${branch} ${entry.moniker}${countNote} [impl: ${entry.providerName}, scope: ${entry.scope}${depsNote}]${dupNote}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Renders the locator map as a tree grouped by registry identity, annotating\n * any moniker that appears in more than one *registry* with `\u26A0 also in: ...`.\n *\n * - When all input locators share one registry (shared-locator path), a single\n * \"Providers shared by actors: \u2026\" section is rendered.\n * - When some actors have distinct registries (legacy `_root` + per-actor\n * child architecture), each registry is rendered separately. `_root` is\n * ordered first.\n *\n * The \"Duplicate monikers\" summary at the bottom only flags monikers\n * registered by *different* registries \u2014 duplicates within one registry are\n * already collapsed into per-entry `(\u00D7N)` counts by `enumerateLocator`.\n */\nexport function formatProviderTree(locators: Record<string, ProviderFactoryLocatorInstance>): string {\n const groups = groupActorsBySharedRegistry(locators)\n\n // Per-actor moniker ownership (used for the \"also in:\" annotation), but\n // attribute each moniker to the GROUP it belongs to \u2014 the \"actor name\" the\n // index uses is the joined group key, so two actors that share a registry\n // never appear as duplicates of each other.\n const groupKeys = groups.map(g => ({ ...g, key: groupId(g.actorNames) }))\n const perGroup = new Map<string, ProviderEntry[]>()\n for (const g of groupKeys) perGroup.set(g.key, enumerateLocator(g.locator))\n const monikerOwners = buildOwnerIndex(perGroup)\n\n // Order: legacy `_root` first when present; otherwise alphabetical by sorted\n // actor names within the group, with the canonical actor order applied to\n // the *primary* (sorted-first) actor name in each group.\n const orderedGroups = [...groupKeys].toSorted((a, b) => {\n const aHasRoot = a.actorNames.includes('_root')\n const bHasRoot = b.actorNames.includes('_root')\n if (aHasRoot !== bHasRoot) return aHasRoot ? -1 : 1\n const ai = CANONICAL_ACTOR_ORDER.indexOf(a.actorNames[0])\n const bi = CANONICAL_ACTOR_ORDER.indexOf(b.actorNames[0])\n if (ai !== bi) return (ai === -1 ? Number.MAX_SAFE_INTEGER : ai) - (bi === -1 ? Number.MAX_SAFE_INTEGER : bi)\n return a.key.localeCompare(b.key)\n })\n\n const lines: string[] = ['XL1 Provider Dump', '=================', '']\n for (const g of orderedGroups) {\n lines.push(...renderGroupSection(g.actorNames.toSorted(), perGroup.get(g.key) ?? [], monikerOwners))\n }\n lines.push(...renderDuplicatesSummary(monikerOwners))\n return lines.join('\\n')\n}\n", "/* eslint-disable no-irregular-whitespace, @stylistic/max-len */\nexport const XL1LogoColorizedAscii = `\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;118;111;144m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;72;32;223m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u2560\u2560\u001B[0m\u001B[38;2;103;85;170m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;79;121;152m\u2566\u001B[0m\u001B[38;2;82;121;151m\u2566\u001B[0m\u001B[38;2;112;125;136m_\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;88;59;196m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;73;34;221m\u2592\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;121;121;127m_\u001B[0m\u001B[38;2;100;101;128m\u2554\u001B[0m\u001B[38;2;93;94;127m\u2566\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;82;121;151m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2560\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;51;117;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u001B[0m\u001B[38;2;111;125;136m_\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;67;23;232m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;120;121;128m_\u001B[0m\u001B[38;2;100;101;127m\u2554\u001B[0m\u001B[38;2;79;81;127mR\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;88;90;127m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;55;117;165m\u255A\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u001B[0m\u001B[38;2;50;116;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u00A0\u001B[0m\u001B[38;2;106;90;165mj\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;89;61;194mH\u00A0\u001B[0m\u001B[38;2;99;100;127m\u2554\u001B[0m\u001B[38;2;79;80;127mD\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;83;121;150m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u2592\u00A0\u001B[0m\u001B[38;2;76;38;217m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;74;76;128m\u2560\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2592\u001B[0m\u001B[38;2;89;90;128m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;90;118;148m\\`\u001B[0m\u001B[38;2;89;107;153m_\u001B[0m\u001B[38;2;93;97;154m,\u001B[0m\u001B[38;2;105;89;166m\u2553\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;95;72;183m\u2553\u001B[0m\u001B[38;2;106;96;152m_\u001B[0m\u001B[38;2;100;94;143m\\`\u001B[0m\u001B[38;2;101;100;133m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;122;118;137m_\u001B[0m\u001B[38;2;113;102;153m,\u001B[0m\u001B[38;2;108;94;161m\u2553\u001B[0m\u001B[38;2;104;86;169m\u2553\u001B[0m\u001B[38;2;98;77;178m\u2554\u001B[0m\u001B[38;2;93;67;188m\u2557\u001B[0m\u001B[38;2;88;59;196m\u03C6\u001B[0m\u001B[38;2;83;51;204m@\u001B[0m\u001B[38;2;78;42;213mD\u001B[0m\u001B[38;2;72;32;223m\u2592\u001B[0m\u001B[38;2;68;24;231m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;71;30;225m\u2592\u001B[0m\u001B[38;2;77;40;215m\u2592\u001B[0m\u001B[38;2;82;49;206mK\u001B[0m\u001B[38;2;87;57;198m\u03C6\u001B[0m\u001B[38;2;91;65;190m\u2557\u001B[0m\u001B[38;2;97;75;180m\u2566\u001B[0m\u001B[38;2;103;84;171m\u2556\u001B[0m\u001B[38;2;107;92;163m\u00B2\u001B[0m\u001B[38;2;112;101;154m_\u001B[0m\u001B[38;2;119;112;143m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;106;91;164m\\`\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;89;62;193m\u2559\u001B[0m\u001B[38;2;85;54;201m\u2559\u001B[0m\u001B[38;2;80;45;210m\u255A\u001B[0m\u001B[38;2;74;35;220m\u255D\u001B[0m\u001B[38;2;69;26;229m\u2560\u001B[0m\u001B[38;2;66;22;233m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;73;33;222m\u255D\u001B[0m\u001B[38;2;79;43;212m\u2569\u001B[0m\u001B[38;2;84;52;203m\u255C\u001B[0m\u001B[38;2;88;60;195m\u2559\u001B[0m\u001B[38;2;93;68;187m^\u001B[0m\u001B[38;2;100;80;175m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;113;84;152m\\`\u001B[0m\u001B[38;2;103;79;169m'\u001B[0m\u001B[38;2;95;72;183m\"\u001B[0m\u001B[38;2;87;57;198m\u2559\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;80;46;209m\u255C\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;102;77;175m^\u001B[0m\u001B[38;2;112;81;162m\\`\u001B[0m\u001B[38;2;115;92;155m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;145;116;107m,\u001B[0m\u001B[38;2;199;82;45m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2560\u00A0\u001B[0m\u001B[38;2;70;28;227m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;189;49;97m\u00E5\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;155;92;114m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;175;98;73m\u2554\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2592\u2592\u001B[0m\u001B[38;2;197;83;47m\u2569\u00A0\u001B[0m\u001B[38;2;98;76;179m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;81;48;207mH\u00A0\u001B[0m\u001B[38;2;188;51;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u2560\u001B[0m\u001B[38;2;183;57;100mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;146;116;106m,\u001B[0m\u001B[38;2;199;82;44m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;196;84;48m\u2569\u001B[0m\u001B[38;2;168;102;81m^\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;160;87;111m'\u001B[0m\u001B[38;2;187;52;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;156;91;113m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;198;83;46m\u2569\u001B[0m\u001B[38;2;194;85;50m\u2569\u001B[0m\u001B[38;2;167;102;82m^\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;81;46;209m\u255A\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;159;88;112m'\u001B[0m\u001B[38;2;186;53;98m\u255A\u001B[0m\u001B[38;2;197;40;93m\u2569\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;110;97;158m'\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;94;69;186mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;68;25;230m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;108;93;162m\u00B2\u001B[0m\u001B[38;2;99;79;176m^\u001B[0m`\n", "import type { UsageMeta } from '@xyo-network/xl1-sdk'\nimport { isUsageMeta } from '@xyo-network/xl1-sdk'\nimport type { Options } from 'yargs'\nimport { globalRegistry } from 'zod'\n\nconst usageMetaToOptions = (meta: UsageMeta): Options => {\n return meta\n}\n\nexport const optionsFromGlobalZodRegistry = (): Record<string, Options> => {\n const opts: Record<string, Options> = {}\n for (const schema of Object.values(globalRegistry._map)) {\n if (isUsageMeta(schema)) {\n if (schema.hidden) continue // skip hidden options\n opts[schema.title] = usageMetaToOptions(schema)\n }\n }\n return opts\n}\n", "import { config } from 'dotenv'\n\nimport { runCLI } from './runCLI.ts'\n\nexport const start = async () => {\n config({ quiet: true })\n await runCLI()\n}\n"],
5
- "mappings": ";AAAA,SAAS,iBAAiB,iBAAiB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP;AAAA,EACE;AAAA,EAAW;AAAA,EAAY;AAAA,OAClB;AAEP,IAAM,YAAY,gBAAgB,EAAE,eAAe,SAAS,CAAC;AAG7D,IAAM,WAAW;AAMjB,IAAM,qBAAqB,oBAAI,IAAY,CAAC,YAAY,kBAAkB,CAAC;AAM3E,IAAM,sBAAsB;AAE5B,SAAS,gBAAgB,KAAsB;AAC7C,MAAI,mBAAmB,IA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;AAAA,MACb,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,yBAAyB;AAAA,MACvB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,EACF,CAAC,EACA,KAAK,EACL,MAAM,QAAQ,GAAG,EACjB,QAAQ,OAAO,EACf;AAEH,QAAM;AACR;;;AMrNA,SAAS,cAAc;AAIhB,IAAM,QAAQ,YAAY;AAC/B,SAAO,EAAE,OAAO,KAAK,CAAC;AACtB,QAAM,OAAO;AACf;",
4
+ "sourcesContent": ["import { createDeepMerge, isDefined } from '@xylabs/sdk-js'\nimport {\n ActorMnemonicNotAllowedError,\n assertNoActorMnemonics,\n ConfigFileNotFoundError,\n tryParseConfig,\n} from '@xyo-network/chain-orchestration'\nimport type { Config } from '@xyo-network/xl1-sdk'\nimport {\n ConfigZod, isZodError, resolveConfig,\n} from '@xyo-network/xl1-sdk'\n\nconst deepMerge = createDeepMerge({ arrayStrategy: 'concat' })\ntype ConfigWithMnemonic = Config & { mnemonic?: string }\n\nconst REDACTED = '[REDACTED]'\n\n/**\n * Names that always redact, regardless of nesting level. `connectionString` is\n * included because Mongo connection URIs commonly embed `user:password@host`.\n */\nconst REDACTED_KEY_NAMES = new Set<string>(['mnemonic', 'connectionString'])\n\n/**\n * Suffix-matched key names that redact. Catches any future `*PrivateKey`,\n * `*Secret`, or `*Password` field without us having to enumerate them here.\n */\nconst REDACTED_KEY_SUFFIX = /(PrivateKey|Secret|Password)$/i\n\nfunction shouldRedactKey(key: string): boolean {\n if (REDACTED_KEY_NAMES.has(key)) return true\n return REDACTED_KEY_SUFFIX.test(key)\n}\n\n/**\n * Returns a deep clone of `config` with secret-bearing leaf values replaced by\n * `'[REDACTED]'`. Walks plain objects and arrays. Leaves primitives, dates,\n * and other non-plain values untouched (other than via `structuredClone`).\n */\nexport function redactConfig<T>(config: T): T {\n const cloned = structuredClone(config) as unknown\n redactInPlace(cloned)\n return cloned as T\n}\n\nfunction redactInPlace(node: unknown): void {\n if (Array.isArray(node)) {\n for (const item of node) redactInPlace(item)\n return\n }\n if (node === null || typeof node !== 'object') return\n const obj = node as Record<string, unknown>\n for (const key of Object.keys(obj)) {\n if (shouldRedactKey(key) && obj[key] !== undefined && obj[key] !== null) {\n obj[key] = REDACTED\n } else {\n redactInPlace(obj[key])\n }\n }\n}\n\n/**\n * Yargs `.env()` with `dot-notation` turns `XL1_ACTORS__0__NAME=foo` into\n * `{ actors: { '0': { name: 'foo' } } }` \u2014 an object keyed by string indices\n * rather than an array. Normalize that back into an array so ConfigZod's\n * `actors` array schema accepts it.\n */\nfunction coerceActorsArray(argv: Record<string, unknown>): Record<string, unknown> {\n const actors = argv.actors\n if (actors === undefined || Array.isArray(actors)) return argv\n if (typeof actors !== 'object' || actors === null) return argv\n const entries = Object.entries(actors as Record<string, unknown>)\n const numericEntries = entries\n .map(([key, value]) => [Number(key), value] as const)\n .filter(([key]) => Number.isInteger(key) && key >= 0)\n if (numericEntries.length !== entries.length) return argv\n const asArray: unknown[] = []\n for (const [key, value] of numericEntries) asArray[key] = value\n return { ...argv, actors: asArray }\n}\n\nfunction safeParseOrThrow(input: unknown): Config {\n const result = ConfigZod.safeParse(input)\n if (!result.success) throw result.error\n return result.data as Config\n}\n\nasync function buildFinalConfig(argv: Record<string, unknown>): Promise<ConfigWithMnemonic> {\n // Parse the various config sources\n const configPath = argv.config as string | undefined\n const parsedConfigFile = await tryParseConfig({ configPath }) as ConfigWithMnemonic // Config file\n const rootMnemonicFromFile = typeof parsedConfigFile.mnemonic === 'string' ? parsedConfigFile.mnemonic : undefined\n const normalizedArgv = coerceActorsArray(argv)\n const parsedConfigArgs = ConfigZod.safeParse(normalizedArgv).data ?? {} // Command-line arguments & ENV VARs\n const rootMnemonicFromArgs = typeof normalizedArgv.mnemonic === 'string' ? normalizedArgv.mnemonic : undefined\n // Deep merge with precedence\n // TODO: Would like precedence to be defaults < file < ENV < CLI Args\n // but there is currently no way to determine which are defaults vs\n // user-supplied CLI Args since we set the CLI args to the defaults\n // and receive a flattened object. We might need to manually invoke\n // the parser without the defaults to achieve this.\n const mergedConfig = safeParseOrThrow(deepMerge(parsedConfigFile, parsedConfigArgs))\n const validated = safeParseOrThrow(resolveConfig(safeParseOrThrow(mergedConfig)))\n const rootMnemonic = rootMnemonicFromArgs ?? rootMnemonicFromFile\n return isDefined(rootMnemonic) ? { ...validated, mnemonic: rootMnemonic } : validated\n}\n\nexport async function configMiddleware(argv: Record<string, unknown>, setConfiguration: (config: Config) => void): Promise<void> {\n try {\n const finalConfig = await buildFinalConfig(argv)\n // Hard-fail if any actor was configured with its own mnemonic. Mnemonics\n // must live at the root; actors pick their wallet via accountPath.\n assertNoActorMnemonics(finalConfig)\n setConfiguration(finalConfig as Config)\n\n // Check if user wants to dump config and exit. Default behavior redacts\n // secrets (mnemonics, private keys, passwords, connection strings). Pass\n // `--with-secrets` to see the raw values \u2014 useful only on a developer box.\n if (argv['dump-config']) {\n const withSecrets = Boolean(argv['with-secrets'])\n const output = withSecrets ? finalConfig : redactConfig(finalConfig)\n console.log(JSON.stringify(output, null, 2))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n } catch (err) {\n if (err instanceof ConfigFileNotFoundError) {\n console.error(`${err.message}. Check the path passed to --config/-c and try again.`)\n } else if (err instanceof ActorMnemonicNotAllowedError) {\n console.error(err.message)\n } else if (isZodError(err)) {\n console.error(`Zod error: ${err.message}`)\n } else {\n console.error(`Error parsing configuration: ${err}`)\n }\n if (!(err instanceof ConfigFileNotFoundError) && !(err instanceof ActorMnemonicNotAllowedError)) {\n console.error(`Stack: ${err instanceof Error ? err.stack : 'N/A'}`)\n }\n throw new Error('Invalid configuration', { cause: err })\n }\n}\n", "import type { Logger, LogLevelValue } from '@xylabs/sdk-js'\nimport {\n Base,\n ConsoleLogger, isDefined,\n LogLevel, SilentLogger,\n} from '@xylabs/sdk-js'\nimport type { BaseConfig } from '@xyo-network/xl1-sdk'\n\nexport const initLogger = (config: BaseConfig): Logger => {\n let logger: Logger\n if (config.log.silent) {\n logger = new SilentLogger()\n } else {\n let level: LogLevelValue | undefined\n if (isDefined(config.log.logLevel)) {\n const parsed = LogLevel[config.log.logLevel.toLowerCase() as keyof typeof LogLevel]\n if (isDefined(parsed)) level = parsed\n }\n logger = new ConsoleLogger(level)\n }\n Base.defaultLogger = logger\n return logger\n}\n", "import { stdin as input, stdout as output } from 'node:process'\nimport { createInterface } from 'node:readline/promises'\n\nimport { isDefined } from '@xylabs/sdk-js'\nimport { apiCommand } from '@xyo-network/chain-api'\nimport { bridgeCommand } from '@xyo-network/chain-bridge'\nimport { finalizerCommand } from '@xyo-network/chain-finalizer'\nimport { mempoolCommand } from '@xyo-network/chain-mempool'\nimport {\n contextFromConfigWithoutLocator, detectDerivationPathCollisions, formatWalletReport, initializeResolvedWalletReport,\n locatorsFromConfig, Orchestrator,\n} from '@xyo-network/chain-orchestration'\nimport { initHealthEndpoints } from '@xyo-network/chain-orchestration-express'\nimport { producerCommand } from '@xyo-network/chain-producer'\nimport { rewardRedemptionCommand } from '@xyo-network/chain-reward-redemption'\nimport type { ActorConfig, Config } from '@xyo-network/xl1-sdk'\nimport {\n ActorConfigZod, ConfigZod, DefaultMetricsScrapePorts,\n} from '@xyo-network/xl1-sdk'\nimport type { Argv } from 'yargs'\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\nimport { z } from 'zod/mini'\n\nimport { startCommand, withDeprecationWarning } from './commands/index.ts'\nimport { configMiddleware } from './configMiddleware.ts'\nimport { formatProviderTree } from './dumpProviders.ts'\nimport { XL1LogoColorizedAscii } from './images.ts'\nimport { initLogger } from './initLogger.ts'\nimport { optionsFromGlobalZodRegistry } from './optionsFromGlobalZodRegistry.ts'\n\n/** Version string injected by Rollup at build time. */\ndeclare const __VERSION__: string\n\nconst DEFAULT_HEALTH_CHECK_PORT = 9099\n\n/**\n * Maps a CLI actor name to its registered Prometheus scrape port. The CLI-level\n * exporter (one per process) defaults to the port of the first requested actor\n * so that running, e.g., `xl1 start producer` and `xl1 start api` side-by-side\n * doesn't fight over a single shared default.\n */\nfunction defaultScrapePortForActors(actors: readonly string[]): number {\n const primary = actors[0]\n const key = primary === 'rewardRedemption' ? 'rewardRedemptionApi' : primary\n return (DefaultMetricsScrapePorts as Record<string, number>)[key] ?? DefaultMetricsScrapePorts.producer\n}\n\n/**\n * The configuration that will be used throughout the CLI.\n * This is materialized after parsing the command-line arguments,\n * environment variables, and defaults.\n */\nlet configuration: Config\nlet skipInsecureConfirm = false\nlet dumpProviders = false\n\nconst version = isDefined(__VERSION__) ? __VERSION__ : 'unknown'\n\nfunction getConfiguration(): Config {\n return configuration\n}\n\nasync function promptForInsecureGenesisConfirmation(logger: ReturnType<typeof initLogger>) {\n if (!input.isTTY || !output.isTTY) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped because this session is not a TTY.')\n return\n }\n const rl = createInterface({ input, output })\n try {\n await rl.question('Insecure genesis reward wallet is active. Hit RETURN to continue.')\n } finally {\n rl.close()\n }\n}\n\nasync function getLocatorsFromConfig(actors: string[], configuration: Config) {\n const actorConfigs: ActorConfig[] = []\n for (const actorName of actors) {\n const existingConfig = configuration.actors.find(actor => actor.name === actorName)\n if (existingConfig) {\n actorConfigs.push(existingConfig)\n } else {\n const actorConfig = z.looseObject(ActorConfigZod.shape).parse({ name: actorName })\n actorConfigs.push(actorConfig)\n }\n }\n\n const config = ConfigZod.parse({ ...configuration, actors: actorConfigs })\n\n const logger = initLogger(configuration)\n const orchestrator = await Orchestrator.create({ logger })\n const collision = detectDerivationPathCollisions(actors, configuration)\n if (collision) throw collision\n const walletReport = await initializeResolvedWalletReport(actors, configuration)\n logger.info(formatWalletReport(walletReport))\n const serviceName = actors.length === 1 ? `xl1-${actors[0]}` : 'xl1-cli'\n const context = await contextFromConfigWithoutLocator(config, logger, serviceName, version, defaultScrapePortForActors(actors))\n if (skipInsecureConfirm) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped via --skip-insecure-confirm.')\n }\n const onInsecureGenesisConfirm = skipInsecureConfirm\n ? undefined\n : async () => await promptForInsecureGenesisConfirmation(logger)\n const locators = await locatorsFromConfig(context, config, onInsecureGenesisConfirm)\n\n // `--dump-providers`: render the locator map and halt before the actor's\n // runner starts. Health endpoints and the SIGINT handler below are skipped.\n if (dumpProviders) {\n console.log(formatProviderTree(locators))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n\n const healthCheckPort = configuration.healthCheckPort ?? DEFAULT_HEALTH_CHECK_PORT\n const healthServer = healthCheckPort > 0 && context.statusReporter !== undefined\n ? await initHealthEndpoints({\n logger,\n port: healthCheckPort,\n readiness: orchestrator,\n statusMonitor: context.statusReporter,\n })\n : undefined\n\n // Handle cancellation (Ctrl+C)\n process.on('SIGINT', () => {\n void (async () => {\n try {\n logger.log('\\nSIGINT received. Attempting graceful shutdown...')\n healthServer?.close()\n await orchestrator?.stop()\n logger.log('Orchestrator stopped, exiting now.')\n process.exit(0)\n } catch (err) {\n logger.error('Error stopping orchestrator:', err)\n process.exit(1)\n }\n })()\n })\n return { locators, orchestrator }\n}\n\n// Main entry point\nexport async function runCLI() {\n // Parse command-line arguments using Yargs\n const y = yargs(hideBin(process.argv)) as Argv<Config>\n const argv = y\n .usage(`\n\uD83D\uDE80 XL1 Node CLI (${version})\n${XL1LogoColorizedAscii}\nRun various components of the XL1 ecosystem.\n\nUsage:\n$0 <command> [options]`)\n .parserConfiguration({\n 'dot-notation': true, // foo.bar \u2192 { foo: { bar } }\n 'parse-numbers': false, // Don't auto-parse numbers to allow strings like \"0x1\"\n 'populate--': true, // Populate -- with all options so we can detected user-supplied vs defaults\n })\n .env('XL1')\n .scriptName('xl1')\n .middleware(async (argv) => {\n await configMiddleware(argv, (config) => {\n configuration = config\n })\n skipInsecureConfirm = Boolean(argv['skip-insecure-confirm'])\n dumpProviders = Boolean(argv['dump-providers'])\n })\n .options(optionsFromGlobalZodRegistry())\n .wrap(y.terminalWidth())\n .command(withDeprecationWarning(apiCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(bridgeCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(finalizerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(mempoolCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(producerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(rewardRedemptionCommand(getConfiguration, getLocatorsFromConfig)))\n .command(startCommand(getConfiguration, getLocatorsFromConfig))\n .options({\n 'config': {\n type: 'string',\n description: 'Path to a config file to use instead of the default search.',\n alias: 'c',\n },\n 'mnemonic': {\n type: 'string',\n description: 'Shared root mnemonic used by actors that do not define their own mnemonic.',\n },\n 'dump-config': {\n type: 'boolean',\n description: 'Just process the configuration and print the resolved config to stdout, then exit. Secrets are redacted unless --with-secrets is also passed.',\n default: false,\n },\n 'with-secrets': {\n type: 'boolean',\n description: 'When used with --dump-config, print raw secret values (mnemonic, private keys, passwords) instead of \"[REDACTED]\". Use only on a developer machine.',\n default: false,\n },\n 'dump-providers': {\n type: 'boolean',\n description: 'Run the normal command flow up to provider locator construction, print the per-actor provider tree (with duplicate detection), then exit.',\n default: false,\n },\n 'skip-insecure-confirm': {\n type: 'boolean',\n description: 'Skip the interactive RETURN confirmation when the built-in dev mnemonic / insecure genesis reward wallet is active.',\n default: false,\n },\n })\n .help()\n .alias('help', 'h')\n .version(version)\n .argv\n\n await argv\n}\n", "import { getApiActor } from '@xyo-network/chain-api'\nimport { getBridgeActor } from '@xyo-network/chain-bridge'\nimport { getFinalizerActor } from '@xyo-network/chain-finalizer'\nimport { getMempoolActor } from '@xyo-network/chain-mempool'\nimport type {\n ActorInstanceV3, GetLocatorsFromConfig, OrchestratorInstance,\n} from '@xyo-network/chain-orchestration'\nimport {\n ApiConfigZod,\n BridgeConfigZod,\n FinalizerConfigZod,\n MempoolConfigZod,\n ProducerConfigZod,\n RewardRedemptionConfigZod,\n} from '@xyo-network/chain-orchestration'\nimport { getProducerActor } from '@xyo-network/chain-producer'\nimport { getRewardRedemptionActor } from '@xyo-network/chain-reward-redemption'\nimport type { Config, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\nimport type {\n ArgumentsCamelCase, Argv, CommandModule,\n} from 'yargs'\n\nimport { initLogger } from '../../initLogger.ts'\n\ninterface StartArgs {\n actors?: string[]\n}\n\nconst KNOWN_ACTORS = ['api', 'bridge', 'finalizer', 'mempool', 'producer', 'rewardRedemption'] as const\n\nconst BOOT_TIMEOUT_MS = 60_000\n\nfunction getActorsFromConfig(configuration: Config): string[] | undefined {\n const enabledActors = configuration.actors\n .filter(actor => actor.enabled !== false)\n .map(actor => actor.name)\n return enabledActors.length > 0 ? enabledActors : undefined\n}\n\nfunction getDefaultActors(): string[] {\n return ['api', 'producer', 'finalizer']\n}\n\nasync function buildActor(\n name: string,\n locator: ProviderFactoryLocatorInstance,\n): Promise<ActorInstanceV3> {\n switch (name) {\n case 'api': {\n const config = ApiConfigZod.parse(locator.context.config)\n return await getApiActor(config, locator)\n }\n case 'bridge': {\n const config = BridgeConfigZod.parse(locator.context.config)\n return await getBridgeActor(config, locator)\n }\n case 'mempool': {\n const config = MempoolConfigZod.parse(locator.context.config)\n return await getMempoolActor(config, locator)\n }\n case 'producer': {\n const config = ProducerConfigZod.parse(locator.context.config)\n return await getProducerActor(config, locator)\n }\n case 'rewardRedemption': {\n const config = RewardRedemptionConfigZod.parse(locator.context.config)\n return await getRewardRedemptionActor(config, locator)\n }\n case 'finalizer': {\n const config = FinalizerConfigZod.parse(locator.context.config)\n return await getFinalizerActor(config, locator)\n }\n default: {\n throw new Error(`Unknown actor: ${name}`)\n }\n }\n}\n\nasync function bootActors(\n requestedActors: string[],\n locators: Record<string, ProviderFactoryLocatorInstance>,\n orchestrator: OrchestratorInstance,\n configuration: Config,\n): Promise<void> {\n const startedAt = Date.now()\n const actors = await Promise.all(requestedActors.map(name => buildActor(name, locators[name])))\n for (const actor of actors) {\n await orchestrator.registerActor(actor)\n }\n await orchestrator.start()\n await orchestrator.whenReady(BOOT_TIMEOUT_MS)\n const ms = Date.now() - startedAt\n initLogger(configuration).info(`[xl1] system ready (${requestedActors.join('/')} in ${ms}ms)`)\n}\n\nexport function startCommand(getConfiguration: () => Config, getLocatorsFromConfig: GetLocatorsFromConfig): CommandModule {\n return {\n command: ['start [actors..]', '$0'],\n describe: 'Run a full XL1 Node',\n builder: (yargs: Argv) => {\n return yargs\n .positional('actors', {\n type: 'string',\n array: true,\n choices: KNOWN_ACTORS,\n description: 'Actors to start (e.g. xl1 start api producer or xl1 start api,producer)',\n coerce: (values: string[]) => values.flatMap(v => v.split(',')),\n })\n .option('actors', {\n type: 'array',\n string: true,\n choices: KNOWN_ACTORS,\n description: 'List of actors to start (e.g. --actors api producer finalizer). Defaults to api, producer, and finalizer.',\n })\n },\n handler: async (argv: ArgumentsCamelCase<StartArgs>) => {\n const configuration = getConfiguration()\n const requestedActors = argv.actors !== undefined && argv.actors.length > 0\n ? argv.actors\n : getActorsFromConfig(configuration) ?? getDefaultActors()\n const { locators, orchestrator } = await getLocatorsFromConfig(requestedActors, configuration)\n await bootActors(requestedActors, locators, orchestrator, configuration)\n },\n }\n}\n", "import { delay } from '@xylabs/sdk-js'\nimport type { CommandModule } from 'yargs'\n\nexport function withDeprecationWarning(module: CommandModule): CommandModule {\n const { deprecated, handler } = module\n if (typeof deprecated === 'string') {\n return {\n ...module,\n handler: async (argv) => {\n console.warn(`[deprecated] ${deprecated}`)\n await delay(3000)\n return handler(argv)\n },\n }\n }\n return module\n}\n", "import type { ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\n\n/**\n * One row in the per-actor provider tree. Captures the moniker (registry key),\n * the implementation class, the dependency monikers the factory declared, the\n * factory scope, and a `count` of how many times an identical fingerprint\n * appeared in the same moniker bucket. The registry can hold the same factory\n * more than once (e.g. via merges or multi-moniker registrations); collapsing\n * keeps the tree readable while still surfacing the multiplicity.\n */\ninterface ProviderEntry {\n count: number\n dependencies: readonly string[]\n moniker: string\n providerName: string\n scope: string\n}\n\nconst CANONICAL_ACTOR_ORDER: readonly string[] = [\n '_root', 'producer', 'finalizer', 'api', 'mempool', 'bridge', 'rewardRedemption',\n]\n\n/**\n * Enumerates the providers registered directly on a single locator. Does not\n * walk the parent chain \u2014 each locator is reported on its own so that a reader\n * can see exactly which providers a given actor contributed versus what it\n * inherits from `_root`.\n */\nfunction enumerateLocator(locator: ProviderFactoryLocatorInstance): ProviderEntry[] {\n const collapsed = new Map<string, ProviderEntry>()\n const registry = locator.registry as Record<string, unknown[] | undefined>\n for (const moniker of Object.keys(registry)) {\n const factories = registry[moniker]\n if (!factories) continue\n for (const factory of factories) {\n const f = factory as { dependencies?: readonly string[]; providerName?: string; scope?: string }\n const providerName = f.providerName ?? '<unknown>'\n const scope = f.scope ?? '<unknown>'\n const dependencies = f.dependencies ?? []\n const fingerprint = `${moniker}|${providerName}|${scope}|${dependencies.join(',')}`\n const existing = collapsed.get(fingerprint)\n if (existing) {\n existing.count += 1\n } else {\n collapsed.set(fingerprint, {\n count: 1, dependencies, moniker, providerName, scope,\n })\n }\n }\n }\n return [...collapsed.values()].toSorted((a, b) => a.moniker.localeCompare(b.moniker) || a.providerName.localeCompare(b.providerName))\n}\n\nfunction buildOwnerIndex(perActor: ReadonlyMap<string, readonly ProviderEntry[]>): Map<string, Set<string>> {\n const monikerOwners = new Map<string, Set<string>>()\n for (const [actorName, entries] of perActor) {\n for (const entry of entries) {\n let owners = monikerOwners.get(entry.moniker)\n if (!owners) {\n owners = new Set()\n monikerOwners.set(entry.moniker, owners)\n }\n owners.add(actorName)\n }\n }\n return monikerOwners\n}\n\nfunction renderDuplicatesSummary(monikerOwners: ReadonlyMap<string, ReadonlySet<string>>): string[] {\n const duplicates = [...monikerOwners.entries()]\n .filter(([, owners]) => owners.size > 1)\n .map(([moniker, owners]) => ({ moniker, owners: [...owners].toSorted().map(formatGroupForDisplay) }))\n .toSorted((a, b) => a.moniker.localeCompare(b.moniker))\n if (duplicates.length === 0) return []\n const lines = ['Duplicate monikers (registered by more than one locator):']\n for (const { moniker, owners } of duplicates) {\n lines.push(` - ${moniker}: ${owners.join(', ')}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Groups actor names whose locators share the same `registry` object reference.\n * Under the shared-locator architecture (Option B), api/mempool/finalizer all\n * point to view locators that share one underlying registry \u2014 without this\n * grouping, the dump would print the same factory set N times and falsely\n * report every moniker as \"duplicate across actors.\"\n */\nfunction groupActorsBySharedRegistry(\n locators: Record<string, ProviderFactoryLocatorInstance>,\n): { actorNames: readonly string[]; locator: ProviderFactoryLocatorInstance }[] {\n const groups: { actorNames: string[]; locator: ProviderFactoryLocatorInstance; registry: unknown }[] = []\n for (const actorName of Object.keys(locators)) {\n const locator = locators[actorName]\n const existing = groups.find(g => g.registry === locator.registry)\n if (existing) {\n existing.actorNames.push(actorName)\n } else {\n groups.push({\n actorNames: [actorName], locator, registry: locator.registry,\n })\n }\n }\n return groups\n}\n\n/**\n * Stable id for a registry-sharing group: sorted, comma-joined actor names.\n * Used as the key in `monikerOwners`. Multi-actor group ids contain commas;\n * we display them parenthesized in the `also in:` annotation.\n */\nfunction groupId(actorNames: readonly string[]): string {\n return [...actorNames].toSorted().join(',')\n}\n\nfunction formatGroupForDisplay(groupKey: string): string {\n const members = groupKey.split(',')\n return members.length === 1 ? members[0] : `(${members.join(', ')})`\n}\n\nfunction renderGroupSection(\n actorNames: readonly string[],\n entries: readonly ProviderEntry[],\n monikerOwners: ReadonlyMap<string, ReadonlySet<string>>,\n): string[] {\n const sortedActors = [...actorNames].toSorted()\n const ownGroupKey = groupId(sortedActors)\n const heading = sortedActors.length === 1\n ? `Providers for actor: ${sortedActors[0]} (${entries.length} registered)`\n : `Providers shared by actors: ${sortedActors.join(', ')} (${entries.length} registered)`\n const lines: string[] = [heading]\n if (entries.length === 0) {\n lines.push(' (none)', '')\n return lines\n }\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]\n const isLast = i === entries.length - 1\n const branch = isLast ? '\u2514\u2500\u2500' : '\u251C\u2500\u2500'\n const owners = monikerOwners.get(entry.moniker) ?? new Set<string>()\n const otherOwners = [...owners]\n .filter(o => o !== ownGroupKey)\n .toSorted()\n .map(formatGroupForDisplay)\n const dupNote = otherOwners.length > 0 ? ` \u26A0 also in: ${otherOwners.join(', ')}` : ''\n const depsNote = entry.dependencies.length > 0 ? `, deps: [${entry.dependencies.join(', ')}]` : ''\n const countNote = entry.count > 1 ? ` (\u00D7${entry.count})` : ''\n lines.push(` ${branch} ${entry.moniker}${countNote} [impl: ${entry.providerName}, scope: ${entry.scope}${depsNote}]${dupNote}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Renders the locator map as a tree grouped by registry identity, annotating\n * any moniker that appears in more than one *registry* with `\u26A0 also in: ...`.\n *\n * - When all input locators share one registry (shared-locator path), a single\n * \"Providers shared by actors: \u2026\" section is rendered.\n * - When some actors have distinct registries (legacy `_root` + per-actor\n * child architecture), each registry is rendered separately. `_root` is\n * ordered first.\n *\n * The \"Duplicate monikers\" summary at the bottom only flags monikers\n * registered by *different* registries \u2014 duplicates within one registry are\n * already collapsed into per-entry `(\u00D7N)` counts by `enumerateLocator`.\n */\nexport function formatProviderTree(locators: Record<string, ProviderFactoryLocatorInstance>): string {\n const groups = groupActorsBySharedRegistry(locators)\n\n // Per-actor moniker ownership (used for the \"also in:\" annotation), but\n // attribute each moniker to the GROUP it belongs to \u2014 the \"actor name\" the\n // index uses is the joined group key, so two actors that share a registry\n // never appear as duplicates of each other.\n const groupKeys = groups.map(g => ({ ...g, key: groupId(g.actorNames) }))\n const perGroup = new Map<string, ProviderEntry[]>()\n for (const g of groupKeys) perGroup.set(g.key, enumerateLocator(g.locator))\n const monikerOwners = buildOwnerIndex(perGroup)\n\n // Order: legacy `_root` first when present; otherwise alphabetical by sorted\n // actor names within the group, with the canonical actor order applied to\n // the *primary* (sorted-first) actor name in each group.\n const orderedGroups = [...groupKeys].toSorted((a, b) => {\n const aHasRoot = a.actorNames.includes('_root')\n const bHasRoot = b.actorNames.includes('_root')\n if (aHasRoot !== bHasRoot) return aHasRoot ? -1 : 1\n const ai = CANONICAL_ACTOR_ORDER.indexOf(a.actorNames[0])\n const bi = CANONICAL_ACTOR_ORDER.indexOf(b.actorNames[0])\n if (ai !== bi) return (ai === -1 ? Number.MAX_SAFE_INTEGER : ai) - (bi === -1 ? Number.MAX_SAFE_INTEGER : bi)\n return a.key.localeCompare(b.key)\n })\n\n const lines: string[] = ['XL1 Provider Dump', '=================', '']\n for (const g of orderedGroups) {\n lines.push(...renderGroupSection(g.actorNames.toSorted(), perGroup.get(g.key) ?? [], monikerOwners))\n }\n lines.push(...renderDuplicatesSummary(monikerOwners))\n return lines.join('\\n')\n}\n", "/* eslint-disable no-irregular-whitespace, @stylistic/max-len */\nexport const XL1LogoColorizedAscii = `\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;118;111;144m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;72;32;223m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u2560\u2560\u001B[0m\u001B[38;2;103;85;170m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;79;121;152m\u2566\u001B[0m\u001B[38;2;82;121;151m\u2566\u001B[0m\u001B[38;2;112;125;136m_\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;88;59;196m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;73;34;221m\u2592\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;121;121;127m_\u001B[0m\u001B[38;2;100;101;128m\u2554\u001B[0m\u001B[38;2;93;94;127m\u2566\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;82;121;151m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2560\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;51;117;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u001B[0m\u001B[38;2;111;125;136m_\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;67;23;232m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;120;121;128m_\u001B[0m\u001B[38;2;100;101;127m\u2554\u001B[0m\u001B[38;2;79;81;127mR\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;88;90;127m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;55;117;165m\u255A\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u001B[0m\u001B[38;2;50;116;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u00A0\u001B[0m\u001B[38;2;106;90;165mj\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;89;61;194mH\u00A0\u001B[0m\u001B[38;2;99;100;127m\u2554\u001B[0m\u001B[38;2;79;80;127mD\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;83;121;150m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u2592\u00A0\u001B[0m\u001B[38;2;76;38;217m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;74;76;128m\u2560\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2592\u001B[0m\u001B[38;2;89;90;128m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;90;118;148m\\`\u001B[0m\u001B[38;2;89;107;153m_\u001B[0m\u001B[38;2;93;97;154m,\u001B[0m\u001B[38;2;105;89;166m\u2553\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;95;72;183m\u2553\u001B[0m\u001B[38;2;106;96;152m_\u001B[0m\u001B[38;2;100;94;143m\\`\u001B[0m\u001B[38;2;101;100;133m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;122;118;137m_\u001B[0m\u001B[38;2;113;102;153m,\u001B[0m\u001B[38;2;108;94;161m\u2553\u001B[0m\u001B[38;2;104;86;169m\u2553\u001B[0m\u001B[38;2;98;77;178m\u2554\u001B[0m\u001B[38;2;93;67;188m\u2557\u001B[0m\u001B[38;2;88;59;196m\u03C6\u001B[0m\u001B[38;2;83;51;204m@\u001B[0m\u001B[38;2;78;42;213mD\u001B[0m\u001B[38;2;72;32;223m\u2592\u001B[0m\u001B[38;2;68;24;231m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;71;30;225m\u2592\u001B[0m\u001B[38;2;77;40;215m\u2592\u001B[0m\u001B[38;2;82;49;206mK\u001B[0m\u001B[38;2;87;57;198m\u03C6\u001B[0m\u001B[38;2;91;65;190m\u2557\u001B[0m\u001B[38;2;97;75;180m\u2566\u001B[0m\u001B[38;2;103;84;171m\u2556\u001B[0m\u001B[38;2;107;92;163m\u00B2\u001B[0m\u001B[38;2;112;101;154m_\u001B[0m\u001B[38;2;119;112;143m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;106;91;164m\\`\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;89;62;193m\u2559\u001B[0m\u001B[38;2;85;54;201m\u2559\u001B[0m\u001B[38;2;80;45;210m\u255A\u001B[0m\u001B[38;2;74;35;220m\u255D\u001B[0m\u001B[38;2;69;26;229m\u2560\u001B[0m\u001B[38;2;66;22;233m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;73;33;222m\u255D\u001B[0m\u001B[38;2;79;43;212m\u2569\u001B[0m\u001B[38;2;84;52;203m\u255C\u001B[0m\u001B[38;2;88;60;195m\u2559\u001B[0m\u001B[38;2;93;68;187m^\u001B[0m\u001B[38;2;100;80;175m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;113;84;152m\\`\u001B[0m\u001B[38;2;103;79;169m'\u001B[0m\u001B[38;2;95;72;183m\"\u001B[0m\u001B[38;2;87;57;198m\u2559\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;80;46;209m\u255C\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;102;77;175m^\u001B[0m\u001B[38;2;112;81;162m\\`\u001B[0m\u001B[38;2;115;92;155m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;145;116;107m,\u001B[0m\u001B[38;2;199;82;45m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2560\u00A0\u001B[0m\u001B[38;2;70;28;227m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;189;49;97m\u00E5\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;155;92;114m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;175;98;73m\u2554\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2592\u2592\u001B[0m\u001B[38;2;197;83;47m\u2569\u00A0\u001B[0m\u001B[38;2;98;76;179m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;81;48;207mH\u00A0\u001B[0m\u001B[38;2;188;51;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u2560\u001B[0m\u001B[38;2;183;57;100mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;146;116;106m,\u001B[0m\u001B[38;2;199;82;44m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;196;84;48m\u2569\u001B[0m\u001B[38;2;168;102;81m^\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;160;87;111m'\u001B[0m\u001B[38;2;187;52;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;156;91;113m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;198;83;46m\u2569\u001B[0m\u001B[38;2;194;85;50m\u2569\u001B[0m\u001B[38;2;167;102;82m^\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;81;46;209m\u255A\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;159;88;112m'\u001B[0m\u001B[38;2;186;53;98m\u255A\u001B[0m\u001B[38;2;197;40;93m\u2569\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;110;97;158m'\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;94;69;186mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;68;25;230m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;108;93;162m\u00B2\u001B[0m\u001B[38;2;99;79;176m^\u001B[0m`\n", "import type { UsageMeta } from '@xyo-network/xl1-sdk'\nimport { isUsageMeta } from '@xyo-network/xl1-sdk'\nimport type { Options } from 'yargs'\nimport { globalRegistry } from 'zod/mini'\n\nconst usageMetaToOptions = (meta: UsageMeta): Options => {\n return meta\n}\n\nexport const optionsFromGlobalZodRegistry = (): Record<string, Options> => {\n const opts: Record<string, Options> = {}\n for (const schema of Object.values(globalRegistry._map)) {\n if (isUsageMeta(schema)) {\n if (schema.hidden) continue // skip hidden options\n opts[schema.title] = usageMetaToOptions(schema)\n }\n }\n return opts\n}\n", "import { config } from 'dotenv'\n\nimport { runCLI } from './runCLI.ts'\n\nexport const start = async () => {\n config({ quiet: true })\n await runCLI()\n}\n"],
5
+ "mappings": ";AAAA,SAAS,iBAAiB,iBAAiB;AAC3C;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAA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gBAAgB,kBAAkB,qBAAqB,CAAC,CAAC,EACxF,QAAQ,uBAAuB,wBAAwB,kBAAkB,qBAAqB,CAAC,CAAC,EAChG,QAAQ,aAAa,kBAAkB,qBAAqB,CAAC,EAC7D,QAAQ;AAAA,IACP,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,OAAO;AAAA,IACT;AAAA,IACA,YAAY;AAAA,MACV,MAAM;AAAA,MACN,aAAa;AAAA,IACf;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,yBAAyB;AAAA,MACvB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,EACF,CAAC,EACA,KAAK,EACL,MAAM,QAAQ,GAAG,EACjB,QAAQ,OAAO,EACf;AAEH,QAAM;AACR;;;AMtNA,SAAS,cAAc;AAIhB,IAAM,QAAQ,YAAY;AAC/B,SAAO,EAAE,OAAO,KAAK,CAAC;AACtB,QAAM,OAAO;AACf;",
6
6
  "names": ["config", "input", "output", "isDefined", "config", "isDefined", "ConfigZod", "configuration", "config", "getConfiguration", "getLocatorsFromConfig", "yargs", "isDefined", "configuration", "config", "ConfigZod", "argv"]
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"runCLI.d.ts","sourceRoot":"","sources":["../../src/runCLI.ts"],"names":[],"mappings":"AA8IA,wBAAsB,MAAM,kBAuE3B"}
1
+ {"version":3,"file":"runCLI.d.ts","sourceRoot":"","sources":["../../src/runCLI.ts"],"names":[],"mappings":"AA+IA,wBAAsB,MAAM,kBAuE3B"}
package/dist/node/xl1.mjs CHANGED
@@ -27,6 +27,7 @@ import {
27
27
  } from "@xyo-network/xl1-sdk";
28
28
  import yargs from "yargs";
29
29
  import { hideBin } from "yargs/helpers";
30
+ import { z } from "zod/mini";
30
31
 
31
32
  // src/commands/start/startCommand.ts
32
33
  import { getApiActor } from "@xyo-network/chain-api";
@@ -415,7 +416,7 @@ var XL1LogoColorizedAscii = `\x1B[38;2;128;128;128m\xA0\xA0\xA0\xA0\xA0\xA0\xA0\
415
416
 
416
417
  // src/optionsFromGlobalZodRegistry.ts
417
418
  import { isUsageMeta } from "@xyo-network/xl1-sdk";
418
- import { globalRegistry } from "zod";
419
+ import { globalRegistry } from "zod/mini";
419
420
  var usageMetaToOptions = (meta) => {
420
421
  return meta;
421
422
  };
@@ -431,7 +432,7 @@ var optionsFromGlobalZodRegistry = () => {
431
432
  };
432
433
 
433
434
  // src/runCLI.ts
434
- var DEFAULT_HEALTH_CHECK_PORT = 9090;
435
+ var DEFAULT_HEALTH_CHECK_PORT = 9099;
435
436
  function defaultScrapePortForActors(actors) {
436
437
  const primary = actors[0];
437
438
  const key = primary === "rewardRedemption" ? "rewardRedemptionApi" : primary;
@@ -440,7 +441,7 @@ function defaultScrapePortForActors(actors) {
440
441
  var configuration;
441
442
  var skipInsecureConfirm = false;
442
443
  var dumpProviders = false;
443
- var version = isDefined3("1.23.2") ? "1.23.2" : "unknown";
444
+ var version = isDefined3("2.0.1") ? "2.0.1" : "unknown";
444
445
  function getConfiguration() {
445
446
  return configuration;
446
447
  }
@@ -463,7 +464,7 @@ async function getLocatorsFromConfig(actors, configuration2) {
463
464
  if (existingConfig) {
464
465
  actorConfigs.push(existingConfig);
465
466
  } else {
466
- const actorConfig = ActorConfigZod.loose().parse({ name: actorName });
467
+ const actorConfig = z.looseObject(ActorConfigZod.shape).parse({ name: actorName });
467
468
  actorConfigs.push(actorConfig);
468
469
  }
469
470
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/start.ts", "../../src/runCLI.ts", "../../src/commands/start/startCommand.ts", "../../src/initLogger.ts", "../../src/commands/withDeprecationWarning.ts", "../../src/configMiddleware.ts", "../../src/dumpProviders.ts", "../../src/images.ts", "../../src/optionsFromGlobalZodRegistry.ts", "../../src/xl1.ts"],
4
- "sourcesContent": ["import { config } from 'dotenv'\n\nimport { runCLI } from './runCLI.ts'\n\nexport const start = async () => {\n config({ quiet: true })\n await runCLI()\n}\n", "import { stdin as input, stdout as output } from 'node:process'\nimport { createInterface } from 'node:readline/promises'\n\nimport { isDefined } from '@xylabs/sdk-js'\nimport { apiCommand } from '@xyo-network/chain-api'\nimport { bridgeCommand } from '@xyo-network/chain-bridge'\nimport { finalizerCommand } from '@xyo-network/chain-finalizer'\nimport { mempoolCommand } from '@xyo-network/chain-mempool'\nimport {\n contextFromConfigWithoutLocator, detectDerivationPathCollisions, formatWalletReport, initializeResolvedWalletReport,\n locatorsFromConfig, Orchestrator,\n} from '@xyo-network/chain-orchestration'\nimport { initHealthEndpoints } from '@xyo-network/chain-orchestration-express'\nimport { producerCommand } from '@xyo-network/chain-producer'\nimport { rewardRedemptionCommand } from '@xyo-network/chain-reward-redemption'\nimport type { ActorConfig, Config } from '@xyo-network/xl1-sdk'\nimport {\n ActorConfigZod, ConfigZod, DefaultMetricsScrapePorts,\n} from '@xyo-network/xl1-sdk'\nimport type { Argv } from 'yargs'\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\n\nimport { startCommand, withDeprecationWarning } from './commands/index.ts'\nimport { configMiddleware } from './configMiddleware.ts'\nimport { formatProviderTree } from './dumpProviders.ts'\nimport { XL1LogoColorizedAscii } from './images.ts'\nimport { initLogger } from './initLogger.ts'\nimport { optionsFromGlobalZodRegistry } from './optionsFromGlobalZodRegistry.ts'\n\n/** Version string injected by Rollup at build time. */\ndeclare const __VERSION__: string\n\nconst DEFAULT_HEALTH_CHECK_PORT = 9090\n\n/**\n * Maps a CLI actor name to its registered Prometheus scrape port. The CLI-level\n * exporter (one per process) defaults to the port of the first requested actor\n * so that running, e.g., `xl1 start producer` and `xl1 start api` side-by-side\n * doesn't fight over a single shared default.\n */\nfunction defaultScrapePortForActors(actors: readonly string[]): number {\n const primary = actors[0]\n const key = primary === 'rewardRedemption' ? 'rewardRedemptionApi' : primary\n return (DefaultMetricsScrapePorts as Record<string, number>)[key] ?? DefaultMetricsScrapePorts.producer\n}\n\n/**\n * The configuration that will be used throughout the CLI.\n * This is materialized after parsing the command-line arguments,\n * environment variables, and defaults.\n */\nlet configuration: Config\nlet skipInsecureConfirm = false\nlet dumpProviders = false\n\nconst version = isDefined(__VERSION__) ? __VERSION__ : 'unknown'\n\nfunction getConfiguration(): Config {\n return configuration\n}\n\nasync function promptForInsecureGenesisConfirmation(logger: ReturnType<typeof initLogger>) {\n if (!input.isTTY || !output.isTTY) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped because this session is not a TTY.')\n return\n }\n const rl = createInterface({ input, output })\n try {\n await rl.question('Insecure genesis reward wallet is active. Hit RETURN to continue.')\n } finally {\n rl.close()\n }\n}\n\nasync function getLocatorsFromConfig(actors: string[], configuration: Config) {\n const actorConfigs: ActorConfig[] = []\n for (const actorName of actors) {\n const existingConfig = configuration.actors.find(actor => actor.name === actorName)\n if (existingConfig) {\n actorConfigs.push(existingConfig)\n } else {\n const actorConfig = ActorConfigZod.loose().parse({ name: actorName })\n actorConfigs.push(actorConfig)\n }\n }\n\n const config = ConfigZod.parse({ ...configuration, actors: actorConfigs })\n\n const logger = initLogger(configuration)\n const orchestrator = await Orchestrator.create({ logger })\n const collision = detectDerivationPathCollisions(actors, configuration)\n if (collision) throw collision\n const walletReport = await initializeResolvedWalletReport(actors, configuration)\n logger.info(formatWalletReport(walletReport))\n const serviceName = actors.length === 1 ? `xl1-${actors[0]}` : 'xl1-cli'\n const context = await contextFromConfigWithoutLocator(config, logger, serviceName, version, defaultScrapePortForActors(actors))\n if (skipInsecureConfirm) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped via --skip-insecure-confirm.')\n }\n const onInsecureGenesisConfirm = skipInsecureConfirm\n ? undefined\n : async () => await promptForInsecureGenesisConfirmation(logger)\n const locators = await locatorsFromConfig(context, config, onInsecureGenesisConfirm)\n\n // `--dump-providers`: render the locator map and halt before the actor's\n // runner starts. Health endpoints and the SIGINT handler below are skipped.\n if (dumpProviders) {\n console.log(formatProviderTree(locators))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n\n const healthCheckPort = configuration.healthCheckPort ?? DEFAULT_HEALTH_CHECK_PORT\n const healthServer = healthCheckPort > 0 && context.statusReporter !== undefined\n ? await initHealthEndpoints({\n logger,\n port: healthCheckPort,\n readiness: orchestrator,\n statusMonitor: context.statusReporter,\n })\n : undefined\n\n // Handle cancellation (Ctrl+C)\n process.on('SIGINT', () => {\n void (async () => {\n try {\n logger.log('\\nSIGINT received. Attempting graceful shutdown...')\n healthServer?.close()\n await orchestrator?.stop()\n logger.log('Orchestrator stopped, exiting now.')\n process.exit(0)\n } catch (err) {\n logger.error('Error stopping orchestrator:', err)\n process.exit(1)\n }\n })()\n })\n return { locators, orchestrator }\n}\n\n// Main entry point\nexport async function runCLI() {\n // Parse command-line arguments using Yargs\n const y = yargs(hideBin(process.argv)) as Argv<Config>\n const argv = y\n .usage(`\n\uD83D\uDE80 XL1 Node CLI (${version})\n${XL1LogoColorizedAscii}\nRun various components of the XL1 ecosystem.\n\nUsage:\n$0 <command> [options]`)\n .parserConfiguration({\n 'dot-notation': true, // foo.bar \u2192 { foo: { bar } }\n 'parse-numbers': false, // Don't auto-parse numbers to allow strings like \"0x1\"\n 'populate--': true, // Populate -- with all options so we can detected user-supplied vs defaults\n })\n .env('XL1')\n .scriptName('xl1')\n .middleware(async (argv) => {\n await configMiddleware(argv, (config) => {\n configuration = config\n })\n skipInsecureConfirm = Boolean(argv['skip-insecure-confirm'])\n dumpProviders = Boolean(argv['dump-providers'])\n })\n .options(optionsFromGlobalZodRegistry())\n .wrap(y.terminalWidth())\n .command(withDeprecationWarning(apiCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(bridgeCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(finalizerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(mempoolCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(producerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(rewardRedemptionCommand(getConfiguration, getLocatorsFromConfig)))\n .command(startCommand(getConfiguration, getLocatorsFromConfig))\n .options({\n 'config': {\n type: 'string',\n description: 'Path to a config file to use instead of the default search.',\n alias: 'c',\n },\n 'mnemonic': {\n type: 'string',\n description: 'Shared root mnemonic used by actors that do not define their own mnemonic.',\n },\n 'dump-config': {\n type: 'boolean',\n description: 'Just process the configuration and print the resolved config to stdout, then exit. Secrets are redacted unless --with-secrets is also passed.',\n default: false,\n },\n 'with-secrets': {\n type: 'boolean',\n description: 'When used with --dump-config, print raw secret values (mnemonic, private keys, passwords) instead of \"[REDACTED]\". Use only on a developer machine.',\n default: false,\n },\n 'dump-providers': {\n type: 'boolean',\n description: 'Run the normal command flow up to provider locator construction, print the per-actor provider tree (with duplicate detection), then exit.',\n default: false,\n },\n 'skip-insecure-confirm': {\n type: 'boolean',\n description: 'Skip the interactive RETURN confirmation when the built-in dev mnemonic / insecure genesis reward wallet is active.',\n default: false,\n },\n })\n .help()\n .alias('help', 'h')\n .version(version)\n .argv\n\n await argv\n}\n", "import { getApiActor } from '@xyo-network/chain-api'\nimport { getBridgeActor } from '@xyo-network/chain-bridge'\nimport { getFinalizerActor } from '@xyo-network/chain-finalizer'\nimport { getMempoolActor } from '@xyo-network/chain-mempool'\nimport type {\n ActorInstanceV3, GetLocatorsFromConfig, OrchestratorInstance,\n} from '@xyo-network/chain-orchestration'\nimport {\n ApiConfigZod,\n BridgeConfigZod,\n FinalizerConfigZod,\n MempoolConfigZod,\n ProducerConfigZod,\n RewardRedemptionConfigZod,\n} from '@xyo-network/chain-orchestration'\nimport { getProducerActor } from '@xyo-network/chain-producer'\nimport { getRewardRedemptionActor } from '@xyo-network/chain-reward-redemption'\nimport type { Config, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\nimport type {\n ArgumentsCamelCase, Argv, CommandModule,\n} from 'yargs'\n\nimport { initLogger } from '../../initLogger.ts'\n\ninterface StartArgs {\n actors?: string[]\n}\n\nconst KNOWN_ACTORS = ['api', 'bridge', 'finalizer', 'mempool', 'producer', 'rewardRedemption'] as const\n\nconst BOOT_TIMEOUT_MS = 60_000\n\nfunction getActorsFromConfig(configuration: Config): string[] | undefined {\n const enabledActors = configuration.actors\n .filter(actor => actor.enabled !== false)\n .map(actor => actor.name)\n return enabledActors.length > 0 ? enabledActors : undefined\n}\n\nfunction getDefaultActors(): string[] {\n return ['api', 'producer', 'finalizer']\n}\n\nasync function buildActor(\n name: string,\n locator: ProviderFactoryLocatorInstance,\n): Promise<ActorInstanceV3> {\n switch (name) {\n case 'api': {\n const config = ApiConfigZod.parse(locator.context.config)\n return await getApiActor(config, locator)\n }\n case 'bridge': {\n const config = BridgeConfigZod.parse(locator.context.config)\n return await getBridgeActor(config, locator)\n }\n case 'mempool': {\n const config = MempoolConfigZod.parse(locator.context.config)\n return await getMempoolActor(config, locator)\n }\n case 'producer': {\n const config = ProducerConfigZod.parse(locator.context.config)\n return await getProducerActor(config, locator)\n }\n case 'rewardRedemption': {\n const config = RewardRedemptionConfigZod.parse(locator.context.config)\n return await getRewardRedemptionActor(config, locator)\n }\n case 'finalizer': {\n const config = FinalizerConfigZod.parse(locator.context.config)\n return await getFinalizerActor(config, locator)\n }\n default: {\n throw new Error(`Unknown actor: ${name}`)\n }\n }\n}\n\nasync function bootActors(\n requestedActors: string[],\n locators: Record<string, ProviderFactoryLocatorInstance>,\n orchestrator: OrchestratorInstance,\n configuration: Config,\n): Promise<void> {\n const startedAt = Date.now()\n const actors = await Promise.all(requestedActors.map(name => buildActor(name, locators[name])))\n for (const actor of actors) {\n await orchestrator.registerActor(actor)\n }\n await orchestrator.start()\n await orchestrator.whenReady(BOOT_TIMEOUT_MS)\n const ms = Date.now() - startedAt\n initLogger(configuration).info(`[xl1] system ready (${requestedActors.join('/')} in ${ms}ms)`)\n}\n\nexport function startCommand(getConfiguration: () => Config, getLocatorsFromConfig: GetLocatorsFromConfig): CommandModule {\n return {\n command: ['start [actors..]', '$0'],\n describe: 'Run a full XL1 Node',\n builder: (yargs: Argv) => {\n return yargs\n .positional('actors', {\n type: 'string',\n array: true,\n choices: KNOWN_ACTORS,\n description: 'Actors to start (e.g. xl1 start api producer or xl1 start api,producer)',\n coerce: (values: string[]) => values.flatMap(v => v.split(',')),\n })\n .option('actors', {\n type: 'array',\n string: true,\n choices: KNOWN_ACTORS,\n description: 'List of actors to start (e.g. --actors api producer finalizer). Defaults to api, producer, and finalizer.',\n })\n },\n handler: async (argv: ArgumentsCamelCase<StartArgs>) => {\n const configuration = getConfiguration()\n const requestedActors = argv.actors !== undefined && argv.actors.length > 0\n ? argv.actors\n : getActorsFromConfig(configuration) ?? getDefaultActors()\n const { locators, orchestrator } = await getLocatorsFromConfig(requestedActors, configuration)\n await bootActors(requestedActors, locators, orchestrator, configuration)\n },\n }\n}\n", "import type { Logger, LogLevelValue } from '@xylabs/sdk-js'\nimport {\n Base,\n ConsoleLogger, isDefined,\n LogLevel, SilentLogger,\n} from '@xylabs/sdk-js'\nimport type { BaseConfig } from '@xyo-network/xl1-sdk'\n\nexport const initLogger = (config: BaseConfig): Logger => {\n let logger: Logger\n if (config.log.silent) {\n logger = new SilentLogger()\n } else {\n let level: LogLevelValue | undefined\n if (isDefined(config.log.logLevel)) {\n const parsed = LogLevel[config.log.logLevel.toLowerCase() as keyof typeof LogLevel]\n if (isDefined(parsed)) level = parsed\n }\n logger = new ConsoleLogger(level)\n }\n Base.defaultLogger = logger\n return logger\n}\n", "import { delay } from '@xylabs/sdk-js'\nimport type { CommandModule } from 'yargs'\n\nexport function withDeprecationWarning(module: CommandModule): CommandModule {\n const { deprecated, handler } = module\n if (typeof deprecated === 'string') {\n return {\n ...module,\n handler: async (argv) => {\n console.warn(`[deprecated] ${deprecated}`)\n await delay(3000)\n return handler(argv)\n },\n }\n }\n return module\n}\n", "import { createDeepMerge, isDefined } from '@xylabs/sdk-js'\nimport {\n ActorMnemonicNotAllowedError,\n assertNoActorMnemonics,\n ConfigFileNotFoundError,\n tryParseConfig,\n} from '@xyo-network/chain-orchestration'\nimport type { Config } from '@xyo-network/xl1-sdk'\nimport {\n ConfigZod, isZodError, resolveConfig,\n} from '@xyo-network/xl1-sdk'\n\nconst deepMerge = createDeepMerge({ arrayStrategy: 'concat' })\ntype ConfigWithMnemonic = Config & { mnemonic?: string }\n\nconst REDACTED = '[REDACTED]'\n\n/**\n * Names that always redact, regardless of nesting level. `connectionString` is\n * included because Mongo connection URIs commonly embed `user:password@host`.\n */\nconst REDACTED_KEY_NAMES = new Set<string>(['mnemonic', 'connectionString'])\n\n/**\n * Suffix-matched key names that redact. Catches any future `*PrivateKey`,\n * `*Secret`, or `*Password` field without us having to enumerate them here.\n */\nconst REDACTED_KEY_SUFFIX = /(PrivateKey|Secret|Password)$/i\n\nfunction shouldRedactKey(key: string): boolean {\n if (REDACTED_KEY_NAMES.has(key)) return true\n return REDACTED_KEY_SUFFIX.test(key)\n}\n\n/**\n * Returns a deep clone of `config` with secret-bearing leaf values replaced by\n * `'[REDACTED]'`. Walks plain objects and arrays. Leaves primitives, dates,\n * and other non-plain values untouched (other than via `structuredClone`).\n */\nexport function redactConfig<T>(config: T): T {\n const cloned = structuredClone(config) as unknown\n redactInPlace(cloned)\n return cloned as T\n}\n\nfunction redactInPlace(node: unknown): void {\n if (Array.isArray(node)) {\n for (const item of node) redactInPlace(item)\n return\n }\n if (node === null || typeof node !== 'object') return\n const obj = node as Record<string, unknown>\n for (const key of Object.keys(obj)) {\n if (shouldRedactKey(key) && obj[key] !== undefined && obj[key] !== null) {\n obj[key] = REDACTED\n } else {\n redactInPlace(obj[key])\n }\n }\n}\n\n/**\n * Yargs `.env()` with `dot-notation` turns `XL1_ACTORS__0__NAME=foo` into\n * `{ actors: { '0': { name: 'foo' } } }` \u2014 an object keyed by string indices\n * rather than an array. Normalize that back into an array so ConfigZod's\n * `actors` array schema accepts it.\n */\nfunction coerceActorsArray(argv: Record<string, unknown>): Record<string, unknown> {\n const actors = argv.actors\n if (actors === undefined || Array.isArray(actors)) return argv\n if (typeof actors !== 'object' || actors === null) return argv\n const entries = Object.entries(actors as Record<string, unknown>)\n const numericEntries = entries\n .map(([key, value]) => [Number(key), value] as const)\n .filter(([key]) => Number.isInteger(key) && key >= 0)\n if (numericEntries.length !== entries.length) return argv\n const asArray: unknown[] = []\n for (const [key, value] of numericEntries) asArray[key] = value\n return { ...argv, actors: asArray }\n}\n\nfunction safeParseOrThrow(input: unknown): Config {\n const result = ConfigZod.safeParse(input)\n if (!result.success) throw result.error\n return result.data as Config\n}\n\nasync function buildFinalConfig(argv: Record<string, unknown>): Promise<ConfigWithMnemonic> {\n // Parse the various config sources\n const configPath = argv.config as string | undefined\n const parsedConfigFile = await tryParseConfig({ configPath }) as ConfigWithMnemonic // Config file\n const rootMnemonicFromFile = typeof parsedConfigFile.mnemonic === 'string' ? parsedConfigFile.mnemonic : undefined\n const normalizedArgv = coerceActorsArray(argv)\n const parsedConfigArgs = ConfigZod.safeParse(normalizedArgv).data ?? {} // Command-line arguments & ENV VARs\n const rootMnemonicFromArgs = typeof normalizedArgv.mnemonic === 'string' ? normalizedArgv.mnemonic : undefined\n // Deep merge with precedence\n // TODO: Would like precedence to be defaults < file < ENV < CLI Args\n // but there is currently no way to determine which are defaults vs\n // user-supplied CLI Args since we set the CLI args to the defaults\n // and receive a flattened object. We might need to manually invoke\n // the parser without the defaults to achieve this.\n const mergedConfig = safeParseOrThrow(deepMerge(parsedConfigFile, parsedConfigArgs))\n const validated = safeParseOrThrow(resolveConfig(safeParseOrThrow(mergedConfig)))\n const rootMnemonic = rootMnemonicFromArgs ?? rootMnemonicFromFile\n return isDefined(rootMnemonic) ? { ...validated, mnemonic: rootMnemonic } : validated\n}\n\nexport async function configMiddleware(argv: Record<string, unknown>, setConfiguration: (config: Config) => void): Promise<void> {\n try {\n const finalConfig = await buildFinalConfig(argv)\n // Hard-fail if any actor was configured with its own mnemonic. Mnemonics\n // must live at the root; actors pick their wallet via accountPath.\n assertNoActorMnemonics(finalConfig)\n setConfiguration(finalConfig as Config)\n\n // Check if user wants to dump config and exit. Default behavior redacts\n // secrets (mnemonics, private keys, passwords, connection strings). Pass\n // `--with-secrets` to see the raw values \u2014 useful only on a developer box.\n if (argv['dump-config']) {\n const withSecrets = Boolean(argv['with-secrets'])\n const output = withSecrets ? finalConfig : redactConfig(finalConfig)\n console.log(JSON.stringify(output, null, 2))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n } catch (err) {\n if (err instanceof ConfigFileNotFoundError) {\n console.error(`${err.message}. Check the path passed to --config/-c and try again.`)\n } else if (err instanceof ActorMnemonicNotAllowedError) {\n console.error(err.message)\n } else if (isZodError(err)) {\n console.error(`Zod error: ${err.message}`)\n } else {\n console.error(`Error parsing configuration: ${err}`)\n }\n if (!(err instanceof ConfigFileNotFoundError) && !(err instanceof ActorMnemonicNotAllowedError)) {\n console.error(`Stack: ${err instanceof Error ? err.stack : 'N/A'}`)\n }\n throw new Error('Invalid configuration', { cause: err })\n }\n}\n", "import type { ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\n\n/**\n * One row in the per-actor provider tree. Captures the moniker (registry key),\n * the implementation class, the dependency monikers the factory declared, the\n * factory scope, and a `count` of how many times an identical fingerprint\n * appeared in the same moniker bucket. The registry can hold the same factory\n * more than once (e.g. via merges or multi-moniker registrations); collapsing\n * keeps the tree readable while still surfacing the multiplicity.\n */\ninterface ProviderEntry {\n count: number\n dependencies: readonly string[]\n moniker: string\n providerName: string\n scope: string\n}\n\nconst CANONICAL_ACTOR_ORDER: readonly string[] = [\n '_root', 'producer', 'finalizer', 'api', 'mempool', 'bridge', 'rewardRedemption',\n]\n\n/**\n * Enumerates the providers registered directly on a single locator. Does not\n * walk the parent chain \u2014 each locator is reported on its own so that a reader\n * can see exactly which providers a given actor contributed versus what it\n * inherits from `_root`.\n */\nfunction enumerateLocator(locator: ProviderFactoryLocatorInstance): ProviderEntry[] {\n const collapsed = new Map<string, ProviderEntry>()\n const registry = locator.registry as Record<string, unknown[] | undefined>\n for (const moniker of Object.keys(registry)) {\n const factories = registry[moniker]\n if (!factories) continue\n for (const factory of factories) {\n const f = factory as { dependencies?: readonly string[]; providerName?: string; scope?: string }\n const providerName = f.providerName ?? '<unknown>'\n const scope = f.scope ?? '<unknown>'\n const dependencies = f.dependencies ?? []\n const fingerprint = `${moniker}|${providerName}|${scope}|${dependencies.join(',')}`\n const existing = collapsed.get(fingerprint)\n if (existing) {\n existing.count += 1\n } else {\n collapsed.set(fingerprint, {\n count: 1, dependencies, moniker, providerName, scope,\n })\n }\n }\n }\n return [...collapsed.values()].toSorted((a, b) => a.moniker.localeCompare(b.moniker) || a.providerName.localeCompare(b.providerName))\n}\n\nfunction buildOwnerIndex(perActor: ReadonlyMap<string, readonly ProviderEntry[]>): Map<string, Set<string>> {\n const monikerOwners = new Map<string, Set<string>>()\n for (const [actorName, entries] of perActor) {\n for (const entry of entries) {\n let owners = monikerOwners.get(entry.moniker)\n if (!owners) {\n owners = new Set()\n monikerOwners.set(entry.moniker, owners)\n }\n owners.add(actorName)\n }\n }\n return monikerOwners\n}\n\nfunction renderDuplicatesSummary(monikerOwners: ReadonlyMap<string, ReadonlySet<string>>): string[] {\n const duplicates = [...monikerOwners.entries()]\n .filter(([, owners]) => owners.size > 1)\n .map(([moniker, owners]) => ({ moniker, owners: [...owners].toSorted().map(formatGroupForDisplay) }))\n .toSorted((a, b) => a.moniker.localeCompare(b.moniker))\n if (duplicates.length === 0) return []\n const lines = ['Duplicate monikers (registered by more than one locator):']\n for (const { moniker, owners } of duplicates) {\n lines.push(` - ${moniker}: ${owners.join(', ')}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Groups actor names whose locators share the same `registry` object reference.\n * Under the shared-locator architecture (Option B), api/mempool/finalizer all\n * point to view locators that share one underlying registry \u2014 without this\n * grouping, the dump would print the same factory set N times and falsely\n * report every moniker as \"duplicate across actors.\"\n */\nfunction groupActorsBySharedRegistry(\n locators: Record<string, ProviderFactoryLocatorInstance>,\n): { actorNames: readonly string[]; locator: ProviderFactoryLocatorInstance }[] {\n const groups: { actorNames: string[]; locator: ProviderFactoryLocatorInstance; registry: unknown }[] = []\n for (const actorName of Object.keys(locators)) {\n const locator = locators[actorName]\n const existing = groups.find(g => g.registry === locator.registry)\n if (existing) {\n existing.actorNames.push(actorName)\n } else {\n groups.push({\n actorNames: [actorName], locator, registry: locator.registry,\n })\n }\n }\n return groups\n}\n\n/**\n * Stable id for a registry-sharing group: sorted, comma-joined actor names.\n * Used as the key in `monikerOwners`. Multi-actor group ids contain commas;\n * we display them parenthesized in the `also in:` annotation.\n */\nfunction groupId(actorNames: readonly string[]): string {\n return [...actorNames].toSorted().join(',')\n}\n\nfunction formatGroupForDisplay(groupKey: string): string {\n const members = groupKey.split(',')\n return members.length === 1 ? members[0] : `(${members.join(', ')})`\n}\n\nfunction renderGroupSection(\n actorNames: readonly string[],\n entries: readonly ProviderEntry[],\n monikerOwners: ReadonlyMap<string, ReadonlySet<string>>,\n): string[] {\n const sortedActors = [...actorNames].toSorted()\n const ownGroupKey = groupId(sortedActors)\n const heading = sortedActors.length === 1\n ? `Providers for actor: ${sortedActors[0]} (${entries.length} registered)`\n : `Providers shared by actors: ${sortedActors.join(', ')} (${entries.length} registered)`\n const lines: string[] = [heading]\n if (entries.length === 0) {\n lines.push(' (none)', '')\n return lines\n }\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]\n const isLast = i === entries.length - 1\n const branch = isLast ? '\u2514\u2500\u2500' : '\u251C\u2500\u2500'\n const owners = monikerOwners.get(entry.moniker) ?? new Set<string>()\n const otherOwners = [...owners]\n .filter(o => o !== ownGroupKey)\n .toSorted()\n .map(formatGroupForDisplay)\n const dupNote = otherOwners.length > 0 ? ` \u26A0 also in: ${otherOwners.join(', ')}` : ''\n const depsNote = entry.dependencies.length > 0 ? `, deps: [${entry.dependencies.join(', ')}]` : ''\n const countNote = entry.count > 1 ? ` (\u00D7${entry.count})` : ''\n lines.push(` ${branch} ${entry.moniker}${countNote} [impl: ${entry.providerName}, scope: ${entry.scope}${depsNote}]${dupNote}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Renders the locator map as a tree grouped by registry identity, annotating\n * any moniker that appears in more than one *registry* with `\u26A0 also in: ...`.\n *\n * - When all input locators share one registry (shared-locator path), a single\n * \"Providers shared by actors: \u2026\" section is rendered.\n * - When some actors have distinct registries (legacy `_root` + per-actor\n * child architecture), each registry is rendered separately. `_root` is\n * ordered first.\n *\n * The \"Duplicate monikers\" summary at the bottom only flags monikers\n * registered by *different* registries \u2014 duplicates within one registry are\n * already collapsed into per-entry `(\u00D7N)` counts by `enumerateLocator`.\n */\nexport function formatProviderTree(locators: Record<string, ProviderFactoryLocatorInstance>): string {\n const groups = groupActorsBySharedRegistry(locators)\n\n // Per-actor moniker ownership (used for the \"also in:\" annotation), but\n // attribute each moniker to the GROUP it belongs to \u2014 the \"actor name\" the\n // index uses is the joined group key, so two actors that share a registry\n // never appear as duplicates of each other.\n const groupKeys = groups.map(g => ({ ...g, key: groupId(g.actorNames) }))\n const perGroup = new Map<string, ProviderEntry[]>()\n for (const g of groupKeys) perGroup.set(g.key, enumerateLocator(g.locator))\n const monikerOwners = buildOwnerIndex(perGroup)\n\n // Order: legacy `_root` first when present; otherwise alphabetical by sorted\n // actor names within the group, with the canonical actor order applied to\n // the *primary* (sorted-first) actor name in each group.\n const orderedGroups = [...groupKeys].toSorted((a, b) => {\n const aHasRoot = a.actorNames.includes('_root')\n const bHasRoot = b.actorNames.includes('_root')\n if (aHasRoot !== bHasRoot) return aHasRoot ? -1 : 1\n const ai = CANONICAL_ACTOR_ORDER.indexOf(a.actorNames[0])\n const bi = CANONICAL_ACTOR_ORDER.indexOf(b.actorNames[0])\n if (ai !== bi) return (ai === -1 ? Number.MAX_SAFE_INTEGER : ai) - (bi === -1 ? Number.MAX_SAFE_INTEGER : bi)\n return a.key.localeCompare(b.key)\n })\n\n const lines: string[] = ['XL1 Provider Dump', '=================', '']\n for (const g of orderedGroups) {\n lines.push(...renderGroupSection(g.actorNames.toSorted(), perGroup.get(g.key) ?? [], monikerOwners))\n }\n lines.push(...renderDuplicatesSummary(monikerOwners))\n return lines.join('\\n')\n}\n", "/* eslint-disable no-irregular-whitespace, @stylistic/max-len */\nexport const XL1LogoColorizedAscii = `\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;118;111;144m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;72;32;223m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u2560\u2560\u001B[0m\u001B[38;2;103;85;170m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;79;121;152m\u2566\u001B[0m\u001B[38;2;82;121;151m\u2566\u001B[0m\u001B[38;2;112;125;136m_\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;88;59;196m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;73;34;221m\u2592\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;121;121;127m_\u001B[0m\u001B[38;2;100;101;128m\u2554\u001B[0m\u001B[38;2;93;94;127m\u2566\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;82;121;151m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2560\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;51;117;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u001B[0m\u001B[38;2;111;125;136m_\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;67;23;232m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;120;121;128m_\u001B[0m\u001B[38;2;100;101;127m\u2554\u001B[0m\u001B[38;2;79;81;127mR\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;88;90;127m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;55;117;165m\u255A\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u001B[0m\u001B[38;2;50;116;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u00A0\u001B[0m\u001B[38;2;106;90;165mj\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;89;61;194mH\u00A0\u001B[0m\u001B[38;2;99;100;127m\u2554\u001B[0m\u001B[38;2;79;80;127mD\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;83;121;150m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u2592\u00A0\u001B[0m\u001B[38;2;76;38;217m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;74;76;128m\u2560\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2592\u001B[0m\u001B[38;2;89;90;128m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;90;118;148m\\`\u001B[0m\u001B[38;2;89;107;153m_\u001B[0m\u001B[38;2;93;97;154m,\u001B[0m\u001B[38;2;105;89;166m\u2553\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;95;72;183m\u2553\u001B[0m\u001B[38;2;106;96;152m_\u001B[0m\u001B[38;2;100;94;143m\\`\u001B[0m\u001B[38;2;101;100;133m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;122;118;137m_\u001B[0m\u001B[38;2;113;102;153m,\u001B[0m\u001B[38;2;108;94;161m\u2553\u001B[0m\u001B[38;2;104;86;169m\u2553\u001B[0m\u001B[38;2;98;77;178m\u2554\u001B[0m\u001B[38;2;93;67;188m\u2557\u001B[0m\u001B[38;2;88;59;196m\u03C6\u001B[0m\u001B[38;2;83;51;204m@\u001B[0m\u001B[38;2;78;42;213mD\u001B[0m\u001B[38;2;72;32;223m\u2592\u001B[0m\u001B[38;2;68;24;231m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;71;30;225m\u2592\u001B[0m\u001B[38;2;77;40;215m\u2592\u001B[0m\u001B[38;2;82;49;206mK\u001B[0m\u001B[38;2;87;57;198m\u03C6\u001B[0m\u001B[38;2;91;65;190m\u2557\u001B[0m\u001B[38;2;97;75;180m\u2566\u001B[0m\u001B[38;2;103;84;171m\u2556\u001B[0m\u001B[38;2;107;92;163m\u00B2\u001B[0m\u001B[38;2;112;101;154m_\u001B[0m\u001B[38;2;119;112;143m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;106;91;164m\\`\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;89;62;193m\u2559\u001B[0m\u001B[38;2;85;54;201m\u2559\u001B[0m\u001B[38;2;80;45;210m\u255A\u001B[0m\u001B[38;2;74;35;220m\u255D\u001B[0m\u001B[38;2;69;26;229m\u2560\u001B[0m\u001B[38;2;66;22;233m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;73;33;222m\u255D\u001B[0m\u001B[38;2;79;43;212m\u2569\u001B[0m\u001B[38;2;84;52;203m\u255C\u001B[0m\u001B[38;2;88;60;195m\u2559\u001B[0m\u001B[38;2;93;68;187m^\u001B[0m\u001B[38;2;100;80;175m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;113;84;152m\\`\u001B[0m\u001B[38;2;103;79;169m'\u001B[0m\u001B[38;2;95;72;183m\"\u001B[0m\u001B[38;2;87;57;198m\u2559\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;80;46;209m\u255C\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;102;77;175m^\u001B[0m\u001B[38;2;112;81;162m\\`\u001B[0m\u001B[38;2;115;92;155m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;145;116;107m,\u001B[0m\u001B[38;2;199;82;45m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2560\u00A0\u001B[0m\u001B[38;2;70;28;227m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;189;49;97m\u00E5\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;155;92;114m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;175;98;73m\u2554\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2592\u2592\u001B[0m\u001B[38;2;197;83;47m\u2569\u00A0\u001B[0m\u001B[38;2;98;76;179m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;81;48;207mH\u00A0\u001B[0m\u001B[38;2;188;51;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u2560\u001B[0m\u001B[38;2;183;57;100mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;146;116;106m,\u001B[0m\u001B[38;2;199;82;44m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;196;84;48m\u2569\u001B[0m\u001B[38;2;168;102;81m^\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;160;87;111m'\u001B[0m\u001B[38;2;187;52;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;156;91;113m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;198;83;46m\u2569\u001B[0m\u001B[38;2;194;85;50m\u2569\u001B[0m\u001B[38;2;167;102;82m^\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;81;46;209m\u255A\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;159;88;112m'\u001B[0m\u001B[38;2;186;53;98m\u255A\u001B[0m\u001B[38;2;197;40;93m\u2569\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;110;97;158m'\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;94;69;186mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;68;25;230m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;108;93;162m\u00B2\u001B[0m\u001B[38;2;99;79;176m^\u001B[0m`\n", "import type { UsageMeta } from '@xyo-network/xl1-sdk'\nimport { isUsageMeta } from '@xyo-network/xl1-sdk'\nimport type { Options } from 'yargs'\nimport { globalRegistry } from 'zod'\n\nconst usageMetaToOptions = (meta: UsageMeta): Options => {\n return meta\n}\n\nexport const optionsFromGlobalZodRegistry = (): Record<string, Options> => {\n const opts: Record<string, Options> = {}\n for (const schema of Object.values(globalRegistry._map)) {\n if (isUsageMeta(schema)) {\n if (schema.hidden) continue // skip hidden options\n opts[schema.title] = usageMetaToOptions(schema)\n }\n }\n return opts\n}\n", "import { start } from './start.ts'\n\nstart().catch((err) => {\n // If we're in development mode, log the stack trace to the console\n if (process.env.NODE_ENV === 'development') console.error('An error occurred during startup:', err)\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1)\n})\n"],
5
- "mappings": ";AAAA,SAAS,cAAc;;;ACAvB,SAAS,SAAS,OAAO,UAAU,cAAc;AACjD,SAAS,uBAAuB;AAEhC,SAAS,aAAAA,kBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EAAiC;AAAA,EAAgC;AAAA,EAAoB;AAAA,EACrF;AAAA,EAAoB;AAAA,OACf;AACP,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,+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aAAa;AAAA,IACf;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,gBAAgB;AAAA,MACd,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,kBAAkB;AAAA,MAChB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,IACA,yBAAyB;AAAA,MACvB,MAAM;AAAA,MACN,aAAa;AAAA,MACb,SAAS;AAAA,IACX;AAAA,EACF,CAAC,EACA,KAAK,EACL,MAAM,QAAQ,GAAG,EACjB,QAAQ,OAAO,EACf;AAEH,QAAM;AACR;;;ADjNO,IAAM,QAAQ,YAAY;AAC/B,SAAO,EAAE,OAAO,KAAK,CAAC;AACtB,QAAM,OAAO;AACf;;;ASLA,MAAM,EAAE,MAAM,CAAC,QAAQ;AAErB,MAAI,QAAQ,IAAI,aAAa,cAAe,SAAQ,MAAM,qCAAqC,GAAG;AAElG,UAAQ,KAAK,CAAC;AAChB,CAAC;",
4
+ "sourcesContent": ["import { config } from 'dotenv'\n\nimport { runCLI } from './runCLI.ts'\n\nexport const start = async () => {\n config({ quiet: true })\n await runCLI()\n}\n", "import { stdin as input, stdout as output } from 'node:process'\nimport { createInterface } from 'node:readline/promises'\n\nimport { isDefined } from '@xylabs/sdk-js'\nimport { apiCommand } from '@xyo-network/chain-api'\nimport { bridgeCommand } from '@xyo-network/chain-bridge'\nimport { finalizerCommand } from '@xyo-network/chain-finalizer'\nimport { mempoolCommand } from '@xyo-network/chain-mempool'\nimport {\n contextFromConfigWithoutLocator, detectDerivationPathCollisions, formatWalletReport, initializeResolvedWalletReport,\n locatorsFromConfig, Orchestrator,\n} from '@xyo-network/chain-orchestration'\nimport { initHealthEndpoints } from '@xyo-network/chain-orchestration-express'\nimport { producerCommand } from '@xyo-network/chain-producer'\nimport { rewardRedemptionCommand } from '@xyo-network/chain-reward-redemption'\nimport type { ActorConfig, Config } from '@xyo-network/xl1-sdk'\nimport {\n ActorConfigZod, ConfigZod, DefaultMetricsScrapePorts,\n} from '@xyo-network/xl1-sdk'\nimport type { Argv } from 'yargs'\nimport yargs from 'yargs'\nimport { hideBin } from 'yargs/helpers'\nimport { z } from 'zod/mini'\n\nimport { startCommand, withDeprecationWarning } from './commands/index.ts'\nimport { configMiddleware } from './configMiddleware.ts'\nimport { formatProviderTree } from './dumpProviders.ts'\nimport { XL1LogoColorizedAscii } from './images.ts'\nimport { initLogger } from './initLogger.ts'\nimport { optionsFromGlobalZodRegistry } from './optionsFromGlobalZodRegistry.ts'\n\n/** Version string injected by Rollup at build time. */\ndeclare const __VERSION__: string\n\nconst DEFAULT_HEALTH_CHECK_PORT = 9099\n\n/**\n * Maps a CLI actor name to its registered Prometheus scrape port. The CLI-level\n * exporter (one per process) defaults to the port of the first requested actor\n * so that running, e.g., `xl1 start producer` and `xl1 start api` side-by-side\n * doesn't fight over a single shared default.\n */\nfunction defaultScrapePortForActors(actors: readonly string[]): number {\n const primary = actors[0]\n const key = primary === 'rewardRedemption' ? 'rewardRedemptionApi' : primary\n return (DefaultMetricsScrapePorts as Record<string, number>)[key] ?? DefaultMetricsScrapePorts.producer\n}\n\n/**\n * The configuration that will be used throughout the CLI.\n * This is materialized after parsing the command-line arguments,\n * environment variables, and defaults.\n */\nlet configuration: Config\nlet skipInsecureConfirm = false\nlet dumpProviders = false\n\nconst version = isDefined(__VERSION__) ? __VERSION__ : 'unknown'\n\nfunction getConfiguration(): Config {\n return configuration\n}\n\nasync function promptForInsecureGenesisConfirmation(logger: ReturnType<typeof initLogger>) {\n if (!input.isTTY || !output.isTTY) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped because this session is not a TTY.')\n return\n }\n const rl = createInterface({ input, output })\n try {\n await rl.question('Insecure genesis reward wallet is active. Hit RETURN to continue.')\n } finally {\n rl.close()\n }\n}\n\nasync function getLocatorsFromConfig(actors: string[], configuration: Config) {\n const actorConfigs: ActorConfig[] = []\n for (const actorName of actors) {\n const existingConfig = configuration.actors.find(actor => actor.name === actorName)\n if (existingConfig) {\n actorConfigs.push(existingConfig)\n } else {\n const actorConfig = z.looseObject(ActorConfigZod.shape).parse({ name: actorName })\n actorConfigs.push(actorConfig)\n }\n }\n\n const config = ConfigZod.parse({ ...configuration, actors: actorConfigs })\n\n const logger = initLogger(configuration)\n const orchestrator = await Orchestrator.create({ logger })\n const collision = detectDerivationPathCollisions(actors, configuration)\n if (collision) throw collision\n const walletReport = await initializeResolvedWalletReport(actors, configuration)\n logger.info(formatWalletReport(walletReport))\n const serviceName = actors.length === 1 ? `xl1-${actors[0]}` : 'xl1-cli'\n const context = await contextFromConfigWithoutLocator(config, logger, serviceName, version, defaultScrapePortForActors(actors))\n if (skipInsecureConfirm) {\n logger.warn('Insecure genesis reward wallet is active. Interactive confirmation skipped via --skip-insecure-confirm.')\n }\n const onInsecureGenesisConfirm = skipInsecureConfirm\n ? undefined\n : async () => await promptForInsecureGenesisConfirmation(logger)\n const locators = await locatorsFromConfig(context, config, onInsecureGenesisConfirm)\n\n // `--dump-providers`: render the locator map and halt before the actor's\n // runner starts. Health endpoints and the SIGINT handler below are skipped.\n if (dumpProviders) {\n console.log(formatProviderTree(locators))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n\n const healthCheckPort = configuration.healthCheckPort ?? DEFAULT_HEALTH_CHECK_PORT\n const healthServer = healthCheckPort > 0 && context.statusReporter !== undefined\n ? await initHealthEndpoints({\n logger,\n port: healthCheckPort,\n readiness: orchestrator,\n statusMonitor: context.statusReporter,\n })\n : undefined\n\n // Handle cancellation (Ctrl+C)\n process.on('SIGINT', () => {\n void (async () => {\n try {\n logger.log('\\nSIGINT received. Attempting graceful shutdown...')\n healthServer?.close()\n await orchestrator?.stop()\n logger.log('Orchestrator stopped, exiting now.')\n process.exit(0)\n } catch (err) {\n logger.error('Error stopping orchestrator:', err)\n process.exit(1)\n }\n })()\n })\n return { locators, orchestrator }\n}\n\n// Main entry point\nexport async function runCLI() {\n // Parse command-line arguments using Yargs\n const y = yargs(hideBin(process.argv)) as Argv<Config>\n const argv = y\n .usage(`\n\uD83D\uDE80 XL1 Node CLI (${version})\n${XL1LogoColorizedAscii}\nRun various components of the XL1 ecosystem.\n\nUsage:\n$0 <command> [options]`)\n .parserConfiguration({\n 'dot-notation': true, // foo.bar \u2192 { foo: { bar } }\n 'parse-numbers': false, // Don't auto-parse numbers to allow strings like \"0x1\"\n 'populate--': true, // Populate -- with all options so we can detected user-supplied vs defaults\n })\n .env('XL1')\n .scriptName('xl1')\n .middleware(async (argv) => {\n await configMiddleware(argv, (config) => {\n configuration = config\n })\n skipInsecureConfirm = Boolean(argv['skip-insecure-confirm'])\n dumpProviders = Boolean(argv['dump-providers'])\n })\n .options(optionsFromGlobalZodRegistry())\n .wrap(y.terminalWidth())\n .command(withDeprecationWarning(apiCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(bridgeCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(finalizerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(mempoolCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(producerCommand(getConfiguration, getLocatorsFromConfig)))\n .command(withDeprecationWarning(rewardRedemptionCommand(getConfiguration, getLocatorsFromConfig)))\n .command(startCommand(getConfiguration, getLocatorsFromConfig))\n .options({\n 'config': {\n type: 'string',\n description: 'Path to a config file to use instead of the default search.',\n alias: 'c',\n },\n 'mnemonic': {\n type: 'string',\n description: 'Shared root mnemonic used by actors that do not define their own mnemonic.',\n },\n 'dump-config': {\n type: 'boolean',\n description: 'Just process the configuration and print the resolved config to stdout, then exit. Secrets are redacted unless --with-secrets is also passed.',\n default: false,\n },\n 'with-secrets': {\n type: 'boolean',\n description: 'When used with --dump-config, print raw secret values (mnemonic, private keys, passwords) instead of \"[REDACTED]\". Use only on a developer machine.',\n default: false,\n },\n 'dump-providers': {\n type: 'boolean',\n description: 'Run the normal command flow up to provider locator construction, print the per-actor provider tree (with duplicate detection), then exit.',\n default: false,\n },\n 'skip-insecure-confirm': {\n type: 'boolean',\n description: 'Skip the interactive RETURN confirmation when the built-in dev mnemonic / insecure genesis reward wallet is active.',\n default: false,\n },\n })\n .help()\n .alias('help', 'h')\n .version(version)\n .argv\n\n await argv\n}\n", "import { getApiActor } from '@xyo-network/chain-api'\nimport { getBridgeActor } from '@xyo-network/chain-bridge'\nimport { getFinalizerActor } from '@xyo-network/chain-finalizer'\nimport { getMempoolActor } from '@xyo-network/chain-mempool'\nimport type {\n ActorInstanceV3, GetLocatorsFromConfig, OrchestratorInstance,\n} from '@xyo-network/chain-orchestration'\nimport {\n ApiConfigZod,\n BridgeConfigZod,\n FinalizerConfigZod,\n MempoolConfigZod,\n ProducerConfigZod,\n RewardRedemptionConfigZod,\n} from '@xyo-network/chain-orchestration'\nimport { getProducerActor } from '@xyo-network/chain-producer'\nimport { getRewardRedemptionActor } from '@xyo-network/chain-reward-redemption'\nimport type { Config, ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\nimport type {\n ArgumentsCamelCase, Argv, CommandModule,\n} from 'yargs'\n\nimport { initLogger } from '../../initLogger.ts'\n\ninterface StartArgs {\n actors?: string[]\n}\n\nconst KNOWN_ACTORS = ['api', 'bridge', 'finalizer', 'mempool', 'producer', 'rewardRedemption'] as const\n\nconst BOOT_TIMEOUT_MS = 60_000\n\nfunction getActorsFromConfig(configuration: Config): string[] | undefined {\n const enabledActors = configuration.actors\n .filter(actor => actor.enabled !== false)\n .map(actor => actor.name)\n return enabledActors.length > 0 ? enabledActors : undefined\n}\n\nfunction getDefaultActors(): string[] {\n return ['api', 'producer', 'finalizer']\n}\n\nasync function buildActor(\n name: string,\n locator: ProviderFactoryLocatorInstance,\n): Promise<ActorInstanceV3> {\n switch (name) {\n case 'api': {\n const config = ApiConfigZod.parse(locator.context.config)\n return await getApiActor(config, locator)\n }\n case 'bridge': {\n const config = BridgeConfigZod.parse(locator.context.config)\n return await getBridgeActor(config, locator)\n }\n case 'mempool': {\n const config = MempoolConfigZod.parse(locator.context.config)\n return await getMempoolActor(config, locator)\n }\n case 'producer': {\n const config = ProducerConfigZod.parse(locator.context.config)\n return await getProducerActor(config, locator)\n }\n case 'rewardRedemption': {\n const config = RewardRedemptionConfigZod.parse(locator.context.config)\n return await getRewardRedemptionActor(config, locator)\n }\n case 'finalizer': {\n const config = FinalizerConfigZod.parse(locator.context.config)\n return await getFinalizerActor(config, locator)\n }\n default: {\n throw new Error(`Unknown actor: ${name}`)\n }\n }\n}\n\nasync function bootActors(\n requestedActors: string[],\n locators: Record<string, ProviderFactoryLocatorInstance>,\n orchestrator: OrchestratorInstance,\n configuration: Config,\n): Promise<void> {\n const startedAt = Date.now()\n const actors = await Promise.all(requestedActors.map(name => buildActor(name, locators[name])))\n for (const actor of actors) {\n await orchestrator.registerActor(actor)\n }\n await orchestrator.start()\n await orchestrator.whenReady(BOOT_TIMEOUT_MS)\n const ms = Date.now() - startedAt\n initLogger(configuration).info(`[xl1] system ready (${requestedActors.join('/')} in ${ms}ms)`)\n}\n\nexport function startCommand(getConfiguration: () => Config, getLocatorsFromConfig: GetLocatorsFromConfig): CommandModule {\n return {\n command: ['start [actors..]', '$0'],\n describe: 'Run a full XL1 Node',\n builder: (yargs: Argv) => {\n return yargs\n .positional('actors', {\n type: 'string',\n array: true,\n choices: KNOWN_ACTORS,\n description: 'Actors to start (e.g. xl1 start api producer or xl1 start api,producer)',\n coerce: (values: string[]) => values.flatMap(v => v.split(',')),\n })\n .option('actors', {\n type: 'array',\n string: true,\n choices: KNOWN_ACTORS,\n description: 'List of actors to start (e.g. --actors api producer finalizer). Defaults to api, producer, and finalizer.',\n })\n },\n handler: async (argv: ArgumentsCamelCase<StartArgs>) => {\n const configuration = getConfiguration()\n const requestedActors = argv.actors !== undefined && argv.actors.length > 0\n ? argv.actors\n : getActorsFromConfig(configuration) ?? getDefaultActors()\n const { locators, orchestrator } = await getLocatorsFromConfig(requestedActors, configuration)\n await bootActors(requestedActors, locators, orchestrator, configuration)\n },\n }\n}\n", "import type { Logger, LogLevelValue } from '@xylabs/sdk-js'\nimport {\n Base,\n ConsoleLogger, isDefined,\n LogLevel, SilentLogger,\n} from '@xylabs/sdk-js'\nimport type { BaseConfig } from '@xyo-network/xl1-sdk'\n\nexport const initLogger = (config: BaseConfig): Logger => {\n let logger: Logger\n if (config.log.silent) {\n logger = new SilentLogger()\n } else {\n let level: LogLevelValue | undefined\n if (isDefined(config.log.logLevel)) {\n const parsed = LogLevel[config.log.logLevel.toLowerCase() as keyof typeof LogLevel]\n if (isDefined(parsed)) level = parsed\n }\n logger = new ConsoleLogger(level)\n }\n Base.defaultLogger = logger\n return logger\n}\n", "import { delay } from '@xylabs/sdk-js'\nimport type { CommandModule } from 'yargs'\n\nexport function withDeprecationWarning(module: CommandModule): CommandModule {\n const { deprecated, handler } = module\n if (typeof deprecated === 'string') {\n return {\n ...module,\n handler: async (argv) => {\n console.warn(`[deprecated] ${deprecated}`)\n await delay(3000)\n return handler(argv)\n },\n }\n }\n return module\n}\n", "import { createDeepMerge, isDefined } from '@xylabs/sdk-js'\nimport {\n ActorMnemonicNotAllowedError,\n assertNoActorMnemonics,\n ConfigFileNotFoundError,\n tryParseConfig,\n} from '@xyo-network/chain-orchestration'\nimport type { Config } from '@xyo-network/xl1-sdk'\nimport {\n ConfigZod, isZodError, resolveConfig,\n} from '@xyo-network/xl1-sdk'\n\nconst deepMerge = createDeepMerge({ arrayStrategy: 'concat' })\ntype ConfigWithMnemonic = Config & { mnemonic?: string }\n\nconst REDACTED = '[REDACTED]'\n\n/**\n * Names that always redact, regardless of nesting level. `connectionString` is\n * included because Mongo connection URIs commonly embed `user:password@host`.\n */\nconst REDACTED_KEY_NAMES = new Set<string>(['mnemonic', 'connectionString'])\n\n/**\n * Suffix-matched key names that redact. Catches any future `*PrivateKey`,\n * `*Secret`, or `*Password` field without us having to enumerate them here.\n */\nconst REDACTED_KEY_SUFFIX = /(PrivateKey|Secret|Password)$/i\n\nfunction shouldRedactKey(key: string): boolean {\n if (REDACTED_KEY_NAMES.has(key)) return true\n return REDACTED_KEY_SUFFIX.test(key)\n}\n\n/**\n * Returns a deep clone of `config` with secret-bearing leaf values replaced by\n * `'[REDACTED]'`. Walks plain objects and arrays. Leaves primitives, dates,\n * and other non-plain values untouched (other than via `structuredClone`).\n */\nexport function redactConfig<T>(config: T): T {\n const cloned = structuredClone(config) as unknown\n redactInPlace(cloned)\n return cloned as T\n}\n\nfunction redactInPlace(node: unknown): void {\n if (Array.isArray(node)) {\n for (const item of node) redactInPlace(item)\n return\n }\n if (node === null || typeof node !== 'object') return\n const obj = node as Record<string, unknown>\n for (const key of Object.keys(obj)) {\n if (shouldRedactKey(key) && obj[key] !== undefined && obj[key] !== null) {\n obj[key] = REDACTED\n } else {\n redactInPlace(obj[key])\n }\n }\n}\n\n/**\n * Yargs `.env()` with `dot-notation` turns `XL1_ACTORS__0__NAME=foo` into\n * `{ actors: { '0': { name: 'foo' } } }` \u2014 an object keyed by string indices\n * rather than an array. Normalize that back into an array so ConfigZod's\n * `actors` array schema accepts it.\n */\nfunction coerceActorsArray(argv: Record<string, unknown>): Record<string, unknown> {\n const actors = argv.actors\n if (actors === undefined || Array.isArray(actors)) return argv\n if (typeof actors !== 'object' || actors === null) return argv\n const entries = Object.entries(actors as Record<string, unknown>)\n const numericEntries = entries\n .map(([key, value]) => [Number(key), value] as const)\n .filter(([key]) => Number.isInteger(key) && key >= 0)\n if (numericEntries.length !== entries.length) return argv\n const asArray: unknown[] = []\n for (const [key, value] of numericEntries) asArray[key] = value\n return { ...argv, actors: asArray }\n}\n\nfunction safeParseOrThrow(input: unknown): Config {\n const result = ConfigZod.safeParse(input)\n if (!result.success) throw result.error\n return result.data as Config\n}\n\nasync function buildFinalConfig(argv: Record<string, unknown>): Promise<ConfigWithMnemonic> {\n // Parse the various config sources\n const configPath = argv.config as string | undefined\n const parsedConfigFile = await tryParseConfig({ configPath }) as ConfigWithMnemonic // Config file\n const rootMnemonicFromFile = typeof parsedConfigFile.mnemonic === 'string' ? parsedConfigFile.mnemonic : undefined\n const normalizedArgv = coerceActorsArray(argv)\n const parsedConfigArgs = ConfigZod.safeParse(normalizedArgv).data ?? {} // Command-line arguments & ENV VARs\n const rootMnemonicFromArgs = typeof normalizedArgv.mnemonic === 'string' ? normalizedArgv.mnemonic : undefined\n // Deep merge with precedence\n // TODO: Would like precedence to be defaults < file < ENV < CLI Args\n // but there is currently no way to determine which are defaults vs\n // user-supplied CLI Args since we set the CLI args to the defaults\n // and receive a flattened object. We might need to manually invoke\n // the parser without the defaults to achieve this.\n const mergedConfig = safeParseOrThrow(deepMerge(parsedConfigFile, parsedConfigArgs))\n const validated = safeParseOrThrow(resolveConfig(safeParseOrThrow(mergedConfig)))\n const rootMnemonic = rootMnemonicFromArgs ?? rootMnemonicFromFile\n return isDefined(rootMnemonic) ? { ...validated, mnemonic: rootMnemonic } : validated\n}\n\nexport async function configMiddleware(argv: Record<string, unknown>, setConfiguration: (config: Config) => void): Promise<void> {\n try {\n const finalConfig = await buildFinalConfig(argv)\n // Hard-fail if any actor was configured with its own mnemonic. Mnemonics\n // must live at the root; actors pick their wallet via accountPath.\n assertNoActorMnemonics(finalConfig)\n setConfiguration(finalConfig as Config)\n\n // Check if user wants to dump config and exit. Default behavior redacts\n // secrets (mnemonics, private keys, passwords, connection strings). Pass\n // `--with-secrets` to see the raw values \u2014 useful only on a developer box.\n if (argv['dump-config']) {\n const withSecrets = Boolean(argv['with-secrets'])\n const output = withSecrets ? finalConfig : redactConfig(finalConfig)\n console.log(JSON.stringify(output, null, 2))\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0)\n }\n } catch (err) {\n if (err instanceof ConfigFileNotFoundError) {\n console.error(`${err.message}. Check the path passed to --config/-c and try again.`)\n } else if (err instanceof ActorMnemonicNotAllowedError) {\n console.error(err.message)\n } else if (isZodError(err)) {\n console.error(`Zod error: ${err.message}`)\n } else {\n console.error(`Error parsing configuration: ${err}`)\n }\n if (!(err instanceof ConfigFileNotFoundError) && !(err instanceof ActorMnemonicNotAllowedError)) {\n console.error(`Stack: ${err instanceof Error ? err.stack : 'N/A'}`)\n }\n throw new Error('Invalid configuration', { cause: err })\n }\n}\n", "import type { ProviderFactoryLocatorInstance } from '@xyo-network/xl1-sdk'\n\n/**\n * One row in the per-actor provider tree. Captures the moniker (registry key),\n * the implementation class, the dependency monikers the factory declared, the\n * factory scope, and a `count` of how many times an identical fingerprint\n * appeared in the same moniker bucket. The registry can hold the same factory\n * more than once (e.g. via merges or multi-moniker registrations); collapsing\n * keeps the tree readable while still surfacing the multiplicity.\n */\ninterface ProviderEntry {\n count: number\n dependencies: readonly string[]\n moniker: string\n providerName: string\n scope: string\n}\n\nconst CANONICAL_ACTOR_ORDER: readonly string[] = [\n '_root', 'producer', 'finalizer', 'api', 'mempool', 'bridge', 'rewardRedemption',\n]\n\n/**\n * Enumerates the providers registered directly on a single locator. Does not\n * walk the parent chain \u2014 each locator is reported on its own so that a reader\n * can see exactly which providers a given actor contributed versus what it\n * inherits from `_root`.\n */\nfunction enumerateLocator(locator: ProviderFactoryLocatorInstance): ProviderEntry[] {\n const collapsed = new Map<string, ProviderEntry>()\n const registry = locator.registry as Record<string, unknown[] | undefined>\n for (const moniker of Object.keys(registry)) {\n const factories = registry[moniker]\n if (!factories) continue\n for (const factory of factories) {\n const f = factory as { dependencies?: readonly string[]; providerName?: string; scope?: string }\n const providerName = f.providerName ?? '<unknown>'\n const scope = f.scope ?? '<unknown>'\n const dependencies = f.dependencies ?? []\n const fingerprint = `${moniker}|${providerName}|${scope}|${dependencies.join(',')}`\n const existing = collapsed.get(fingerprint)\n if (existing) {\n existing.count += 1\n } else {\n collapsed.set(fingerprint, {\n count: 1, dependencies, moniker, providerName, scope,\n })\n }\n }\n }\n return [...collapsed.values()].toSorted((a, b) => a.moniker.localeCompare(b.moniker) || a.providerName.localeCompare(b.providerName))\n}\n\nfunction buildOwnerIndex(perActor: ReadonlyMap<string, readonly ProviderEntry[]>): Map<string, Set<string>> {\n const monikerOwners = new Map<string, Set<string>>()\n for (const [actorName, entries] of perActor) {\n for (const entry of entries) {\n let owners = monikerOwners.get(entry.moniker)\n if (!owners) {\n owners = new Set()\n monikerOwners.set(entry.moniker, owners)\n }\n owners.add(actorName)\n }\n }\n return monikerOwners\n}\n\nfunction renderDuplicatesSummary(monikerOwners: ReadonlyMap<string, ReadonlySet<string>>): string[] {\n const duplicates = [...monikerOwners.entries()]\n .filter(([, owners]) => owners.size > 1)\n .map(([moniker, owners]) => ({ moniker, owners: [...owners].toSorted().map(formatGroupForDisplay) }))\n .toSorted((a, b) => a.moniker.localeCompare(b.moniker))\n if (duplicates.length === 0) return []\n const lines = ['Duplicate monikers (registered by more than one locator):']\n for (const { moniker, owners } of duplicates) {\n lines.push(` - ${moniker}: ${owners.join(', ')}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Groups actor names whose locators share the same `registry` object reference.\n * Under the shared-locator architecture (Option B), api/mempool/finalizer all\n * point to view locators that share one underlying registry \u2014 without this\n * grouping, the dump would print the same factory set N times and falsely\n * report every moniker as \"duplicate across actors.\"\n */\nfunction groupActorsBySharedRegistry(\n locators: Record<string, ProviderFactoryLocatorInstance>,\n): { actorNames: readonly string[]; locator: ProviderFactoryLocatorInstance }[] {\n const groups: { actorNames: string[]; locator: ProviderFactoryLocatorInstance; registry: unknown }[] = []\n for (const actorName of Object.keys(locators)) {\n const locator = locators[actorName]\n const existing = groups.find(g => g.registry === locator.registry)\n if (existing) {\n existing.actorNames.push(actorName)\n } else {\n groups.push({\n actorNames: [actorName], locator, registry: locator.registry,\n })\n }\n }\n return groups\n}\n\n/**\n * Stable id for a registry-sharing group: sorted, comma-joined actor names.\n * Used as the key in `monikerOwners`. Multi-actor group ids contain commas;\n * we display them parenthesized in the `also in:` annotation.\n */\nfunction groupId(actorNames: readonly string[]): string {\n return [...actorNames].toSorted().join(',')\n}\n\nfunction formatGroupForDisplay(groupKey: string): string {\n const members = groupKey.split(',')\n return members.length === 1 ? members[0] : `(${members.join(', ')})`\n}\n\nfunction renderGroupSection(\n actorNames: readonly string[],\n entries: readonly ProviderEntry[],\n monikerOwners: ReadonlyMap<string, ReadonlySet<string>>,\n): string[] {\n const sortedActors = [...actorNames].toSorted()\n const ownGroupKey = groupId(sortedActors)\n const heading = sortedActors.length === 1\n ? `Providers for actor: ${sortedActors[0]} (${entries.length} registered)`\n : `Providers shared by actors: ${sortedActors.join(', ')} (${entries.length} registered)`\n const lines: string[] = [heading]\n if (entries.length === 0) {\n lines.push(' (none)', '')\n return lines\n }\n for (let i = 0; i < entries.length; i++) {\n const entry = entries[i]\n const isLast = i === entries.length - 1\n const branch = isLast ? '\u2514\u2500\u2500' : '\u251C\u2500\u2500'\n const owners = monikerOwners.get(entry.moniker) ?? new Set<string>()\n const otherOwners = [...owners]\n .filter(o => o !== ownGroupKey)\n .toSorted()\n .map(formatGroupForDisplay)\n const dupNote = otherOwners.length > 0 ? ` \u26A0 also in: ${otherOwners.join(', ')}` : ''\n const depsNote = entry.dependencies.length > 0 ? `, deps: [${entry.dependencies.join(', ')}]` : ''\n const countNote = entry.count > 1 ? ` (\u00D7${entry.count})` : ''\n lines.push(` ${branch} ${entry.moniker}${countNote} [impl: ${entry.providerName}, scope: ${entry.scope}${depsNote}]${dupNote}`)\n }\n lines.push('')\n return lines\n}\n\n/**\n * Renders the locator map as a tree grouped by registry identity, annotating\n * any moniker that appears in more than one *registry* with `\u26A0 also in: ...`.\n *\n * - When all input locators share one registry (shared-locator path), a single\n * \"Providers shared by actors: \u2026\" section is rendered.\n * - When some actors have distinct registries (legacy `_root` + per-actor\n * child architecture), each registry is rendered separately. `_root` is\n * ordered first.\n *\n * The \"Duplicate monikers\" summary at the bottom only flags monikers\n * registered by *different* registries \u2014 duplicates within one registry are\n * already collapsed into per-entry `(\u00D7N)` counts by `enumerateLocator`.\n */\nexport function formatProviderTree(locators: Record<string, ProviderFactoryLocatorInstance>): string {\n const groups = groupActorsBySharedRegistry(locators)\n\n // Per-actor moniker ownership (used for the \"also in:\" annotation), but\n // attribute each moniker to the GROUP it belongs to \u2014 the \"actor name\" the\n // index uses is the joined group key, so two actors that share a registry\n // never appear as duplicates of each other.\n const groupKeys = groups.map(g => ({ ...g, key: groupId(g.actorNames) }))\n const perGroup = new Map<string, ProviderEntry[]>()\n for (const g of groupKeys) perGroup.set(g.key, enumerateLocator(g.locator))\n const monikerOwners = buildOwnerIndex(perGroup)\n\n // Order: legacy `_root` first when present; otherwise alphabetical by sorted\n // actor names within the group, with the canonical actor order applied to\n // the *primary* (sorted-first) actor name in each group.\n const orderedGroups = [...groupKeys].toSorted((a, b) => {\n const aHasRoot = a.actorNames.includes('_root')\n const bHasRoot = b.actorNames.includes('_root')\n if (aHasRoot !== bHasRoot) return aHasRoot ? -1 : 1\n const ai = CANONICAL_ACTOR_ORDER.indexOf(a.actorNames[0])\n const bi = CANONICAL_ACTOR_ORDER.indexOf(b.actorNames[0])\n if (ai !== bi) return (ai === -1 ? Number.MAX_SAFE_INTEGER : ai) - (bi === -1 ? Number.MAX_SAFE_INTEGER : bi)\n return a.key.localeCompare(b.key)\n })\n\n const lines: string[] = ['XL1 Provider Dump', '=================', '']\n for (const g of orderedGroups) {\n lines.push(...renderGroupSection(g.actorNames.toSorted(), perGroup.get(g.key) ?? [], monikerOwners))\n }\n lines.push(...renderDuplicatesSummary(monikerOwners))\n return lines.join('\\n')\n}\n", "/* eslint-disable no-irregular-whitespace, @stylistic/max-len */\nexport const XL1LogoColorizedAscii = `\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;118;111;144m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;72;32;223m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u2560\u2560\u001B[0m\u001B[38;2;103;85;170m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;79;121;152m\u2566\u001B[0m\u001B[38;2;82;121;151m\u2566\u001B[0m\u001B[38;2;112;125;136m_\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;88;59;196m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;73;34;221m\u2592\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;121;121;127m_\u001B[0m\u001B[38;2;100;101;128m\u2554\u001B[0m\u001B[38;2;93;94;127m\u2566\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;82;121;151m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2560\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;51;117;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u001B[0m\u001B[38;2;111;125;136m_\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;67;23;232m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;120;121;128m_\u001B[0m\u001B[38;2;100;101;127m\u2554\u001B[0m\u001B[38;2;79;81;127mR\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;88;90;127m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;55;117;165m\u255A\u001B[0m\u001B[38;2;44;116;171m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u001B[0m\u001B[38;2;50;116;167mD\u001B[0m\u001B[38;2;80;121;152m\u2566\u00A0\u001B[0m\u001B[38;2;106;90;165mj\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;89;61;194mH\u00A0\u001B[0m\u001B[38;2;99;100;127m\u2554\u001B[0m\u001B[38;2;79;80;127mD\u001B[0m\u001B[38;2;71;73;128m\u2592\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;83;121;150m\u00B2\u001B[0m\u001B[38;2;44;116;170m\u2592\u001B[0m\u001B[38;2;44;116;171m\u2592\u2592\u2592\u00A0\u001B[0m\u001B[38;2;76;38;217m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;74;76;128m\u2560\u001B[0m\u001B[38;2;71;73;128m\u2592\u2592\u2592\u001B[0m\u001B[38;2;89;90;128m\u2559\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;90;118;148m\\`\u001B[0m\u001B[38;2;89;107;153m_\u001B[0m\u001B[38;2;93;97;154m,\u001B[0m\u001B[38;2;105;89;166m\u2553\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;95;72;183m\u2553\u001B[0m\u001B[38;2;106;96;152m_\u001B[0m\u001B[38;2;100;94;143m\\`\u001B[0m\u001B[38;2;101;100;133m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;122;118;137m_\u001B[0m\u001B[38;2;113;102;153m,\u001B[0m\u001B[38;2;108;94;161m\u2553\u001B[0m\u001B[38;2;104;86;169m\u2553\u001B[0m\u001B[38;2;98;77;178m\u2554\u001B[0m\u001B[38;2;93;67;188m\u2557\u001B[0m\u001B[38;2;88;59;196m\u03C6\u001B[0m\u001B[38;2;83;51;204m@\u001B[0m\u001B[38;2;78;42;213mD\u001B[0m\u001B[38;2;72;32;223m\u2592\u001B[0m\u001B[38;2;68;24;231m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;71;30;225m\u2592\u001B[0m\u001B[38;2;77;40;215m\u2592\u001B[0m\u001B[38;2;82;49;206mK\u001B[0m\u001B[38;2;87;57;198m\u03C6\u001B[0m\u001B[38;2;91;65;190m\u2557\u001B[0m\u001B[38;2;97;75;180m\u2566\u001B[0m\u001B[38;2;103;84;171m\u2556\u001B[0m\u001B[38;2;107;92;163m\u00B2\u001B[0m\u001B[38;2;112;101;154m_\u001B[0m\u001B[38;2;119;112;143m_\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u001B[0m\u001B[38;2;106;91;164m\\`\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;89;62;193m\u2559\u001B[0m\u001B[38;2;85;54;201m\u2559\u001B[0m\u001B[38;2;80;45;210m\u255A\u001B[0m\u001B[38;2;74;35;220m\u255D\u001B[0m\u001B[38;2;69;26;229m\u2560\u001B[0m\u001B[38;2;66;22;233m\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;73;33;222m\u255D\u001B[0m\u001B[38;2;79;43;212m\u2569\u001B[0m\u001B[38;2;84;52;203m\u255C\u001B[0m\u001B[38;2;88;60;195m\u2559\u001B[0m\u001B[38;2;93;68;187m^\u001B[0m\u001B[38;2;100;80;175m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;113;84;152m\\`\u001B[0m\u001B[38;2;103;79;169m'\u001B[0m\u001B[38;2;95;72;183m\"\u001B[0m\u001B[38;2;87;57;198m\u2559\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u2560\u001B[0m\u001B[38;2;80;46;209m\u255C\u001B[0m\u001B[38;2;94;70;185m^\u001B[0m\u001B[38;2;102;77;175m^\u001B[0m\u001B[38;2;112;81;162m\\`\u001B[0m\u001B[38;2;115;92;155m\\`\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;145;116;107m,\u001B[0m\u001B[38;2;199;82;45m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2560\u00A0\u001B[0m\u001B[38;2;70;28;227m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u2560\u00A0\u001B[0m\u001B[38;2;189;49;97m\u00E5\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;155;92;114m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;175;98;73m\u2554\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u2592\u2592\u001B[0m\u001B[38;2;197;83;47m\u2569\u00A0\u001B[0m\u001B[38;2;98;76;179m[\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u001B[0m\u001B[38;2;81;48;207mH\u00A0\u001B[0m\u001B[38;2;188;51;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u2560\u001B[0m\u001B[38;2;183;57;100mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;146;116;106m,\u001B[0m\u001B[38;2;199;82;44m\u2560\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;207;77;35m\u2592\u001B[0m\u001B[38;2;196;84;48m\u2569\u001B[0m\u001B[38;2;168;102;81m^\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;160;87;111m'\u001B[0m\u001B[38;2;187;52;98m\u255A\u001B[0m\u001B[38;2;203;32;90m\u2560\u001B[0m\u001B[38;2;203;32;90m\u2560\u2560\u001B[0m\u001B[38;2;156;91;113m,\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;198;83;46m\u2569\u001B[0m\u001B[38;2;194;85;50m\u2569\u001B[0m\u001B[38;2;167;102;82m^\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;81;46;209m\u255A\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u2560\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;159;88;112m'\u001B[0m\u001B[38;2;186;53;98m\u255A\u001B[0m\u001B[38;2;197;40;93m\u2569\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;110;97;158m'\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\u001B[38;2;94;69;186mH\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;68;25;230m\u2560\u001B[0m\u001B[38;2;66;21;234m\u2560\u001B[0m\n\u001B[38;2;128;128;128m\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u00A0\u001B[0m\u001B[38;2;108;93;162m\u00B2\u001B[0m\u001B[38;2;99;79;176m^\u001B[0m`\n", "import type { UsageMeta } from '@xyo-network/xl1-sdk'\nimport { isUsageMeta } from '@xyo-network/xl1-sdk'\nimport type { Options } from 'yargs'\nimport { globalRegistry } from 'zod/mini'\n\nconst usageMetaToOptions = (meta: UsageMeta): Options => {\n return meta\n}\n\nexport const optionsFromGlobalZodRegistry = (): Record<string, Options> => {\n const opts: Record<string, Options> = {}\n for (const schema of Object.values(globalRegistry._map)) {\n if (isUsageMeta(schema)) {\n if (schema.hidden) continue // skip hidden options\n opts[schema.title] = usageMetaToOptions(schema)\n }\n }\n return opts\n}\n", "import { start } from './start.ts'\n\nstart().catch((err) => {\n // If we're in development mode, log the stack trace to the console\n if (process.env.NODE_ENV === 'development') console.error('An error occurred during startup:', err)\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1)\n})\n"],
5
+ "mappings": ";AAAA,SAAS,cAAc;;;ACAvB,SAAS,SAAS,OAAO,UAAU,cAAc;AACjD,SAAS,uBAAuB;AAEhC,SAAS,aAAAA,kBAAiB;AAC1B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,wBAAwB;AACjC,SAAS,sBAAsB;AAC/B;AAAA,EACE;AAAA,EAAiC;AAAA,EAAgC;AAAA,EAAoB;AAAA,EACrF;AAAA,EAAoB;AAAA,OACf;AACP,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AAExC;AAAA,EACE;AAAA,EAAgB,aAAAC;AAAA,EAAW;AAAA,OACtB;AAEP,OAAO,WAAW;AAClB,SAAS,eAAe;AACxB,SAAS,SAAS;;;ACtBlB,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AAIhC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,wBAAwB;AACjC,SAAS,gCAAgC;;;ACfzC;AAAA,EACE;AAAA,EACA;AAAA,EAAe;AAAA,EACf;AAAA,EAAU;AAAA,OACL;AAGA,IAAM,aAAa,CAACC,YAA+B;AACxD,MAAI;AACJ,MAAIA,QAAO,IAAI,QAAQ;AACrB,aAAS,IAAI,aAAa;AAAA,EAC5B,OAAO;AACL,QAAI;AACJ,QAAI,UAAUA,QAAO,IAAI,QAAQ,GAAG;AAClC,YAAM,SAAS,SAASA,QAAO,IAAI,SAAS,YAAY,CAA0B;AAClF,UAAI,UAAU,MAAM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AAQ,KAAK,CAAC;AAChB,CAAC;",
6
6
  "names": ["isDefined", "ConfigZod", "config", "configuration", "config", "getConfiguration", "getLocatorsFromConfig", "yargs", "isDefined", "config", "input", "output", "isDefined", "configuration", "config", "ConfigZod", "argv"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/xl1-cli-lib",
3
- "version": "1.23.2",
3
+ "version": "2.0.1",
4
4
  "description": "XYO Layer One CLI Library",
5
5
  "homepage": "https://xylabs.com",
6
6
  "bugs": {
@@ -38,32 +38,32 @@
38
38
  "README.md"
39
39
  ],
40
40
  "dependencies": {
41
- "@xyo-network/chain-api": "~1.23.2",
42
- "@xyo-network/chain-finalizer": "~1.23.2",
43
- "@xyo-network/chain-orchestration": "~1.23.2",
44
- "@xyo-network/chain-producer": "~1.23.2",
45
- "@xyo-network/chain-reward-redemption": "~1.23.2",
46
- "@xyo-network/chain-orchestration-express": "~1.23.2",
47
- "@xyo-network/chain-mempool": "~1.23.2",
48
- "@xyo-network/chain-bridge": "~1.23.2"
41
+ "@xyo-network/chain-bridge": "~2.0.1",
42
+ "@xyo-network/chain-api": "~2.0.1",
43
+ "@xyo-network/chain-mempool": "~2.0.1",
44
+ "@xyo-network/chain-orchestration": "~2.0.1",
45
+ "@xyo-network/chain-finalizer": "~2.0.1",
46
+ "@xyo-network/chain-orchestration-express": "~2.0.1",
47
+ "@xyo-network/chain-producer": "~2.0.1",
48
+ "@xyo-network/chain-reward-redemption": "~2.0.1"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@bitauth/libauth": "~3.0.0",
52
52
  "@metamask/json-rpc-engine": "^10.5.0",
53
53
  "@metamask/providers": "^22.1.1",
54
- "@metamask/utils": "~11.11.0",
54
+ "@metamask/utils": "^11.11.0",
55
55
  "@opentelemetry/api": "^1.9.1",
56
56
  "@opentelemetry/context-async-hooks": "~2.7.1",
57
57
  "@opentelemetry/context-zone": "~2.7.1",
58
58
  "@opentelemetry/core": "~2.7.1",
59
- "@opentelemetry/exporter-prometheus": "~0.218",
60
- "@opentelemetry/exporter-trace-otlp-grpc": "~0.218",
61
- "@opentelemetry/exporter-trace-otlp-http": "~0.218",
59
+ "@opentelemetry/exporter-prometheus": "^0.218.0",
60
+ "@opentelemetry/exporter-trace-otlp-grpc": "^0.218.0",
61
+ "@opentelemetry/exporter-trace-otlp-http": "^0.218.0",
62
62
  "@opentelemetry/host-metrics": "~0.38.3",
63
- "@opentelemetry/instrumentation": "~0.218",
64
- "@opentelemetry/instrumentation-express": "~0.66",
65
- "@opentelemetry/instrumentation-http": "~0.218",
66
- "@opentelemetry/instrumentation-runtime-node": "~0.31",
63
+ "@opentelemetry/instrumentation": "^0.218.0",
64
+ "@opentelemetry/instrumentation-express": "^0.66.0",
65
+ "@opentelemetry/instrumentation-http": "^0.218.0",
66
+ "@opentelemetry/instrumentation-runtime-node": "^0.31.0",
67
67
  "@opentelemetry/resources": "~2.7.1",
68
68
  "@opentelemetry/sdk-metrics": "~2.7.1",
69
69
  "@opentelemetry/sdk-trace-base": "^2.7.1",
@@ -71,48 +71,48 @@
71
71
  "@scure/base": "~2.2.0",
72
72
  "@scure/bip39": "~2.2.0",
73
73
  "@types/yargs": "^17.0.35",
74
- "@xylabs/express": "^5.1.2",
75
- "@xylabs/fetch": "~5.1.2",
76
- "@xylabs/geo": "^5.1.2",
77
- "@xylabs/mongo": "^5.1.2",
78
- "@xylabs/sdk-js": "^5.1.2",
79
- "@xylabs/threads": "~5.1.2",
80
- "@xylabs/toolchain": "~8.0.4",
81
- "@xylabs/tsconfig": "~8.0.4",
82
- "@xyo-network/account": "~5.6.2",
83
- "@xyo-network/account-model": "~5.6.3",
84
- "@xyo-network/api": "~5.6.2",
85
- "@xyo-network/api-models": "~5.6.3",
86
- "@xyo-network/archivist-lmdb": "~5.6.4",
87
- "@xyo-network/archivist-mongodb": "~5.6.4",
88
- "@xyo-network/archivist-view": "~5.6.4",
89
- "@xyo-network/bios": "~7.3.1",
90
- "@xyo-network/bios-model": "~7.3.1",
91
- "@xyo-network/boundwitness-builder": "~5.6.2",
92
- "@xyo-network/boundwitness-model": "~5.6.3",
93
- "@xyo-network/boundwitness-validator": "~5.6.2",
94
- "@xyo-network/boundwitness-wrapper": "~5.6.2",
95
- "@xyo-network/config-payload-plugin": "~5.6.3",
96
- "@xyo-network/huri": "~5.6.2",
97
- "@xyo-network/manifest-model": "~5.6.3",
98
- "@xyo-network/payload-builder": "~5.6.2",
99
- "@xyo-network/payload-model": "~5.6.3",
100
- "@xyo-network/payload-plugin": "~5.6.3",
101
- "@xyo-network/payload-wrapper": "~5.6.2",
102
- "@xyo-network/query-payload-plugin": "~5.6.3",
103
- "@xyo-network/sdk-js": "^5.6.4",
104
- "@xyo-network/sdk-protocol-js": "~5.6.3",
74
+ "@xylabs/express": "~6.0.2",
75
+ "@xylabs/fetch": "~6.0.2",
76
+ "@xylabs/geo": "~6.0.2",
77
+ "@xylabs/mongo": "^6.0.2",
78
+ "@xylabs/sdk-js": "^6.0.2",
79
+ "@xylabs/threads": "~6.0.2",
80
+ "@xylabs/toolchain": "~8.1.1",
81
+ "@xylabs/tsconfig": "~8.1.1",
82
+ "@xyo-network/account": "~6.0.0",
83
+ "@xyo-network/account-model": "~6.0.0",
84
+ "@xyo-network/api": "~6.0",
85
+ "@xyo-network/api-models": "~6.0",
86
+ "@xyo-network/archivist-lmdb": "~6.0",
87
+ "@xyo-network/archivist-mongodb": "~6.0.0",
88
+ "@xyo-network/archivist-view": "~6.0",
89
+ "@xyo-network/bios": "~8.0",
90
+ "@xyo-network/bios-model": "~8.0",
91
+ "@xyo-network/boundwitness-builder": "~6.0.0",
92
+ "@xyo-network/boundwitness-model": "~6.0.0",
93
+ "@xyo-network/boundwitness-validator": "~6.0",
94
+ "@xyo-network/boundwitness-wrapper": "~6.0.0",
95
+ "@xyo-network/config-payload-plugin": "~6.0.0",
96
+ "@xyo-network/huri": "~6.0",
97
+ "@xyo-network/manifest-model": "~6.0.0",
98
+ "@xyo-network/payload-builder": "~6.0.0",
99
+ "@xyo-network/payload-model": "~6.0.0",
100
+ "@xyo-network/payload-plugin": "~6.0",
101
+ "@xyo-network/payload-wrapper": "~6.0.0",
102
+ "@xyo-network/query-payload-plugin": "~6.0.0",
103
+ "@xyo-network/sdk-js": "~6.0",
104
+ "@xyo-network/sdk-protocol-js": "~6.0",
105
105
  "@xyo-network/typechain": "^4.1.3",
106
- "@xyo-network/wallet": "~5.6.2",
107
- "@xyo-network/wallet-model": "^5.6.3",
108
- "@xyo-network/xl1-protocol-sdk": "~1.30.2",
109
- "@xyo-network/xl1-sdk": "^1.30.2",
106
+ "@xyo-network/wallet": "~6.0",
107
+ "@xyo-network/wallet-model": "^6.0.0",
108
+ "@xyo-network/xl1-protocol-sdk": "~2.0",
109
+ "@xyo-network/xl1-sdk": "~2.0",
110
110
  "ajv": "^8.20.0",
111
111
  "async-mutex": "^0.5.0",
112
112
  "bn.js": "^5.2.3",
113
113
  "body-parser": "~2.2.2",
114
114
  "buffer": "^6.0.3",
115
- "bullmq": "~5.76.8",
115
+ "bullmq": "~5.76.11",
116
116
  "bullmq-otel": "~1.3.1",
117
117
  "chalk": "^5.6.2",
118
118
  "compression": "~1.8.1",
@@ -121,7 +121,7 @@
121
121
  "cosmiconfig": "^9.0.1",
122
122
  "debug": "~4.4.3",
123
123
  "dotenv": "~17.4.2",
124
- "eslint": "^10.3.0",
124
+ "eslint": "^10.4.0",
125
125
  "ethers": "^6.16.0",
126
126
  "express": "^5.2.1",
127
127
  "express-mung": "~0.5.1",
@@ -130,8 +130,8 @@
130
130
  "idb": "^8.0.3",
131
131
  "ioredis": "~5.10.1",
132
132
  "lmdb": "^3.5.4",
133
- "lru-cache": "^11.3.6",
134
- "mapbox-gl": "^3.23.1",
133
+ "lru-cache": "^11.5.0",
134
+ "mapbox-gl": "^3.24.0",
135
135
  "mongodb": "^7.2.0",
136
136
  "observable-fns": "~0.6.1",
137
137
  "pako": "^2.1.0",
@@ -140,8 +140,8 @@
140
140
  "store2": "~2.14.4",
141
141
  "typescript": "~6.0.3",
142
142
  "uuid": "~14.0.0",
143
- "vite": "^8.0.13",
144
- "vitest": "^4.1.6",
143
+ "vite": "^8.0.14",
144
+ "vitest": "^4.1.7",
145
145
  "wasm-feature-detect": "~1.8.0",
146
146
  "web3-types": "~1.10.0",
147
147
  "webextension-polyfill": "^0.12.0",
@@ -154,7 +154,7 @@
154
154
  "@bitauth/libauth": "~3.0",
155
155
  "@metamask/json-rpc-engine": "^10.3",
156
156
  "@metamask/providers": "^22.1",
157
- "@metamask/utils": "~11.11",
157
+ "@metamask/utils": "^11.11",
158
158
  "@opentelemetry/api": "^1.9",
159
159
  "@opentelemetry/context-async-hooks": "~2.7",
160
160
  "@opentelemetry/context-zone": "~2.7",
@@ -173,40 +173,40 @@
173
173
  "@opentelemetry/semantic-conventions": "~1.41",
174
174
  "@scure/base": "~2.2",
175
175
  "@scure/bip39": "~2.2",
176
- "@xylabs/express": "^5.1",
177
- "@xylabs/fetch": "~5.1",
178
- "@xylabs/geo": "^5.1",
179
- "@xylabs/mongo": "^5.1",
180
- "@xylabs/sdk-js": "^5.1",
181
- "@xylabs/threads": "~5.1",
182
- "@xyo-network/account": "~5.6",
183
- "@xyo-network/account-model": "~5.6",
184
- "@xyo-network/api": "~5.6",
185
- "@xyo-network/api-models": "~5.6",
186
- "@xyo-network/archivist-lmdb": "~5.6",
187
- "@xyo-network/archivist-mongodb": "~5.6",
188
- "@xyo-network/archivist-view": "~5.6",
189
- "@xyo-network/bios": "~7.3",
190
- "@xyo-network/bios-model": "~7.3",
191
- "@xyo-network/boundwitness-builder": "~5.6",
192
- "@xyo-network/boundwitness-model": "~5.6",
193
- "@xyo-network/boundwitness-validator": "~5.6",
194
- "@xyo-network/boundwitness-wrapper": "~5.6",
195
- "@xyo-network/config-payload-plugin": "~5.6",
196
- "@xyo-network/huri": "~5.6",
197
- "@xyo-network/manifest-model": "~5.6",
198
- "@xyo-network/payload-builder": "~5.6",
199
- "@xyo-network/payload-model": "~5.6",
200
- "@xyo-network/payload-plugin": "~5.6",
201
- "@xyo-network/payload-wrapper": "~5.6",
202
- "@xyo-network/query-payload-plugin": "~5.6",
203
- "@xyo-network/sdk-js": "^5.6",
204
- "@xyo-network/sdk-protocol-js": "~5.6",
176
+ "@xylabs/express": "^6.0",
177
+ "@xylabs/fetch": "^6.0",
178
+ "@xylabs/geo": "^6.0",
179
+ "@xylabs/mongo": "^6.0",
180
+ "@xylabs/sdk-js": "^6.0",
181
+ "@xylabs/threads": "~6.0",
182
+ "@xyo-network/account": "~6.0",
183
+ "@xyo-network/account-model": "~6.0",
184
+ "@xyo-network/api": "~6.0",
185
+ "@xyo-network/api-models": "~6.0",
186
+ "@xyo-network/archivist-lmdb": "~6.0",
187
+ "@xyo-network/archivist-mongodb": "~6.0",
188
+ "@xyo-network/archivist-view": "~6.0",
189
+ "@xyo-network/bios": "~8.0",
190
+ "@xyo-network/bios-model": "~8.0",
191
+ "@xyo-network/boundwitness-builder": "~6.0",
192
+ "@xyo-network/boundwitness-model": "~6.0",
193
+ "@xyo-network/boundwitness-validator": "~6.0",
194
+ "@xyo-network/boundwitness-wrapper": "~6.0",
195
+ "@xyo-network/config-payload-plugin": "~6.0",
196
+ "@xyo-network/huri": "~6.0",
197
+ "@xyo-network/manifest-model": "~6.0",
198
+ "@xyo-network/payload-builder": "~6.0",
199
+ "@xyo-network/payload-model": "~6.0",
200
+ "@xyo-network/payload-plugin": "~6.0",
201
+ "@xyo-network/payload-wrapper": "~6.0",
202
+ "@xyo-network/query-payload-plugin": "~6.0",
203
+ "@xyo-network/sdk-js": "^6.0",
204
+ "@xyo-network/sdk-protocol-js": "~6.0",
205
205
  "@xyo-network/typechain": "^4.1",
206
- "@xyo-network/wallet": "~5.6",
207
- "@xyo-network/wallet-model": "^5.6",
208
- "@xyo-network/xl1-protocol-sdk": "~1.30.1",
209
- "@xyo-network/xl1-sdk": "^1.28",
206
+ "@xyo-network/wallet": "~6.0",
207
+ "@xyo-network/wallet-model": "^6.0",
208
+ "@xyo-network/xl1-protocol-sdk": "~2.0",
209
+ "@xyo-network/xl1-sdk": "^2.0",
210
210
  "ajv": "^8.20",
211
211
  "async-mutex": "^0.5",
212
212
  "bn.js": "^5.2",