@powerhousedao/host-core 6.2.3-dev.76 → 6.2.3-dev.78

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.
@@ -564,12 +564,7 @@ function buildHostSchemas(tokenField) {
564
564
  /** on-demand model resolution (was DYNAMIC_MODEL_LOADING). */
565
565
  dynamic: z.boolean().optional()
566
566
  }).optional(),
567
- remote: z.strictObject({ url: tokenField.any(z.url()) }).optional(),
568
- projection: z.strictObject({
569
- enabled: z.boolean().optional(),
570
- dbPoolSize: z.number().int().positive().optional()
571
- }).optional(),
572
- executors: z.strictObject({ numWorkers: z.union([z.number().int().positive(), z.literal("auto")]).optional() }).optional()
567
+ remote: z.strictObject({ url: tokenField.any(z.url()) }).optional()
573
568
  }).superRefine((backend, ctx) => {
574
569
  if (backend.kind === "remote" && !backend.remote) ctx.addIssue({
575
570
  code: "custom",
@@ -587,10 +582,7 @@ function buildHostSchemas(tokenField) {
587
582
  });
588
583
  const reactorSchema = z.strictObject({
589
584
  backends: z.record(z.string(), reactorBackendSchema).optional(),
590
- placement: z.strictObject({
591
- primary: z.string().optional(),
592
- default: z.looseObject({}).optional()
593
- }).optional(),
585
+ placement: z.strictObject({ primary: z.string().optional() }).optional(),
594
586
  protocol: reactorProtocolSchema.optional(),
595
587
  /** DEPRECATED (dies in R2): workflows become a listed plugin. */
596
588
  workflows: z.boolean().optional(),
@@ -599,13 +591,7 @@ function buildHostSchemas(tokenField) {
599
591
  networkId: z.string().optional(),
600
592
  chainId: z.number().int().optional()
601
593
  }).optional(),
602
- packages: z.strictObject({ registryUrl: z.string().optional() }).optional(),
603
594
  namespace: z.string().min(1).optional(),
604
- auth: z.strictObject({
605
- enabled: z.boolean().optional(),
606
- admins: z.array(z.string()).optional(),
607
- renown: z.looseObject({}).optional()
608
- }).optional(),
609
595
  drives: tokenField.any(z.array(buildDriveDeclarationSchema(tokenField.any))).optional()
610
596
  });
611
597
  /** Common runner options; runner modules extend it with their own. */
@@ -623,7 +609,7 @@ function buildHostSchemas(tokenField) {
623
609
  * (as on a standalone host); there is no wrapper-level `plugins`. */
624
610
  const childWrapperSchema = z.strictObject({
625
611
  host: z.string().min(1),
626
- runner: runnerBaseSchema.partial().optional(),
612
+ runner: runnerBaseSchema.partial().extend({ port: z.number().int().min(0).max(65535).optional() }).optional(),
627
613
  config: z.looseObject({}).optional(),
628
614
  reactor: reactorSchema.optional()
629
615
  });
@@ -2512,6 +2498,22 @@ function probeRun(projectDir, hostName, projectName, env = process.env) {
2512
2498
  };
2513
2499
  }
2514
2500
  //#endregion
2501
+ //#region src/child-wrapper.ts
2502
+ /** Generic compound rule: `reactor`/`config` replace, `runner` key-merges. */
2503
+ function applyChildWrapper(base, wrapper) {
2504
+ const reactor = wrapper.reactor ?? base.reactor;
2505
+ const config = wrapper.config ?? base.config;
2506
+ return {
2507
+ ...base,
2508
+ runner: {
2509
+ ...base.runner,
2510
+ ...wrapper.runner
2511
+ },
2512
+ ...config !== void 0 ? { config } : {},
2513
+ ...reactor !== void 0 ? { reactor } : {}
2514
+ };
2515
+ }
2516
+ //#endregion
2515
2517
  //#region src/placeholders.ts
2516
2518
  /**
2517
2519
  * `${userData}` resolution for host files (desktop shape): storage paths in a
@@ -2685,23 +2687,8 @@ function toStartedHandle(value, where) {
2685
2687
  }
2686
2688
  //#endregion
2687
2689
  //#region src/compound.ts
2688
- /** Build the member host object the member runner sees: the member's own
2689
- * host.js with the wrapper applied. A wrapper SECTION is a FULL STATEMENT —
2690
- * `reactor` and `config`, when present on the wrapper, replace the member's
2691
- * wholesale; `runner` key-merges (wrappers override port, host, plugins…). */
2692
2690
  async function memberDraft(projectRoot, member) {
2693
- const base = (await loadHost(projectRoot, member.host)).host;
2694
- const reactor = member.reactor ?? base.reactor;
2695
- const config = member.config ?? base.config;
2696
- return {
2697
- ...base,
2698
- runner: {
2699
- ...base.runner,
2700
- ...member.runner
2701
- },
2702
- ...config !== void 0 ? { config } : {},
2703
- ...reactor !== void 0 ? { reactor } : {}
2704
- };
2691
+ return applyChildWrapper((await loadHost(projectRoot, member.host)).host, member);
2705
2692
  }
2706
2693
  /** Whether a member receives the compound's `cspRegistrySync` wiring (as
2707
2694
  * `runner.cspRegistrySync`): its runner declares that option (any specifier
@@ -2881,6 +2868,6 @@ async function prepareMember(projectRoot, key, member) {
2881
2868
  };
2882
2869
  }
2883
2870
  //#endregion
2884
- export { unsetEnvMessage as $, keyTokenSchema as $t, lintHostImportGraph as A, makeHostSchemas as At, RunnerError as B, buildDriveDeclarationSchema as Bt, runRecordMemberSchema as C, runTransformHook as Cn, compoundWiringSchema as Ct, computeOutputsHash as D, emitHostJsonSchema as Dt, OUTPUTS_FILE as E, defineHostSchemas as Et, readOutputsFileHash as F, reactorProtocolSchema as Ft, knownVerbIssues as G, TOKEN_KEYS as Gt, hostSchemaIssues as H, drivesSchema as Ht, scanHostImports as I, reactorSchema as It, validateDeclaredHost as J, envTokenable as Jt, listVerbs as K, concatTokenSchema as Kt, stripComments as L, refineStartOrder as Lt, lintOutputsFile as M, reactorBackendKindSchema as Mt, loadHost as N, reactorBackendSchema as Nt, describeHostOutputs as O, emittedHostSchemas as Ot, probeHostsFolder as P, reactorHostSchema as Pt, resolveHostOutputs as Q, itemTokenSchema as Qt, CONNECT_RUNNER as R, runnerBaseSchema as Rt, writeRunRecord as S, runProvideHook as Sn, compoundHostSchema as St, HostLoadError as T, declaredHostSchemas as Tt, isSchemaLike as U, projectDriveIdWith as Ut, getVerb as V, driveDeclarationSchema as Vt, kindShapeIssues as W, TOKEN_ESCAPE_KEY as Wt, TokenResolutionError as X, forbidRef as Xt, validateHost as Y, findToken as Yt, describeMapElements as Z, isToken as Zt, isPidAlive as _, pluginEntrySchema as _n, isPlainObject as _t, takesCspRegistrySync as a, tokenable as an, substituteBuiltinEnv as at, readProjectName as b, runObserveHook as bn, childWrapperSchema as bt, compoundOutputSource as c, resolveHostPlugins as cn, checkTokenSites as ct, producerOutputsSchemas as d, entryActiveForVerb as dn, outputSitesOf as dt, mapTokenSchema as en, PlanError as et, runRecordOutputSource as f, hostTypeSatisfies as fn, refKey as ft, clearRunRecord as g, pluginEntryObjectSchema as gn, formatPath as gt, resolveUserDataPlaceholders as h, normalizePluginEntry as hn, describeToken as ht, runCompound as i, tokenSchema as in, isBuiltinEnvName as it, lintHostImports as j, profileSchema as jt, findNonStaticValue as k, genericCompoundHostSchema as kt, loadProducers as l, resolvePluginContributions as ln, envSitesOf as lt, defaultUserDataDir as m, normalizePluginEntries as mn, collectTokenSites as mt, memberVerbOf as n, ref as nn, planCompound as nt, runnerHandleSchema as o, CONNECT_PLUGIN_OWNED_SLICES as on, findRemovedForms as ot, runnerOutputsSchema as p, mergeContributions as pn, schemaAtPath as pt, resolveRunnerModule as q, envTokenSchema as qt, prepareMember as r, tokenKeyOf as rn, BUILTIN_ENV_NAMES as rt, toStartedHandle as s, findDeadConnectConfig as sn, checkOutputPaths as st, compoundStartVerb as t, outputTokenSchema as tn, memberForRef as tt, processResolveEnv as u, PluginError as un, outputRefsOf as ut, listRunRecords as v, registerHostType as vn, renderTokens as vt, runRecordSchema as w, declaredGenericCompoundHostSchema as wt, readRunRecord as x, runObserveHookSequential as xn, childrenSchema as xt, probeRun as y, resolveOrder as yn, unwrapEscapes as yt, ONE_SHOT_VERBS as z, runnerKindSchema as zt };
2871
+ export { resolveHostOutputs as $, itemTokenSchema as $t, findNonStaticValue as A, genericCompoundHostSchema as At, ONE_SHOT_VERBS as B, runnerKindSchema as Bt, writeRunRecord as C, runProvideHook as Cn, compoundHostSchema as Ct, OUTPUTS_FILE as D, defineHostSchemas as Dt, HostLoadError as E, declaredHostSchemas as Et, probeHostsFolder as F, reactorHostSchema as Ft, kindShapeIssues as G, TOKEN_ESCAPE_KEY as Gt, getVerb as H, driveDeclarationSchema as Ht, readOutputsFileHash as I, reactorProtocolSchema as It, resolveRunnerModule as J, envTokenSchema as Jt, knownVerbIssues as K, TOKEN_KEYS as Kt, scanHostImports as L, reactorSchema as Lt, lintHostImports as M, profileSchema as Mt, lintOutputsFile as N, reactorBackendKindSchema as Nt, computeOutputsHash as O, emitHostJsonSchema as Ot, loadHost as P, reactorBackendSchema as Pt, describeMapElements as Q, isToken as Qt, stripComments as R, refineStartOrder as Rt, readRunRecord as S, runObserveHookSequential as Sn, childrenSchema as St, runRecordSchema as T, declaredGenericCompoundHostSchema as Tt, hostSchemaIssues as U, drivesSchema as Ut, RunnerError as V, buildDriveDeclarationSchema as Vt, isSchemaLike as W, projectDriveIdWith as Wt, validateHost as X, findToken as Xt, validateDeclaredHost as Y, envTokenable as Yt, TokenResolutionError as Z, forbidRef as Zt, clearRunRecord as _, pluginEntryObjectSchema as _n, formatPath as _t, takesCspRegistrySync as a, tokenSchema as an, isBuiltinEnvName as at, probeRun as b, resolveOrder as bn, unwrapEscapes as bt, compoundOutputSource as c, findDeadConnectConfig as cn, checkOutputPaths as ct, producerOutputsSchemas as d, PluginError as dn, outputRefsOf as dt, keyTokenSchema as en, unsetEnvMessage as et, runRecordOutputSource as f, entryActiveForVerb as fn, outputSitesOf as ft, applyChildWrapper as g, normalizePluginEntry as gn, describeToken as gt, resolveUserDataPlaceholders as h, normalizePluginEntries as hn, collectTokenSites as ht, runCompound as i, tokenKeyOf as in, BUILTIN_ENV_NAMES as it, lintHostImportGraph as j, makeHostSchemas as jt, describeHostOutputs as k, emittedHostSchemas as kt, loadProducers as l, resolveHostPlugins as ln, checkTokenSites as lt, defaultUserDataDir as m, mergeContributions as mn, schemaAtPath as mt, memberVerbOf as n, outputTokenSchema as nn, memberForRef as nt, runnerHandleSchema as o, tokenable as on, substituteBuiltinEnv as ot, runnerOutputsSchema as p, hostTypeSatisfies as pn, refKey as pt, listVerbs as q, concatTokenSchema as qt, prepareMember as r, ref as rn, planCompound as rt, toStartedHandle as s, CONNECT_PLUGIN_OWNED_SLICES as sn, findRemovedForms as st, compoundStartVerb as t, mapTokenSchema as tn, PlanError as tt, processResolveEnv as u, resolvePluginContributions as un, envSitesOf as ut, isPidAlive as v, pluginEntrySchema as vn, isPlainObject as vt, runRecordMemberSchema as w, runTransformHook as wn, compoundWiringSchema as wt, readProjectName as x, runObserveHook as xn, childWrapperSchema as xt, listRunRecords as y, registerHostType as yn, renderTokens as yt, CONNECT_RUNNER as z, runnerBaseSchema as zt };
2885
2872
 
2886
- //# sourceMappingURL=compound-Gjt5rBfF.mjs.map
2873
+ //# sourceMappingURL=compound-Cfqa5Jal.mjs.map