@amerged/ohmyhost-mcp 0.1.10

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 (72) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +4 -0
  3. package/README.md +11 -0
  4. package/THIRD_PARTY_NOTICES.md +474 -0
  5. package/dist/chunk-7MV2EVXV.js +30779 -0
  6. package/dist/index.js +9 -0
  7. package/dist/stdio-main.js +5607 -0
  8. package/package.json +32 -0
  9. package/src/apps/mcp/index.ts +30 -0
  10. package/src/apps/mcp/local-client.ts +891 -0
  11. package/src/apps/mcp/local-server.ts +1512 -0
  12. package/src/apps/mcp/stdio-main.ts +26 -0
  13. package/src/apps/product-cli/bin.ts +24 -0
  14. package/src/apps/product-cli/cli.ts +2271 -0
  15. package/src/apps/product-cli/command.ts +1811 -0
  16. package/src/apps/product-cli/composition.ts +823 -0
  17. package/src/apps/product-cli/credential-store.ts +149 -0
  18. package/src/apps/product-cli/device-token-expiry.ts +89 -0
  19. package/src/apps/product-cli/file-credential-store.ts +166 -0
  20. package/src/apps/product-cli/index.ts +23 -0
  21. package/src/apps/product-cli/product-api.ts +1082 -0
  22. package/src/apps/product-cli/project-link-store.ts +30 -0
  23. package/src/apps/product-cli/psql-session.ts +29 -0
  24. package/src/apps/product-cli/repository-init.ts +1622 -0
  25. package/src/apps/product-cli/runtime-contract.ts +1747 -0
  26. package/src/apps/product-cli/user-token-file.ts +214 -0
  27. package/src/apps/product-cli/workspace.ts +92 -0
  28. package/src/packages/agent-skills/generated-skill-resources.ts +147 -0
  29. package/src/packages/agent-skills/index.ts +37 -0
  30. package/src/packages/contracts/application-root.ts +80 -0
  31. package/src/packages/contracts/billing.ts +172 -0
  32. package/src/packages/contracts/credit-pricing.ts +214 -0
  33. package/src/packages/contracts/database-access.ts +257 -0
  34. package/src/packages/contracts/database-compute.ts +72 -0
  35. package/src/packages/contracts/database-migration-admission.ts +235 -0
  36. package/src/packages/contracts/feedback.ts +96 -0
  37. package/src/packages/contracts/framework-admission.ts +280 -0
  38. package/src/packages/contracts/framework-family.ts +18 -0
  39. package/src/packages/contracts/functions.ts +76 -0
  40. package/src/packages/contracts/index.ts +245 -0
  41. package/src/packages/contracts/operation-deployment-result.ts +165 -0
  42. package/src/packages/contracts/operation-failure.ts +150 -0
  43. package/src/packages/contracts/platform-origins.ts +5 -0
  44. package/src/packages/contracts/project-context.ts +59 -0
  45. package/src/packages/contracts/project-exports.ts +102 -0
  46. package/src/packages/contracts/user-api-keys.ts +98 -0
  47. package/src/packages/sdk-ts/generated/client/client.gen.ts +277 -0
  48. package/src/packages/sdk-ts/generated/client/index.ts +27 -0
  49. package/src/packages/sdk-ts/generated/client/types.gen.ts +217 -0
  50. package/src/packages/sdk-ts/generated/client/utils.gen.ts +316 -0
  51. package/src/packages/sdk-ts/generated/client.gen.ts +24 -0
  52. package/src/packages/sdk-ts/generated/core/auth.gen.ts +48 -0
  53. package/src/packages/sdk-ts/generated/core/bodySerializer.gen.ts +82 -0
  54. package/src/packages/sdk-ts/generated/core/params.gen.ts +178 -0
  55. package/src/packages/sdk-ts/generated/core/pathSerializer.gen.ts +171 -0
  56. package/src/packages/sdk-ts/generated/core/queryKeySerializer.gen.ts +117 -0
  57. package/src/packages/sdk-ts/generated/core/serverSentEvents.gen.ts +242 -0
  58. package/src/packages/sdk-ts/generated/core/types.gen.ts +114 -0
  59. package/src/packages/sdk-ts/generated/core/utils.gen.ts +140 -0
  60. package/src/packages/sdk-ts/generated/index.ts +578 -0
  61. package/src/packages/sdk-ts/generated/sdk.gen.ts +3440 -0
  62. package/src/packages/sdk-ts/generated/types.gen.ts +5790 -0
  63. package/src/packages/sdk-ts/index.ts +7 -0
  64. package/src/packages/workos-auth-contracts/device-flow.ts +271 -0
  65. package/src/packages/workos-auth-contracts/index.ts +8 -0
  66. package/src/packages/workos-auth-contracts/management-rpc.ts +379 -0
  67. package/src/packages/workos-auth-contracts/organizations.ts +113 -0
  68. package/src/packages/workos-auth-contracts/parsing.ts +75 -0
  69. package/src/packages/workos-auth-contracts/session-status.ts +53 -0
  70. package/src/packages/workos-auth-contracts/tokens.ts +216 -0
  71. package/src/packages/workos-auth-contracts/user-api-keys.ts +85 -0
  72. package/src/packages/workos-auth-contracts/webhooks.ts +127 -0
@@ -0,0 +1,114 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type { Auth, AuthToken } from "./auth.gen.js";
4
+ import type {
5
+ BodySerializer,
6
+ QuerySerializer,
7
+ QuerySerializerOptions,
8
+ } from "./bodySerializer.gen.js";
9
+
10
+ export type HttpMethod =
11
+ | "connect"
12
+ | "delete"
13
+ | "get"
14
+ | "head"
15
+ | "options"
16
+ | "patch"
17
+ | "post"
18
+ | "put"
19
+ | "trace";
20
+
21
+ export type Client<
22
+ RequestFn = never,
23
+ Config = unknown,
24
+ MethodFn = never,
25
+ BuildUrlFn = never,
26
+ SseFn = never,
27
+ > = {
28
+ /**
29
+ * Returns the final request URL.
30
+ */
31
+ buildUrl: BuildUrlFn;
32
+ getConfig: () => Config;
33
+ request: RequestFn;
34
+ setConfig: (config: Config) => Config;
35
+ } & {
36
+ [K in HttpMethod]: MethodFn;
37
+ } & ([SseFn] extends [never] ? { sse?: never } : { sse: { [K in HttpMethod]: SseFn } });
38
+
39
+ export interface Config {
40
+ /**
41
+ * Auth token or a function returning auth token. The resolved value will be
42
+ * added to the request payload as defined by its `security` array.
43
+ */
44
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
45
+ /**
46
+ * A function for serializing request body parameter. By default,
47
+ * {@link JSON.stringify()} will be used.
48
+ */
49
+ bodySerializer?: BodySerializer | null;
50
+ /**
51
+ * An object containing any HTTP headers that you want to pre-populate your
52
+ * `Headers` object with.
53
+ *
54
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
55
+ */
56
+ headers?:
57
+ | RequestInit["headers"]
58
+ | Record<
59
+ string,
60
+ string | number | boolean | (string | number | boolean)[] | null | undefined | unknown
61
+ >;
62
+ /**
63
+ * The request method.
64
+ *
65
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
66
+ */
67
+ method?: Uppercase<HttpMethod>;
68
+ /**
69
+ * A function for serializing request query parameters. By default, arrays
70
+ * will be exploded in form style, objects will be exploded in deepObject
71
+ * style, and reserved characters are percent-encoded.
72
+ *
73
+ * This method will have no effect if the native `paramsSerializer()` Axios
74
+ * API function is used.
75
+ *
76
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
77
+ */
78
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
79
+ /**
80
+ * A function validating request data. This is useful if you want to ensure
81
+ * the request conforms to the desired shape, so it can be safely sent to
82
+ * the server.
83
+ */
84
+ requestValidator?: (data: unknown) => Promise<unknown>;
85
+ /**
86
+ * A function transforming response data before it's returned. This is useful
87
+ * for post-processing data, e.g., converting ISO strings into Date objects.
88
+ */
89
+ responseTransformer?: (data: unknown) => Promise<unknown>;
90
+ /**
91
+ * A function validating response data. This is useful if you want to ensure
92
+ * the response conforms to the desired shape, so it can be safely passed to
93
+ * the transformers and returned to the user.
94
+ */
95
+ responseValidator?: (data: unknown) => Promise<unknown>;
96
+ }
97
+
98
+ /**
99
+ * Arbitrary metadata passed through the `meta` request option.
100
+ */
101
+ // eslint-disable-next-line @typescript-eslint/no-empty-object-type
102
+ export interface ClientMeta {}
103
+
104
+ type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never]
105
+ ? true
106
+ : [T] extends [never | undefined]
107
+ ? [undefined] extends [T]
108
+ ? false
109
+ : true
110
+ : false;
111
+
112
+ export type OmitNever<T extends Record<string, unknown>> = {
113
+ [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];
114
+ };
@@ -0,0 +1,140 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+
3
+ import type { BodySerializer, QuerySerializer } from "./bodySerializer.gen.js";
4
+ import {
5
+ type ArraySeparatorStyle,
6
+ serializeArrayParam,
7
+ serializeObjectParam,
8
+ serializePrimitiveParam,
9
+ } from "./pathSerializer.gen.js";
10
+
11
+ export interface PathSerializer {
12
+ path: Record<string, unknown>;
13
+ url: string;
14
+ }
15
+
16
+ export const PATH_PARAM_RE: RegExp = /\{[^{}]+\}/g;
17
+
18
+ export const defaultPathSerializer = ({ path, url: _url }: PathSerializer): string => {
19
+ let url = _url;
20
+ const matches = _url.match(PATH_PARAM_RE);
21
+ if (matches) {
22
+ for (const match of matches) {
23
+ let explode = false;
24
+ let name = match.substring(1, match.length - 1);
25
+ let style: ArraySeparatorStyle = "simple";
26
+
27
+ if (name.endsWith("*")) {
28
+ explode = true;
29
+ name = name.substring(0, name.length - 1);
30
+ }
31
+
32
+ if (name.startsWith(".")) {
33
+ name = name.substring(1);
34
+ style = "label";
35
+ } else if (name.startsWith(";")) {
36
+ name = name.substring(1);
37
+ style = "matrix";
38
+ }
39
+
40
+ const value = path[name];
41
+
42
+ if (value === undefined || value === null) {
43
+ continue;
44
+ }
45
+
46
+ if (Array.isArray(value)) {
47
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
48
+ continue;
49
+ }
50
+
51
+ if (typeof value === "object") {
52
+ url = url.replace(
53
+ match,
54
+ serializeObjectParam({
55
+ explode,
56
+ name,
57
+ style,
58
+ value: value as Record<string, unknown>,
59
+ valueOnly: true,
60
+ }),
61
+ );
62
+ continue;
63
+ }
64
+
65
+ if (style === "matrix") {
66
+ url = url.replace(
67
+ match,
68
+ `;${serializePrimitiveParam({
69
+ name,
70
+ value: value as string,
71
+ })}`,
72
+ );
73
+ continue;
74
+ }
75
+
76
+ const replaceValue = encodeURIComponent(
77
+ style === "label" ? `.${value as string}` : (value as string),
78
+ );
79
+ url = url.replace(match, replaceValue);
80
+ }
81
+ }
82
+ return url;
83
+ };
84
+
85
+ export const getUrl = ({
86
+ baseUrl,
87
+ path,
88
+ query,
89
+ querySerializer,
90
+ url: _url,
91
+ }: {
92
+ baseUrl?: string;
93
+ path?: Record<string, unknown>;
94
+ query?: Record<string, unknown>;
95
+ querySerializer: QuerySerializer;
96
+ url: string;
97
+ }): string => {
98
+ const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
99
+ let url = (baseUrl ?? "") + pathUrl;
100
+ if (path) {
101
+ url = defaultPathSerializer({ path, url });
102
+ }
103
+ let search = query ? querySerializer(query) : "";
104
+ if (search.startsWith("?")) {
105
+ search = search.substring(1);
106
+ }
107
+ if (search) {
108
+ url += `?${search}`;
109
+ }
110
+ return url;
111
+ };
112
+
113
+ export function getValidRequestBody(options: {
114
+ body?: unknown;
115
+ bodySerializer?: BodySerializer | null;
116
+ serializedBody?: unknown;
117
+ }): unknown {
118
+ const hasBody = options.body !== undefined;
119
+ const isSerializedBody = hasBody && options.bodySerializer;
120
+
121
+ if (isSerializedBody) {
122
+ if ("serializedBody" in options) {
123
+ const hasSerializedBody =
124
+ options.serializedBody !== undefined && options.serializedBody !== "";
125
+
126
+ return hasSerializedBody ? options.serializedBody : null;
127
+ }
128
+
129
+ // not all clients implement a serializedBody property (i.e., client-axios)
130
+ return options.body !== "" ? options.body : null;
131
+ }
132
+
133
+ // plain/text body
134
+ if (hasBody) {
135
+ return options.body;
136
+ }
137
+
138
+ // no body was provided
139
+ return undefined;
140
+ }