@semiont/frontend 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/package.json +1 -1
  2. package/standalone/apps/frontend/.next/BUILD_ID +1 -1
  3. package/standalone/apps/frontend/.next/app-path-routes-manifest.json +2 -2
  4. package/standalone/apps/frontend/.next/build-manifest.json +3 -3
  5. package/standalone/apps/frontend/.next/prerender-manifest.json +3 -3
  6. package/standalone/apps/frontend/.next/server/app/[locale]/about/page.js +1 -1
  7. package/standalone/apps/frontend/.next/server/app/[locale]/about/page.js.nft.json +1 -1
  8. package/standalone/apps/frontend/.next/server/app/[locale]/about/page_client-reference-manifest.js +1 -1
  9. package/standalone/apps/frontend/.next/server/app/[locale]/admin/devops/page.js +1 -1
  10. package/standalone/apps/frontend/.next/server/app/[locale]/admin/devops/page.js.nft.json +1 -1
  11. package/standalone/apps/frontend/.next/server/app/[locale]/admin/devops/page_client-reference-manifest.js +1 -1
  12. package/standalone/apps/frontend/.next/server/app/[locale]/admin/exchange/page.js +1 -1
  13. package/standalone/apps/frontend/.next/server/app/[locale]/admin/exchange/page.js.nft.json +1 -1
  14. package/standalone/apps/frontend/.next/server/app/[locale]/admin/exchange/page_client-reference-manifest.js +1 -1
  15. package/standalone/apps/frontend/.next/server/app/[locale]/admin/page.js +1 -1
  16. package/standalone/apps/frontend/.next/server/app/[locale]/admin/page.js.nft.json +1 -1
  17. package/standalone/apps/frontend/.next/server/app/[locale]/admin/page_client-reference-manifest.js +1 -1
  18. package/standalone/apps/frontend/.next/server/app/[locale]/admin/security/page.js +1 -1
  19. package/standalone/apps/frontend/.next/server/app/[locale]/admin/security/page.js.nft.json +1 -1
  20. package/standalone/apps/frontend/.next/server/app/[locale]/admin/security/page_client-reference-manifest.js +1 -1
  21. package/standalone/apps/frontend/.next/server/app/[locale]/admin/users/page.js +1 -1
  22. package/standalone/apps/frontend/.next/server/app/[locale]/admin/users/page.js.nft.json +1 -1
  23. package/standalone/apps/frontend/.next/server/app/[locale]/admin/users/page_client-reference-manifest.js +1 -1
  24. package/standalone/apps/frontend/.next/server/app/[locale]/auth/error/page.js +100 -100
  25. package/standalone/apps/frontend/.next/server/app/[locale]/auth/error/page.js.nft.json +1 -1
  26. package/standalone/apps/frontend/.next/server/app/[locale]/auth/error/page_client-reference-manifest.js +1 -1
  27. package/standalone/apps/frontend/.next/server/app/[locale]/auth/mcp-setup/route.js +1 -1
  28. package/standalone/apps/frontend/.next/server/app/[locale]/auth/mcp-setup/route.js.nft.json +1 -1
  29. package/standalone/apps/frontend/.next/server/app/[locale]/auth/signin/page.js +1 -1
  30. package/standalone/apps/frontend/.next/server/app/[locale]/auth/signin/page.js.nft.json +1 -1
  31. package/standalone/apps/frontend/.next/server/app/[locale]/auth/signin/page_client-reference-manifest.js +1 -1
  32. package/standalone/apps/frontend/.next/server/app/[locale]/auth/signup/page.js +1 -1
  33. package/standalone/apps/frontend/.next/server/app/[locale]/auth/signup/page.js.nft.json +1 -1
  34. package/standalone/apps/frontend/.next/server/app/[locale]/auth/signup/page_client-reference-manifest.js +1 -1
  35. package/standalone/apps/frontend/.next/server/app/[locale]/auth/welcome/page.js +1 -1
  36. package/standalone/apps/frontend/.next/server/app/[locale]/auth/welcome/page.js.nft.json +1 -1
  37. package/standalone/apps/frontend/.next/server/app/[locale]/auth/welcome/page_client-reference-manifest.js +1 -1
  38. package/standalone/apps/frontend/.next/server/app/[locale]/know/compose/page.js +1 -1
  39. package/standalone/apps/frontend/.next/server/app/[locale]/know/compose/page.js.nft.json +1 -1
  40. package/standalone/apps/frontend/.next/server/app/[locale]/know/compose/page_client-reference-manifest.js +1 -1
  41. package/standalone/apps/frontend/.next/server/app/[locale]/know/discover/page.js +1 -1
  42. package/standalone/apps/frontend/.next/server/app/[locale]/know/discover/page.js.nft.json +1 -1
  43. package/standalone/apps/frontend/.next/server/app/[locale]/know/discover/page_client-reference-manifest.js +1 -1
  44. package/standalone/apps/frontend/.next/server/app/[locale]/know/page.js +1 -1
  45. package/standalone/apps/frontend/.next/server/app/[locale]/know/page.js.nft.json +1 -1
  46. package/standalone/apps/frontend/.next/server/app/[locale]/know/page_client-reference-manifest.js +1 -1
  47. package/standalone/apps/frontend/.next/server/app/[locale]/know/resource/[id]/page.js +1 -1
  48. package/standalone/apps/frontend/.next/server/app/[locale]/know/resource/[id]/page.js.nft.json +1 -1
  49. package/standalone/apps/frontend/.next/server/app/[locale]/know/resource/[id]/page_client-reference-manifest.js +1 -1
  50. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/entity-tags/page.js +1 -1
  51. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/entity-tags/page.js.nft.json +1 -1
  52. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/entity-tags/page_client-reference-manifest.js +1 -1
  53. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/linked-data/page.js +1 -1
  54. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/linked-data/page.js.nft.json +1 -1
  55. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/linked-data/page_client-reference-manifest.js +1 -1
  56. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/page.js +1 -1
  57. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/page.js.nft.json +1 -1
  58. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/page_client-reference-manifest.js +1 -1
  59. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/recent/page.js +1 -1
  60. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/recent/page.js.nft.json +1 -1
  61. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/recent/page_client-reference-manifest.js +1 -1
  62. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/tag-schemas/page.js +1 -1
  63. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/tag-schemas/page.js.nft.json +1 -1
  64. package/standalone/apps/frontend/.next/server/app/[locale]/moderate/tag-schemas/page_client-reference-manifest.js +1 -1
  65. package/standalone/apps/frontend/.next/server/app/[locale]/page.js +1 -1
  66. package/standalone/apps/frontend/.next/server/app/[locale]/page.js.nft.json +1 -1
  67. package/standalone/apps/frontend/.next/server/app/[locale]/page_client-reference-manifest.js +1 -1
  68. package/standalone/apps/frontend/.next/server/app/[locale]/privacy/page.js +1 -1
  69. package/standalone/apps/frontend/.next/server/app/[locale]/privacy/page.js.nft.json +1 -1
  70. package/standalone/apps/frontend/.next/server/app/[locale]/privacy/page_client-reference-manifest.js +1 -1
  71. package/standalone/apps/frontend/.next/server/app/[locale]/terms/page.js +1 -1
  72. package/standalone/apps/frontend/.next/server/app/[locale]/terms/page.js.nft.json +1 -1
  73. package/standalone/apps/frontend/.next/server/app/[locale]/terms/page_client-reference-manifest.js +1 -1
  74. package/standalone/apps/frontend/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  75. package/standalone/apps/frontend/.next/server/app/_global-error.html +1 -1
  76. package/standalone/apps/frontend/.next/server/app/_global-error.rsc +1 -1
  77. package/standalone/apps/frontend/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  78. package/standalone/apps/frontend/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  79. package/standalone/apps/frontend/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  80. package/standalone/apps/frontend/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  81. package/standalone/apps/frontend/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  82. package/standalone/apps/frontend/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  83. package/standalone/apps/frontend/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  84. package/standalone/apps/frontend/.next/server/app/_not-found.html +1 -1
  85. package/standalone/apps/frontend/.next/server/app/_not-found.rsc +1 -1
  86. package/standalone/apps/frontend/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  87. package/standalone/apps/frontend/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  88. package/standalone/apps/frontend/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  89. package/standalone/apps/frontend/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  90. package/standalone/apps/frontend/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  91. package/standalone/apps/frontend/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  92. package/standalone/apps/frontend/.next/server/app/api/auth/[...nextauth]/route.js +1 -1
  93. package/standalone/apps/frontend/.next/server/app/api/auth/[...nextauth]/route.js.nft.json +1 -1
  94. package/standalone/apps/frontend/.next/server/app/api/cookies/consent/route.js +1 -1
  95. package/standalone/apps/frontend/.next/server/app/api/cookies/consent/route.js.nft.json +1 -1
  96. package/standalone/apps/frontend/.next/server/app/api/cookies/export/route.js +1 -1
  97. package/standalone/apps/frontend/.next/server/app/api/cookies/export/route.js.nft.json +1 -1
  98. package/standalone/apps/frontend/.next/server/app/api/resources/[id]/route.js +2022 -12
  99. package/standalone/apps/frontend/.next/server/app/api/resources/[id]/route.js.nft.json +1 -1
  100. package/standalone/apps/frontend/.next/server/app-paths-manifest.json +2 -2
  101. package/standalone/apps/frontend/.next/server/chunks/3144.js +277 -1835
  102. package/standalone/apps/frontend/.next/server/chunks/{5781.js → 5056.js} +66 -7214
  103. package/standalone/apps/frontend/.next/server/chunks/{4741.js → 5866.js} +1311 -7254
  104. package/standalone/apps/frontend/.next/server/chunks/730.js +2 -2458
  105. package/standalone/apps/frontend/.next/server/middleware-build-manifest.js +1 -1
  106. package/standalone/apps/frontend/.next/server/pages/404.html +1 -1
  107. package/standalone/apps/frontend/.next/server/pages/500.html +1 -1
  108. package/standalone/apps/frontend/.next/server/server-reference-manifest.json +1 -1
  109. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/compose/{page-94f946fb3aaf0917.js → page-8c09eaae74b2bfd1.js} +1 -1
  110. package/standalone/apps/frontend/.next/static/chunks/app/[locale]/know/resource/[id]/{page-a4b644af750844d5.js → page-78dff169b8aa5aff.js} +1 -1
  111. package/standalone/apps/frontend/.next/static/chunks/common-5a07de4e988dc9b9.js +63 -0
  112. package/standalone/apps/frontend/package.json +8 -8
  113. package/standalone/package.json +10 -1
  114. package/standalone/packages/core/package.json +12 -4
  115. package/standalone/apps/frontend/.next/static/chunks/common-42653c14d34c8864.js +0 -69
  116. /package/standalone/apps/frontend/.next/static/{I_XveRdyStDMqYJPcAAy5 → ewuXcO4pOVeGlYuR_3hkh}/_buildManifest.js +0 -0
  117. /package/standalone/apps/frontend/.next/static/{I_XveRdyStDMqYJPcAAy5 → ewuXcO4pOVeGlYuR_3hkh}/_ssgManifest.js +0 -0
@@ -21,12 +21,10 @@ exports.modules = {
21
21
  /* harmony export */ q$: () => (/* binding */ getFragmentSelector),
22
22
  /* harmony export */ zI: () => (/* binding */ cloneToken)
23
23
  /* harmony export */ });
24
- /* unused harmony exports APIError, CORE_TYPES_VERSION, CREATION_METHODS, ConfigurationError, ConflictError, NotFoundError, SDK_VERSION, ScopedEventBus, ScriptError, SemiontError, UnauthorizedError, ValidationError, annotationUri, applyBodyOperations, assembleAnnotation, authCode, burstBuffer, createConfigLoader, deepMerge, didToAgent, displayConfiguration, email, findBodyItem, formatErrors, generateUuid, getAllPlatformTypes, getEventType, getNodeEnvForEnvironment, googleCredential, hasAWSConfig, isAnnotationId, isArray, isBoolean, isDefined, isEventRelatedToAnnotation, isFunction, isNull, isNullish, isNumber, isObject, isResourceEvent, isResourceId, isResourceScopedEvent, isStoredEvent, isString, isSystemEvent, isUndefined, isValidPlatformType, jobId, listEnvironmentNames, mcpToken, parseAndMergeConfigs, parseEnvironment, refreshToken, resolveEnvVars, resourceAnnotationUri, resourceUri, userId, userToAgent, userToDid, validateEnvironment, validateEnvironmentConfig, validateSemiontConfig, validateSiteConfig, validateSvgMarkup */
24
+ /* unused harmony exports APIError, CORE_TYPES_VERSION, CREATION_METHODS, ConfigurationError, ConflictError, NotFoundError, SDK_VERSION, ScopedEventBus, ScriptError, SemiontError, UnauthorizedError, ValidationError, annotationUri, applyBodyOperations, assembleAnnotation, authCode, burstBuffer, createTomlConfigLoader, didToAgent, email, findBodyItem, generateUuid, getAllPlatformTypes, getEventType, googleCredential, isAnnotationId, isArray, isBoolean, isDefined, isEventRelatedToAnnotation, isFunction, isNull, isNullish, isNumber, isObject, isResourceEvent, isResourceId, isResourceScopedEvent, isStoredEvent, isString, isSystemEvent, isUndefined, isValidPlatformType, jobId, loadTomlConfig, mcpToken, parseEnvironment, refreshToken, resourceAnnotationUri, resourceUri, userId, userToAgent, userToDid, validateEnvironment, validateSvgMarkup */
25
25
  /* harmony import */ var _barrel_optimize_names_Observable_Subject_rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6476);
26
26
  /* harmony import */ var crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55511);
27
- /* harmony import */ var ajv__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27102);
28
- /* harmony import */ var ajv_formats__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7642);
29
-
27
+ /* harmony import */ var smol_toml__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(45419);
30
28
 
31
29
 
32
30
 
@@ -594,6 +592,276 @@ function didToAgent(did) {
594
592
  name: userId2
595
593
  };
596
594
  }
595
+ function deepMerge(base, override) {
596
+ const result = {
597
+ ...base
598
+ };
599
+ for (const key of Object.keys(override)){
600
+ const b = base[key];
601
+ const o = override[key];
602
+ if (o !== void 0 && o !== null && typeof o === "object" && !Array.isArray(o) && b !== void 0 && b !== null && typeof b === "object" && !Array.isArray(b)) {
603
+ result[key] = deepMerge(b, o);
604
+ } else if (o !== void 0) {
605
+ result[key] = o;
606
+ }
607
+ }
608
+ return result;
609
+ }
610
+ function resolveEnvVars(obj, env) {
611
+ if (typeof obj === "string") {
612
+ return obj.replace(/\$\{([^}]+)\}/g, (match, varName)=>{
613
+ if (env[varName] === void 0) {
614
+ throw new Error(`Environment variable ${varName} is not set (referenced in config as ${match})`);
615
+ }
616
+ return env[varName];
617
+ });
618
+ }
619
+ if (Array.isArray(obj)) {
620
+ return obj.map((item)=>resolveEnvVars(item, env));
621
+ }
622
+ if (obj !== null && typeof obj === "object") {
623
+ const resolved = {};
624
+ for(const key in obj){
625
+ resolved[key] = resolveEnvVars(obj[key], env);
626
+ }
627
+ return resolved;
628
+ }
629
+ return obj;
630
+ }
631
+ function requirePlatform(value, serviceName) {
632
+ if (!value) {
633
+ throw new Error(`platform is required for service '${serviceName}' \u2014 add 'platform = "posix"|"container"|"external"' to its config section`);
634
+ }
635
+ return value;
636
+ }
637
+ function loadTomlConfig(projectRoot, environment, globalConfigPath, reader, env) {
638
+ const projectConfigContent = reader.readIfExists(`${projectRoot}/.semiont/config`);
639
+ let projectName = "semiont-project";
640
+ let projectSite;
641
+ let projectEnvSection = {};
642
+ if (projectConfigContent) {
643
+ const projectConfig = parse(projectConfigContent);
644
+ projectName = projectConfig.project?.name ?? projectName;
645
+ projectSite = projectConfig.site;
646
+ projectEnvSection = projectConfig.environments?.[environment] ?? {};
647
+ }
648
+ const globalContent = reader.readIfExists(globalConfigPath);
649
+ const raw = globalContent ? parse(globalContent) : {};
650
+ const userEnvSection = raw.environments?.[environment] ?? {};
651
+ const envSection = deepMerge(projectEnvSection, userEnvSection);
652
+ const resolved = resolveEnvVars(envSection, env);
653
+ const flatInference = resolved.inference;
654
+ const makeMeaningSection = resolved["make-meaning"];
655
+ const workersSection = resolved.workers ?? {};
656
+ const actorsSection = resolved.actors ?? {};
657
+ const defaultWorkerInference = workersSection["default"]?.inference;
658
+ const defaultMakeMeaningInference = makeMeaningSection?.default?.inference;
659
+ function mergeWithFlatInference(specific) {
660
+ if (!flatInference) return specific;
661
+ return {
662
+ apiKey: flatInference.apiKey,
663
+ maxTokens: flatInference.maxTokens,
664
+ endpoint: flatInference.endpoint,
665
+ baseURL: flatInference.baseURL,
666
+ ...specific
667
+ };
668
+ }
669
+ function resolveActorInference(fromMakeMeaning, fromActors) {
670
+ const base = fromMakeMeaning ?? fromActors ?? defaultMakeMeaningInference;
671
+ if (!base) return void 0;
672
+ return mergeWithFlatInference(base);
673
+ }
674
+ const actors = {};
675
+ const gathererInference = resolveActorInference(makeMeaningSection?.actors?.gatherer?.inference, actorsSection["gatherer"]?.inference);
676
+ if (gathererInference) actors.gatherer = gathererInference;
677
+ const matcherInference = resolveActorInference(makeMeaningSection?.actors?.matcher?.inference, actorsSection["matcher"]?.inference);
678
+ if (matcherInference) actors.matcher = matcherInference;
679
+ const workers = {};
680
+ const workerTypes = [
681
+ "reference-annotation",
682
+ "highlight-annotation",
683
+ "assessment-annotation",
684
+ "comment-annotation",
685
+ "tag-annotation",
686
+ "generation"
687
+ ];
688
+ if (defaultWorkerInference) {
689
+ workers.default = mergeWithFlatInference(defaultWorkerInference);
690
+ }
691
+ for (const wt of workerTypes){
692
+ const specific = workersSection[wt]?.inference;
693
+ if (specific) {
694
+ workers[wt] = mergeWithFlatInference(specific);
695
+ }
696
+ }
697
+ const backend = resolved.backend;
698
+ const site = resolved.site ?? projectSite;
699
+ const inferenceSection = resolved.inference;
700
+ let inferenceProviders;
701
+ if (inferenceSection) {
702
+ inferenceProviders = {};
703
+ if (inferenceSection.type === "anthropic") {
704
+ inferenceProviders.anthropic = {
705
+ platform: requirePlatform(inferenceSection.platform, "inference"),
706
+ endpoint: inferenceSection.endpoint ?? "https://api.anthropic.com",
707
+ apiKey: inferenceSection.apiKey ?? ""
708
+ };
709
+ } else if (inferenceSection.type === "ollama") {
710
+ inferenceProviders.ollama = {
711
+ platform: {
712
+ type: requirePlatform(inferenceSection.platform, "inference")
713
+ },
714
+ baseURL: inferenceSection.baseURL,
715
+ port: inferenceSection.baseURL ? void 0 : 11434
716
+ };
717
+ }
718
+ }
719
+ const topLevelWorkers = {};
720
+ for (const [name, w] of Object.entries(workersSection)){
721
+ if (w.inference) {
722
+ topLevelWorkers[name] = {
723
+ inference: {
724
+ type: w.inference.type,
725
+ model: w.inference.model
726
+ }
727
+ };
728
+ }
729
+ }
730
+ const topLevelActors = {};
731
+ for (const [name, a] of Object.entries(actorsSection)){
732
+ if (a.inference) {
733
+ topLevelActors[name] = {
734
+ inference: {
735
+ type: a.inference.type,
736
+ model: a.inference.model
737
+ }
738
+ };
739
+ }
740
+ }
741
+ if (makeMeaningSection?.actors?.gatherer?.inference) {
742
+ topLevelActors["gatherer"] = {
743
+ inference: {
744
+ type: makeMeaningSection.actors.gatherer.inference.type,
745
+ model: makeMeaningSection.actors.gatherer.inference.model
746
+ }
747
+ };
748
+ }
749
+ if (makeMeaningSection?.actors?.matcher?.inference) {
750
+ topLevelActors["matcher"] = {
751
+ inference: {
752
+ type: makeMeaningSection.actors.matcher.inference.type,
753
+ model: makeMeaningSection.actors.matcher.inference.model
754
+ }
755
+ };
756
+ }
757
+ const frontend = resolved.frontend;
758
+ const proxy = resolved.proxy;
759
+ const config = {
760
+ services: {
761
+ backend: backend ? {
762
+ platform: {
763
+ type: requirePlatform(backend.platform, "backend")
764
+ },
765
+ port: backend.port ?? 4e3,
766
+ publicURL: backend.publicURL ?? `http://localhost:${backend.port ?? 4e3}`,
767
+ corsOrigin: backend.corsOrigin ?? backend.frontendURL ?? "http://localhost:3000"
768
+ } : void 0,
769
+ frontend: frontend ? {
770
+ platform: {
771
+ type: requirePlatform(frontend.platform, "frontend")
772
+ },
773
+ port: frontend.port ?? 3e3,
774
+ siteName: site?.siteName ?? "Semiont",
775
+ publicURL: frontend.publicURL
776
+ } : void 0,
777
+ proxy: proxy ? {
778
+ platform: {
779
+ type: requirePlatform(proxy.platform, "proxy")
780
+ },
781
+ type: "envoy",
782
+ port: proxy.port ?? 8080,
783
+ adminPort: proxy.adminPort ?? 9901,
784
+ backendPort: backend?.port ?? 4e3,
785
+ frontendPort: frontend?.port ?? 3e3
786
+ } : void 0,
787
+ graph: resolved.graph ? {
788
+ ...resolved.graph,
789
+ platform: {
790
+ type: requirePlatform(resolved.graph.platform, "graph")
791
+ },
792
+ type: resolved.graph.type ?? "neo4j"
793
+ } : makeMeaningSection?.graph,
794
+ database: resolved.database ? {
795
+ platform: {
796
+ type: requirePlatform(resolved.database.platform, "database")
797
+ },
798
+ type: "postgres",
799
+ image: resolved.database.image,
800
+ host: resolved.database.host ?? "localhost",
801
+ port: resolved.database.port ?? 5432,
802
+ name: resolved.database.name,
803
+ user: resolved.database.user,
804
+ password: resolved.database.password
805
+ } : void 0
806
+ },
807
+ ...inferenceProviders ? {
808
+ inference: inferenceProviders
809
+ } : {},
810
+ ...Object.keys(topLevelWorkers).length > 0 ? {
811
+ workers: topLevelWorkers
812
+ } : {},
813
+ ...Object.keys(topLevelActors).length > 0 ? {
814
+ actors: topLevelActors
815
+ } : {},
816
+ site: site ? {
817
+ domain: site.domain ?? "localhost",
818
+ siteName: site.siteName,
819
+ adminEmail: site.adminEmail,
820
+ oauthAllowedDomains: site.oauthAllowedDomains
821
+ } : void 0,
822
+ logLevel: resolved.logLevel,
823
+ _metadata: {
824
+ environment,
825
+ projectRoot,
826
+ projectName,
827
+ ...Object.keys(actors).length > 0 ? {
828
+ actors
829
+ } : {},
830
+ ...Object.keys(workers).length > 0 ? {
831
+ workers
832
+ } : {}
833
+ }
834
+ };
835
+ return config;
836
+ }
837
+ function createTomlConfigLoader(reader, globalConfigPath, env) {
838
+ return (projectRoot, environment)=>{
839
+ return loadTomlConfig(projectRoot, environment, globalConfigPath, reader, env);
840
+ };
841
+ }
842
+ // src/config/environment-validator.ts
843
+ function isValidEnvironment(value, availableEnvironments) {
844
+ if (!value) return false;
845
+ return availableEnvironments.includes(value);
846
+ }
847
+ function parseEnvironment(value, availableEnvironments) {
848
+ if (!value) {
849
+ throw new Error("Environment is required");
850
+ }
851
+ if (!isValidEnvironment(value, availableEnvironments)) {
852
+ throw new Error(`Invalid environment: ${value}. Available environments: ${availableEnvironments.join(", ")}`);
853
+ }
854
+ return value;
855
+ }
856
+ function validateEnvironment(value, availableEnvironments) {
857
+ if (!value) {
858
+ throw new Error("Environment is required");
859
+ }
860
+ if (!isValidEnvironment(value, availableEnvironments)) {
861
+ throw new Error(`Invalid environment: ${value}. Available environments: ${availableEnvironments.join(", ")}`);
862
+ }
863
+ return value;
864
+ }
597
865
  // src/config/configuration-error.ts
598
866
  var ConfigurationError = class extends Error {
599
867
  constructor(message, environment, suggestion, cause){
@@ -618,1832 +886,6 @@ var ConfigurationError = class extends Error {
618
886
  return output;
619
887
  }
620
888
  };
621
- // src/config/config.schema.json
622
- var config_schema_default = {
623
- $schema: "http://json-schema.org/draft-07/schema#",
624
- $id: "https://semiont.org/schemas/config.json",
625
- definitions: {
626
- PlatformType: {
627
- type: "string",
628
- enum: [
629
- "posix",
630
- "container",
631
- "aws",
632
- "external"
633
- ]
634
- },
635
- ServicePlatformConfig: {
636
- type: "object",
637
- properties: {
638
- type: {
639
- $ref: "#/definitions/PlatformType"
640
- }
641
- },
642
- required: [
643
- "type"
644
- ]
645
- },
646
- ResourceRequirements: {
647
- type: "object",
648
- properties: {
649
- cpu: {
650
- type: "string"
651
- },
652
- memory: {
653
- type: "string"
654
- },
655
- gpu: {
656
- type: "integer"
657
- },
658
- gpus: {
659
- type: "integer"
660
- },
661
- replicas: {
662
- type: "integer"
663
- },
664
- ephemeralStorage: {
665
- type: "string"
666
- },
667
- memoryReservation: {
668
- type: "string"
669
- }
670
- },
671
- additionalProperties: false
672
- },
673
- SecurityRequirements: {
674
- type: "object",
675
- properties: {
676
- readOnlyRootFilesystem: {
677
- type: "boolean"
678
- },
679
- runAsNonRoot: {
680
- type: "boolean"
681
- },
682
- runAsUser: {
683
- type: "integer"
684
- },
685
- runAsGroup: {
686
- type: "integer"
687
- },
688
- capabilities: {
689
- oneOf: [
690
- {
691
- type: "array",
692
- items: {
693
- type: "string"
694
- }
695
- },
696
- {
697
- type: "object",
698
- properties: {
699
- add: {
700
- type: "array",
701
- items: {
702
- type: "string"
703
- }
704
- },
705
- drop: {
706
- type: "array",
707
- items: {
708
- type: "string"
709
- }
710
- }
711
- }
712
- }
713
- ]
714
- },
715
- privileged: {
716
- type: "boolean"
717
- },
718
- allowPrivilegeEscalation: {
719
- type: "boolean"
720
- }
721
- },
722
- additionalProperties: false
723
- },
724
- BuildRequirements: {
725
- type: "object",
726
- properties: {
727
- dockerfile: {
728
- type: "string"
729
- },
730
- buildContext: {
731
- type: "string"
732
- },
733
- buildArgs: {
734
- type: "object",
735
- additionalProperties: {
736
- type: "string"
737
- }
738
- },
739
- buildTarget: {
740
- type: "string"
741
- },
742
- prebuilt: {
743
- type: "boolean"
744
- },
745
- noCache: {
746
- type: "boolean"
747
- }
748
- },
749
- additionalProperties: false
750
- },
751
- BackendServiceConfig: {
752
- type: "object",
753
- properties: {
754
- platform: {
755
- $ref: "#/definitions/ServicePlatformConfig"
756
- },
757
- devMode: {
758
- type: "boolean"
759
- },
760
- command: {
761
- type: "string"
762
- },
763
- port: {
764
- type: "integer"
765
- },
766
- publicURL: {
767
- type: "string"
768
- },
769
- corsOrigin: {
770
- type: "string"
771
- },
772
- image: {
773
- type: "string"
774
- },
775
- cpu: {
776
- type: "string"
777
- },
778
- memory: {
779
- type: "string"
780
- },
781
- semiontRepo: {
782
- type: "string"
783
- },
784
- databaseUrl: {
785
- type: "string"
786
- },
787
- projectRoot: {
788
- type: "string"
789
- },
790
- timeout: {
791
- type: "integer"
792
- },
793
- wait: {
794
- type: "integer"
795
- },
796
- logsEndpoint: {
797
- type: "string"
798
- },
799
- tag: {
800
- type: "string"
801
- },
802
- resources: {
803
- $ref: "#/definitions/ResourceRequirements"
804
- },
805
- security: {
806
- $ref: "#/definitions/SecurityRequirements"
807
- },
808
- build: {
809
- oneOf: [
810
- {
811
- type: "boolean"
812
- },
813
- {
814
- $ref: "#/definitions/BuildRequirements"
815
- }
816
- ]
817
- },
818
- dockerfile: {
819
- type: "string"
820
- },
821
- buildContext: {
822
- type: "string"
823
- },
824
- buildArgs: {
825
- type: "object",
826
- additionalProperties: {
827
- type: "string"
828
- }
829
- },
830
- buildTarget: {
831
- type: "string"
832
- },
833
- prebuilt: {
834
- type: "boolean"
835
- },
836
- noCache: {
837
- type: "boolean"
838
- },
839
- secrets: {
840
- type: "array",
841
- items: {
842
- type: "string"
843
- }
844
- },
845
- labels: {
846
- type: "object",
847
- additionalProperties: {
848
- type: "string"
849
- }
850
- },
851
- annotations: {
852
- type: "object",
853
- additionalProperties: {
854
- type: "string"
855
- }
856
- },
857
- dependencies: {
858
- type: "array",
859
- items: {
860
- type: "string"
861
- }
862
- },
863
- externalDependencies: {
864
- type: "array",
865
- items: {
866
- oneOf: [
867
- {
868
- type: "string"
869
- },
870
- {
871
- type: "object",
872
- properties: {
873
- name: {
874
- type: "string"
875
- },
876
- url: {
877
- type: "string"
878
- },
879
- required: {
880
- type: "boolean"
881
- },
882
- healthCheck: {
883
- type: "string"
884
- }
885
- }
886
- }
887
- ]
888
- }
889
- },
890
- redisUrl: {
891
- type: "string"
892
- },
893
- environment: {
894
- type: "object",
895
- additionalProperties: {
896
- type: "string"
897
- }
898
- },
899
- env: {
900
- type: "object",
901
- additionalProperties: {
902
- type: "string"
903
- }
904
- }
905
- },
906
- required: [
907
- "platform",
908
- "port",
909
- "publicURL",
910
- "corsOrigin"
911
- ],
912
- additionalProperties: false
913
- },
914
- FrontendServiceConfig: {
915
- type: "object",
916
- properties: {
917
- platform: {
918
- $ref: "#/definitions/ServicePlatformConfig"
919
- },
920
- devMode: {
921
- type: "boolean"
922
- },
923
- command: {
924
- type: "string"
925
- },
926
- port: {
927
- type: "integer"
928
- },
929
- siteName: {
930
- type: "string"
931
- },
932
- image: {
933
- type: "string"
934
- },
935
- semiontRepo: {
936
- type: "string"
937
- },
938
- projectRoot: {
939
- type: "string"
940
- },
941
- databaseUrl: {
942
- type: "string"
943
- },
944
- timeout: {
945
- type: "integer"
946
- },
947
- wait: {
948
- type: "integer"
949
- },
950
- logsEndpoint: {
951
- type: "string"
952
- },
953
- tag: {
954
- type: "string"
955
- },
956
- resources: {
957
- $ref: "#/definitions/ResourceRequirements"
958
- },
959
- security: {
960
- $ref: "#/definitions/SecurityRequirements"
961
- },
962
- build: {
963
- oneOf: [
964
- {
965
- type: "boolean"
966
- },
967
- {
968
- $ref: "#/definitions/BuildRequirements"
969
- }
970
- ]
971
- },
972
- dockerfile: {
973
- type: "string"
974
- },
975
- buildContext: {
976
- type: "string"
977
- },
978
- buildArgs: {
979
- type: "object",
980
- additionalProperties: {
981
- type: "string"
982
- }
983
- },
984
- buildTarget: {
985
- type: "string"
986
- },
987
- prebuilt: {
988
- type: "boolean"
989
- },
990
- noCache: {
991
- type: "boolean"
992
- },
993
- secrets: {
994
- type: "array",
995
- items: {
996
- type: "string"
997
- }
998
- },
999
- labels: {
1000
- type: "object",
1001
- additionalProperties: {
1002
- type: "string"
1003
- }
1004
- },
1005
- annotations: {
1006
- type: "object",
1007
- additionalProperties: {
1008
- type: "string"
1009
- }
1010
- },
1011
- dependencies: {
1012
- type: "array",
1013
- items: {
1014
- type: "string"
1015
- }
1016
- },
1017
- externalDependencies: {
1018
- type: "array",
1019
- items: {
1020
- oneOf: [
1021
- {
1022
- type: "string"
1023
- },
1024
- {
1025
- type: "object",
1026
- properties: {
1027
- name: {
1028
- type: "string"
1029
- },
1030
- url: {
1031
- type: "string"
1032
- },
1033
- required: {
1034
- type: "boolean"
1035
- },
1036
- healthCheck: {
1037
- type: "string"
1038
- }
1039
- }
1040
- }
1041
- ]
1042
- }
1043
- },
1044
- environment: {
1045
- type: "object",
1046
- additionalProperties: {
1047
- type: "string"
1048
- }
1049
- },
1050
- env: {
1051
- type: "object",
1052
- additionalProperties: {
1053
- type: "string"
1054
- }
1055
- },
1056
- publicURL: {
1057
- type: "string"
1058
- },
1059
- allowedOrigins: {
1060
- type: "array",
1061
- items: {
1062
- type: "string"
1063
- }
1064
- }
1065
- },
1066
- required: [
1067
- "platform",
1068
- "port",
1069
- "siteName"
1070
- ],
1071
- additionalProperties: false
1072
- },
1073
- ProxyServiceConfig: {
1074
- type: "object",
1075
- properties: {
1076
- platform: {
1077
- $ref: "#/definitions/ServicePlatformConfig"
1078
- },
1079
- type: {
1080
- type: "string",
1081
- enum: [
1082
- "envoy",
1083
- "nginx",
1084
- "haproxy"
1085
- ],
1086
- default: "envoy"
1087
- },
1088
- port: {
1089
- type: "integer",
1090
- default: 8080
1091
- },
1092
- adminPort: {
1093
- type: "integer",
1094
- default: 9901
1095
- },
1096
- backendPort: {
1097
- type: "integer",
1098
- default: 4e3
1099
- },
1100
- frontendPort: {
1101
- type: "integer",
1102
- default: 3e3
1103
- },
1104
- image: {
1105
- type: "string",
1106
- default: "envoyproxy/envoy:v1.28-latest"
1107
- },
1108
- configPath: {
1109
- type: "string"
1110
- },
1111
- timeout: {
1112
- type: "integer"
1113
- },
1114
- wait: {
1115
- type: "integer"
1116
- },
1117
- logsEndpoint: {
1118
- type: "string"
1119
- },
1120
- tag: {
1121
- type: "string"
1122
- },
1123
- resources: {
1124
- $ref: "#/definitions/ResourceRequirements"
1125
- },
1126
- security: {
1127
- $ref: "#/definitions/SecurityRequirements"
1128
- },
1129
- environment: {
1130
- type: "object",
1131
- additionalProperties: {
1132
- type: "string"
1133
- }
1134
- },
1135
- env: {
1136
- type: "object",
1137
- additionalProperties: {
1138
- type: "string"
1139
- }
1140
- }
1141
- },
1142
- required: [
1143
- "platform",
1144
- "type",
1145
- "port"
1146
- ],
1147
- additionalProperties: false
1148
- },
1149
- DatabaseServiceConfig: {
1150
- type: "object",
1151
- properties: {
1152
- platform: {
1153
- $ref: "#/definitions/ServicePlatformConfig"
1154
- },
1155
- type: {
1156
- type: "string"
1157
- },
1158
- name: {
1159
- type: "string"
1160
- },
1161
- host: {
1162
- type: "string"
1163
- },
1164
- port: {
1165
- type: "integer"
1166
- },
1167
- environment: {
1168
- type: "object",
1169
- additionalProperties: {
1170
- type: "string"
1171
- }
1172
- },
1173
- env: {
1174
- type: "object",
1175
- additionalProperties: {
1176
- type: "string"
1177
- }
1178
- },
1179
- description: {
1180
- type: "string"
1181
- },
1182
- command: {
1183
- type: "string"
1184
- },
1185
- image: {
1186
- type: "string"
1187
- },
1188
- user: {
1189
- type: "string"
1190
- },
1191
- username: {
1192
- type: "string"
1193
- },
1194
- password: {
1195
- type: "string"
1196
- },
1197
- database: {
1198
- type: "string"
1199
- },
1200
- storageSize: {
1201
- type: "string"
1202
- },
1203
- timeout: {
1204
- type: "integer"
1205
- },
1206
- wait: {
1207
- type: "integer"
1208
- },
1209
- logsEndpoint: {
1210
- type: "string"
1211
- },
1212
- tag: {
1213
- type: "string"
1214
- },
1215
- resources: {
1216
- $ref: "#/definitions/ResourceRequirements"
1217
- },
1218
- security: {
1219
- $ref: "#/definitions/SecurityRequirements"
1220
- },
1221
- build: {
1222
- oneOf: [
1223
- {
1224
- type: "boolean"
1225
- },
1226
- {
1227
- $ref: "#/definitions/BuildRequirements"
1228
- }
1229
- ]
1230
- },
1231
- dockerfile: {
1232
- type: "string"
1233
- },
1234
- buildContext: {
1235
- type: "string"
1236
- },
1237
- buildArgs: {
1238
- type: "object",
1239
- additionalProperties: {
1240
- type: "string"
1241
- }
1242
- },
1243
- buildTarget: {
1244
- type: "string"
1245
- },
1246
- prebuilt: {
1247
- type: "boolean"
1248
- },
1249
- noCache: {
1250
- type: "boolean"
1251
- },
1252
- secrets: {
1253
- type: "array",
1254
- items: {
1255
- type: "string"
1256
- }
1257
- },
1258
- labels: {
1259
- type: "object",
1260
- additionalProperties: {
1261
- type: "string"
1262
- }
1263
- },
1264
- annotations: {
1265
- type: "object",
1266
- additionalProperties: {
1267
- type: "string"
1268
- }
1269
- },
1270
- dependencies: {
1271
- type: "array",
1272
- items: {
1273
- type: "string"
1274
- }
1275
- },
1276
- externalDependencies: {
1277
- type: "array",
1278
- items: {
1279
- oneOf: [
1280
- {
1281
- type: "string"
1282
- },
1283
- {
1284
- type: "object",
1285
- properties: {
1286
- name: {
1287
- type: "string"
1288
- },
1289
- url: {
1290
- type: "string"
1291
- },
1292
- required: {
1293
- type: "boolean"
1294
- },
1295
- healthCheck: {
1296
- type: "string"
1297
- }
1298
- }
1299
- }
1300
- ]
1301
- }
1302
- }
1303
- },
1304
- required: [
1305
- "platform",
1306
- "type",
1307
- "host",
1308
- "port"
1309
- ],
1310
- additionalProperties: false
1311
- },
1312
- GraphDatabaseType: {
1313
- type: "string",
1314
- enum: [
1315
- "neo4j",
1316
- "janusgraph",
1317
- "neptune",
1318
- "memory"
1319
- ]
1320
- },
1321
- GraphServiceConfig: {
1322
- type: "object",
1323
- properties: {
1324
- platform: {
1325
- $ref: "#/definitions/ServicePlatformConfig"
1326
- },
1327
- type: {
1328
- $ref: "#/definitions/GraphDatabaseType"
1329
- },
1330
- name: {
1331
- type: "string"
1332
- },
1333
- uri: {
1334
- type: "string"
1335
- },
1336
- url: {
1337
- type: "string"
1338
- },
1339
- username: {
1340
- type: "string"
1341
- },
1342
- password: {
1343
- type: "string"
1344
- },
1345
- database: {
1346
- type: "string"
1347
- },
1348
- host: {
1349
- type: "string"
1350
- },
1351
- port: {
1352
- type: "integer"
1353
- },
1354
- storage: {
1355
- type: "string"
1356
- },
1357
- index: {
1358
- type: "string"
1359
- },
1360
- endpoint: {
1361
- type: "string"
1362
- },
1363
- region: {
1364
- type: "string"
1365
- },
1366
- command: {
1367
- type: "string"
1368
- },
1369
- image: {
1370
- type: "string"
1371
- },
1372
- janusgraphVersion: {
1373
- type: "string"
1374
- },
1375
- javaOptions: {
1376
- type: "string"
1377
- },
1378
- heapSize: {
1379
- type: "string"
1380
- },
1381
- pageCacheSize: {
1382
- type: "string"
1383
- },
1384
- noAuth: {
1385
- type: "boolean"
1386
- },
1387
- dataPath: {
1388
- type: "string"
1389
- },
1390
- timeout: {
1391
- type: "integer"
1392
- },
1393
- wait: {
1394
- type: "integer"
1395
- },
1396
- logsEndpoint: {
1397
- type: "string"
1398
- },
1399
- tag: {
1400
- type: "string"
1401
- },
1402
- resources: {
1403
- $ref: "#/definitions/ResourceRequirements"
1404
- },
1405
- security: {
1406
- $ref: "#/definitions/SecurityRequirements"
1407
- },
1408
- build: {
1409
- oneOf: [
1410
- {
1411
- type: "boolean"
1412
- },
1413
- {
1414
- $ref: "#/definitions/BuildRequirements"
1415
- }
1416
- ]
1417
- },
1418
- dockerfile: {
1419
- type: "string"
1420
- },
1421
- buildContext: {
1422
- type: "string"
1423
- },
1424
- buildArgs: {
1425
- type: "object",
1426
- additionalProperties: {
1427
- type: "string"
1428
- }
1429
- },
1430
- buildTarget: {
1431
- type: "string"
1432
- },
1433
- prebuilt: {
1434
- type: "boolean"
1435
- },
1436
- noCache: {
1437
- type: "boolean"
1438
- },
1439
- secrets: {
1440
- type: "array",
1441
- items: {
1442
- type: "string"
1443
- }
1444
- },
1445
- labels: {
1446
- type: "object",
1447
- additionalProperties: {
1448
- type: "string"
1449
- }
1450
- },
1451
- annotations: {
1452
- type: "object",
1453
- additionalProperties: {
1454
- type: "string"
1455
- }
1456
- },
1457
- dependencies: {
1458
- type: "array",
1459
- items: {
1460
- type: "string"
1461
- }
1462
- },
1463
- externalDependencies: {
1464
- type: "array",
1465
- items: {
1466
- oneOf: [
1467
- {
1468
- type: "string"
1469
- },
1470
- {
1471
- type: "object",
1472
- properties: {
1473
- name: {
1474
- type: "string"
1475
- },
1476
- url: {
1477
- type: "string"
1478
- },
1479
- required: {
1480
- type: "boolean"
1481
- },
1482
- healthCheck: {
1483
- type: "string"
1484
- }
1485
- }
1486
- }
1487
- ]
1488
- }
1489
- },
1490
- environment: {
1491
- type: "object",
1492
- additionalProperties: {
1493
- type: "string"
1494
- }
1495
- },
1496
- env: {
1497
- type: "object",
1498
- additionalProperties: {
1499
- type: "string"
1500
- }
1501
- }
1502
- },
1503
- required: [
1504
- "platform",
1505
- "type"
1506
- ],
1507
- allOf: [
1508
- {
1509
- if: {
1510
- properties: {
1511
- type: {
1512
- const: "neo4j"
1513
- }
1514
- }
1515
- },
1516
- then: {
1517
- required: [
1518
- "uri",
1519
- "username",
1520
- "password",
1521
- "database"
1522
- ]
1523
- }
1524
- }
1525
- ],
1526
- additionalProperties: false
1527
- },
1528
- FilesystemServiceConfig: {
1529
- type: "object",
1530
- properties: {
1531
- platform: {
1532
- $ref: "#/definitions/ServicePlatformConfig"
1533
- },
1534
- path: {
1535
- type: "string"
1536
- },
1537
- description: {
1538
- type: "string"
1539
- },
1540
- command: {
1541
- type: "string"
1542
- },
1543
- image: {
1544
- type: "string"
1545
- },
1546
- port: {
1547
- type: "integer"
1548
- },
1549
- timeout: {
1550
- type: "integer"
1551
- },
1552
- wait: {
1553
- type: "integer"
1554
- },
1555
- logsEndpoint: {
1556
- type: "string"
1557
- },
1558
- tag: {
1559
- type: "string"
1560
- },
1561
- resources: {
1562
- $ref: "#/definitions/ResourceRequirements"
1563
- },
1564
- security: {
1565
- $ref: "#/definitions/SecurityRequirements"
1566
- },
1567
- build: {
1568
- oneOf: [
1569
- {
1570
- type: "boolean"
1571
- },
1572
- {
1573
- $ref: "#/definitions/BuildRequirements"
1574
- }
1575
- ]
1576
- },
1577
- dockerfile: {
1578
- type: "string"
1579
- },
1580
- buildContext: {
1581
- type: "string"
1582
- },
1583
- buildArgs: {
1584
- type: "object",
1585
- additionalProperties: {
1586
- type: "string"
1587
- }
1588
- },
1589
- buildTarget: {
1590
- type: "string"
1591
- },
1592
- prebuilt: {
1593
- type: "boolean"
1594
- },
1595
- noCache: {
1596
- type: "boolean"
1597
- },
1598
- secrets: {
1599
- type: "array",
1600
- items: {
1601
- type: "string"
1602
- }
1603
- },
1604
- labels: {
1605
- type: "object",
1606
- additionalProperties: {
1607
- type: "string"
1608
- }
1609
- },
1610
- annotations: {
1611
- type: "object",
1612
- additionalProperties: {
1613
- type: "string"
1614
- }
1615
- },
1616
- dependencies: {
1617
- type: "array",
1618
- items: {
1619
- type: "string"
1620
- }
1621
- },
1622
- externalDependencies: {
1623
- type: "array",
1624
- items: {
1625
- oneOf: [
1626
- {
1627
- type: "string"
1628
- },
1629
- {
1630
- type: "object",
1631
- properties: {
1632
- name: {
1633
- type: "string"
1634
- },
1635
- url: {
1636
- type: "string"
1637
- },
1638
- required: {
1639
- type: "boolean"
1640
- },
1641
- healthCheck: {
1642
- type: "string"
1643
- }
1644
- }
1645
- }
1646
- ]
1647
- }
1648
- },
1649
- environment: {
1650
- type: "object",
1651
- additionalProperties: {
1652
- type: "string"
1653
- }
1654
- },
1655
- env: {
1656
- type: "object",
1657
- additionalProperties: {
1658
- type: "string"
1659
- }
1660
- }
1661
- },
1662
- required: [
1663
- "platform",
1664
- "path"
1665
- ],
1666
- additionalProperties: false
1667
- },
1668
- InferenceServiceConfig: {
1669
- type: "object",
1670
- properties: {
1671
- platform: {
1672
- $ref: "#/definitions/ServicePlatformConfig"
1673
- },
1674
- type: {
1675
- type: "string"
1676
- },
1677
- model: {
1678
- type: "string"
1679
- },
1680
- maxTokens: {
1681
- type: "integer"
1682
- },
1683
- endpoint: {
1684
- type: "string"
1685
- },
1686
- baseURL: {
1687
- type: "string"
1688
- },
1689
- apiKey: {
1690
- type: "string"
1691
- },
1692
- command: {
1693
- type: "string"
1694
- },
1695
- image: {
1696
- type: "string"
1697
- },
1698
- port: {
1699
- type: "integer"
1700
- },
1701
- organization: {
1702
- type: "string"
1703
- },
1704
- timeout: {
1705
- type: "integer"
1706
- },
1707
- wait: {
1708
- type: "integer"
1709
- },
1710
- logsEndpoint: {
1711
- type: "string"
1712
- },
1713
- tag: {
1714
- type: "string"
1715
- },
1716
- resources: {
1717
- $ref: "#/definitions/ResourceRequirements"
1718
- },
1719
- security: {
1720
- $ref: "#/definitions/SecurityRequirements"
1721
- },
1722
- build: {
1723
- oneOf: [
1724
- {
1725
- type: "boolean"
1726
- },
1727
- {
1728
- $ref: "#/definitions/BuildRequirements"
1729
- }
1730
- ]
1731
- },
1732
- dockerfile: {
1733
- type: "string"
1734
- },
1735
- buildContext: {
1736
- type: "string"
1737
- },
1738
- buildArgs: {
1739
- type: "object",
1740
- additionalProperties: {
1741
- type: "string"
1742
- }
1743
- },
1744
- buildTarget: {
1745
- type: "string"
1746
- },
1747
- prebuilt: {
1748
- type: "boolean"
1749
- },
1750
- noCache: {
1751
- type: "boolean"
1752
- },
1753
- secrets: {
1754
- type: "array",
1755
- items: {
1756
- type: "string"
1757
- }
1758
- },
1759
- labels: {
1760
- type: "object",
1761
- additionalProperties: {
1762
- type: "string"
1763
- }
1764
- },
1765
- annotations: {
1766
- type: "object",
1767
- additionalProperties: {
1768
- type: "string"
1769
- }
1770
- },
1771
- dependencies: {
1772
- type: "array",
1773
- items: {
1774
- type: "string"
1775
- }
1776
- },
1777
- externalDependencies: {
1778
- type: "array",
1779
- items: {
1780
- oneOf: [
1781
- {
1782
- type: "string"
1783
- },
1784
- {
1785
- type: "object",
1786
- properties: {
1787
- name: {
1788
- type: "string"
1789
- },
1790
- url: {
1791
- type: "string"
1792
- },
1793
- required: {
1794
- type: "boolean"
1795
- },
1796
- healthCheck: {
1797
- type: "string"
1798
- }
1799
- }
1800
- }
1801
- ]
1802
- }
1803
- },
1804
- environment: {
1805
- type: "object",
1806
- additionalProperties: {
1807
- type: "string"
1808
- }
1809
- },
1810
- env: {
1811
- type: "object",
1812
- additionalProperties: {
1813
- type: "string"
1814
- }
1815
- }
1816
- },
1817
- required: [
1818
- "platform",
1819
- "type",
1820
- "apiKey"
1821
- ],
1822
- additionalProperties: false
1823
- },
1824
- McpServiceConfig: {
1825
- type: "object",
1826
- properties: {
1827
- platform: {
1828
- $ref: "#/definitions/ServicePlatformConfig"
1829
- },
1830
- command: {
1831
- type: "string"
1832
- },
1833
- image: {
1834
- type: "string"
1835
- },
1836
- port: {
1837
- type: "integer"
1838
- },
1839
- dependsOn: {
1840
- type: "array",
1841
- items: {
1842
- type: "string"
1843
- }
1844
- },
1845
- timeout: {
1846
- type: "integer"
1847
- },
1848
- wait: {
1849
- type: "integer"
1850
- },
1851
- logsEndpoint: {
1852
- type: "string"
1853
- },
1854
- tag: {
1855
- type: "string"
1856
- },
1857
- resources: {
1858
- $ref: "#/definitions/ResourceRequirements"
1859
- },
1860
- security: {
1861
- $ref: "#/definitions/SecurityRequirements"
1862
- },
1863
- build: {
1864
- oneOf: [
1865
- {
1866
- type: "boolean"
1867
- },
1868
- {
1869
- $ref: "#/definitions/BuildRequirements"
1870
- }
1871
- ]
1872
- },
1873
- dockerfile: {
1874
- type: "string"
1875
- },
1876
- buildContext: {
1877
- type: "string"
1878
- },
1879
- buildArgs: {
1880
- type: "object",
1881
- additionalProperties: {
1882
- type: "string"
1883
- }
1884
- },
1885
- buildTarget: {
1886
- type: "string"
1887
- },
1888
- prebuilt: {
1889
- type: "boolean"
1890
- },
1891
- noCache: {
1892
- type: "boolean"
1893
- },
1894
- secrets: {
1895
- type: "array",
1896
- items: {
1897
- type: "string"
1898
- }
1899
- },
1900
- labels: {
1901
- type: "object",
1902
- additionalProperties: {
1903
- type: "string"
1904
- }
1905
- },
1906
- annotations: {
1907
- type: "object",
1908
- additionalProperties: {
1909
- type: "string"
1910
- }
1911
- },
1912
- dependencies: {
1913
- type: "array",
1914
- items: {
1915
- type: "string"
1916
- }
1917
- },
1918
- externalDependencies: {
1919
- type: "array",
1920
- items: {
1921
- oneOf: [
1922
- {
1923
- type: "string"
1924
- },
1925
- {
1926
- type: "object",
1927
- properties: {
1928
- name: {
1929
- type: "string"
1930
- },
1931
- url: {
1932
- type: "string"
1933
- },
1934
- required: {
1935
- type: "boolean"
1936
- },
1937
- healthCheck: {
1938
- type: "string"
1939
- }
1940
- }
1941
- }
1942
- ]
1943
- }
1944
- },
1945
- environment: {
1946
- type: "object",
1947
- additionalProperties: {
1948
- type: "string"
1949
- }
1950
- },
1951
- env: {
1952
- type: "object",
1953
- additionalProperties: {
1954
- type: "string"
1955
- }
1956
- }
1957
- },
1958
- required: [
1959
- "platform"
1960
- ],
1961
- additionalProperties: false
1962
- },
1963
- ServicesConfig: {
1964
- type: "object",
1965
- properties: {
1966
- backend: {
1967
- $ref: "#/definitions/BackendServiceConfig"
1968
- },
1969
- frontend: {
1970
- $ref: "#/definitions/FrontendServiceConfig"
1971
- },
1972
- database: {
1973
- $ref: "#/definitions/DatabaseServiceConfig"
1974
- },
1975
- graph: {
1976
- $ref: "#/definitions/GraphServiceConfig"
1977
- },
1978
- filesystem: {
1979
- $ref: "#/definitions/FilesystemServiceConfig"
1980
- },
1981
- inference: {
1982
- $ref: "#/definitions/InferenceServiceConfig"
1983
- },
1984
- mcp: {
1985
- $ref: "#/definitions/McpServiceConfig"
1986
- },
1987
- proxy: {
1988
- $ref: "#/definitions/ProxyServiceConfig"
1989
- }
1990
- },
1991
- additionalProperties: true
1992
- },
1993
- SiteConfig: {
1994
- type: "object",
1995
- properties: {
1996
- siteName: {
1997
- type: "string",
1998
- minLength: 1,
1999
- description: "Display name for the site"
2000
- },
2001
- domain: {
2002
- type: "string",
2003
- minLength: 1,
2004
- description: "Primary domain for the site"
2005
- },
2006
- adminEmail: {
2007
- type: "string",
2008
- format: "email",
2009
- description: "Administrator email address"
2010
- },
2011
- supportEmail: {
2012
- type: "string",
2013
- format: "email",
2014
- description: "Support email address (optional)"
2015
- },
2016
- oauthAllowedDomains: {
2017
- type: "array",
2018
- items: {
2019
- type: "string"
2020
- },
2021
- minItems: 1,
2022
- description: "Email domains allowed for OAuth authentication"
2023
- }
2024
- },
2025
- required: [
2026
- "domain"
2027
- ],
2028
- additionalProperties: false
2029
- },
2030
- AppConfig: {
2031
- type: "object",
2032
- properties: {
2033
- features: {
2034
- type: "object",
2035
- properties: {
2036
- enableAnalytics: {
2037
- type: "boolean"
2038
- },
2039
- enableMaintenanceMode: {
2040
- type: "boolean"
2041
- },
2042
- enableDebugLogging: {
2043
- type: "boolean"
2044
- }
2045
- },
2046
- additionalProperties: false
2047
- },
2048
- security: {
2049
- type: "object",
2050
- properties: {
2051
- sessionTimeout: {
2052
- type: "integer",
2053
- minimum: 60,
2054
- description: "Session timeout in seconds"
2055
- },
2056
- maxLoginAttempts: {
2057
- type: "integer",
2058
- minimum: 1,
2059
- description: "Maximum failed login attempts before lockout"
2060
- },
2061
- corsAllowedOrigins: {
2062
- type: "array",
2063
- items: {
2064
- type: "string"
2065
- }
2066
- },
2067
- enableLocalAuth: {
2068
- type: "boolean",
2069
- description: "Enable local username/password authentication"
2070
- },
2071
- jwtSecret: {
2072
- type: "string",
2073
- minLength: 32,
2074
- description: "JWT signing secret (base64 encoded, 32+ bytes)"
2075
- }
2076
- },
2077
- additionalProperties: false
2078
- },
2079
- performance: {
2080
- type: "object",
2081
- properties: {
2082
- enableCaching: {
2083
- type: "boolean"
2084
- },
2085
- cacheTimeout: {
2086
- type: "integer",
2087
- minimum: 0,
2088
- description: "Cache timeout in seconds"
2089
- },
2090
- maxRequestSize: {
2091
- type: "string",
2092
- pattern: "^[0-9]+(kb|mb|gb)$",
2093
- description: "Maximum request size (e.g., '10mb')"
2094
- }
2095
- },
2096
- additionalProperties: false
2097
- }
2098
- },
2099
- additionalProperties: false
2100
- },
2101
- EnvironmentConfig: {
2102
- type: "object",
2103
- properties: {
2104
- _comment: {
2105
- type: "string",
2106
- description: "Optional comment for documentation"
2107
- },
2108
- _metadata: {
2109
- type: "object",
2110
- properties: {
2111
- environment: {
2112
- type: "string"
2113
- },
2114
- projectRoot: {
2115
- type: "string"
2116
- }
2117
- },
2118
- required: [
2119
- "environment",
2120
- "projectRoot"
2121
- ]
2122
- },
2123
- name: {
2124
- type: "string",
2125
- description: "Environment name"
2126
- },
2127
- platform: {
2128
- type: "object",
2129
- properties: {
2130
- default: {
2131
- $ref: "#/definitions/PlatformType"
2132
- }
2133
- }
2134
- },
2135
- services: {
2136
- $ref: "#/definitions/ServicesConfig"
2137
- },
2138
- site: {
2139
- $ref: "#/definitions/SiteConfig"
2140
- },
2141
- app: {
2142
- $ref: "#/definitions/AppConfig"
2143
- },
2144
- env: {
2145
- type: "object",
2146
- properties: {
2147
- NODE_ENV: {
2148
- type: "string",
2149
- enum: [
2150
- "development",
2151
- "production",
2152
- "test"
2153
- ]
2154
- }
2155
- },
2156
- additionalProperties: true
2157
- },
2158
- logLevel: {
2159
- type: "string",
2160
- enum: [
2161
- "error",
2162
- "warn",
2163
- "info",
2164
- "http",
2165
- "debug"
2166
- ],
2167
- description: "Logging verbosity level"
2168
- },
2169
- deployment: {
2170
- type: "object",
2171
- properties: {
2172
- imageTagStrategy: {
2173
- type: "string",
2174
- enum: [
2175
- "mutable",
2176
- "immutable",
2177
- "git-hash"
2178
- ]
2179
- }
2180
- }
2181
- }
2182
- },
2183
- required: [
2184
- "services"
2185
- ],
2186
- additionalProperties: false
2187
- },
2188
- SemiontConfig: {
2189
- type: "object",
2190
- properties: {
2191
- version: {
2192
- type: "string",
2193
- pattern: "^[0-9]+\\.[0-9]+\\.[0-9]+$",
2194
- description: "Config file version (semver)"
2195
- },
2196
- project: {
2197
- type: "string",
2198
- minLength: 1,
2199
- description: "Project name"
2200
- },
2201
- site: {
2202
- $ref: "#/definitions/SiteConfig"
2203
- },
2204
- app: {
2205
- $ref: "#/definitions/AppConfig"
2206
- },
2207
- services: {
2208
- $ref: "#/definitions/ServicesConfig"
2209
- }
2210
- },
2211
- required: [
2212
- "version",
2213
- "project",
2214
- "site"
2215
- ],
2216
- additionalProperties: false
2217
- }
2218
- }
2219
- };
2220
- // src/config/config-validator.ts
2221
- var ajv = new ajv__WEBPACK_IMPORTED_MODULE_3__({
2222
- allErrors: true,
2223
- // Return all errors, not just the first one
2224
- coerceTypes: true,
2225
- // Coerce types (e.g., "123" -> 123)
2226
- removeAdditional: false,
2227
- // Don't remove additional properties
2228
- useDefaults: true,
2229
- // Apply default values from schema
2230
- strict: false
2231
- });
2232
- ajv_formats__WEBPACK_IMPORTED_MODULE_1__(ajv);
2233
- ajv.addSchema(config_schema_default, "config");
2234
- function validateSemiontConfig(data) {
2235
- const validate = ajv.getSchema("config#/definitions/SemiontConfig");
2236
- if (!validate) {
2237
- throw new Error("SemiontConfig schema not found");
2238
- }
2239
- const valid = validate(data);
2240
- if (!valid) {
2241
- return {
2242
- valid: false,
2243
- errors: validate.errors || null,
2244
- errorMessage: formatErrors(validate.errors || [])
2245
- };
2246
- }
2247
- return {
2248
- valid: true,
2249
- errors: null
2250
- };
2251
- }
2252
- function validateEnvironmentConfig(data) {
2253
- const validate = ajv.getSchema("config#/definitions/EnvironmentConfig");
2254
- if (!validate) {
2255
- throw new Error("EnvironmentConfig schema not found");
2256
- }
2257
- const valid = validate(data);
2258
- if (!valid) {
2259
- return {
2260
- valid: false,
2261
- errors: validate.errors || null,
2262
- errorMessage: formatErrors(validate.errors || [])
2263
- };
2264
- }
2265
- return {
2266
- valid: true,
2267
- errors: null
2268
- };
2269
- }
2270
- function validateSiteConfig(data) {
2271
- const validate = ajv.getSchema("config#/definitions/SiteConfig");
2272
- if (!validate) {
2273
- throw new Error("SiteConfig schema not found");
2274
- }
2275
- const valid = validate(data);
2276
- if (!valid) {
2277
- return {
2278
- valid: false,
2279
- errors: validate.errors || null,
2280
- errorMessage: formatErrors(validate.errors || [])
2281
- };
2282
- }
2283
- return {
2284
- valid: true,
2285
- errors: null
2286
- };
2287
- }
2288
- function formatErrors(errors) {
2289
- if (errors.length === 0) return "Validation failed";
2290
- const messages = errors.map((err)=>{
2291
- const path = err.instancePath || "root";
2292
- const message = err.message || "validation error";
2293
- if (err.keyword === "required" && "missingProperty" in err.params) {
2294
- return `Missing required property: ${err.params.missingProperty}`;
2295
- }
2296
- if (err.keyword === "type" && "type" in err.params) {
2297
- return `${path}: ${message} (expected ${err.params.type})`;
2298
- }
2299
- if (err.keyword === "enum" && "allowedValues" in err.params) {
2300
- return `${path}: must be one of [${err.params.allowedValues.join(", ")}]`;
2301
- }
2302
- if (err.keyword === "format") {
2303
- return `${path}: invalid format (${message})`;
2304
- }
2305
- if (err.keyword === "minLength" || err.keyword === "minItems") {
2306
- return `${path}: ${message}`;
2307
- }
2308
- return `${path}: ${message}`;
2309
- });
2310
- return messages.join("; ");
2311
- }
2312
- // src/config/environment-loader.ts
2313
- function deepMerge(target, ...sources) {
2314
- if (!sources.length) return target;
2315
- const source = sources.shift();
2316
- if (isObject(target) && isObject(source)) {
2317
- for(const key in source){
2318
- if (isObject(source[key])) {
2319
- if (!target[key]) Object.assign(target, {
2320
- [key]: {}
2321
- });
2322
- deepMerge(target[key], source[key]);
2323
- } else {
2324
- Object.assign(target, {
2325
- [key]: source[key]
2326
- });
2327
- }
2328
- }
2329
- }
2330
- return deepMerge(target, ...sources);
2331
- }
2332
- function resolveEnvVars(obj, env) {
2333
- if (typeof obj === "string") {
2334
- return obj.replace(/\$\{([^}]+)\}/g, (match, varName)=>{
2335
- return env[varName] || match;
2336
- });
2337
- }
2338
- if (Array.isArray(obj)) {
2339
- return obj.map((item)=>resolveEnvVars(item, env));
2340
- }
2341
- if (obj && typeof obj === "object") {
2342
- const resolved = {};
2343
- for(const key in obj){
2344
- resolved[key] = resolveEnvVars(obj[key], env);
2345
- }
2346
- return resolved;
2347
- }
2348
- return obj;
2349
- }
2350
- function parseAndMergeConfigs(baseContent, envContent, env, environment, projectRoot) {
2351
- try {
2352
- let baseConfig = {};
2353
- if (baseContent) {
2354
- baseConfig = JSON.parse(baseContent);
2355
- }
2356
- const envConfig = JSON.parse(envContent);
2357
- const merged = deepMerge({}, {
2358
- site: baseConfig.site
2359
- }, // Site config from semiont.json
2360
- baseConfig.defaults || {}, // Default config from semiont.json
2361
- envConfig);
2362
- const resolved = resolveEnvVars(merged, env);
2363
- if (!resolved.services) {
2364
- resolved.services = {};
2365
- }
2366
- if (resolved.env?.NODE_ENV) {
2367
- const validNodeEnv = [
2368
- "development",
2369
- "production",
2370
- "test"
2371
- ];
2372
- if (!validNodeEnv.includes(resolved.env.NODE_ENV)) {
2373
- throw new ConfigurationError(`Invalid NODE_ENV value: ${resolved.env.NODE_ENV}`, environment, `NODE_ENV must be one of: ${validNodeEnv.join(", ")}`);
2374
- }
2375
- }
2376
- const configWithMetadata = {
2377
- ...resolved,
2378
- _metadata: {
2379
- environment,
2380
- projectRoot
2381
- }
2382
- };
2383
- const validationResult = validateEnvironmentConfig(configWithMetadata);
2384
- if (!validationResult.valid) {
2385
- throw new ConfigurationError(`Invalid environment configuration: ${validationResult.errorMessage}`, environment, `Fix the validation errors in your environments/${environment}.json file`);
2386
- }
2387
- return configWithMetadata;
2388
- } catch (error) {
2389
- if (error instanceof ConfigurationError) {
2390
- throw error;
2391
- }
2392
- if (error instanceof SyntaxError && error.message.includes("JSON")) {
2393
- throw new ConfigurationError(`Invalid JSON syntax in configuration file`, environment, `Check for missing commas, quotes, or brackets. Use a JSON validator to verify syntax.`);
2394
- }
2395
- const message = error instanceof Error ? error.message : String(error);
2396
- throw new ConfigurationError(`Failed to parse environment configuration: ${message}`, environment, `Check the configuration files are valid JSON`);
2397
- }
2398
- }
2399
- function getNodeEnvForEnvironment(config) {
2400
- const nodeEnv = config.env?.NODE_ENV;
2401
- return nodeEnv || "development";
2402
- }
2403
- function listEnvironmentNames(files) {
2404
- return files.filter((file)=>file.endsWith(".json")).map((file)=>{
2405
- const lastSlash = Math.max(file.lastIndexOf("/"), file.lastIndexOf("\\"));
2406
- const filename = lastSlash >= 0 ? file.substring(lastSlash + 1) : file;
2407
- return filename.slice(0, -5);
2408
- }).sort();
2409
- }
2410
- function hasAWSConfig(config) {
2411
- return !!config.aws && !!config.aws.region;
2412
- }
2413
- function displayConfiguration(config) {
2414
- console.log("Environment Configuration:");
2415
- console.log(JSON.stringify(config, null, 2));
2416
- }
2417
- function createConfigLoader(reader) {
2418
- return (projectRoot, environment)=>{
2419
- const baseContent = reader.readIfExists(`${projectRoot}/semiont.json`);
2420
- const envContent = reader.readRequired(`${projectRoot}/environments/${environment}.json`);
2421
- return parseAndMergeConfigs(baseContent, envContent, process.env, environment, projectRoot);
2422
- };
2423
- }
2424
- // src/config/environment-validator.ts
2425
- function isValidEnvironment(value, availableEnvironments) {
2426
- if (!value) return false;
2427
- return availableEnvironments.includes(value);
2428
- }
2429
- function parseEnvironment(value, availableEnvironments) {
2430
- if (!value) {
2431
- throw new Error("Environment is required");
2432
- }
2433
- if (!isValidEnvironment(value, availableEnvironments)) {
2434
- throw new Error(`Invalid environment: ${value}. Available environments: ${availableEnvironments.join(", ")}`);
2435
- }
2436
- return value;
2437
- }
2438
- function validateEnvironment(value, availableEnvironments) {
2439
- if (!value) {
2440
- throw new Error("Environment is required");
2441
- }
2442
- if (!isValidEnvironment(value, availableEnvironments)) {
2443
- throw new Error(`Invalid environment: ${value}. Available environments: ${availableEnvironments.join(", ")}`);
2444
- }
2445
- return value;
2446
- }
2447
889
  // src/config/platform-types.ts
2448
890
  function isValidPlatformType(value) {
2449
891
  return [
@@ -4130,22 +2572,22 @@ function getAllowedDomains() {
4130
2572
  /* harmony export */ iX: () => (/* binding */ useEventBus)
4131
2573
  /* harmony export */ });
4132
2574
  /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71277);
4133
- /* harmony import */ var _semiont_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4698);
4134
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92692);
2575
+ /* harmony import */ var _semiont_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4698);
2576
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(92692);
4135
2577
  /* __next_internal_client_entry_do_not_use__ resetEventBusForTesting,EventBusProvider,useEventBus auto */ // src/contexts/EventBusContext.tsx
4136
2578
 
4137
2579
 
4138
2580
 
4139
2581
  var EventBusContext = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
4140
- var globalEventBus = new _semiont_core__WEBPACK_IMPORTED_MODULE_1__/* .EventBus */ .l7();
2582
+ var globalEventBus = new _semiont_core__WEBPACK_IMPORTED_MODULE_2__/* .EventBus */ .l7();
4141
2583
  function resetEventBusForTesting() {
4142
2584
  globalEventBus.destroy();
4143
- globalEventBus = new _semiont_core__WEBPACK_IMPORTED_MODULE_1__/* .EventBus */ .l7();
2585
+ globalEventBus = new _semiont_core__WEBPACK_IMPORTED_MODULE_2__/* .EventBus */ .l7();
4144
2586
  return globalEventBus;
4145
2587
  }
4146
2588
  function EventBusProvider({ children }) {
4147
2589
  const eventBus = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>globalEventBus, []);
4148
- return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(EventBusContext.Provider, {
2590
+ return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(EventBusContext.Provider, {
4149
2591
  value: eventBus,
4150
2592
  children
4151
2593
  });