@amerged/ohmyhost-mcp 0.1.49 → 0.1.50
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-GLPFLQD6.js → chunk-MYCLNNZ7.js} +5 -5
- package/dist/index.js +1 -1
- package/dist/stdio-main.js +555 -5
- package/package.json +1 -1
- package/src/apps/mcp/package.json +1 -1
- package/src/apps/mcp/src/local-client.ts +5 -0
- package/src/apps/mcp/src/local-server.ts +307 -1
- package/src/apps/product-cli/package.json +1 -1
- package/src/apps/product-cli/src/cli.ts +22 -0
- package/src/apps/product-cli/src/command.ts +235 -0
- package/src/apps/product-cli/src/composition.ts +7 -2
- package/src/apps/product-cli/src/index.ts +1 -0
- package/src/apps/product-cli/src/native-auth.ts +172 -0
- package/src/apps/product-cli/src/product-api.ts +6 -0
- package/src/packages/agent-skills/src/generated-skill-resources.ts +4 -4
- package/src/packages/contracts/package.json +5 -0
- package/src/packages/contracts/src/framework-admission.ts +5 -0
- package/src/packages/contracts/src/framework-source-rules.ts +9 -0
- package/src/packages/contracts/src/index.ts +1 -1
- package/src/packages/contracts/src/native-auth.ts +158 -0
- package/src/packages/contracts/src/problem-policy.ts +8 -1
- package/src/packages/contracts/src/project-exports.ts +11 -3
- package/src/packages/sdk-ts/package.json +1 -1
- package/src/packages/sdk-ts/src/generated/index.ts +81 -0
- package/src/packages/sdk-ts/src/generated/sdk.gen.ts +604 -0
- package/src/packages/sdk-ts/src/generated/types.gen.ts +995 -4
package/dist/index.js
CHANGED
package/dist/stdio-main.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
serverIdentityOf,
|
|
31
31
|
setNegotiatedProtocolVersion,
|
|
32
32
|
validateEnvelopeMeta
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-MYCLNNZ7.js";
|
|
34
34
|
|
|
35
35
|
// node_modules/.pnpm/ignore@7.0.12/node_modules/ignore/index.js
|
|
36
36
|
var require_ignore = __commonJS({
|
|
@@ -24019,6 +24019,10 @@ var BUILD_FRAMEWORKS = Object.freeze([
|
|
|
24019
24019
|
var PUSH_AND_PLAN = "Commit and push the change, then plan the new commit.";
|
|
24020
24020
|
var VITE_BUILD_SCRIPT = '"vite build", optionally joined with && to one "tsc", "tsc -b", "tsc --build" or "tsc --noEmit" stage';
|
|
24021
24021
|
var FRAMEWORK_CONVERSION_DETAILS = Object.freeze({
|
|
24022
|
+
native_auth_route_conflict: {
|
|
24023
|
+
paths: ["module"],
|
|
24024
|
+
template: '"{{path}}" declares a route in the reserved /api/auth/v1 namespace. Move the route or select a different authentication provider. Commit and push the change, then plan the new commit.'
|
|
24025
|
+
},
|
|
24022
24026
|
astro_template_import_unsupported: {
|
|
24023
24027
|
paths: ["module"],
|
|
24024
24028
|
template: '"{{path}}" uses a dynamic import, import.meta or require in an Astro template. Move server imports into frontmatter and dynamic browser imports into a normal statically imported browser module, then commit and push the change and plan the new commit.'
|
|
@@ -25688,7 +25692,7 @@ var PROBLEM_POLICY = {
|
|
|
25688
25692
|
project_rename_blocked: {
|
|
25689
25693
|
status: 409,
|
|
25690
25694
|
retryable: true,
|
|
25691
|
-
action: "
|
|
25695
|
+
action: "Read project status and finish or retry any pending Native Auth deployment or other operation. Once preparation is complete, read the project again and rename with its current ETag.",
|
|
25692
25696
|
title: "Project address change blocked"
|
|
25693
25697
|
},
|
|
25694
25698
|
project_identity_unavailable: {
|
|
@@ -25947,6 +25951,12 @@ var PROBLEM_POLICY = {
|
|
|
25947
25951
|
retryable: false,
|
|
25948
25952
|
title: "Remove the project domain first",
|
|
25949
25953
|
action: "This project still has a live or pending custom-domain connection. Read 'ohmyhost domain paid status --project ULID --json', remove that connection with 'ohmyhost domain paid delete --project ULID --hostname HOST --yes --json', then create a fresh project deletion plan. Repeating while it remains connected cannot work."
|
|
25954
|
+
},
|
|
25955
|
+
native_domain_sync_pending: {
|
|
25956
|
+
status: 409,
|
|
25957
|
+
retryable: false,
|
|
25958
|
+
title: "Complete the pending domain change",
|
|
25959
|
+
action: "Read project status and Paid domain status to identify the pending change. If a Paid domain removal is pending, retry it as a current owner with a new idempotency key. If a project address change is pending, submit a fresh address change as a current owner. After it finishes, create a new project deletion plan."
|
|
25950
25960
|
}
|
|
25951
25961
|
};
|
|
25952
25962
|
|
|
@@ -27413,7 +27423,7 @@ function exact4(value, keys) {
|
|
|
27413
27423
|
// apps/product-cli/package.json
|
|
27414
27424
|
var package_default2 = {
|
|
27415
27425
|
name: "@ohmyhost/product-cli",
|
|
27416
|
-
version: "0.1.
|
|
27426
|
+
version: "0.1.50",
|
|
27417
27427
|
private: true,
|
|
27418
27428
|
ohmyhost: {
|
|
27419
27429
|
deployment: "production",
|
|
@@ -27523,7 +27533,17 @@ function assertProjectExport(value) {
|
|
|
27523
27533
|
invalid4();
|
|
27524
27534
|
return;
|
|
27525
27535
|
}
|
|
27526
|
-
if (value["state"] !== "succeeded" || !record6(archive) || Object.keys(archive).sort().join(",") !== "bytes,captured_at,download_expires_at,download_url,expires_at,sha256,sql_files" || !Number.isSafeInteger(archive["bytes"]) || Number(archive["bytes"]) < 1 || Number(archive["bytes"]) > 536870912 || typeof archive["sha256"] !== "string" || !/^sha256:[a-f0-9]{64}$/u.test(archive["sha256"]) || ![
|
|
27536
|
+
if (value["state"] !== "succeeded" || !record6(archive) || Object.keys(archive).sort().join(",") !== "bytes,captured_at,download_expires_at,download_url,expires_at,sha256,sql_files" || !Number.isSafeInteger(archive["bytes"]) || Number(archive["bytes"]) < 1 || Number(archive["bytes"]) > 536870912 || typeof archive["sha256"] !== "string" || !/^sha256:[a-f0-9]{64}$/u.test(archive["sha256"]) || ![
|
|
27537
|
+
'["dev.sql"]',
|
|
27538
|
+
'["prod.sql"]',
|
|
27539
|
+
'["dev.sql","prod.sql"]',
|
|
27540
|
+
'["shared.sql"]',
|
|
27541
|
+
'["auth.sql"]',
|
|
27542
|
+
'["dev.sql","auth.sql"]',
|
|
27543
|
+
'["prod.sql","auth.sql"]',
|
|
27544
|
+
'["dev.sql","prod.sql","auth.sql"]',
|
|
27545
|
+
'["shared.sql","auth.sql"]'
|
|
27546
|
+
].includes(JSON.stringify(archive["sql_files"])) || !timestamp5(archive["captured_at"]) || !timestamp5(archive["expires_at"]))
|
|
27527
27547
|
invalid4();
|
|
27528
27548
|
if (archive["download_url"] === null) {
|
|
27529
27549
|
if (archive["download_expires_at"] !== null)
|
|
@@ -28027,6 +28047,41 @@ function onlyKeys(value, allowed) {
|
|
|
28027
28047
|
return Object.keys(value).every((key) => allowed.includes(key));
|
|
28028
28048
|
}
|
|
28029
28049
|
|
|
28050
|
+
// packages/contracts/dist/native-auth.js
|
|
28051
|
+
var NATIVE_AUTH_DEFAULT_REDIRECT_PATHS = Object.freeze([
|
|
28052
|
+
"/",
|
|
28053
|
+
"/login",
|
|
28054
|
+
"/reset-password",
|
|
28055
|
+
"/accept-invitation"
|
|
28056
|
+
]);
|
|
28057
|
+
function isNativeAuthRedirectPath(value) {
|
|
28058
|
+
return typeof value === "string" && value.length <= 256 && /^\/[A-Za-z0-9/_~.-]*$/u.test(value) && !value.includes("//") && !value.split("/").some((segment) => segment === "." || segment === "..");
|
|
28059
|
+
}
|
|
28060
|
+
var PUBLIC_ROUTES = Object.freeze({
|
|
28061
|
+
GET: Object.freeze([
|
|
28062
|
+
"/get-session",
|
|
28063
|
+
"/verify-email",
|
|
28064
|
+
"/callback/google",
|
|
28065
|
+
"/callback/github",
|
|
28066
|
+
"/list-accounts"
|
|
28067
|
+
]),
|
|
28068
|
+
POST: Object.freeze([
|
|
28069
|
+
"/sign-up/email",
|
|
28070
|
+
"/sign-in/email",
|
|
28071
|
+
"/sign-in/social",
|
|
28072
|
+
"/sign-out",
|
|
28073
|
+
"/request-password-reset",
|
|
28074
|
+
"/reset-password",
|
|
28075
|
+
"/change-password",
|
|
28076
|
+
"/send-verification-email",
|
|
28077
|
+
"/link-social",
|
|
28078
|
+
"/unlink-account",
|
|
28079
|
+
"/accept-invitation",
|
|
28080
|
+
"/reauthenticate",
|
|
28081
|
+
"/enroll-recovery"
|
|
28082
|
+
])
|
|
28083
|
+
});
|
|
28084
|
+
|
|
28030
28085
|
// packages/workos-auth-contracts/dist/user-api-keys.js
|
|
28031
28086
|
var WORKOS_USER_API_KEY_PATTERN = /^sk_[A-Za-z0-9_-]{20,128}$/u;
|
|
28032
28087
|
|
|
@@ -28745,6 +28800,7 @@ var HELP_USAGE = Object.freeze({
|
|
|
28745
28800
|
"secret list": "ohmyhost secret list --project ULID --environment ENVIRONMENT_ULID --json",
|
|
28746
28801
|
"function runs": "ohmyhost function runs --project ULID --environment ENVIRONMENT_ULID [--limit 1-100] --json",
|
|
28747
28802
|
"secret set": `printf '%s' "$SECRET_VALUE" | ohmyhost secret set NAME --project ULID --environment ENVIRONMENT_ULID --idempotency-key KEY [--profile-user USER_ID --profile-organization ULID | --token-user USER_ID --token-organization ULID] --stdin [--wait] --json (with --profile-user and --profile-organization the saved login that runs it must belong to that user and organization; with --token-user and --token-organization it runs only with an OHMYHOST_TOKEN of that user and organization, never with a saved login)`,
|
|
28803
|
+
auth: "ohmyhost auth config get|set --project ULID --environment ULID [--revision N --enabled true|false --signup-policy open|invite-only --application-name NAME --idempotency-key KEY] [--canonical-origin URL|primary] [--allowed-redirect-paths JSON_ARRAY --reset-password-path PATH --invitation-path PATH]; auth provider get|set --project ULID --environment ULID --provider google|github [--revision N --enabled true|false --client-id ID --idempotency-key KEY --stdin]; auth users list --project ULID --environment ULID [--limit N --cursor CURSOR --search TEXT]; auth user create|get|delete|invite|suspend|reactivate|revoke-sessions --project ULID --environment ULID [--email EMAIL | --user UUID] [--idempotency-key KEY]. Provider secrets are read only from stdin; use --json.",
|
|
28748
28804
|
"secret delete": "ohmyhost secret delete NAME --project ULID --environment ENVIRONMENT_ULID --idempotency-key KEY [--wait] --json",
|
|
28749
28805
|
"mail workspace list": "ohmyhost mail workspace list --organization ULID --json",
|
|
28750
28806
|
"mail workspace create": "ohmyhost mail workspace create --organization ULID --domain DOMAIN --sending true --idempotency-key KEY --json",
|
|
@@ -29623,6 +29679,259 @@ var createClient = (config = {}) => {
|
|
|
29623
29679
|
var client = createClient(createConfig({ throwOnError: true }));
|
|
29624
29680
|
|
|
29625
29681
|
// packages/sdk-ts/dist/generated/sdk.gen.js
|
|
29682
|
+
var getNativeAuthConfiguration = (parameters, options) => {
|
|
29683
|
+
const params = buildClientParams([parameters], [
|
|
29684
|
+
{
|
|
29685
|
+
args: [
|
|
29686
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
29687
|
+
{ in: "path", key: "project_id" },
|
|
29688
|
+
{ in: "path", key: "environment_id" }
|
|
29689
|
+
]
|
|
29690
|
+
}
|
|
29691
|
+
]);
|
|
29692
|
+
return (options?.client ?? client).get({
|
|
29693
|
+
responseStyle: "data",
|
|
29694
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
29695
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/auth",
|
|
29696
|
+
...options,
|
|
29697
|
+
...params
|
|
29698
|
+
});
|
|
29699
|
+
};
|
|
29700
|
+
var updateNativeAuthConfiguration = (parameters, options) => {
|
|
29701
|
+
const params = buildClientParams([parameters], [
|
|
29702
|
+
{
|
|
29703
|
+
args: [
|
|
29704
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
29705
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
29706
|
+
{ in: "path", key: "project_id" },
|
|
29707
|
+
{ in: "path", key: "environment_id" },
|
|
29708
|
+
{ key: "nativeAuthConfigurationUpdate", map: "body" }
|
|
29709
|
+
]
|
|
29710
|
+
}
|
|
29711
|
+
]);
|
|
29712
|
+
return (options?.client ?? client).put({
|
|
29713
|
+
responseStyle: "data",
|
|
29714
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
29715
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/auth",
|
|
29716
|
+
...options,
|
|
29717
|
+
...params,
|
|
29718
|
+
headers: {
|
|
29719
|
+
"Content-Type": "application/json",
|
|
29720
|
+
...options?.headers,
|
|
29721
|
+
...params.headers
|
|
29722
|
+
}
|
|
29723
|
+
});
|
|
29724
|
+
};
|
|
29725
|
+
var getNativeAuthProvider = (parameters, options) => {
|
|
29726
|
+
const params = buildClientParams([parameters], [
|
|
29727
|
+
{
|
|
29728
|
+
args: [
|
|
29729
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
29730
|
+
{ in: "path", key: "project_id" },
|
|
29731
|
+
{ in: "path", key: "environment_id" },
|
|
29732
|
+
{ in: "path", key: "provider" }
|
|
29733
|
+
]
|
|
29734
|
+
}
|
|
29735
|
+
]);
|
|
29736
|
+
return (options?.client ?? client).get({
|
|
29737
|
+
responseStyle: "data",
|
|
29738
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
29739
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/auth/providers/{provider}",
|
|
29740
|
+
...options,
|
|
29741
|
+
...params
|
|
29742
|
+
});
|
|
29743
|
+
};
|
|
29744
|
+
var updateNativeAuthProvider = (parameters, options) => {
|
|
29745
|
+
const params = buildClientParams([parameters], [
|
|
29746
|
+
{
|
|
29747
|
+
args: [
|
|
29748
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
29749
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
29750
|
+
{ in: "path", key: "project_id" },
|
|
29751
|
+
{ in: "path", key: "environment_id" },
|
|
29752
|
+
{ in: "path", key: "provider" },
|
|
29753
|
+
{ key: "nativeAuthProviderUpdateWritable", map: "body" }
|
|
29754
|
+
]
|
|
29755
|
+
}
|
|
29756
|
+
]);
|
|
29757
|
+
return (options?.client ?? client).put({
|
|
29758
|
+
responseStyle: "data",
|
|
29759
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
29760
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/auth/providers/{provider}",
|
|
29761
|
+
...options,
|
|
29762
|
+
...params,
|
|
29763
|
+
headers: {
|
|
29764
|
+
"Content-Type": "application/json",
|
|
29765
|
+
...options?.headers,
|
|
29766
|
+
...params.headers
|
|
29767
|
+
}
|
|
29768
|
+
});
|
|
29769
|
+
};
|
|
29770
|
+
var listNativeAuthUsers = (parameters, options) => {
|
|
29771
|
+
const params = buildClientParams([parameters], [
|
|
29772
|
+
{
|
|
29773
|
+
args: [
|
|
29774
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
29775
|
+
{ in: "path", key: "project_id" },
|
|
29776
|
+
{ in: "path", key: "environment_id" },
|
|
29777
|
+
{ in: "query", key: "limit" },
|
|
29778
|
+
{ in: "query", key: "cursor" },
|
|
29779
|
+
{ in: "query", key: "search" }
|
|
29780
|
+
]
|
|
29781
|
+
}
|
|
29782
|
+
]);
|
|
29783
|
+
return (options?.client ?? client).get({
|
|
29784
|
+
responseStyle: "data",
|
|
29785
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
29786
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/auth/users",
|
|
29787
|
+
...options,
|
|
29788
|
+
...params
|
|
29789
|
+
});
|
|
29790
|
+
};
|
|
29791
|
+
var createNativeAuthUser = (parameters, options) => {
|
|
29792
|
+
const params = buildClientParams([parameters], [
|
|
29793
|
+
{
|
|
29794
|
+
args: [
|
|
29795
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
29796
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
29797
|
+
{ in: "path", key: "project_id" },
|
|
29798
|
+
{ in: "path", key: "environment_id" },
|
|
29799
|
+
{ key: "nativeAuthUserCreate", map: "body" }
|
|
29800
|
+
]
|
|
29801
|
+
}
|
|
29802
|
+
]);
|
|
29803
|
+
return (options?.client ?? client).post({
|
|
29804
|
+
responseStyle: "data",
|
|
29805
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
29806
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/auth/users",
|
|
29807
|
+
...options,
|
|
29808
|
+
...params,
|
|
29809
|
+
headers: {
|
|
29810
|
+
"Content-Type": "application/json",
|
|
29811
|
+
...options?.headers,
|
|
29812
|
+
...params.headers
|
|
29813
|
+
}
|
|
29814
|
+
});
|
|
29815
|
+
};
|
|
29816
|
+
var deleteNativeAuthUser = (parameters, options) => {
|
|
29817
|
+
const params = buildClientParams([parameters], [
|
|
29818
|
+
{
|
|
29819
|
+
args: [
|
|
29820
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
29821
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
29822
|
+
{ in: "path", key: "project_id" },
|
|
29823
|
+
{ in: "path", key: "environment_id" },
|
|
29824
|
+
{ in: "path", key: "user_id" }
|
|
29825
|
+
]
|
|
29826
|
+
}
|
|
29827
|
+
]);
|
|
29828
|
+
return (options?.client ?? client).delete({
|
|
29829
|
+
responseStyle: "data",
|
|
29830
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
29831
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/auth/users/{user_id}",
|
|
29832
|
+
...options,
|
|
29833
|
+
...params
|
|
29834
|
+
});
|
|
29835
|
+
};
|
|
29836
|
+
var getNativeAuthUser = (parameters, options) => {
|
|
29837
|
+
const params = buildClientParams([parameters], [
|
|
29838
|
+
{
|
|
29839
|
+
args: [
|
|
29840
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
29841
|
+
{ in: "path", key: "project_id" },
|
|
29842
|
+
{ in: "path", key: "environment_id" },
|
|
29843
|
+
{ in: "path", key: "user_id" }
|
|
29844
|
+
]
|
|
29845
|
+
}
|
|
29846
|
+
]);
|
|
29847
|
+
return (options?.client ?? client).get({
|
|
29848
|
+
responseStyle: "data",
|
|
29849
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
29850
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/auth/users/{user_id}",
|
|
29851
|
+
...options,
|
|
29852
|
+
...params
|
|
29853
|
+
});
|
|
29854
|
+
};
|
|
29855
|
+
var resendNativeAuthInvitation = (parameters, options) => {
|
|
29856
|
+
const params = buildClientParams([parameters], [
|
|
29857
|
+
{
|
|
29858
|
+
args: [
|
|
29859
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
29860
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
29861
|
+
{ in: "path", key: "project_id" },
|
|
29862
|
+
{ in: "path", key: "environment_id" },
|
|
29863
|
+
{ in: "path", key: "user_id" }
|
|
29864
|
+
]
|
|
29865
|
+
}
|
|
29866
|
+
]);
|
|
29867
|
+
return (options?.client ?? client).post({
|
|
29868
|
+
responseStyle: "data",
|
|
29869
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
29870
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/auth/users/{user_id}/invite",
|
|
29871
|
+
...options,
|
|
29872
|
+
...params
|
|
29873
|
+
});
|
|
29874
|
+
};
|
|
29875
|
+
var suspendNativeAuthUser = (parameters, options) => {
|
|
29876
|
+
const params = buildClientParams([parameters], [
|
|
29877
|
+
{
|
|
29878
|
+
args: [
|
|
29879
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
29880
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
29881
|
+
{ in: "path", key: "project_id" },
|
|
29882
|
+
{ in: "path", key: "environment_id" },
|
|
29883
|
+
{ in: "path", key: "user_id" }
|
|
29884
|
+
]
|
|
29885
|
+
}
|
|
29886
|
+
]);
|
|
29887
|
+
return (options?.client ?? client).post({
|
|
29888
|
+
responseStyle: "data",
|
|
29889
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
29890
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/auth/users/{user_id}/suspend",
|
|
29891
|
+
...options,
|
|
29892
|
+
...params
|
|
29893
|
+
});
|
|
29894
|
+
};
|
|
29895
|
+
var reactivateNativeAuthUser = (parameters, options) => {
|
|
29896
|
+
const params = buildClientParams([parameters], [
|
|
29897
|
+
{
|
|
29898
|
+
args: [
|
|
29899
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
29900
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
29901
|
+
{ in: "path", key: "project_id" },
|
|
29902
|
+
{ in: "path", key: "environment_id" },
|
|
29903
|
+
{ in: "path", key: "user_id" }
|
|
29904
|
+
]
|
|
29905
|
+
}
|
|
29906
|
+
]);
|
|
29907
|
+
return (options?.client ?? client).post({
|
|
29908
|
+
responseStyle: "data",
|
|
29909
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
29910
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/auth/users/{user_id}/reactivate",
|
|
29911
|
+
...options,
|
|
29912
|
+
...params
|
|
29913
|
+
});
|
|
29914
|
+
};
|
|
29915
|
+
var revokeNativeAuthUserSessions = (parameters, options) => {
|
|
29916
|
+
const params = buildClientParams([parameters], [
|
|
29917
|
+
{
|
|
29918
|
+
args: [
|
|
29919
|
+
{ in: "headers", key: "X-Request-Id" },
|
|
29920
|
+
{ in: "headers", key: "Idempotency-Key" },
|
|
29921
|
+
{ in: "path", key: "project_id" },
|
|
29922
|
+
{ in: "path", key: "environment_id" },
|
|
29923
|
+
{ in: "path", key: "user_id" }
|
|
29924
|
+
]
|
|
29925
|
+
}
|
|
29926
|
+
]);
|
|
29927
|
+
return (options?.client ?? client).post({
|
|
29928
|
+
responseStyle: "data",
|
|
29929
|
+
security: [{ scheme: "bearer", type: "http" }],
|
|
29930
|
+
url: "/v1/projects/{project_id}/environments/{environment_id}/auth/users/{user_id}/revoke-sessions",
|
|
29931
|
+
...options,
|
|
29932
|
+
...params
|
|
29933
|
+
});
|
|
29934
|
+
};
|
|
29626
29935
|
var listWorkspaceMailDomains = (parameters, options) => {
|
|
29627
29936
|
const params = buildClientParams([parameters], [
|
|
29628
29937
|
{
|
|
@@ -32863,6 +33172,87 @@ var parseDeviceTokens = (value) => {
|
|
|
32863
33172
|
};
|
|
32864
33173
|
};
|
|
32865
33174
|
|
|
33175
|
+
// apps/product-cli/dist/native-auth.js
|
|
33176
|
+
async function executeNativeAuth(client2, command) {
|
|
33177
|
+
const scope = { project_id: command.projectId, environment_id: command.environmentId };
|
|
33178
|
+
const options = { client: client2 };
|
|
33179
|
+
switch (command.action) {
|
|
33180
|
+
case "config_get":
|
|
33181
|
+
return getNativeAuthConfiguration(scope, options);
|
|
33182
|
+
case "config_set":
|
|
33183
|
+
return updateNativeAuthConfiguration({
|
|
33184
|
+
...scope,
|
|
33185
|
+
"Idempotency-Key": command.idempotencyKey,
|
|
33186
|
+
nativeAuthConfigurationUpdate: {
|
|
33187
|
+
configurationRevision: command.configurationRevision,
|
|
33188
|
+
enabled: command.enabled,
|
|
33189
|
+
signupPolicy: command.signupPolicy,
|
|
33190
|
+
applicationName: command.applicationName,
|
|
33191
|
+
...command.canonicalOrigin === void 0 ? {} : { canonicalOrigin: command.canonicalOrigin },
|
|
33192
|
+
...command.allowedRedirectPaths === void 0 ? {} : { allowedRedirectPaths: [...command.allowedRedirectPaths] },
|
|
33193
|
+
...command.resetPasswordPath === void 0 ? {} : { resetPasswordPath: command.resetPasswordPath },
|
|
33194
|
+
...command.invitationPath === void 0 ? {} : { invitationPath: command.invitationPath }
|
|
33195
|
+
}
|
|
33196
|
+
}, options);
|
|
33197
|
+
case "provider_get": {
|
|
33198
|
+
const result = await getNativeAuthProvider({ ...scope, provider: command.provider }, options);
|
|
33199
|
+
return providerStatus(result);
|
|
33200
|
+
}
|
|
33201
|
+
case "provider_set": {
|
|
33202
|
+
const result = await updateNativeAuthProvider({
|
|
33203
|
+
...scope,
|
|
33204
|
+
provider: command.provider,
|
|
33205
|
+
"Idempotency-Key": command.idempotencyKey,
|
|
33206
|
+
nativeAuthProviderUpdateWritable: {
|
|
33207
|
+
configurationRevision: command.configurationRevision,
|
|
33208
|
+
enabled: command.enabled,
|
|
33209
|
+
...command.clientId === void 0 ? {} : { clientId: command.clientId },
|
|
33210
|
+
...command.clientSecret === void 0 ? {} : { clientSecret: command.clientSecret }
|
|
33211
|
+
}
|
|
33212
|
+
}, options);
|
|
33213
|
+
return providerStatus(result);
|
|
33214
|
+
}
|
|
33215
|
+
case "users_list":
|
|
33216
|
+
return listNativeAuthUsers({
|
|
33217
|
+
...scope,
|
|
33218
|
+
...command.limit === void 0 ? {} : { limit: command.limit },
|
|
33219
|
+
...command.cursor === void 0 ? {} : { cursor: command.cursor },
|
|
33220
|
+
...command.search === void 0 ? {} : { search: command.search }
|
|
33221
|
+
}, options);
|
|
33222
|
+
case "user_create":
|
|
33223
|
+
return createNativeAuthUser({
|
|
33224
|
+
...scope,
|
|
33225
|
+
"Idempotency-Key": command.idempotencyKey,
|
|
33226
|
+
nativeAuthUserCreate: { email: command.email }
|
|
33227
|
+
}, options);
|
|
33228
|
+
case "user_get":
|
|
33229
|
+
return getNativeAuthUser({ ...scope, user_id: command.userId }, options);
|
|
33230
|
+
case "user_delete":
|
|
33231
|
+
return deleteNativeAuthUser({ ...scope, user_id: command.userId, "Idempotency-Key": command.idempotencyKey }, options);
|
|
33232
|
+
case "user_invite":
|
|
33233
|
+
return resendNativeAuthInvitation({ ...scope, user_id: command.userId, "Idempotency-Key": command.idempotencyKey }, options);
|
|
33234
|
+
case "user_suspend":
|
|
33235
|
+
return suspendNativeAuthUser({ ...scope, user_id: command.userId, "Idempotency-Key": command.idempotencyKey }, options);
|
|
33236
|
+
case "user_reactivate":
|
|
33237
|
+
return reactivateNativeAuthUser({ ...scope, user_id: command.userId, "Idempotency-Key": command.idempotencyKey }, options);
|
|
33238
|
+
case "user_revoke_sessions":
|
|
33239
|
+
return revokeNativeAuthUserSessions({ ...scope, user_id: command.userId, "Idempotency-Key": command.idempotencyKey }, options);
|
|
33240
|
+
}
|
|
33241
|
+
}
|
|
33242
|
+
function providerStatus(result) {
|
|
33243
|
+
const { provider, enabled, configured, clientId, secretPresent, callbackUrl, scopes, lastSuccessfulFlowAt } = result;
|
|
33244
|
+
return {
|
|
33245
|
+
provider,
|
|
33246
|
+
enabled,
|
|
33247
|
+
configured,
|
|
33248
|
+
clientId,
|
|
33249
|
+
secretPresent,
|
|
33250
|
+
callbackUrl,
|
|
33251
|
+
scopes,
|
|
33252
|
+
lastSuccessfulFlowAt
|
|
33253
|
+
};
|
|
33254
|
+
}
|
|
33255
|
+
|
|
32866
33256
|
// apps/product-cli/dist/source-managed-client.js
|
|
32867
33257
|
var GeneratedSdkManagedSourceApi = class {
|
|
32868
33258
|
client;
|
|
@@ -33631,6 +34021,9 @@ var GeneratedSdkProductApi = class {
|
|
|
33631
34021
|
managedMail(input) {
|
|
33632
34022
|
return executeManagedMail(this.#client, input);
|
|
33633
34023
|
}
|
|
34024
|
+
nativeAuth(input) {
|
|
34025
|
+
return executeNativeAuth(this.#client, input);
|
|
34026
|
+
}
|
|
33634
34027
|
};
|
|
33635
34028
|
|
|
33636
34029
|
// apps/product-cli/dist/repository-init.js
|
|
@@ -34725,6 +35118,9 @@ var GeneratedSdkLocalMcpClient = class {
|
|
|
34725
35118
|
managedMail(input) {
|
|
34726
35119
|
return executeManagedMail(this.#client, input);
|
|
34727
35120
|
}
|
|
35121
|
+
nativeAuth(input) {
|
|
35122
|
+
return executeNativeAuth(this.#client, input);
|
|
35123
|
+
}
|
|
34728
35124
|
planDelete(projectId) {
|
|
34729
35125
|
return planProjectDeletion({ project_id: projectId }, { client: this.#client });
|
|
34730
35126
|
}
|
|
@@ -35621,7 +36017,7 @@ function createLocalOhmyhostMcpServer(dependencies) {
|
|
|
35621
36017
|
throw new Error("Managed source client is unavailable");
|
|
35622
36018
|
return client2.managedSource.getSource(input.project_id);
|
|
35623
36019
|
});
|
|
35624
|
-
registerProductTool(server, dependencies, "deployment_plan", "Plan an immutable deployment. Preserve the customer's existing authentication integration, such as Better Auth or WorkOS, and use the same generic Next.js/Vite/TanStack runtime contract. ohmyho.st login is separate. Read the app Skill's auth guidance and report actual plan blockers, required secret names/callback configuration and unverified runtime compatibility. The explicitly selected managed Better Auth bridge requires the managed database; managed mail is optional, and its verification or password-reset send actions require a configured platform sender. Application-owned Better Auth handlers can use their own sender, including Resend, with auth.provider set to none. Never assume a working platform login proves application login or silently replace its auth provider. The plan builds into Dev unless environment is prod; prod builds straight into Prod without a Dev deployment (a project with shared data and a database must deploy to Dev and promote instead). The plan stays valid for 24 hours.", external_exports.object({
|
|
36020
|
+
registerProductTool(server, dependencies, "deployment_plan", "Plan an immutable deployment. Preserve the customer's existing authentication integration, such as Better Auth or WorkOS, and use the same generic Next.js/Vite/TanStack runtime contract. ohmyho.st login is separate. Read the app Skill's auth guidance and report actual plan blockers, required secret names/callback configuration and unverified runtime compatibility. The explicitly selected managed Better Auth bridge requires the managed database; managed mail is optional, and its verification or password-reset send actions require a configured platform sender. Application-owned Better Auth handlers can use their own sender, including Resend, with auth.provider set to none. The unreleased omh-native capability is an explicit choice requiring Paid access, a verified sender and its separately metered Auth database; verify readiness and hosted support before claiming it works. Never assume a working platform login proves application login or silently replace its auth provider. The plan builds into Dev unless environment is prod; prod builds straight into Prod without a Dev deployment (a project with shared data and a database must deploy to Dev and promote instead). The plan stays valid for 24 hours.", external_exports.object({
|
|
35625
36021
|
project_id: identifier2,
|
|
35626
36022
|
commit_sha: commitSha,
|
|
35627
36023
|
environment: external_exports.enum(["dev", "prod"]).optional()
|
|
@@ -36048,6 +36444,160 @@ function createLocalOhmyhostMcpServer(dependencies) {
|
|
|
36048
36444
|
idempotencyKey: input.idempotency_key
|
|
36049
36445
|
});
|
|
36050
36446
|
}, destructiveAnnotations());
|
|
36447
|
+
const nativeScope = { project_id: identifier2, environment_id: identifier2 };
|
|
36448
|
+
const nativeProvider = external_exports.enum(["google", "github"]);
|
|
36449
|
+
const nativeRun = (client2, command) => {
|
|
36450
|
+
if (!client2.nativeAuth)
|
|
36451
|
+
throw new Error("Native Auth unavailable");
|
|
36452
|
+
return client2.nativeAuth(command);
|
|
36453
|
+
};
|
|
36454
|
+
registerProductTool(server, dependencies, "native_auth_config_get", "Read Owner Native Auth configuration and readiness.", external_exports.object(nativeScope), (client2, input) => nativeRun(client2, {
|
|
36455
|
+
action: "config_get",
|
|
36456
|
+
projectId: input.project_id,
|
|
36457
|
+
environmentId: input.environment_id
|
|
36458
|
+
}));
|
|
36459
|
+
registerProductTool(server, dependencies, "native_auth_config_set", "Update Owner Native Auth configuration at the current revision.", external_exports.object({
|
|
36460
|
+
...nativeScope,
|
|
36461
|
+
configuration_revision: external_exports.number().int().min(0),
|
|
36462
|
+
enabled: external_exports.boolean(),
|
|
36463
|
+
signup_policy: external_exports.enum(["open", "invite-only"]),
|
|
36464
|
+
application_name: external_exports.string().trim().min(1).max(128).refine((value) => !new RegExp("\\p{Cc}", "u").test(value)),
|
|
36465
|
+
canonical_origin: external_exports.string().url().refine((value) => {
|
|
36466
|
+
try {
|
|
36467
|
+
const url = new URL(value);
|
|
36468
|
+
return url.protocol === "https:" && url.origin === value && !url.username && !url.password;
|
|
36469
|
+
} catch {
|
|
36470
|
+
return false;
|
|
36471
|
+
}
|
|
36472
|
+
}).nullable().optional(),
|
|
36473
|
+
allowed_redirect_paths: external_exports.array(external_exports.string().refine(isNativeAuthRedirectPath)).min(1).max(16).refine((paths) => new Set(paths).size === paths.length).optional(),
|
|
36474
|
+
reset_password_path: external_exports.string().refine(isNativeAuthRedirectPath).optional(),
|
|
36475
|
+
invitation_path: external_exports.string().refine(isNativeAuthRedirectPath).optional(),
|
|
36476
|
+
idempotency_key: idempotencyKey
|
|
36477
|
+
}), (client2, input) => {
|
|
36478
|
+
const paths = input.allowed_redirect_paths;
|
|
36479
|
+
if (paths && [input.reset_password_path, input.invitation_path].some((path2) => path2 !== void 0 && !paths.includes(path2)))
|
|
36480
|
+
throw new TypeError("Native Auth form path must be in the redirect allowlist");
|
|
36481
|
+
return nativeRun(client2, {
|
|
36482
|
+
action: "config_set",
|
|
36483
|
+
projectId: input.project_id,
|
|
36484
|
+
environmentId: input.environment_id,
|
|
36485
|
+
configurationRevision: input.configuration_revision,
|
|
36486
|
+
enabled: input.enabled,
|
|
36487
|
+
signupPolicy: input.signup_policy,
|
|
36488
|
+
applicationName: input.application_name,
|
|
36489
|
+
...input.canonical_origin === void 0 ? {} : { canonicalOrigin: input.canonical_origin },
|
|
36490
|
+
...input.allowed_redirect_paths === void 0 ? {} : { allowedRedirectPaths: input.allowed_redirect_paths },
|
|
36491
|
+
...input.reset_password_path === void 0 ? {} : { resetPasswordPath: input.reset_password_path },
|
|
36492
|
+
...input.invitation_path === void 0 ? {} : { invitationPath: input.invitation_path },
|
|
36493
|
+
idempotencyKey: input.idempotency_key
|
|
36494
|
+
});
|
|
36495
|
+
}, mutationAnnotations());
|
|
36496
|
+
registerProductTool(server, dependencies, "native_auth_provider_get", "Read provider setup without its secret.", external_exports.object({ ...nativeScope, provider: nativeProvider }), (client2, input) => nativeRun(client2, {
|
|
36497
|
+
action: "provider_get",
|
|
36498
|
+
projectId: input.project_id,
|
|
36499
|
+
environmentId: input.environment_id,
|
|
36500
|
+
provider: input.provider
|
|
36501
|
+
}));
|
|
36502
|
+
registerProductTool(server, dependencies, "native_auth_provider_set", "Update provider settings without submitting a secret.", external_exports.object({
|
|
36503
|
+
...nativeScope,
|
|
36504
|
+
provider: nativeProvider,
|
|
36505
|
+
configuration_revision: external_exports.number().int().min(0),
|
|
36506
|
+
enabled: external_exports.boolean(),
|
|
36507
|
+
client_id: external_exports.string().min(1).max(1024).optional(),
|
|
36508
|
+
idempotency_key: idempotencyKey
|
|
36509
|
+
}).strict(), (client2, input) => nativeRun(client2, {
|
|
36510
|
+
action: "provider_set",
|
|
36511
|
+
projectId: input.project_id,
|
|
36512
|
+
environmentId: input.environment_id,
|
|
36513
|
+
provider: input.provider,
|
|
36514
|
+
configurationRevision: input.configuration_revision,
|
|
36515
|
+
enabled: input.enabled,
|
|
36516
|
+
...input.client_id === void 0 ? {} : { clientId: input.client_id },
|
|
36517
|
+
idempotencyKey: input.idempotency_key
|
|
36518
|
+
}), mutationAnnotations());
|
|
36519
|
+
registerProductTool(server, dependencies, "native_auth_users_list", "List Native Auth users with bounded pagination.", external_exports.object({
|
|
36520
|
+
...nativeScope,
|
|
36521
|
+
limit: external_exports.number().int().min(1).max(100).optional(),
|
|
36522
|
+
cursor: external_exports.string().min(1).max(512).optional(),
|
|
36523
|
+
search: external_exports.string().min(1).max(320).optional()
|
|
36524
|
+
}), (client2, input) => nativeRun(client2, {
|
|
36525
|
+
action: "users_list",
|
|
36526
|
+
projectId: input.project_id,
|
|
36527
|
+
environmentId: input.environment_id,
|
|
36528
|
+
...input.limit === void 0 ? {} : { limit: input.limit },
|
|
36529
|
+
...input.cursor === void 0 ? {} : { cursor: input.cursor },
|
|
36530
|
+
...input.search === void 0 ? {} : { search: input.search }
|
|
36531
|
+
}));
|
|
36532
|
+
registerProductTool(server, dependencies, "native_auth_user_create", "Create and invite a Native Auth user without choosing a password.", external_exports.object({
|
|
36533
|
+
...nativeScope,
|
|
36534
|
+
email: external_exports.string().email().max(254),
|
|
36535
|
+
idempotency_key: idempotencyKey
|
|
36536
|
+
}), (client2, input) => nativeRun(client2, {
|
|
36537
|
+
action: "user_create",
|
|
36538
|
+
projectId: input.project_id,
|
|
36539
|
+
environmentId: input.environment_id,
|
|
36540
|
+
email: input.email,
|
|
36541
|
+
idempotencyKey: input.idempotency_key
|
|
36542
|
+
}), mutationAnnotations());
|
|
36543
|
+
registerProductTool(server, dependencies, "native_auth_user_get", "Read a Native Auth user.", external_exports.object({ ...nativeScope, user_id: external_exports.string().uuid() }), (client2, input) => nativeRun(client2, {
|
|
36544
|
+
action: "user_get",
|
|
36545
|
+
projectId: input.project_id,
|
|
36546
|
+
environmentId: input.environment_id,
|
|
36547
|
+
userId: input.user_id
|
|
36548
|
+
}));
|
|
36549
|
+
const nativeUserActionInput = external_exports.object({
|
|
36550
|
+
...nativeScope,
|
|
36551
|
+
user_id: external_exports.string().uuid(),
|
|
36552
|
+
idempotency_key: idempotencyKey,
|
|
36553
|
+
confirm: external_exports.literal(true)
|
|
36554
|
+
});
|
|
36555
|
+
const nativeUserAction = (action) => (client2, input) => nativeRun(client2, {
|
|
36556
|
+
action,
|
|
36557
|
+
projectId: input.project_id,
|
|
36558
|
+
environmentId: input.environment_id,
|
|
36559
|
+
userId: input.user_id,
|
|
36560
|
+
idempotencyKey: input.idempotency_key
|
|
36561
|
+
});
|
|
36562
|
+
registerProductTool(server, dependencies, "native_auth_user_delete", "Delete an Owner-authorized Native Auth user.", nativeUserActionInput, nativeUserAction("user_delete"), destructiveAnnotations());
|
|
36563
|
+
registerProductTool(server, dependencies, "native_auth_user_invite", "Resend an Owner-authorized Native Auth user's invitation.", nativeUserActionInput, nativeUserAction("user_invite"), destructiveAnnotations());
|
|
36564
|
+
registerProductTool(server, dependencies, "native_auth_user_suspend", "Suspend an Owner-authorized Native Auth user.", nativeUserActionInput, nativeUserAction("user_suspend"), destructiveAnnotations());
|
|
36565
|
+
registerProductTool(server, dependencies, "native_auth_user_reactivate", "Reactivate an Owner-authorized Native Auth user.", nativeUserActionInput, nativeUserAction("user_reactivate"), destructiveAnnotations());
|
|
36566
|
+
registerProductTool(server, dependencies, "native_auth_user_revoke_sessions", "Revoke an Owner-authorized Native Auth user's sessions.", nativeUserActionInput, nativeUserAction("user_revoke_sessions"), destructiveAnnotations());
|
|
36567
|
+
registerProductTool(server, dependencies, "native_auth_provider_secret_input_request", "Return an account-bound stdin-only command; never place a provider secret in MCP arguments.", external_exports.object({
|
|
36568
|
+
...nativeScope,
|
|
36569
|
+
provider: nativeProvider,
|
|
36570
|
+
configuration_revision: external_exports.number().int().min(0),
|
|
36571
|
+
enabled: external_exports.boolean(),
|
|
36572
|
+
client_id: external_exports.string().min(1).max(1024).optional(),
|
|
36573
|
+
idempotency_key: idempotencyKey
|
|
36574
|
+
}).strict(), async (client2, input, signal) => {
|
|
36575
|
+
await client2.getProject(input.project_id);
|
|
36576
|
+
const account = await handoverAccount(client2, signal);
|
|
36577
|
+
return {
|
|
36578
|
+
command: [
|
|
36579
|
+
`${commandPrefix} auth provider set`,
|
|
36580
|
+
"--project",
|
|
36581
|
+
shellQuote(input.project_id),
|
|
36582
|
+
"--environment",
|
|
36583
|
+
shellQuote(input.environment_id),
|
|
36584
|
+
"--provider",
|
|
36585
|
+
input.provider,
|
|
36586
|
+
"--revision",
|
|
36587
|
+
String(input.configuration_revision),
|
|
36588
|
+
"--enabled",
|
|
36589
|
+
String(input.enabled),
|
|
36590
|
+
...input.client_id === void 0 ? [] : ["--client-id", shellQuote(input.client_id)],
|
|
36591
|
+
"--idempotency-key",
|
|
36592
|
+
shellQuote(input.idempotency_key),
|
|
36593
|
+
...account.flags,
|
|
36594
|
+
"--stdin",
|
|
36595
|
+
"--json"
|
|
36596
|
+
].join(" "),
|
|
36597
|
+
acting_as: client2.actingAs?.() ?? null,
|
|
36598
|
+
instruction: `Pass the provider secret on stdin in a local terminal; ${account.runs}. Never put it in MCP, arguments, source, or logs.`
|
|
36599
|
+
};
|
|
36600
|
+
});
|
|
36051
36601
|
registerProductTool(server, dependencies, "secrets_list", "List secret metadata without values", external_exports.object({ project_id: identifier2, environment_id: identifier2 }), (client2, input) => client2.listEnvironmentSecrets({
|
|
36052
36602
|
projectId: input.project_id,
|
|
36053
36603
|
environmentId: input.environment_id
|