@amerged/ohmyhost-cli 0.1.55 → 0.1.57

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 (30) hide show
  1. package/README.md +1 -1
  2. package/dist/bin.js +1 -1
  3. package/dist/{chunk-4OAAJX5B.js → chunk-GODV5QDC.js} +797 -86
  4. package/dist/index.js +9 -1
  5. package/package.json +1 -1
  6. package/src/apps/product-cli/package.json +1 -1
  7. package/src/apps/product-cli/src/cli.ts +208 -11
  8. package/src/apps/product-cli/src/command.ts +276 -19
  9. package/src/apps/product-cli/src/index.ts +1 -0
  10. package/src/apps/product-cli/src/product-api.ts +165 -3
  11. package/src/apps/product-cli/src/repository-init.ts +8 -0
  12. package/src/apps/product-cli/src/runtime-contract.ts +81 -5
  13. package/src/apps/product-cli/src/user-token-file.ts +73 -0
  14. package/src/packages/contracts/package.json +5 -0
  15. package/src/packages/contracts/src/credit-pricing.ts +1 -1
  16. package/src/packages/contracts/src/database-events.ts +67 -0
  17. package/src/packages/contracts/src/framework-admission.ts +5 -4
  18. package/src/packages/contracts/src/framework-source-rules.ts +9 -2
  19. package/src/packages/contracts/src/index.ts +9 -0
  20. package/src/packages/contracts/src/operation-deployment-result.ts +121 -1
  21. package/src/packages/contracts/src/operation-failure.ts +72 -1
  22. package/src/packages/contracts/src/organization-mcp-connections.ts +7 -0
  23. package/src/packages/contracts/src/problem-policy.ts +17 -5
  24. package/src/packages/contracts/src/secret-names.ts +10 -2
  25. package/src/packages/sdk-ts/package.json +1 -1
  26. package/src/packages/sdk-ts/src/generated/index.ts +36 -0
  27. package/src/packages/sdk-ts/src/generated/sdk.gen.ts +265 -1
  28. package/src/packages/sdk-ts/src/generated/types.gen.ts +445 -2
  29. package/src/packages/sdk-ts/src/managed-mail-response.ts +12 -0
  30. package/src/packages/sdk-ts/src/managed-mail.ts +10 -1
@@ -225,6 +225,7 @@ export function viteCompanionRequired(configuration: OhmyhostConfig): boolean {
225
225
  configuration.auth?.provider === "better-auth" ||
226
226
  configuration.mail?.enabled === true ||
227
227
  configuration.ai?.enabled === true ||
228
+ configuration.browser?.enabled === true ||
228
229
  configuration.storage !== undefined ||
229
230
  (configuration.functions?.crons.length ?? 0) > 0
230
231
  );
@@ -646,7 +647,11 @@ function configurationFindings(input: FrameworkSourceRuleInput): FrameworkConver
646
647
  findings.push(
647
648
  diagnostic({ code: "runtime_mode_unsupported", path: REPOSITORY_CONFIG, framework }),
648
649
  );
649
- if (build !== null && framework !== "nextjs" && build.ssg_cache_max_mib !== undefined)
650
+ if (
651
+ build !== null &&
652
+ framework !== "nextjs" &&
653
+ (build.ssg_cache_max_mib !== undefined || build.next_revalidate_path === true)
654
+ )
650
655
  findings.push(diagnostic({ code: "build_option_unsupported", path: REPOSITORY_CONFIG }));
651
656
  const output =
652
657
  framework === "astro"
@@ -703,6 +708,7 @@ function runtimeModeAdmitted(
703
708
  configuration.database?.enabled !== true &&
704
709
  configuration.mail?.enabled !== true &&
705
710
  configuration.ai?.enabled !== true &&
711
+ configuration.browser?.enabled !== true &&
706
712
  configuration.auth?.provider !== "better-auth")
707
713
  );
708
714
  if (framework === "nextjs") return mode === "edge";
@@ -713,7 +719,8 @@ function runtimeModeAdmitted(
713
719
  (mode === "static" &&
714
720
  !crons &&
715
721
  configuration.storage === undefined &&
716
- configuration.ai?.enabled !== true)
722
+ configuration.ai?.enabled !== true &&
723
+ configuration.browser?.enabled !== true)
717
724
  );
718
725
  }
719
726
 
@@ -26,6 +26,8 @@ export type OhmyhostApplicationBuild = Readonly<{
26
26
  output: string;
27
27
  /** Maximum private immutable Next.js prerender cache, in MiB; defaults to 32. */
28
28
  ssg_cache_max_mib?: number;
29
+ /** Opt into the writable, deployment-scoped Next.js revalidatePath cache. */
30
+ next_revalidate_path?: boolean;
29
31
  }>;
30
32
  export type OhmyhostFunctionsBuild = Readonly<{ install: string }>;
31
33
 
@@ -61,6 +63,7 @@ export interface OhmyhostConfig {
61
63
  enabled: boolean;
62
64
  jurisdiction?: "eu" | "any";
63
65
  }>;
66
+ readonly browser?: Readonly<{ enabled: boolean }>;
64
67
  readonly functions?: Readonly<{ crons: readonly string[] }>;
65
68
  readonly credits?: Readonly<{
66
69
  monthly_budget: number;
@@ -98,6 +101,9 @@ export function parseOhmyhostConfig(value: unknown): OhmyhostConfig {
98
101
  ...((input.build as OhmyhostApplicationBuild).ssg_cache_max_mib === undefined
99
102
  ? {}
100
103
  : { ssg_cache_max_mib: (input.build as OhmyhostApplicationBuild).ssg_cache_max_mib }),
104
+ ...((input.build as OhmyhostApplicationBuild).next_revalidate_path === true
105
+ ? { next_revalidate_path: true }
106
+ : {}),
101
107
  }),
102
108
  runtime: Object.freeze({
103
109
  mode: input.runtime.mode,
@@ -138,6 +144,9 @@ export function parseOhmyhostConfig(value: unknown): OhmyhostConfig {
138
144
  ...(input.ai.jurisdiction === undefined ? {} : { jurisdiction: input.ai.jurisdiction }),
139
145
  }),
140
146
  }),
147
+ ...(input.browser === undefined
148
+ ? {}
149
+ : { browser: Object.freeze({ enabled: input.browser.enabled }) }),
141
150
  ...(input.functions === undefined
142
151
  ? {}
143
152
  : {
@@ -96,6 +96,34 @@ const deploymentProgressActions = {
96
96
  "Mail readiness could not be observed. Read 'ohmyhost mail status --project PROJECT --environment PROD_ENVIRONMENT_ULID --json' (MCP mail_status) with the Prod environment ID from 'ohmyhost project status', and report a persistent error; keep this operation.",
97
97
  } as const;
98
98
  export type DeploymentProgressPhase = keyof typeof deploymentProgressActions;
99
+ export interface DeploymentMailProgress {
100
+ readonly domain: string;
101
+ readonly status:
102
+ | "configured"
103
+ | "delegation_required"
104
+ | "ready"
105
+ | "verification_pending"
106
+ | "verification_failed";
107
+ readonly configured_at: string;
108
+ readonly observed_at?: string;
109
+ readonly verification_issue?:
110
+ | "identity_missing"
111
+ | "identity_verification_failed"
112
+ | "dkim_verification_failed"
113
+ | "dkim_records_changed"
114
+ | "tenant_association_missing"
115
+ | null;
116
+ readonly next_check_after_seconds?: 60 | 3600 | null;
117
+ readonly sending?: "disabled" | "pending" | "ready" | "failed";
118
+ readonly receiving?: "disabled" | "pending" | "ready" | "failed";
119
+ readonly dns_records: {
120
+ readonly type: "MX" | "TXT" | "CNAME";
121
+ readonly name: string;
122
+ readonly value: string;
123
+ readonly status: string;
124
+ readonly priority?: number;
125
+ }[];
126
+ }
99
127
  export interface OperationDeploymentProgress {
100
128
  readonly build_completed_at?: string;
101
129
  readonly phase: DeploymentProgressPhase;
@@ -104,6 +132,7 @@ export interface OperationDeploymentProgress {
104
132
  readonly observed_at: string;
105
133
  readonly next_poll_after_seconds: 60;
106
134
  readonly suggested_action: string;
135
+ readonly mail?: DeploymentMailProgress;
107
136
  }
108
137
  export function createOperationDeploymentProgress(input: {
109
138
  build_completed_at?: string;
@@ -111,6 +140,7 @@ export function createOperationDeploymentProgress(input: {
111
140
  project_id: string;
112
141
  deployment_id: string;
113
142
  observed_at: string;
143
+ mail?: DeploymentMailProgress;
114
144
  }): OperationDeploymentProgress {
115
145
  const project = ulid(input.project_id);
116
146
  ulid(input.deployment_id);
@@ -126,6 +156,8 @@ export function createOperationDeploymentProgress(input: {
126
156
  new Date(input.build_completed_at).toISOString() !== input.build_completed_at)
127
157
  )
128
158
  invalid();
159
+ const mail = input.mail === undefined ? undefined : parseDeploymentMailProgress(input.mail);
160
+ if (mail !== undefined && input.phase !== "waiting_for_mail") invalid();
129
161
  return Object.freeze({
130
162
  ...(input.build_completed_at === undefined
131
163
  ? {}
@@ -135,8 +167,93 @@ export function createOperationDeploymentProgress(input: {
135
167
  deployment_id: input.deployment_id,
136
168
  observed_at: input.observed_at,
137
169
  next_poll_after_seconds: 60 as const,
138
- suggested_action: deploymentProgressActions[input.phase].replace("PROJECT", project),
170
+ suggested_action:
171
+ mail === undefined || mail.dns_records.length === 0
172
+ ? deploymentProgressActions[input.phase].replace("PROJECT", project)
173
+ : "Follow the mail readiness and DNS records shown here, then poll this same operation. Do not rebuild or repeat correct DNS changes.",
174
+ ...(mail === undefined ? {} : { mail }),
175
+ });
176
+ }
177
+ function parseDeploymentMailProgress(value: unknown): DeploymentMailProgress {
178
+ if (typeof value !== "object" || value === null || Array.isArray(value)) invalid();
179
+ const raw = value as Record<string, unknown>;
180
+ const keys = ["domain", "status", "configured_at", "dns_records"];
181
+ for (const optional of [
182
+ "observed_at",
183
+ "verification_issue",
184
+ "next_check_after_seconds",
185
+ "sending",
186
+ "receiving",
187
+ ])
188
+ if (raw[optional] !== undefined) keys.push(optional);
189
+ const row = exactRecord(raw, keys),
190
+ time = (v: unknown) =>
191
+ typeof v === "string" && Number.isFinite(Date.parse(v)) && new Date(v).toISOString() === v,
192
+ state = ["disabled", "pending", "ready", "failed"];
193
+ if (
194
+ typeof row["domain"] !== "string" ||
195
+ row["domain"].length > 253 ||
196
+ !/^[a-z0-9.-]+$/u.test(row["domain"]) ||
197
+ ![
198
+ "configured",
199
+ "delegation_required",
200
+ "ready",
201
+ "verification_pending",
202
+ "verification_failed",
203
+ ].includes(String(row["status"])) ||
204
+ !time(row["configured_at"]) ||
205
+ (row["observed_at"] !== undefined && !time(row["observed_at"])) ||
206
+ (row["verification_issue"] !== undefined &&
207
+ row["verification_issue"] !== null &&
208
+ ![
209
+ "identity_missing",
210
+ "identity_verification_failed",
211
+ "dkim_verification_failed",
212
+ "dkim_records_changed",
213
+ "tenant_association_missing",
214
+ ].includes(String(row["verification_issue"]))) ||
215
+ (row["next_check_after_seconds"] !== undefined &&
216
+ ![60, 3600, null].includes(row["next_check_after_seconds"] as 60 | 3600 | null)) ||
217
+ (row["sending"] !== undefined && !state.includes(String(row["sending"]))) ||
218
+ (row["receiving"] !== undefined && !state.includes(String(row["receiving"]))) ||
219
+ !Array.isArray(row["dns_records"]) ||
220
+ row["dns_records"].length > 16
221
+ )
222
+ invalid();
223
+ const records = row["dns_records"].map((value: unknown) => {
224
+ if (typeof value !== "object" || value === null || Array.isArray(value)) invalid();
225
+ const item = value as Record<string, unknown>;
226
+ const record = exactRecord(
227
+ item,
228
+ item["priority"] === undefined
229
+ ? ["type", "name", "value", "status"]
230
+ : ["type", "name", "value", "status", "priority"],
231
+ );
232
+ if (
233
+ !["MX", "TXT", "CNAME"].includes(String(record["type"])) ||
234
+ typeof record["name"] !== "string" ||
235
+ record["name"].length === 0 ||
236
+ record["name"].length > 253 ||
237
+ /[\r\n\0]/u.test(record["name"]) ||
238
+ !(record["name"] === row["domain"] || record["name"].endsWith(`.${row["domain"]}`)) ||
239
+ typeof record["value"] !== "string" ||
240
+ record["value"].length === 0 ||
241
+ record["value"].length > 4096 ||
242
+ /[\r\n\0]/u.test(record["value"]) ||
243
+ typeof record["status"] !== "string" ||
244
+ record["status"].length === 0 ||
245
+ record["status"].length > 32 ||
246
+ /[\r\n\0]/u.test(record["status"]) ||
247
+ (record["type"] === "MX" &&
248
+ (!Number.isSafeInteger(record["priority"]) ||
249
+ Number(record["priority"]) < 0 ||
250
+ Number(record["priority"]) > 65535)) ||
251
+ (record["type"] !== "MX" && record["priority"] !== undefined)
252
+ )
253
+ invalid();
254
+ return Object.freeze({ ...record }) as DeploymentMailProgress["dns_records"][number];
139
255
  });
256
+ return Object.freeze({ ...row, dns_records: records }) as unknown as DeploymentMailProgress;
140
257
  }
141
258
  export function parseOperationDeploymentProgress(value: unknown): OperationDeploymentProgress {
142
259
  const keys = [
@@ -149,6 +266,8 @@ export function parseOperationDeploymentProgress(value: unknown): OperationDeplo
149
266
  ];
150
267
  if (typeof value === "object" && value !== null && Object.hasOwn(value, "build_completed_at"))
151
268
  keys.push("build_completed_at");
269
+ if (typeof value === "object" && value !== null && Object.hasOwn(value, "mail"))
270
+ keys.push("mail");
152
271
  const row = exactRecord(value, keys);
153
272
  const parsed = createOperationDeploymentProgress({
154
273
  ...(row["build_completed_at"] === undefined
@@ -158,6 +277,7 @@ export function parseOperationDeploymentProgress(value: unknown): OperationDeplo
158
277
  project_id: row["project_id"] as string,
159
278
  deployment_id: row["deployment_id"] as string,
160
279
  observed_at: row["observed_at"] as string,
280
+ ...(row["mail"] === undefined ? {} : { mail: parseDeploymentMailProgress(row["mail"]) }),
161
281
  });
162
282
  if (row["next_poll_after_seconds"] !== 60 || row["suggested_action"] !== parsed.suggested_action)
163
283
  invalid();
@@ -1,4 +1,8 @@
1
- import { frameworkConversionDetail } from "./framework-admission.js";
1
+ import {
2
+ frameworkConversionDetail,
3
+ parseFrameworkConversionDiagnostic,
4
+ type FrameworkConversionDiagnostic,
5
+ } from "./framework-admission.js";
2
6
 
3
7
  const failures = {
4
8
  authorization_changed: [
@@ -147,6 +151,70 @@ export interface PublicOperationFailure {
147
151
  readonly suggested_action: string;
148
152
  /** The catalog sentence naming the refused file and its fix, only for an auto-deploy rejection. */
149
153
  readonly detail?: string;
154
+ readonly migration?: MigrationFailureDiagnostic;
155
+ }
156
+
157
+ export interface MigrationFailureDiagnostic {
158
+ readonly reason: "catalog_changed" | "execution_failed" | "ledger_conflict" | "not_admitted";
159
+ readonly file: string | null;
160
+ readonly statement_index?: number;
161
+ readonly sqlstate?: string;
162
+ }
163
+ export type OperationFailureDiagnostic = FrameworkConversionDiagnostic | MigrationFailureDiagnostic;
164
+
165
+ /** Each diagnostic variant validates its exact closed shape before crossing a read boundary. */
166
+ export function parseOperationFailureDiagnostic(value: unknown): OperationFailureDiagnostic | null {
167
+ return parseFrameworkConversionDiagnostic(value) ?? parseMigrationFailureDiagnostic(value);
168
+ }
169
+
170
+ /** Closed metadata only: PostgreSQL messages, SQL and parameters are never public diagnostics. */
171
+ export function parseMigrationFailureDiagnostic(value: unknown): MigrationFailureDiagnostic | null {
172
+ if (typeof value !== "object" || value === null || Array.isArray(value)) return null;
173
+ const r = value as Record<string, unknown>;
174
+ if (
175
+ Object.keys(r).some(
176
+ (key) => !["reason", "file", "statement_index", "sqlstate"].includes(key),
177
+ ) ||
178
+ !["catalog_changed", "execution_failed", "ledger_conflict", "not_admitted"].includes(
179
+ String(r["reason"]),
180
+ ) ||
181
+ !(
182
+ r["file"] === null ||
183
+ (typeof r["file"] === "string" &&
184
+ r["file"].length <= 512 &&
185
+ /^(?:[A-Za-z0-9][A-Za-z0-9._-]*\/)*\d{14}_[a-z0-9][a-z0-9_-]*\.sql$/u.test(r["file"]))
186
+ )
187
+ )
188
+ return null;
189
+ const ordinal = r["statement_index"],
190
+ state = r["sqlstate"];
191
+ if (
192
+ (Object.hasOwn(r, "statement_index") && ordinal === undefined) ||
193
+ (Object.hasOwn(r, "sqlstate") && state === undefined)
194
+ )
195
+ return null;
196
+ if (
197
+ (ordinal === undefined) !== (state === undefined) ||
198
+ (ordinal !== undefined &&
199
+ (r["reason"] !== "execution_failed" ||
200
+ r["file"] === null ||
201
+ typeof ordinal !== "number" ||
202
+ !Number.isSafeInteger(ordinal) ||
203
+ ordinal < 1)) ||
204
+ (state !== undefined &&
205
+ (ordinal === undefined ||
206
+ typeof state !== "string" ||
207
+ !/^[0-9A-Z]{5}$/u.test(state) ||
208
+ state.startsWith("08") ||
209
+ /^57P0[123]$/u.test(state)))
210
+ )
211
+ return null;
212
+ return Object.freeze({
213
+ reason: r["reason"] as MigrationFailureDiagnostic["reason"],
214
+ file: r["file"] as string | null,
215
+ ...(ordinal === undefined ? {} : { statement_index: ordinal as number }),
216
+ ...(state === undefined ? {} : { sqlstate: state as string }),
217
+ });
150
218
  }
151
219
 
152
220
  export interface OperationReconciliationObservation {
@@ -198,11 +266,14 @@ export function publicOperationFailure(
198
266
  const [message, suggested_action] = failures[code];
199
267
  const detail =
200
268
  code === "auto_deploy_plan_rejected" ? frameworkConversionDetail(diagnostic) : null;
269
+ const migration =
270
+ code === "database_migration_failed" ? parseMigrationFailureDiagnostic(diagnostic) : null;
201
271
  return Object.freeze({
202
272
  code,
203
273
  message,
204
274
  retryable: false,
205
275
  suggested_action,
206
276
  ...(detail === null ? {} : { detail }),
277
+ ...(migration === null ? {} : { migration }),
207
278
  });
208
279
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The connection_id of one workspace MCP consent. The public contract names it as a UUID; the
3
+ * clients accept any hex UUID in the 8-4-4-4-12 form, so a server id that RFC 4122 would refuse is
4
+ * still reachable from the CLI and the MCP tools.
5
+ */
6
+ export const MCP_CONNECTION_ID_PATTERN =
7
+ /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;
@@ -441,9 +441,21 @@ export const PROBLEM_POLICY = {
441
441
  status: 409,
442
442
  retryable: false,
443
443
  action:
444
- "Plan and deploy this commit to Dev, then run 'ohmyhost deployment promote plan' to reach Prod.",
444
+ "This is a legacy deployment restriction. Update the CLI and MCP to the current release, then plan with environment prod. The current platform permits direct Prod deployment with shared data; its migrations affect both environments when Dev exists. If the restriction persists, report the request ID.",
445
445
  title: "Shared data requires promotion",
446
446
  },
447
+ development_environment_exists: {
448
+ status: 409,
449
+ retryable: false,
450
+ action: "Read project status and use the existing Dev environment ID.",
451
+ title: "Development environment already exists",
452
+ },
453
+ development_environment_missing: {
454
+ status: 409,
455
+ retryable: false,
456
+ action: "Select environment prod, or add Dev with 'ohmyhost project dev add'.",
457
+ title: "Development environment is missing",
458
+ },
447
459
  production_deployment_required: {
448
460
  status: 409,
449
461
  retryable: false,
@@ -611,18 +623,18 @@ export const PROBLEM_POLICY = {
611
623
  status: 409,
612
624
  retryable: false,
613
625
  action:
614
- "A live connection holds it; its holder removes it with ohmyhost domain paid delete --project ULID --hostname HOST --yes --json. To connect it here, run application_domain_identity_declare (CLI: ohmyhost mail identity declare --project ULID --hostname HOST --idempotency-key KEY --json), add the _omh-project.HOST TXT record it returns, run application_domain_identity_verify (CLI: ohmyhost mail identity verify --project ULID --expected-revision N --idempotency-key KEY --json), then apply again.",
626
+ "A live connection holds it; its holder removes it with ohmyhost domain paid delete --project ULID --hostname HOST --yes --json. To connect it here, add the _omh-project.HOST TXT record that ohmyhost domain paid status --project ULID --json shows for it, then apply again with ohmyhost domain paid apply --project ULID --hostname HOST --idempotency-key KEY --json.",
615
627
  restAction:
616
- "A live connection holds it; its holder removes it with ohmyhost domain paid delete --project ULID --hostname HOST --yes --json. To connect it here, run application_domain_identity_declare (CLI: ohmyhost mail identity declare --project ULID --hostname HOST --idempotency-key KEY --json), add the _omh-project.HOST TXT record it returns, run application_domain_identity_verify (CLI: ohmyhost mail identity verify --project ULID --expected-revision N --idempotency-key KEY --json), then apply again.",
628
+ "A live connection holds it; its holder removes it with ohmyhost domain paid delete --project ULID --hostname HOST --yes --json. To connect it here, add the _omh-project.HOST TXT record that ohmyhost domain paid status --project ULID --json shows for it, then apply again with ohmyhost domain paid apply --project ULID --hostname HOST --idempotency-key KEY --json.",
617
629
  title: "Domain hostname is already connected",
618
630
  },
619
631
  domain_ownership_required: {
620
632
  status: 409,
621
633
  retryable: false,
622
634
  action:
623
- "This hostname is not verified for this project yet. Run application_domain_identity_declare (CLI: ohmyhost mail identity declare --project ULID --hostname HOST --idempotency-key KEY --json) and add the _omh-project.HOST TXT record it returns; then application_domain_identity_verify (CLI: ohmyhost mail identity verify --project ULID --expected-revision N --idempotency-key KEY --json), then apply again. Repeating before then cannot work.",
635
+ "This hostname is not verified for this project yet. Add the _omh-project.HOST TXT record that ohmyhost domain paid status --project ULID --json shows for it, then apply again with ohmyhost domain paid apply --project ULID --hostname HOST --idempotency-key KEY --json. Repeating before the record is published cannot work.",
624
636
  restAction:
625
- "This hostname is not verified for this project yet. Run application_domain_identity_declare (CLI: ohmyhost mail identity declare --project ULID --hostname HOST --idempotency-key KEY --json) and add the _omh-project.HOST TXT record it returns; then application_domain_identity_verify (CLI: ohmyhost mail identity verify --project ULID --expected-revision N --idempotency-key KEY --json), then apply again. Repeating before then cannot work.",
637
+ "This hostname is not verified for this project yet. Add the _omh-project.HOST TXT record that ohmyhost domain paid status --project ULID --json shows for it, then apply again with ohmyhost domain paid apply --project ULID --hostname HOST --idempotency-key KEY --json. Repeating before the record is published cannot work.",
626
638
  title: "Verify the domain before connecting it",
627
639
  },
628
640
  domain_dns_conflict: {
@@ -10,12 +10,20 @@ const FIXED_PLATFORM_NAMES = new Set([
10
10
  "IMAGES",
11
11
  "STORAGE",
12
12
  ]);
13
- const INSTALLED_PLATFORM_KEYS = new Set([
13
+ /** The five keys the platform installs; control-store's rotation accepts exactly these names. */
14
+ export const INSTALLED_PLATFORM_KEY_NAMES = [
14
15
  "OHMYHOST_STORAGE_KEY",
15
16
  "OHMYHOST_MAIL_KEY",
16
17
  "OHMYHOST_AI_KEY",
18
+ "OHMYHOST_BROWSER_KEY",
17
19
  "BETTER_AUTH_SECRET",
18
- ]);
20
+ ] as const;
21
+ const INSTALLED_PLATFORM_KEYS = new Set<string>(INSTALLED_PLATFORM_KEY_NAMES);
22
+
23
+ /** The five keys the platform installs. An owner may rotate them; a customer may never set or delete them. */
24
+ export function isInstalledPlatformKeyName(value: unknown): value is string {
25
+ return typeof value === "string" && INSTALLED_PLATFORM_KEYS.has(value);
26
+ }
19
27
 
20
28
  export function isUserSecretName(
21
29
  value: unknown,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ohmyhost/sdk-ts",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,6 +1,8 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
3
  export {
4
+ activateDatabaseWebhookSubscription,
5
+ addProjectDevelopmentEnvironment,
4
6
  applyPaidProjectDomain,
5
7
  authorizeApplicationDomainIdentityDns,
6
8
  authorizeWorkspaceMailDomainDns,
@@ -33,6 +35,7 @@ export {
33
35
  createProjectExportDownloadLink,
34
36
  createUserApiKey,
35
37
  createWorkspaceMailDomain,
38
+ deactivateDatabaseWebhookSubscription,
36
39
  declareApplicationDomainIdentity,
37
40
  deleteEnvironmentSecret,
38
41
  deleteManagedMailDomain,
@@ -55,6 +58,7 @@ export {
55
58
  getCloudflareDnsAuthorizationStatus,
56
59
  getCurrentIdentity,
57
60
  getDatabaseCompute,
61
+ getDatabaseWebhookSubscription,
58
62
  getDeployment,
59
63
  getDeploymentLogs,
60
64
  getFeatureInterests,
@@ -141,6 +145,7 @@ export {
141
145
  revokeUserApiKey,
142
146
  revokeWorkspaceMailDomainDnsAuthorization,
143
147
  rollbackDeployment,
148
+ rotateEnvironmentSecret,
144
149
  rotateManagedMailWebhookSecret,
145
150
  rotateProjectDevShareLink,
146
151
  runProjectDatabaseSchedule,
@@ -164,6 +169,16 @@ export {
164
169
  } from "./sdk.gen.js";
165
170
  export type {
166
171
  AccountProfile,
172
+ ActivateDatabaseWebhookSubscriptionData,
173
+ ActivateDatabaseWebhookSubscriptionError,
174
+ ActivateDatabaseWebhookSubscriptionErrors,
175
+ ActivateDatabaseWebhookSubscriptionResponse,
176
+ ActivateDatabaseWebhookSubscriptionResponses,
177
+ AddProjectDevelopmentEnvironmentData,
178
+ AddProjectDevelopmentEnvironmentError,
179
+ AddProjectDevelopmentEnvironmentErrors,
180
+ AddProjectDevelopmentEnvironmentResponse,
181
+ AddProjectDevelopmentEnvironmentResponses,
167
182
  ApplicationDomainIdentity,
168
183
  ApplicationDomainIdentityRequest,
169
184
  ApplicationDomainIdentitySummary,
@@ -387,10 +402,19 @@ export type {
387
402
  DatabaseWebhookEventPattern,
388
403
  DatabaseWebhookEventPatternWritable,
389
404
  DatabaseWebhookEventType,
405
+ DatabaseWebhookGeneration,
390
406
  DatabaseWebhookId,
391
407
  DatabaseWebhookPage,
392
408
  DatabaseWebhookReplayAccepted,
409
+ DatabaseWebhookSubscription,
410
+ DatabaseWebhookSubscriptionActivation,
411
+ DatabaseWebhookSubscriptionId,
393
412
  DatabaseWebhookTestResult,
413
+ DeactivateDatabaseWebhookSubscriptionData,
414
+ DeactivateDatabaseWebhookSubscriptionError,
415
+ DeactivateDatabaseWebhookSubscriptionErrors,
416
+ DeactivateDatabaseWebhookSubscriptionResponse,
417
+ DeactivateDatabaseWebhookSubscriptionResponses,
394
418
  DeclareApplicationDomainIdentityData,
395
419
  DeclareApplicationDomainIdentityError,
396
420
  DeclareApplicationDomainIdentityErrors,
@@ -443,6 +467,7 @@ export type {
443
467
  DeploymentDiagnosticPage,
444
468
  DeploymentId,
445
469
  DeploymentLimit,
470
+ DeploymentMailProgress,
446
471
  DeploymentPage,
447
472
  DeploymentPlan,
448
473
  DeploymentPlanWritable,
@@ -526,6 +551,11 @@ export type {
526
551
  GetDatabaseComputeErrors,
527
552
  GetDatabaseComputeResponse,
528
553
  GetDatabaseComputeResponses,
554
+ GetDatabaseWebhookSubscriptionData,
555
+ GetDatabaseWebhookSubscriptionError,
556
+ GetDatabaseWebhookSubscriptionErrors,
557
+ GetDatabaseWebhookSubscriptionResponse,
558
+ GetDatabaseWebhookSubscriptionResponses,
529
559
  GetDeploymentData,
530
560
  GetDeploymentError,
531
561
  GetDeploymentErrors,
@@ -837,6 +867,7 @@ export type {
837
867
  ManagedSourceUploadReceipt,
838
868
  ManagedSourceUploadRequest,
839
869
  ManagedSourceVersions,
870
+ MigrationFailureDiagnostic,
840
871
  NativeAuthConfiguration,
841
872
  NativeAuthConfigurationUpdate,
842
873
  NativeAuthProviderStatus,
@@ -1057,6 +1088,11 @@ export type {
1057
1088
  RollbackDeploymentErrors,
1058
1089
  RollbackDeploymentResponse,
1059
1090
  RollbackDeploymentResponses,
1091
+ RotateEnvironmentSecretData,
1092
+ RotateEnvironmentSecretError,
1093
+ RotateEnvironmentSecretErrors,
1094
+ RotateEnvironmentSecretResponse,
1095
+ RotateEnvironmentSecretResponses,
1060
1096
  RotateManagedMailWebhookSecretData,
1061
1097
  RotateManagedMailWebhookSecretError,
1062
1098
  RotateManagedMailWebhookSecretErrors,