@amerged/ohmyhost-mcp 0.1.28 → 0.1.30
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/THIRD_PARTY_NOTICES.md +1419 -0
- package/dist/{chunk-GIP4M4CK.js → chunk-MVT76LJ5.js} +92 -28
- package/dist/index.js +1 -1
- package/dist/stdio-main.js +24153 -2354
- package/package.json +1 -1
- package/src/apps/mcp/package.json +1 -1
- package/src/apps/mcp/src/local-client.ts +12 -2
- package/src/apps/mcp/src/local-server.ts +333 -4
- package/src/apps/product-cli/package.json +4 -2
- package/src/apps/product-cli/src/cli.ts +312 -2
- package/src/apps/product-cli/src/command.ts +261 -0
- package/src/apps/product-cli/src/composition.ts +74 -4
- package/src/apps/product-cli/src/index.ts +6 -0
- package/src/apps/product-cli/src/product-api.ts +5 -0
- package/src/apps/product-cli/src/project-link-store.ts +92 -1
- package/src/apps/product-cli/src/repository-init.ts +2 -2
- package/src/apps/product-cli/src/runtime-contract.ts +34 -1
- package/src/apps/product-cli/src/source-managed-client.ts +189 -0
- package/src/apps/product-cli/src/source-publication-store.ts +563 -0
- package/src/apps/product-cli/src/source-publisher.ts +195 -0
- package/src/apps/product-cli/src/source-workspace.ts +552 -0
- package/src/packages/agent-skills/src/generated-skill-resources.ts +43 -15
- package/src/packages/contracts/package.json +10 -0
- package/src/packages/contracts/src/database-migration-admission.ts +65 -125
- package/src/packages/contracts/src/database-migration-errors.ts +14 -0
- package/src/packages/contracts/src/database-migration-lexical.ts +180 -0
- package/src/packages/contracts/src/database-migration-policies.ts +150 -0
- package/src/packages/contracts/src/framework-admission.ts +1 -1
- package/src/packages/contracts/src/framework-build-script.mjs +1 -2
- package/src/packages/contracts/src/managed-sources.ts +582 -0
- package/src/packages/contracts/src/mcp-source-codec.ts +150 -0
- package/src/packages/contracts/src/operation-failure.ts +22 -6
- package/src/packages/contracts/src/problem-policy.ts +61 -14
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/index.ts +92 -0
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +541 -0
- package/src/packages/sdk-ts/src/generated/types.gen.ts +911 -4
- package/src/packages/workos-auth-contracts/src/tokens.ts +61 -4
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assertManagedSourceResponse,
|
|
3
|
+
MANAGED_SOURCE_LIMITS,
|
|
4
|
+
parseManagedSourceRequest,
|
|
5
|
+
} from "./managed-sources.js";
|
|
6
|
+
import type {
|
|
7
|
+
ManagedSourceChangesRequest,
|
|
8
|
+
ManagedSourceFile,
|
|
9
|
+
ManagedSourceFileResponse,
|
|
10
|
+
ManagedSourceFiles,
|
|
11
|
+
SourceManifestFile,
|
|
12
|
+
} from "./managed-sources.js";
|
|
13
|
+
|
|
14
|
+
/** MCP presentation only: these fields are never part of the canonical REST contract. */
|
|
15
|
+
export interface McpSourceTextFileResponse {
|
|
16
|
+
readonly commit_sha: string;
|
|
17
|
+
readonly file: SourceManifestFile & {
|
|
18
|
+
readonly content_text: string;
|
|
19
|
+
readonly encoding: "utf8";
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface McpSourceBinaryFileResponse {
|
|
24
|
+
readonly commit_sha: string;
|
|
25
|
+
readonly file: ManagedSourceFile & {
|
|
26
|
+
readonly encoding: "base64";
|
|
27
|
+
readonly guidance: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type McpSourceFileReadResponse =
|
|
32
|
+
| ManagedSourceFiles
|
|
33
|
+
| ManagedSourceFileResponse
|
|
34
|
+
| McpSourceTextFileResponse
|
|
35
|
+
| McpSourceBinaryFileResponse;
|
|
36
|
+
|
|
37
|
+
/** Allows MCP transports to classify user input separately from invalid upstream data. */
|
|
38
|
+
export class McpSourceChangesInputError extends TypeError {
|
|
39
|
+
constructor() {
|
|
40
|
+
super("MCP source changes are invalid");
|
|
41
|
+
this.name = "McpSourceChangesInputError";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Accepts exactly one own content_text or content_base64 field per MCP change.
|
|
47
|
+
* Missing executable defaults to false; null content_base64 retains deletion semantics.
|
|
48
|
+
* The returned request is exclusively canonical REST data, with its existing limits.
|
|
49
|
+
*/
|
|
50
|
+
export function normalizeMcpSourceChanges(value: unknown): ManagedSourceChangesRequest {
|
|
51
|
+
try {
|
|
52
|
+
return normalizeSourceChanges(value);
|
|
53
|
+
} catch {
|
|
54
|
+
throw new McpSourceChangesInputError();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function normalizeSourceChanges(value: unknown): ManagedSourceChangesRequest {
|
|
59
|
+
const body = record(value);
|
|
60
|
+
const changes = body["changes"];
|
|
61
|
+
if (!Array.isArray(changes) || changes.length < 1 || changes.length > MANAGED_SOURCE_LIMITS.files)
|
|
62
|
+
invalid();
|
|
63
|
+
let textBytes = 0;
|
|
64
|
+
const normalized = changes.map((change: unknown) => {
|
|
65
|
+
const entry = record(change);
|
|
66
|
+
const hasText = Object.hasOwn(entry, "content_text");
|
|
67
|
+
if (hasText === Object.hasOwn(entry, "content_base64")) invalid();
|
|
68
|
+
const result = {
|
|
69
|
+
...entry,
|
|
70
|
+
executable: Object.hasOwn(entry, "executable") ? entry["executable"] : false,
|
|
71
|
+
} as Record<string, unknown>;
|
|
72
|
+
if (hasText) {
|
|
73
|
+
const text = entry["content_text"];
|
|
74
|
+
if (typeof text !== "string" || text.length > MANAGED_SOURCE_LIMITS.fileBytes) invalid();
|
|
75
|
+
const bytes = new TextEncoder().encode(text);
|
|
76
|
+
if (
|
|
77
|
+
bytes.byteLength > MANAGED_SOURCE_LIMITS.fileBytes ||
|
|
78
|
+
new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(bytes) !== text
|
|
79
|
+
)
|
|
80
|
+
invalid();
|
|
81
|
+
textBytes += bytes.byteLength;
|
|
82
|
+
// Bound allocations before producing a batch of encoded strings.
|
|
83
|
+
if (textBytes > MANAGED_SOURCE_LIMITS.uploadBytes) invalid();
|
|
84
|
+
result["content_base64"] = encodeBase64(bytes);
|
|
85
|
+
delete result["content_text"];
|
|
86
|
+
}
|
|
87
|
+
return result;
|
|
88
|
+
});
|
|
89
|
+
return parseManagedSourceRequest("changes", { ...body, changes: normalized });
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Validates the canonical source response before adding MCP-only presentation fields.
|
|
94
|
+
* Manifest and explicit base64 responses remain unchanged. Text mode replaces the
|
|
95
|
+
* payload with content_text only when strict UTF-8 decoding preserves every byte
|
|
96
|
+
* and contains no binary control characters. Otherwise it returns the original
|
|
97
|
+
* base64 payload and binary guidance.
|
|
98
|
+
*/
|
|
99
|
+
export function formatMcpSourceFileResponse(
|
|
100
|
+
value: unknown,
|
|
101
|
+
format: "text" | "base64" = "text",
|
|
102
|
+
): McpSourceFileReadResponse {
|
|
103
|
+
if (format !== "text" && format !== "base64") invalid();
|
|
104
|
+
assertManagedSourceResponse("files", value);
|
|
105
|
+
const response = value as ManagedSourceFiles | ManagedSourceFileResponse;
|
|
106
|
+
if (format === "base64" || !("file" in response)) return response;
|
|
107
|
+
const { content_base64, ...metadata } = response.file;
|
|
108
|
+
const bytes = Uint8Array.from(atob(content_base64), (character) => character.charCodeAt(0));
|
|
109
|
+
try {
|
|
110
|
+
const text = new TextDecoder("utf-8", { fatal: true, ignoreBOM: true }).decode(bytes);
|
|
111
|
+
if (
|
|
112
|
+
!bytes.some(
|
|
113
|
+
(byte) => (byte < 32 && byte !== 9 && byte !== 10 && byte !== 13) || byte === 127,
|
|
114
|
+
) &&
|
|
115
|
+
encodeBase64(new TextEncoder().encode(text)) === content_base64
|
|
116
|
+
) {
|
|
117
|
+
return {
|
|
118
|
+
commit_sha: response.commit_sha,
|
|
119
|
+
file: { ...metadata, content_text: text, encoding: "utf8" },
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
} catch {
|
|
123
|
+
// Non-UTF-8 files retain their canonical payload rather than replacement characters.
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
commit_sha: response.commit_sha,
|
|
127
|
+
file: {
|
|
128
|
+
...response.file,
|
|
129
|
+
encoding: "base64",
|
|
130
|
+
guidance:
|
|
131
|
+
"Binary file: preserve content_base64 and use content_base64 when writing this file.",
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function encodeBase64(bytes: Uint8Array): string {
|
|
137
|
+
let binary = "";
|
|
138
|
+
for (let offset = 0; offset < bytes.byteLength; offset += 32768)
|
|
139
|
+
binary += String.fromCharCode(...bytes.subarray(offset, offset + 32768));
|
|
140
|
+
return btoa(binary);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function record(value: unknown): Record<string, unknown> {
|
|
144
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) invalid();
|
|
145
|
+
return value as Record<string, unknown>;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function invalid(): never {
|
|
149
|
+
throw new TypeError("MCP source content is invalid");
|
|
150
|
+
}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
const failures = {
|
|
2
|
+
authorization_changed: [
|
|
3
|
+
"Authorization changed before this operation could finish.",
|
|
4
|
+
"Read the current project and sign-in status. Reconnect the client or ask the project owner to grant the required access, then submit a new request with a new idempotency key. This terminal operation cannot resume; preserve the project's existing data and deployment.",
|
|
5
|
+
],
|
|
6
|
+
source_commit_conflict: [
|
|
7
|
+
"Another source change was saved before this version could be committed.",
|
|
8
|
+
"Read the current source and compare it with this operation's original version. Merge both changes, then submit the combined files using the current commit and a new idempotency key. Do not overwrite the remote version or reuse this failed operation.",
|
|
9
|
+
],
|
|
10
|
+
source_snapshot_invalid: [
|
|
11
|
+
"The uploaded source did not match its complete verified manifest.",
|
|
12
|
+
"Capture a stable source snapshot and start a new upload with a new idempotency key. Verify every file hash, path and size, upload all selected files and seal the complete manifest before deployment. This failed upload cannot be published.",
|
|
13
|
+
],
|
|
14
|
+
source_upload_expired: [
|
|
15
|
+
"The source upload expired before it was committed.",
|
|
16
|
+
"Read the current source version, capture the intended files again and start a new upload with a new idempotency key. Complete every file upload and seal the manifest before expiry. The expired upload cannot be deployed.",
|
|
17
|
+
],
|
|
2
18
|
operation_abandoned: [
|
|
3
19
|
"ohmyho.st stopped this operation before it finished and ended it.",
|
|
4
20
|
"Repeating this operation cannot resume it. Read project status for what is live; if this operation names a deployment_id, read 'ohmyhost deployment logs --project PROJECT_ULID --deployment DEPLOYMENT_ULID --follow --json' or MCP deployment_logs. Then submit the request once more with a new idempotency key: a deployment, promotion, rollback or deletion from a fresh plan, a rename with the ETag from project status. If it ends the same way, report both operation IDs through feedback.",
|
|
@@ -66,7 +82,7 @@ const failures = {
|
|
|
66
82
|
],
|
|
67
83
|
build_failed: [
|
|
68
84
|
"The build did not produce a verified deployable artifact.",
|
|
69
|
-
"Read the BUILD_FAILED item of
|
|
85
|
+
"Read the BUILD_FAILED item of its deployment_id with 'ohmyhost deployment logs --project PROJECT_ULID --deployment DEPLOYMENT_ULID --follow --json' or MCP deployment_logs. Its excerpt shows install and build output: fix that error, save or push the corrected version and plan its commit. Without an excerpt the build printed nothing, passed the 8-minute limit or failed inside ohmyho.st: plan the same commit once more, and report the operation ID through feedback if it fails again.",
|
|
70
86
|
],
|
|
71
87
|
insufficient_organization_credits: [
|
|
72
88
|
"The organization does not have sufficient available credits for this operation.",
|
|
@@ -74,23 +90,23 @@ const failures = {
|
|
|
74
90
|
],
|
|
75
91
|
paid_plan_required: [
|
|
76
92
|
"Transactional mail requires an active Paid plan for this organization.",
|
|
77
|
-
"Ask the organization Owner to activate Paid through billing checkout; top-ups and signup credits do not activate it. Then plan the same deployment or promotion again. If the app should send no mail, instead set mail.enabled to false in ohmyhost.yaml,
|
|
93
|
+
"Ask the organization Owner to activate Paid through billing checkout; top-ups and signup credits do not activate it. Then plan the same deployment or promotion again. If the app should send no mail, instead set mail.enabled to false in ohmyhost.yaml, save or push the corrected version and plan its commit. Replaying this operation cannot enable mail. Do not reset the database.",
|
|
78
94
|
],
|
|
79
95
|
database_migration_failed: [
|
|
80
96
|
"The database migrations were not applied; none of this deployment's new migration files took effect.",
|
|
81
|
-
"Read the DATABASE_MIGRATION_FAILED item in 'ohmyhost deployment logs --project PROJECT_ULID --deployment DEPLOYMENT_ULID --follow --json' and fix what it names; run 'ohmyhost init --dry-run --json' for migration_sql_not_admitted. Keep applied files unchanged, give new files later timestamps, and add to existing tables only nullable columns without default and non-unique indexes.
|
|
97
|
+
"Read the DATABASE_MIGRATION_FAILED item in 'ohmyhost deployment logs --project PROJECT_ULID --deployment DEPLOYMENT_ULID --follow --json' and fix what it names; run 'ohmyhost init --dry-run --json' for migration_sql_not_admitted. Keep applied files unchanged, give new files later timestamps, and add to existing tables only nullable columns without default and non-unique indexes. Save or push the corrected version and plan its commit; never reset the database.",
|
|
82
98
|
],
|
|
83
99
|
runtime_candidate_failed: [
|
|
84
100
|
"The deployed candidate failed its runtime checks.",
|
|
85
|
-
"Read the HEALTH_CHECK_FAILED item with 'ohmyhost deployment logs --project PROJECT_ULID --deployment DEPLOYMENT_ULID --follow --json' or MCP deployment_logs. ohmyhost.yaml runtime.healthcheck (default /) must answer 2xx to a cookieless GET without redirect; status_code and, for owners, excerpt show the answer. After
|
|
101
|
+
"Read the HEALTH_CHECK_FAILED item with 'ohmyhost deployment logs --project PROJECT_ULID --deployment DEPLOYMENT_ULID --follow --json' or MCP deployment_logs. ohmyhost.yaml runtime.healthcheck (default /) must answer 2xx to a cookieless GET without redirect; status_code and, for owners, excerpt show the answer. After promotion or rollback, fix the environment's secrets and plan again; otherwise fix the app, save or push the corrected version and plan its commit. No item: plan once, then report.",
|
|
86
102
|
],
|
|
87
103
|
runtime_candidate_rejected: [
|
|
88
104
|
"The runtime refused to load the built Worker.",
|
|
89
|
-
"The built Worker could not be loaded: top-level code throws or calls fetch, timers or random values outside a handler, an import cannot be resolved, a Worker module such as src/ohmyhost/companion.ts has no default export, or the bundle is too large. Fix that, push and plan
|
|
105
|
+
"The built Worker could not be loaded: top-level code throws or calls fetch, timers or random values outside a handler, an import cannot be resolved, a Worker module such as src/ohmyhost/companion.ts has no default export, or the bundle is too large. Fix that, save or push the corrected version and plan its commit; replaying this operation cannot pass. If none of this applies, report the operation ID through feedback.",
|
|
90
106
|
],
|
|
91
107
|
storage_jurisdiction_conflict: [
|
|
92
108
|
"storage.jurisdiction must equal the project's hosting region.",
|
|
93
|
-
"Set storage.jurisdiction in ohmyhost.yaml to the project's region (us or eu) shown by 'ohmyhost project status',
|
|
109
|
+
"Set storage.jurisdiction in ohmyhost.yaml to the project's region (us or eu) shown by 'ohmyhost project status', save or push the corrected version, then plan its commit (for a promotion, deploy it to Dev and promote again); the unchanged commit fails again. A project cannot move its files between regions; do not delete or recreate the project to change it.",
|
|
94
110
|
],
|
|
95
111
|
provider_state_absent: [
|
|
96
112
|
"Reconciliation confirmed that the required deployment resources are absent.",
|
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
/** Canonical public status, retry policy and recovery text shared by the API and clients. */
|
|
2
2
|
export const PROBLEM_POLICY = {
|
|
3
|
+
source_generation_conflict: {
|
|
4
|
+
status: 409,
|
|
5
|
+
retryable: false,
|
|
6
|
+
action:
|
|
7
|
+
"Read the project's current source and generation, reconcile any source switch, then prepare a new request.",
|
|
8
|
+
title: "Source binding changed",
|
|
9
|
+
},
|
|
10
|
+
source_commit_conflict: {
|
|
11
|
+
status: 409,
|
|
12
|
+
retryable: false,
|
|
13
|
+
action:
|
|
14
|
+
"Read the current managed version and its changes, reconcile them with your working files, then publish against that exact commit.",
|
|
15
|
+
title: "Source version changed",
|
|
16
|
+
},
|
|
17
|
+
source_upload_conflict: {
|
|
18
|
+
status: 409,
|
|
19
|
+
retryable: false,
|
|
20
|
+
action:
|
|
21
|
+
"Read the existing upload and operation. Reuse a key only for its original request; complete its original manifest or start a new upload.",
|
|
22
|
+
title: "Source upload conflicts",
|
|
23
|
+
},
|
|
24
|
+
source_upload_expired: {
|
|
25
|
+
status: 409,
|
|
26
|
+
retryable: false,
|
|
27
|
+
action: "Start a fresh source upload and transfer the verified snapshot again.",
|
|
28
|
+
title: "Source upload expired",
|
|
29
|
+
},
|
|
30
|
+
source_scope_unavailable: {
|
|
31
|
+
status: 404,
|
|
32
|
+
retryable: false,
|
|
33
|
+
action: "Check the selected account, workspace, project and client permissions.",
|
|
34
|
+
title: "Source is unavailable",
|
|
35
|
+
},
|
|
36
|
+
source_snapshot_invalid: {
|
|
37
|
+
status: 409,
|
|
38
|
+
retryable: false,
|
|
39
|
+
action:
|
|
40
|
+
"Verify the source file contents, hashes and complete manifest before preparing a new upload.",
|
|
41
|
+
title: "Source snapshot is inconsistent",
|
|
42
|
+
},
|
|
43
|
+
source_snapshot_too_large: {
|
|
44
|
+
status: 413,
|
|
45
|
+
retryable: false,
|
|
46
|
+
action:
|
|
47
|
+
"Use safe repository-relative paths and a bounded source snapshot. Keep generated outputs and large media outside the source tree.",
|
|
48
|
+
title: "Source snapshot exceeds its limits",
|
|
49
|
+
},
|
|
3
50
|
cloudflare_zone_not_bound: {
|
|
4
51
|
status: 409,
|
|
5
52
|
retryable: false,
|
|
@@ -280,10 +327,10 @@ export const PROBLEM_POLICY = {
|
|
|
280
327
|
status: 409,
|
|
281
328
|
retryable: false,
|
|
282
329
|
action:
|
|
283
|
-
"Set storage.jurisdiction in ohmyhost.yaml to the project's region (us or eu) shown by 'ohmyhost project status',
|
|
330
|
+
"Set storage.jurisdiction in ohmyhost.yaml to the project's region (us or eu) shown by 'ohmyhost project status', save or push the corrected version, then plan its commit (for a promotion, deploy it to Dev and promote again); the unchanged commit fails again. A project cannot move its files between regions; do not delete or recreate the project to change it.",
|
|
284
331
|
title: "Storage jurisdiction conflict",
|
|
285
332
|
restAction:
|
|
286
|
-
"Set storage.jurisdiction in ohmyhost.yaml to the project's region (us or eu) shown by 'ohmyhost project status',
|
|
333
|
+
"Set storage.jurisdiction in ohmyhost.yaml to the project's region (us or eu) shown by 'ohmyhost project status', save or push the corrected version, then plan its commit (for a promotion, deploy it to Dev and promote again); the unchanged commit fails again. A project cannot move its files between regions; do not delete or recreate the project to change it.",
|
|
287
334
|
},
|
|
288
335
|
shared_data_requires_promotion: {
|
|
289
336
|
status: 409,
|
|
@@ -303,28 +350,28 @@ export const PROBLEM_POLICY = {
|
|
|
303
350
|
status: 409,
|
|
304
351
|
retryable: false,
|
|
305
352
|
action:
|
|
306
|
-
"Read detail for the file, reason and required change. Run ohmyhost init --dry-run --json at that commit, apply its blockers and the matching ohmyho.st framework Skill, then
|
|
353
|
+
"Read detail for the file, reason and required change. Run ohmyhost init --dry-run --json at that commit, apply its blockers and the matching ohmyho.st framework Skill, then save or push the corrected version. Plan its commit; repeating the unchanged source cannot fix an admission error.",
|
|
307
354
|
title: "Framework conversion required",
|
|
308
355
|
restAction:
|
|
309
|
-
"Read detail for the file, reason and required change. Run ohmyhost init --dry-run --json at that commit, apply its blockers and the matching ohmyho.st framework Skill, then
|
|
356
|
+
"Read detail for the file, reason and required change. Run ohmyhost init --dry-run --json at that commit, apply its blockers and the matching ohmyho.st framework Skill, then save or push the corrected version. Plan its commit; repeating the unchanged source cannot fix an admission error.",
|
|
310
357
|
},
|
|
311
358
|
repository_configuration_missing: {
|
|
312
359
|
status: 409,
|
|
313
360
|
retryable: false,
|
|
314
361
|
action:
|
|
315
|
-
"The planned commit has no ohmyhost.yaml at the Git repository root. If the repository has none, run 'ohmyhost init --json' at the root (--root DIR when the app lives in a subdirectory, --region eu for an EU project). Otherwise move the existing file to the root and set applicationRoot to the app directory, for example website.
|
|
362
|
+
"The planned commit has no ohmyhost.yaml at the Git repository root. If the repository has none, run 'ohmyhost init --json' at the root (--root DIR when the app lives in a subdirectory, --region eu for an EU project). Otherwise move the existing file to the root and set applicationRoot to the app directory, for example website. Save or push the corrected version, then plan its commit.",
|
|
316
363
|
title: "Repository configuration missing",
|
|
317
364
|
restAction:
|
|
318
|
-
"The planned commit has no ohmyhost.yaml at the Git repository root. If the repository has none, run 'ohmyhost init --json' at the root (--root DIR when the app lives in a subdirectory, --region eu for an EU project). Otherwise move the existing file to the root and set applicationRoot to the app directory, for example website.
|
|
365
|
+
"The planned commit has no ohmyhost.yaml at the Git repository root. If the repository has none, run 'ohmyhost init --json' at the root (--root DIR when the app lives in a subdirectory, --region eu for an EU project). Otherwise move the existing file to the root and set applicationRoot to the app directory, for example website. Save or push the corrected version, then plan its commit.",
|
|
319
366
|
},
|
|
320
367
|
migration_filename_noncanonical: {
|
|
321
368
|
status: 409,
|
|
322
369
|
retryable: false,
|
|
323
370
|
action:
|
|
324
|
-
"Every file in the migrations directory (database.migrations in ohmyhost.yaml) must be named YYYYMMDDHHMMSS_name.sql: 14 digits, an underscore, then lowercase letters, digits, _ or -. Rename each file that does not match and move any other file, such as README.md or .gitkeep, out of that directory.
|
|
371
|
+
"Every file in the migrations directory (database.migrations in ohmyhost.yaml) must be named YYYYMMDDHHMMSS_name.sql: 14 digits, an underscore, then lowercase letters, digits, _ or -. Rename each file that does not match and move any other file, such as README.md or .gitkeep, out of that directory. Save or push the corrected version, then plan its commit. Never rename a migration a deployment already applied.",
|
|
325
372
|
title: "Migration filename noncanonical",
|
|
326
373
|
restAction:
|
|
327
|
-
"Every file in the migrations directory (database.migrations in ohmyhost.yaml) must be named YYYYMMDDHHMMSS_name.sql: 14 digits, an underscore, then lowercase letters, digits, _ or -. Rename each file that does not match and move any other file, such as README.md or .gitkeep, out of that directory.
|
|
374
|
+
"Every file in the migrations directory (database.migrations in ohmyhost.yaml) must be named YYYYMMDDHHMMSS_name.sql: 14 digits, an underscore, then lowercase letters, digits, _ or -. Rename each file that does not match and move any other file, such as README.md or .gitkeep, out of that directory. Save or push the corrected version, then plan its commit. Never rename a migration a deployment already applied.",
|
|
328
375
|
},
|
|
329
376
|
environment_secret_mutation_blocked: {
|
|
330
377
|
status: 409,
|
|
@@ -336,10 +383,10 @@ export const PROBLEM_POLICY = {
|
|
|
336
383
|
status: 409,
|
|
337
384
|
retryable: false,
|
|
338
385
|
action:
|
|
339
|
-
"A Next.js file under app/, pages/, middleware or proxy imports a native addon (.node) or a Node.js module that does not run on Workers: child_process, cluster, dgram, domain, http2, inspector, readline, repl, sqlite, trace_events, tty, v8, vm, wasi, worker_threads or _stream_wrap, with or without node:. Remove or replace that import,
|
|
386
|
+
"A Next.js file under app/, pages/, middleware or proxy imports a native addon (.node) or a Node.js module that does not run on Workers: child_process, cluster, dgram, domain, http2, inspector, readline, repl, sqlite, trace_events, tty, v8, vm, wasi, worker_threads or _stream_wrap, with or without node:. Remove or replace that import, save or push the corrected version, then plan its commit.",
|
|
340
387
|
title: "Workers runtime incompatible",
|
|
341
388
|
restAction:
|
|
342
|
-
"A Next.js file under app/, pages/, middleware or proxy imports a native addon (.node) or a Node.js module that does not run on Workers: child_process, cluster, dgram, domain, http2, inspector, readline, repl, sqlite, trace_events, tty, v8, vm, wasi, worker_threads or _stream_wrap, with or without node:. Remove or replace that import,
|
|
389
|
+
"A Next.js file under app/, pages/, middleware or proxy imports a native addon (.node) or a Node.js module that does not run on Workers: child_process, cluster, dgram, domain, http2, inspector, readline, repl, sqlite, trace_events, tty, v8, vm, wasi, worker_threads or _stream_wrap, with or without node:. Remove or replace that import, save or push the corrected version, then plan its commit.",
|
|
343
390
|
},
|
|
344
391
|
payload_too_large: {
|
|
345
392
|
status: 413,
|
|
@@ -427,18 +474,18 @@ export const PROBLEM_POLICY = {
|
|
|
427
474
|
status: 503,
|
|
428
475
|
retryable: true,
|
|
429
476
|
action:
|
|
430
|
-
"The service could not complete or confirm this request; it may already have taken effect. Wait, then repeat exactly the same request with the same idempotency key, waiting longer each time; never switch to a new key. If 'ohmyhost plan' keeps failing, check that the commit is
|
|
477
|
+
"The service could not complete or confirm this request; it may already have taken effect. Wait, then repeat exactly the same request with the same idempotency key, waiting longer each time; never switch to a new key. If 'ohmyhost plan' keeps failing, check that the commit is saved in the project's selected source and that 'ohmyhost init --dry-run --json' at that commit reports no blockers. If it still fails, report the request_id through feedback.",
|
|
431
478
|
title: "Service unavailable",
|
|
432
479
|
restAction:
|
|
433
|
-
"The service could not complete or confirm this request; it may already have taken effect. Wait, then repeat exactly the same request with the same idempotency key, waiting longer each time; never switch to a new key. If 'ohmyhost plan' keeps failing, check that the commit is
|
|
480
|
+
"The service could not complete or confirm this request; it may already have taken effect. Wait, then repeat exactly the same request with the same idempotency key, waiting longer each time; never switch to a new key. If 'ohmyhost plan' keeps failing, check that the commit is saved in the project's selected source and that 'ohmyhost init --dry-run --json' at that commit reports no blockers. If it still fails, report the request_id through feedback.",
|
|
434
481
|
},
|
|
435
482
|
source_commit_not_found: {
|
|
436
483
|
status: 409,
|
|
437
484
|
retryable: false,
|
|
438
485
|
action:
|
|
439
|
-
"The requested commit is not in the linked repository.
|
|
486
|
+
"The requested commit is not in the linked repository. Save or push that exact version using the source named by project status, or select a version already there, then run 'ohmyhost plan' with its full SHA. Repeating the unchanged unavailable commit cannot work.",
|
|
440
487
|
restAction:
|
|
441
|
-
"The requested commit is not in the linked repository.
|
|
488
|
+
"The requested commit is not in the linked repository. Save or push that exact version using the source named by project status, or select a version already there, then run 'ohmyhost plan' with its full SHA. Repeating the unchanged unavailable commit cannot work.",
|
|
442
489
|
title: "Source commit not found",
|
|
443
490
|
},
|
|
444
491
|
domain_hostname_taken: {
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
export {
|
|
4
4
|
applyPaidProjectDomain,
|
|
5
5
|
changeDatabaseCompute,
|
|
6
|
+
changeManagedSource,
|
|
6
7
|
changeProjectHandle,
|
|
8
|
+
commitManagedSourceUpload,
|
|
7
9
|
completeCloudflareDnsAuthorization,
|
|
8
10
|
completeGithubSourceAuthorization,
|
|
9
11
|
configureBillingRecharge,
|
|
@@ -15,6 +17,7 @@ export {
|
|
|
15
17
|
createBillingPortal,
|
|
16
18
|
createCloudflareDnsAuthorization,
|
|
17
19
|
createDeployment,
|
|
20
|
+
createManagedSourceUpload,
|
|
18
21
|
createOrganization,
|
|
19
22
|
createProject,
|
|
20
23
|
createProjectDatabaseAccess,
|
|
@@ -26,6 +29,7 @@ export {
|
|
|
26
29
|
deleteManagedMailDomain,
|
|
27
30
|
deletePaidProjectDomain,
|
|
28
31
|
deleteProject,
|
|
32
|
+
diffManagedSource,
|
|
29
33
|
disableManagedMailReceiving,
|
|
30
34
|
ensureProjectDevShareLink,
|
|
31
35
|
getAccountProfile,
|
|
@@ -42,6 +46,7 @@ export {
|
|
|
42
46
|
getManagedMailAttachment,
|
|
43
47
|
getManagedMailDomain,
|
|
44
48
|
getManagedMailMessage,
|
|
49
|
+
getManagedSourceUpload,
|
|
45
50
|
getOperation,
|
|
46
51
|
getOrganizationAccount,
|
|
47
52
|
getOrganizationCredits,
|
|
@@ -58,12 +63,15 @@ export {
|
|
|
58
63
|
getProjectSourceAutoDeploy,
|
|
59
64
|
getProjectStatus,
|
|
60
65
|
getPublicDeploymentStats,
|
|
66
|
+
initializeManagedSource,
|
|
61
67
|
linkProjectSource,
|
|
62
68
|
listAuditEvents,
|
|
63
69
|
listDeployments,
|
|
64
70
|
listEnvironmentSecrets,
|
|
65
71
|
listFunctionRuns,
|
|
66
72
|
listManagedMailMessages,
|
|
73
|
+
listManagedSourceFiles,
|
|
74
|
+
listManagedSourceVersions,
|
|
67
75
|
listProjectDatabaseAccess,
|
|
68
76
|
listProjects,
|
|
69
77
|
listUserApiKeys,
|
|
@@ -77,10 +85,12 @@ export {
|
|
|
77
85
|
prepareManagedMailWebhook,
|
|
78
86
|
promoteDeployment,
|
|
79
87
|
putEnvironmentSecret,
|
|
88
|
+
putManagedSourceBlob,
|
|
80
89
|
queryProjectDatabase,
|
|
81
90
|
reconcileOperation,
|
|
82
91
|
recordSignupSource,
|
|
83
92
|
registerFeatureInterest,
|
|
93
|
+
restoreManagedSource,
|
|
84
94
|
retryManagedMailMessage,
|
|
85
95
|
revokeCurrentSession,
|
|
86
96
|
revokeProjectDatabaseAccess,
|
|
@@ -96,6 +106,7 @@ export {
|
|
|
96
106
|
streamOperationEvents,
|
|
97
107
|
submitContactRequest,
|
|
98
108
|
submitFeedback,
|
|
109
|
+
switchManagedSource,
|
|
99
110
|
verifyManagedMailWebhook,
|
|
100
111
|
writeProjectDatabase,
|
|
101
112
|
} from "./sdk.gen.js";
|
|
@@ -120,6 +131,11 @@ export type {
|
|
|
120
131
|
ChangeDatabaseComputeErrors,
|
|
121
132
|
ChangeDatabaseComputeResponse,
|
|
122
133
|
ChangeDatabaseComputeResponses,
|
|
134
|
+
ChangeManagedSourceData,
|
|
135
|
+
ChangeManagedSourceError,
|
|
136
|
+
ChangeManagedSourceErrors,
|
|
137
|
+
ChangeManagedSourceResponse,
|
|
138
|
+
ChangeManagedSourceResponses,
|
|
123
139
|
ChangeProjectHandleData,
|
|
124
140
|
ChangeProjectHandleError,
|
|
125
141
|
ChangeProjectHandleErrors,
|
|
@@ -128,6 +144,12 @@ export type {
|
|
|
128
144
|
ClientOptions,
|
|
129
145
|
CloudflareDnsAuthorization,
|
|
130
146
|
CloudflareDnsAuthorizationStatus,
|
|
147
|
+
CommitManagedSourceUploadData,
|
|
148
|
+
CommitManagedSourceUploadError,
|
|
149
|
+
CommitManagedSourceUploadErrors,
|
|
150
|
+
CommitManagedSourceUploadResponse,
|
|
151
|
+
CommitManagedSourceUploadResponses,
|
|
152
|
+
CommitSha,
|
|
131
153
|
CompleteCloudflareDnsAuthorizationData,
|
|
132
154
|
CompleteCloudflareDnsAuthorizationError,
|
|
133
155
|
CompleteCloudflareDnsAuthorizationErrors,
|
|
@@ -188,6 +210,11 @@ export type {
|
|
|
188
210
|
CreateDeploymentRequest,
|
|
189
211
|
CreateDeploymentResponse,
|
|
190
212
|
CreateDeploymentResponses,
|
|
213
|
+
CreateManagedSourceUploadData,
|
|
214
|
+
CreateManagedSourceUploadError,
|
|
215
|
+
CreateManagedSourceUploadErrors,
|
|
216
|
+
CreateManagedSourceUploadResponse,
|
|
217
|
+
CreateManagedSourceUploadResponses,
|
|
191
218
|
CreateOrganizationData,
|
|
192
219
|
CreateOrganizationError,
|
|
193
220
|
CreateOrganizationErrors,
|
|
@@ -262,6 +289,11 @@ export type {
|
|
|
262
289
|
DeploymentPlanWritable,
|
|
263
290
|
DevAccessState,
|
|
264
291
|
DevAccessTicket,
|
|
292
|
+
DiffManagedSourceData,
|
|
293
|
+
DiffManagedSourceError,
|
|
294
|
+
DiffManagedSourceErrors,
|
|
295
|
+
DiffManagedSourceResponse,
|
|
296
|
+
DiffManagedSourceResponses,
|
|
265
297
|
DisableManagedMailReceivingData,
|
|
266
298
|
DisableManagedMailReceivingError,
|
|
267
299
|
DisableManagedMailReceivingErrors,
|
|
@@ -354,6 +386,11 @@ export type {
|
|
|
354
386
|
GetManagedMailMessageErrors,
|
|
355
387
|
GetManagedMailMessageResponse,
|
|
356
388
|
GetManagedMailMessageResponses,
|
|
389
|
+
GetManagedSourceUploadData,
|
|
390
|
+
GetManagedSourceUploadError,
|
|
391
|
+
GetManagedSourceUploadErrors,
|
|
392
|
+
GetManagedSourceUploadResponse,
|
|
393
|
+
GetManagedSourceUploadResponses,
|
|
357
394
|
GetOperationData,
|
|
358
395
|
GetOperationError,
|
|
359
396
|
GetOperationErrors,
|
|
@@ -438,12 +475,19 @@ export type {
|
|
|
438
475
|
GithubConnectionAuthorization,
|
|
439
476
|
GithubOrganizationConnection,
|
|
440
477
|
GithubOrganizationConnectionStatus,
|
|
478
|
+
GithubProjectSource,
|
|
441
479
|
GithubSourceAuthorization,
|
|
480
|
+
GithubSourceBinding,
|
|
442
481
|
GuardedActionPlan,
|
|
443
482
|
HostingRegion,
|
|
444
483
|
IdempotencyConflictProblem,
|
|
445
484
|
IdempotencyKey,
|
|
446
485
|
IfMatch,
|
|
486
|
+
InitializeManagedSourceData,
|
|
487
|
+
InitializeManagedSourceError,
|
|
488
|
+
InitializeManagedSourceErrors,
|
|
489
|
+
InitializeManagedSourceResponse,
|
|
490
|
+
InitializeManagedSourceResponses,
|
|
447
491
|
LinkProjectSourceData,
|
|
448
492
|
LinkProjectSourceError,
|
|
449
493
|
LinkProjectSourceErrors,
|
|
@@ -475,6 +519,16 @@ export type {
|
|
|
475
519
|
ListManagedMailMessagesErrors,
|
|
476
520
|
ListManagedMailMessagesResponse,
|
|
477
521
|
ListManagedMailMessagesResponses,
|
|
522
|
+
ListManagedSourceFilesData,
|
|
523
|
+
ListManagedSourceFilesError,
|
|
524
|
+
ListManagedSourceFilesErrors,
|
|
525
|
+
ListManagedSourceFilesResponse,
|
|
526
|
+
ListManagedSourceFilesResponses,
|
|
527
|
+
ListManagedSourceVersionsData,
|
|
528
|
+
ListManagedSourceVersionsError,
|
|
529
|
+
ListManagedSourceVersionsErrors,
|
|
530
|
+
ListManagedSourceVersionsResponse,
|
|
531
|
+
ListManagedSourceVersionsResponses,
|
|
478
532
|
ListProjectDatabaseAccessData,
|
|
479
533
|
ListProjectDatabaseAccessError,
|
|
480
534
|
ListProjectDatabaseAccessErrors,
|
|
@@ -502,6 +556,22 @@ export type {
|
|
|
502
556
|
ManagedMailRetryResult,
|
|
503
557
|
ManagedMailWebhook,
|
|
504
558
|
ManagedMailWebhookRequest,
|
|
559
|
+
ManagedProjectSource,
|
|
560
|
+
ManagedSourceBlobRequest,
|
|
561
|
+
ManagedSourceChangesRequest,
|
|
562
|
+
ManagedSourceDiff,
|
|
563
|
+
ManagedSourceFileResponse,
|
|
564
|
+
ManagedSourceFiles,
|
|
565
|
+
ManagedSourceFilesResponse,
|
|
566
|
+
ManagedSourceFinalizeRequest,
|
|
567
|
+
ManagedSourceInitializeRequest,
|
|
568
|
+
ManagedSourcePath,
|
|
569
|
+
ManagedSourceRestoreRequest,
|
|
570
|
+
ManagedSourceSwitchRequest,
|
|
571
|
+
ManagedSourceUploadReceipt,
|
|
572
|
+
ManagedSourceUploadRequest,
|
|
573
|
+
ManagedSourceVersions,
|
|
574
|
+
NullableCommitSha,
|
|
505
575
|
Operation,
|
|
506
576
|
OperationDeploymentProgress,
|
|
507
577
|
OperationEvent,
|
|
@@ -581,6 +651,8 @@ export type {
|
|
|
581
651
|
ProjectNotesReceipt,
|
|
582
652
|
ProjectPage,
|
|
583
653
|
ProjectSource,
|
|
654
|
+
ProjectSourceBinding,
|
|
655
|
+
ProjectSourceResponse,
|
|
584
656
|
ProjectStatus,
|
|
585
657
|
PromoteDeploymentData,
|
|
586
658
|
PromoteDeploymentError,
|
|
@@ -595,6 +667,11 @@ export type {
|
|
|
595
667
|
PutEnvironmentSecretRequest,
|
|
596
668
|
PutEnvironmentSecretResponse,
|
|
597
669
|
PutEnvironmentSecretResponses,
|
|
670
|
+
PutManagedSourceBlobData,
|
|
671
|
+
PutManagedSourceBlobError,
|
|
672
|
+
PutManagedSourceBlobErrors,
|
|
673
|
+
PutManagedSourceBlobResponse,
|
|
674
|
+
PutManagedSourceBlobResponses,
|
|
598
675
|
QueryProjectDatabaseData,
|
|
599
676
|
QueryProjectDatabaseError,
|
|
600
677
|
QueryProjectDatabaseErrors,
|
|
@@ -616,6 +693,11 @@ export type {
|
|
|
616
693
|
RegisterFeatureInterestResponse,
|
|
617
694
|
RegisterFeatureInterestResponses,
|
|
618
695
|
RequestId,
|
|
696
|
+
RestoreManagedSourceData,
|
|
697
|
+
RestoreManagedSourceError,
|
|
698
|
+
RestoreManagedSourceErrors,
|
|
699
|
+
RestoreManagedSourceResponse,
|
|
700
|
+
RestoreManagedSourceResponses,
|
|
619
701
|
RetryManagedMailMessageData,
|
|
620
702
|
RetryManagedMailMessageError,
|
|
621
703
|
RetryManagedMailMessageErrors,
|
|
@@ -677,7 +759,12 @@ export type {
|
|
|
677
759
|
SetProjectPoweredByFlagResponses,
|
|
678
760
|
Sha256Digest,
|
|
679
761
|
SourceAutoDeploy,
|
|
762
|
+
SourceContentBase64,
|
|
680
763
|
SourceDeploymentId,
|
|
764
|
+
SourceGeneration,
|
|
765
|
+
SourceManifest,
|
|
766
|
+
SourceManifestFile,
|
|
767
|
+
SourceMessage,
|
|
681
768
|
StreamDeploymentLogsData,
|
|
682
769
|
StreamDeploymentLogsError,
|
|
683
770
|
StreamDeploymentLogsErrors,
|
|
@@ -698,6 +785,11 @@ export type {
|
|
|
698
785
|
SubmitFeedbackErrors,
|
|
699
786
|
SubmitFeedbackResponse,
|
|
700
787
|
SubmitFeedbackResponses,
|
|
788
|
+
SwitchManagedSourceData,
|
|
789
|
+
SwitchManagedSourceError,
|
|
790
|
+
SwitchManagedSourceErrors,
|
|
791
|
+
SwitchManagedSourceResponse,
|
|
792
|
+
SwitchManagedSourceResponses,
|
|
701
793
|
TargetDeploymentId,
|
|
702
794
|
Ulid,
|
|
703
795
|
UsageTotal,
|