@amerged/ohmyhost-mcp 0.1.26 → 0.1.28
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.
- package/README.md +1 -1
- package/dist/{chunk-K57THTQL.js → chunk-GIP4M4CK.js} +7 -7
- package/dist/index.js +1 -1
- package/dist/stdio-main.js +13 -6
- package/package.json +1 -1
- package/src/apps/mcp/package.json +1 -1
- package/src/apps/mcp/src/local-server.ts +2 -2
- package/src/apps/product-cli/package.json +1 -1
- package/src/apps/product-cli/src/repository-init.ts +14 -2
- package/src/apps/product-cli/src/runtime-contract.ts +9 -1
- package/src/packages/agent-skills/src/generated-skill-resources.ts +6 -6
- package/src/packages/agent-skills/src/index.ts +1 -1
- package/src/packages/contracts/src/framework-admission.ts +3 -6
- package/src/packages/contracts/src/framework-build-script.mjs +19 -0
- package/src/packages/contracts/src/index.ts +5 -0
- package/src/packages/contracts/src/problem-policy.ts +7 -0
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +2 -2
- package/src/packages/sdk-ts/src/generated/types.gen.ts +7 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GENERATED_SKILL_RESOURCES } from "./generated-skill-resources.js";
|
|
2
2
|
|
|
3
|
-
export const OHMYHOST_SKILL_INSTALL_SOURCE = "amerged-org/docs";
|
|
3
|
+
export const OHMYHOST_SKILL_INSTALL_SOURCE = "amerged-org/ohmyhost-docs";
|
|
4
4
|
|
|
5
5
|
export interface OhmyhostSkillResource {
|
|
6
6
|
readonly skillName: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PINNED_BUN_VERSION } from "./framework-build-script.mjs";
|
|
1
|
+
import { isAdmittedNextVersion, PINNED_BUN_VERSION } from "./framework-build-script.mjs";
|
|
2
2
|
import { managedCustomerAuthDatabaseMessage } from "./customer-auth-admission.js";
|
|
3
3
|
export { managedCustomerAuthAdmissionIssue } from "./customer-auth-admission.js";
|
|
4
4
|
|
|
@@ -129,7 +129,7 @@ export interface FrameworkVersionAdmission {
|
|
|
129
129
|
const VERIFIED_VERSIONS: Readonly<Record<AdmittedFramework, ReadonlySet<string>>> = Object.freeze({
|
|
130
130
|
vite: new Set(["5.4.21", "8.0.16", "8.2.2"]),
|
|
131
131
|
"tanstack-start": new Set(["1.168.26", "1.168.49"]),
|
|
132
|
-
nextjs: new Set(["15.5.
|
|
132
|
+
nextjs: new Set(["15.5.26", "16.3.7"]),
|
|
133
133
|
});
|
|
134
134
|
|
|
135
135
|
export function classifyFrameworkVersion(
|
|
@@ -173,10 +173,7 @@ function insideAdmittedWindow(framework: AdmittedFramework, version: VersionTupl
|
|
|
173
173
|
compareVersions(version, [1, 168, 26]) >= 0 && compareVersions(version, [1, 168, 49]) <= 0
|
|
174
174
|
);
|
|
175
175
|
case "nextjs":
|
|
176
|
-
return (
|
|
177
|
-
(version[0] === 15 && version[1] === 5) ||
|
|
178
|
-
(compareVersions(version, [16, 0, 0]) >= 0 && compareVersions(version, [16, 3, 4]) <= 0)
|
|
179
|
-
);
|
|
176
|
+
return isAdmittedNextVersion(version.join("."));
|
|
180
177
|
}
|
|
181
178
|
}
|
|
182
179
|
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
export const PINNED_BUN_VERSION = "1.2.22";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* The installed Next.js release must satisfy the same window as source admission.
|
|
5
|
+
* @param {unknown} version
|
|
6
|
+
* @returns {boolean}
|
|
7
|
+
*/
|
|
8
|
+
export function isAdmittedNextVersion(version) {
|
|
9
|
+
if (typeof version !== "string") return false;
|
|
10
|
+
const match = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$/u.exec(version);
|
|
11
|
+
if (match === null) return false;
|
|
12
|
+
const major = Number(match[1]);
|
|
13
|
+
const minor = Number(match[2]);
|
|
14
|
+
const patch = Number(match[3]);
|
|
15
|
+
if (![major, minor, patch].every(Number.isSafeInteger)) return false;
|
|
16
|
+
return (
|
|
17
|
+
(major === 15 && minor === 5 && patch >= 26) ||
|
|
18
|
+
(major === 16 && minor === 3 && patch >= 6 && patch <= 7)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
3
22
|
const TYPESCRIPT_BUILD_STAGE = /^tsc(?:[ \t]+(?:--noEmit|-b|--build))?$/u;
|
|
4
23
|
|
|
5
24
|
/**
|
|
@@ -24,6 +24,8 @@ export type OhmyhostApplicationBuild = Readonly<{
|
|
|
24
24
|
install: string;
|
|
25
25
|
command: string;
|
|
26
26
|
output: string;
|
|
27
|
+
/** Maximum private immutable Next.js prerender cache, in MiB; defaults to 32. */
|
|
28
|
+
ssg_cache_max_mib?: number;
|
|
27
29
|
}>;
|
|
28
30
|
export type OhmyhostFunctionsBuild = Readonly<{ install: string }>;
|
|
29
31
|
|
|
@@ -88,6 +90,9 @@ export function parseOhmyhostConfig(value: unknown): OhmyhostConfig {
|
|
|
88
90
|
install: input.build.install,
|
|
89
91
|
command: (input.build as OhmyhostApplicationBuild).command,
|
|
90
92
|
output: (input.build as OhmyhostApplicationBuild).output,
|
|
93
|
+
...((input.build as OhmyhostApplicationBuild).ssg_cache_max_mib === undefined
|
|
94
|
+
? {}
|
|
95
|
+
: { ssg_cache_max_mib: (input.build as OhmyhostApplicationBuild).ssg_cache_max_mib }),
|
|
91
96
|
}),
|
|
92
97
|
runtime: Object.freeze({
|
|
93
98
|
mode: input.runtime.mode,
|
|
@@ -450,6 +450,13 @@ export const PROBLEM_POLICY = {
|
|
|
450
450
|
"A live project connection already holds this hostname. Remove it from the project you manage with 'ohmyhost domain paid delete --project ULID --hostname HOST --yes --json', then apply it to the new project. Repeating while that connection remains cannot work; report the request_id if you cannot manage its owning project.",
|
|
451
451
|
title: "Domain hostname is already connected",
|
|
452
452
|
},
|
|
453
|
+
domain_dns_conflict: {
|
|
454
|
+
status: 409,
|
|
455
|
+
retryable: false,
|
|
456
|
+
action:
|
|
457
|
+
"Review DNS for the requested hostname and resolve the conflicting delegation or another project's managed records. Preserve mailbox MX, TXT and CAA records. Then repeat the original domain paid apply or delete with the same hostname and idempotency key; do not create another deployment or repeatedly resubmit unchanged conflicts.",
|
|
458
|
+
title: "Domain DNS records conflict",
|
|
459
|
+
},
|
|
453
460
|
data_change_blocked: {
|
|
454
461
|
status: 409,
|
|
455
462
|
retryable: true,
|
|
@@ -2560,7 +2560,7 @@ export const configureProjectDomains = <ThrowOnError extends boolean = true>(
|
|
|
2560
2560
|
/**
|
|
2561
2561
|
* Plan one Paid customer-owned hostname
|
|
2562
2562
|
*
|
|
2563
|
-
*
|
|
2563
|
+
* Plan the customer's requested hostname before or after the first Prod deployment. This read-only plan explains declaration, Cloudflare consent and activation; it does not claim the hostname, create provider resources or change DNS.
|
|
2564
2564
|
*/
|
|
2565
2565
|
export const planPaidProjectDomain = <ThrowOnError extends boolean = true>(
|
|
2566
2566
|
parameters: {
|
|
@@ -2698,7 +2698,7 @@ export const getPaidProjectDomain = <ThrowOnError extends boolean = true>(
|
|
|
2698
2698
|
/**
|
|
2699
2699
|
* Apply one Paid customer-owned hostname
|
|
2700
2700
|
*
|
|
2701
|
-
* Requires Paid access (a Stripe period or a grant) or, for a Free workspace, a project that currently shows the powered-by flag, and no expired credit-exhaustion grace. Returns paid_plan_required otherwise, or insufficient_organization_credits after seven days with no available credits, without provider mutation. Top-ups lift a credit-exhaustion block but never start or extend Paid access.
|
|
2701
|
+
* Requires Paid access (a Stripe period or a grant) or, for a Free workspace, a project that currently shows the powered-by flag, and no expired credit-exhaustion grace. Returns paid_plan_required otherwise, or insufficient_organization_credits after seven days with no available credits, without provider mutation. Top-ups lift a credit-exhaustion block but never start or extend Paid access. Without an active Prod deployment, apply declares the hostname as awaiting_deployment, enabling Cloudflare consent without provider resources, DNS changes or domain charges. After a successful Prod deployment, replay the same hostname and idempotency key to activate it. A changed request under a used key returns idempotency_key_reused (409).
|
|
2702
2702
|
*/
|
|
2703
2703
|
export const applyPaidProjectDomain = <ThrowOnError extends boolean = true>(
|
|
2704
2704
|
parameters: {
|
|
@@ -351,9 +351,13 @@ export type PaidDomainPlan = {
|
|
|
351
351
|
risks: Array<string>;
|
|
352
352
|
};
|
|
353
353
|
|
|
354
|
+
/**
|
|
355
|
+
* awaiting_deployment means the requested hostname is declared but not provisioned. Its hostname is present, suspension_reason, custom_hostname_status, ssl_status and url are null, and validation_records is empty. Authorize Cloudflare, deploy to Prod, then repeat the same apply.
|
|
356
|
+
*/
|
|
354
357
|
export type PaidDomain = {
|
|
355
358
|
status:
|
|
356
359
|
| "not_configured"
|
|
360
|
+
| "awaiting_deployment"
|
|
357
361
|
| "pending"
|
|
358
362
|
| "active"
|
|
359
363
|
| "reconciliation_required"
|
|
@@ -1112,6 +1116,7 @@ export type ProblemDetails = {
|
|
|
1112
1116
|
| "service_unavailable"
|
|
1113
1117
|
| "source_commit_not_found"
|
|
1114
1118
|
| "domain_hostname_taken"
|
|
1119
|
+
| "domain_dns_conflict"
|
|
1115
1120
|
| "data_change_blocked"
|
|
1116
1121
|
| "data_change_in_progress"
|
|
1117
1122
|
| "data_change_not_applicable"
|
|
@@ -4686,7 +4691,7 @@ export type PlanPaidProjectDomainError =
|
|
|
4686
4691
|
|
|
4687
4692
|
export type PlanPaidProjectDomainResponses = {
|
|
4688
4693
|
/**
|
|
4689
|
-
*
|
|
4694
|
+
* The requested hostname, routing target and staged provider effects.
|
|
4690
4695
|
*/
|
|
4691
4696
|
200: PaidDomainPlan;
|
|
4692
4697
|
};
|
|
@@ -4880,7 +4885,7 @@ export type ApplyPaidProjectDomainError =
|
|
|
4880
4885
|
|
|
4881
4886
|
export type ApplyPaidProjectDomainResponses = {
|
|
4882
4887
|
/**
|
|
4883
|
-
*
|
|
4888
|
+
* Declared hostname or current Cloudflare for SaaS hostname and certificate state.
|
|
4884
4889
|
*/
|
|
4885
4890
|
200: PaidDomain;
|
|
4886
4891
|
};
|