@amerged/ohmyhost-mcp 0.1.28 → 0.1.29
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-BWVBJWRR.js} +67 -21
- package/dist/index.js +1 -1
- package/dist/stdio-main.js +24152 -2353
- 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/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 +18 -8
- package/src/packages/contracts/package.json +10 -0
- 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
|
@@ -42,6 +42,22 @@ export interface WorkosM2mClaims {
|
|
|
42
42
|
|
|
43
43
|
export type WorkosTokenClaims = WorkosSessionClaims | WorkosM2mClaims;
|
|
44
44
|
|
|
45
|
+
/** A third-party client's user delegation, distinct from an AuthKit login session. */
|
|
46
|
+
export interface WorkosConnectUserClaims {
|
|
47
|
+
readonly kind: "connect_user";
|
|
48
|
+
readonly issuer: string;
|
|
49
|
+
readonly audience: readonly string[];
|
|
50
|
+
readonly subject: string;
|
|
51
|
+
readonly clientId: string;
|
|
52
|
+
readonly organizationId?: string;
|
|
53
|
+
readonly consentId: string;
|
|
54
|
+
readonly tokenId?: string;
|
|
55
|
+
readonly expiresAt: number;
|
|
56
|
+
readonly issuedAt: number;
|
|
57
|
+
readonly notBefore?: number;
|
|
58
|
+
readonly scopes: readonly string[];
|
|
59
|
+
}
|
|
60
|
+
|
|
45
61
|
export interface WorkosRsaJwk {
|
|
46
62
|
readonly kty: "RSA";
|
|
47
63
|
readonly kid: string;
|
|
@@ -129,10 +145,19 @@ export const parseWorkosJwtHeader = (value: unknown): WorkosJwtHeader => {
|
|
|
129
145
|
};
|
|
130
146
|
};
|
|
131
147
|
|
|
132
|
-
export
|
|
148
|
+
export function parseWorkosTokenClaims(value: unknown, kind: "session" | "m2m"): WorkosTokenClaims;
|
|
149
|
+
export function parseWorkosTokenClaims(
|
|
150
|
+
value: unknown,
|
|
151
|
+
kind: "connect_user",
|
|
152
|
+
): WorkosConnectUserClaims;
|
|
153
|
+
export function parseWorkosTokenClaims(
|
|
133
154
|
value: unknown,
|
|
134
|
-
kind: "session" | "m2m",
|
|
135
|
-
): WorkosTokenClaims
|
|
155
|
+
kind: "session" | "m2m" | "connect_user",
|
|
156
|
+
): WorkosTokenClaims | WorkosConnectUserClaims;
|
|
157
|
+
export function parseWorkosTokenClaims(
|
|
158
|
+
value: unknown,
|
|
159
|
+
kind: "session" | "m2m" | "connect_user",
|
|
160
|
+
): WorkosTokenClaims | WorkosConnectUserClaims {
|
|
136
161
|
const input = expectRecord(value, "invalid_jwt_claims");
|
|
137
162
|
const common = {
|
|
138
163
|
issuer: expectString(input["iss"], "iss"),
|
|
@@ -141,6 +166,38 @@ export const parseWorkosTokenClaims = (
|
|
|
141
166
|
issuedAt: parseEpoch(input["iat"], "iat"),
|
|
142
167
|
};
|
|
143
168
|
const notBefore = input["nbf"] === undefined ? undefined : parseEpoch(input["nbf"], "nbf");
|
|
169
|
+
if (kind === "connect_user") {
|
|
170
|
+
if (!/^user_[A-Za-z0-9]{1,120}$/u.test(common.subject)) {
|
|
171
|
+
throw new WorkosContractError(
|
|
172
|
+
"invalid_principal_kind",
|
|
173
|
+
"Connect user token subject must identify a user",
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
const clientId = expectString(input["client_id"], "client_id");
|
|
177
|
+
if (clientId.length > 2_048 || /[\s\p{Cc}]/u.test(clientId)) {
|
|
178
|
+
throw new WorkosContractError("invalid_client", "Connect client identifier is invalid");
|
|
179
|
+
}
|
|
180
|
+
const organizationId = expectString(input["org_id"], "org_id", { optional: true });
|
|
181
|
+
if (organizationId !== undefined && !/^org_[A-Za-z0-9]{1,120}$/u.test(organizationId)) {
|
|
182
|
+
throw new WorkosContractError("invalid_organization", "Connect organization is invalid");
|
|
183
|
+
}
|
|
184
|
+
const consentId = expectString(input["sid"], "sid");
|
|
185
|
+
if (!/^app_consent_[A-Za-z0-9]{1,120}$/u.test(consentId)) {
|
|
186
|
+
throw new WorkosContractError("invalid_consent", "Connect consent identifier is invalid");
|
|
187
|
+
}
|
|
188
|
+
const tokenId = expectString(input["jti"], "jti", { optional: true });
|
|
189
|
+
return {
|
|
190
|
+
kind,
|
|
191
|
+
...common,
|
|
192
|
+
audience: parseAudience(input["aud"]),
|
|
193
|
+
clientId,
|
|
194
|
+
...(organizationId === undefined ? {} : { organizationId }),
|
|
195
|
+
consentId,
|
|
196
|
+
...(tokenId === undefined ? {} : { tokenId }),
|
|
197
|
+
...(notBefore === undefined ? {} : { notBefore }),
|
|
198
|
+
scopes: parseScopes(input["scope"]),
|
|
199
|
+
};
|
|
200
|
+
}
|
|
144
201
|
if (kind === "m2m") {
|
|
145
202
|
if (!common.subject.startsWith("client_")) {
|
|
146
203
|
throw new WorkosContractError(
|
|
@@ -186,7 +243,7 @@ export const parseWorkosTokenClaims = (
|
|
|
186
243
|
...(role === undefined ? {} : { role }),
|
|
187
244
|
permissions,
|
|
188
245
|
};
|
|
189
|
-
}
|
|
246
|
+
}
|
|
190
247
|
|
|
191
248
|
export const parseWorkosJwks = (value: unknown): readonly WorkosRsaJwk[] => {
|
|
192
249
|
const input = expectRecord(value, "invalid_jwks");
|