@amerged/ohmyhost-mcp 0.1.46 → 0.1.47

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.
@@ -209,6 +209,7 @@ export function viteCompanionRequired(configuration: OhmyhostConfig): boolean {
209
209
  configuration.database?.enabled === true ||
210
210
  configuration.auth?.provider === "better-auth" ||
211
211
  configuration.mail?.enabled === true ||
212
+ configuration.ai?.enabled === true ||
212
213
  configuration.storage !== undefined ||
213
214
  (configuration.functions?.crons.length ?? 0) > 0
214
215
  );
@@ -637,12 +638,19 @@ function runtimeModeAdmitted(
637
638
  configuration.storage === undefined &&
638
639
  configuration.database?.enabled !== true &&
639
640
  configuration.mail?.enabled !== true &&
641
+ configuration.ai?.enabled !== true &&
640
642
  configuration.auth?.provider !== "better-auth")
641
643
  );
642
644
  if (framework === "nextjs") return mode === "edge";
643
645
  if (framework === "vite-static")
644
646
  return mode === (viteCompanionRequired(configuration) ? "edge" : "static");
645
- return mode === "edge" || (mode === "static" && !crons && configuration.storage === undefined);
647
+ return (
648
+ mode === "edge" ||
649
+ (mode === "static" &&
650
+ !crons &&
651
+ configuration.storage === undefined &&
652
+ configuration.ai?.enabled !== true)
653
+ );
646
654
  }
647
655
 
648
656
  function betterAuthFindings(
@@ -56,6 +56,11 @@ export interface OhmyhostConfig {
56
56
  jurisdiction: "us" | "eu";
57
57
  public: false;
58
58
  }>;
59
+ /** `jurisdiction` is required when `enabled` is true; it has no default. */
60
+ readonly ai?: Readonly<{
61
+ enabled: boolean;
62
+ jurisdiction?: "eu" | "any";
63
+ }>;
59
64
  readonly functions?: Readonly<{ crons: readonly string[] }>;
60
65
  readonly credits?: Readonly<{
61
66
  monthly_budget: number;
@@ -125,6 +130,14 @@ export function parseOhmyhostConfig(value: unknown): OhmyhostConfig {
125
130
  public: input.storage.public,
126
131
  }),
127
132
  }),
133
+ ...(input.ai === undefined
134
+ ? {}
135
+ : {
136
+ ai: Object.freeze({
137
+ enabled: input.ai.enabled,
138
+ ...(input.ai.jurisdiction === undefined ? {} : { jurisdiction: input.ai.jurisdiction }),
139
+ }),
140
+ }),
128
141
  ...(input.functions === undefined
129
142
  ? {}
130
143
  : {
@@ -13,6 +13,7 @@ const FIXED_PLATFORM_NAMES = new Set([
13
13
  const INSTALLED_PLATFORM_KEYS = new Set([
14
14
  "OHMYHOST_STORAGE_KEY",
15
15
  "OHMYHOST_MAIL_KEY",
16
+ "OHMYHOST_AI_KEY",
16
17
  "BETTER_AUTH_SECRET",
17
18
  ]);
18
19
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohmyhost/sdk-ts",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {