@m6d/cortex 0.8.0 → 0.9.0
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/dist/index.d.ts +135 -17
- package/dist/index.js +26 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2167,7 +2167,7 @@ export type ManagementProcedures = {
|
|
|
2167
2167
|
output: {
|
|
2168
2168
|
id: string;
|
|
2169
2169
|
actorId: string;
|
|
2170
|
-
credentialKind: "session" | "managementKey" | "operatorToken" | "system";
|
|
2170
|
+
credentialKind: "session" | "managementKey" | "operatorToken" | "oauthToken" | "system";
|
|
2171
2171
|
credentialId: string | null;
|
|
2172
2172
|
entityType: string;
|
|
2173
2173
|
entityId: string;
|
|
@@ -2184,6 +2184,7 @@ export type ManagementProcedures = {
|
|
|
2184
2184
|
displayName: Partial<Record<"en" | "ar", string>>;
|
|
2185
2185
|
fingerprint: string;
|
|
2186
2186
|
} | null;
|
|
2187
|
+
oauthClientName: string | null;
|
|
2187
2188
|
before: unknown;
|
|
2188
2189
|
after: unknown;
|
|
2189
2190
|
};
|
|
@@ -2204,7 +2205,7 @@ export type ManagementProcedures = {
|
|
|
2204
2205
|
items: Array<{
|
|
2205
2206
|
id: string;
|
|
2206
2207
|
actorId: string;
|
|
2207
|
-
credentialKind: "session" | "managementKey" | "operatorToken" | "system";
|
|
2208
|
+
credentialKind: "session" | "managementKey" | "operatorToken" | "oauthToken" | "system";
|
|
2208
2209
|
credentialId: string | null;
|
|
2209
2210
|
entityType: string;
|
|
2210
2211
|
entityId: string;
|
|
@@ -2221,6 +2222,7 @@ export type ManagementProcedures = {
|
|
|
2221
2222
|
displayName: Partial<Record<"en" | "ar", string>>;
|
|
2222
2223
|
fingerprint: string;
|
|
2223
2224
|
} | null;
|
|
2225
|
+
oauthClientName: string | null;
|
|
2224
2226
|
}>;
|
|
2225
2227
|
/** Every row the caller may see, ignoring the search and filters. */
|
|
2226
2228
|
count: number;
|
|
@@ -2416,15 +2418,17 @@ export type ManagementProcedures = {
|
|
|
2416
2418
|
name: string;
|
|
2417
2419
|
};
|
|
2418
2420
|
};
|
|
2419
|
-
/** Create a
|
|
2421
|
+
/** Create a credential over a stored secret, with a display name (`{}` for none). `static` presents the secret's value; `oauth2-client-credentials` gets a bearer at `tokenUrl` (https) as `clientId`, by `authMethod`: `client_secret_basic` sends the secret; `private_key_jwt` signs with a key Cortex generates into a new secret named `secretName`, which nothing else may compose or rewrite (`signing_key_secret`), and needs `issuer` and an engine public URL to publish its key under (`jwks_unavailable`); `none` is a public app for MCP sign-in at `issuer`, with no secret. `issuer` is the authorization server's exact identifier. Name, kind and auth method never change. Needs `secrets:write`. */
|
|
2420
2422
|
"credentials.create": {
|
|
2421
2423
|
input: {
|
|
2422
2424
|
displayName: Partial<Record<"en" | "ar", string>>;
|
|
2423
2425
|
kind: "static" | "oauth2-client-credentials";
|
|
2426
|
+
authMethod: "client_secret_basic" | "private_key_jwt" | "none";
|
|
2424
2427
|
secretName: string;
|
|
2425
2428
|
tokenUrl: string;
|
|
2426
2429
|
clientId: string;
|
|
2427
2430
|
scope: string;
|
|
2431
|
+
issuer: string;
|
|
2428
2432
|
/** A name: lowercase letters, digits, and single hyphens. */
|
|
2429
2433
|
name: string;
|
|
2430
2434
|
};
|
|
@@ -2433,10 +2437,12 @@ export type ManagementProcedures = {
|
|
|
2433
2437
|
name: string;
|
|
2434
2438
|
displayName: Partial<Record<"en" | "ar", string>>;
|
|
2435
2439
|
kind: "static" | "oauth2-client-credentials";
|
|
2436
|
-
|
|
2440
|
+
authMethod: "client_secret_basic" | "private_key_jwt" | "none" | null;
|
|
2441
|
+
secretName: string | null;
|
|
2437
2442
|
tokenUrl: string | null;
|
|
2438
2443
|
clientId: string | null;
|
|
2439
2444
|
scope: string | null;
|
|
2445
|
+
issuer: string | null;
|
|
2440
2446
|
createdAt: string;
|
|
2441
2447
|
updatedAt: string;
|
|
2442
2448
|
};
|
|
@@ -2451,15 +2457,17 @@ export type ManagementProcedures = {
|
|
|
2451
2457
|
name: string;
|
|
2452
2458
|
displayName: Partial<Record<"en" | "ar", string>>;
|
|
2453
2459
|
kind: "static" | "oauth2-client-credentials";
|
|
2454
|
-
|
|
2460
|
+
authMethod: "client_secret_basic" | "private_key_jwt" | "none" | null;
|
|
2461
|
+
secretName: string | null;
|
|
2455
2462
|
tokenUrl: string | null;
|
|
2456
2463
|
clientId: string | null;
|
|
2457
2464
|
scope: string | null;
|
|
2465
|
+
issuer: string | null;
|
|
2458
2466
|
createdAt: string;
|
|
2459
2467
|
updatedAt: string;
|
|
2460
2468
|
};
|
|
2461
2469
|
};
|
|
2462
|
-
/** List credentials with pagination and search: the name tools, dataset hosts and triggers reference, its display name, its kind, the secret it composes,
|
|
2470
|
+
/** List credentials with pagination and search: the name tools, dataset hosts and triggers reference, its display name, its kind and auth method, the secret it composes, how many rows name it with the first few (`usedBy`), and, for a `private_key_jwt` one, the URL of its public key set (`jwksUrl`, null without an engine public URL), which its authorization server is registered with, and the `kid` of the key it signs with now (null for any other). */
|
|
2463
2471
|
"credentials.list": {
|
|
2464
2472
|
input: {
|
|
2465
2473
|
pageIndex?: number;
|
|
@@ -2472,10 +2480,12 @@ export type ManagementProcedures = {
|
|
|
2472
2480
|
name: string;
|
|
2473
2481
|
displayName: Partial<Record<"en" | "ar", string>>;
|
|
2474
2482
|
kind: "static" | "oauth2-client-credentials";
|
|
2475
|
-
|
|
2483
|
+
authMethod: "client_secret_basic" | "private_key_jwt" | "none" | null;
|
|
2484
|
+
secretName: string | null;
|
|
2476
2485
|
tokenUrl: string | null;
|
|
2477
2486
|
clientId: string | null;
|
|
2478
2487
|
scope: string | null;
|
|
2488
|
+
issuer: string | null;
|
|
2479
2489
|
createdAt: string;
|
|
2480
2490
|
updatedAt: string;
|
|
2481
2491
|
usedBy: {
|
|
@@ -2487,6 +2497,8 @@ export type ManagementProcedures = {
|
|
|
2487
2497
|
id: string;
|
|
2488
2498
|
}>;
|
|
2489
2499
|
};
|
|
2500
|
+
jwksUrl: string | null;
|
|
2501
|
+
kid: string | null;
|
|
2490
2502
|
}>;
|
|
2491
2503
|
/** Every row the caller may see, ignoring the search and filters. */
|
|
2492
2504
|
count: number;
|
|
@@ -2494,25 +2506,47 @@ export type ManagementProcedures = {
|
|
|
2494
2506
|
filteredCount: number;
|
|
2495
2507
|
};
|
|
2496
2508
|
};
|
|
2497
|
-
/** Each credential's name and display name, in name order, for a picker. `present`: what a tool, dataset host, webhook or trigger run may present upstream (every credential but a trigger's fire credential). `fire`: what a trigger may be fired with (static credentials). */
|
|
2509
|
+
/** Each credential's name and display name, in name order, for a picker. `present`: what a tool, dataset host, webhook or trigger run may present upstream (every credential but a trigger's fire credential). `fire`: what a trigger may be fired with (static credentials). `signIn`: what an MCP server's sign-in may present as its pre-registered app (OAuth2 client credentials ones naming their `issuer`). */
|
|
2498
2510
|
"credentials.names": {
|
|
2499
2511
|
input: {
|
|
2500
|
-
use: "present" | "fire";
|
|
2512
|
+
use: "present" | "fire" | "signIn";
|
|
2501
2513
|
};
|
|
2502
2514
|
output: Array<{
|
|
2503
2515
|
name: string;
|
|
2504
2516
|
displayName: Partial<Record<"en" | "ar", string>>;
|
|
2505
2517
|
}>;
|
|
2506
2518
|
};
|
|
2507
|
-
/**
|
|
2519
|
+
/** Replace a `private_key_jwt` credential's signing key with a new one, under a new `kid`, rewriting its secret (`no_signing_key` for any other credential). Its key set serves only the new public key at once, so assertions verify again once the authorization server refetches it. */
|
|
2520
|
+
"credentials.rotateKey": {
|
|
2521
|
+
input: {
|
|
2522
|
+
id: string;
|
|
2523
|
+
};
|
|
2524
|
+
output: {
|
|
2525
|
+
id: string;
|
|
2526
|
+
name: string;
|
|
2527
|
+
displayName: Partial<Record<"en" | "ar", string>>;
|
|
2528
|
+
kind: "static" | "oauth2-client-credentials";
|
|
2529
|
+
authMethod: "client_secret_basic" | "private_key_jwt" | "none" | null;
|
|
2530
|
+
secretName: string | null;
|
|
2531
|
+
tokenUrl: string | null;
|
|
2532
|
+
clientId: string | null;
|
|
2533
|
+
scope: string | null;
|
|
2534
|
+
issuer: string | null;
|
|
2535
|
+
createdAt: string;
|
|
2536
|
+
updatedAt: string;
|
|
2537
|
+
};
|
|
2538
|
+
};
|
|
2539
|
+
/** Change a credential's display name, the secret it composes and, for an OAuth2 one, its token URL, client id, scope and issuer. Applies to the next call of every tool, dataset host and trigger naming it. Changing the secret, the token URL or the issuer needs `secrets:write` too (`secret_binding_forbidden`): each sends a stored secret somewhere new. A `private_key_jwt` one keeps its secret, which holds its key, like its kind and auth method (`kind_locked`). */
|
|
2508
2540
|
"credentials.update": {
|
|
2509
2541
|
input: {
|
|
2510
2542
|
displayName: Partial<Record<"en" | "ar", string>>;
|
|
2511
2543
|
kind: "static" | "oauth2-client-credentials";
|
|
2544
|
+
authMethod: "client_secret_basic" | "private_key_jwt" | "none";
|
|
2512
2545
|
secretName: string;
|
|
2513
2546
|
tokenUrl: string;
|
|
2514
2547
|
clientId: string;
|
|
2515
2548
|
scope: string;
|
|
2549
|
+
issuer: string;
|
|
2516
2550
|
id: string;
|
|
2517
2551
|
};
|
|
2518
2552
|
output: {
|
|
@@ -2520,10 +2554,12 @@ export type ManagementProcedures = {
|
|
|
2520
2554
|
name: string;
|
|
2521
2555
|
displayName: Partial<Record<"en" | "ar", string>>;
|
|
2522
2556
|
kind: "static" | "oauth2-client-credentials";
|
|
2523
|
-
|
|
2557
|
+
authMethod: "client_secret_basic" | "private_key_jwt" | "none" | null;
|
|
2558
|
+
secretName: string | null;
|
|
2524
2559
|
tokenUrl: string | null;
|
|
2525
2560
|
clientId: string | null;
|
|
2526
2561
|
scope: string | null;
|
|
2562
|
+
issuer: string | null;
|
|
2527
2563
|
createdAt: string;
|
|
2528
2564
|
updatedAt: string;
|
|
2529
2565
|
};
|
|
@@ -3466,6 +3502,11 @@ export type ManagementProcedures = {
|
|
|
3466
3502
|
value: string;
|
|
3467
3503
|
};
|
|
3468
3504
|
}>;
|
|
3505
|
+
signIn?: {
|
|
3506
|
+
connects: "shared" | "endUser";
|
|
3507
|
+
scope?: string;
|
|
3508
|
+
credential?: string;
|
|
3509
|
+
};
|
|
3469
3510
|
include?: Array<string>;
|
|
3470
3511
|
exclude?: Array<string>;
|
|
3471
3512
|
audience: "all" | {
|
|
@@ -3473,7 +3514,7 @@ export type ManagementProcedures = {
|
|
|
3473
3514
|
} | {
|
|
3474
3515
|
agents: Array<string>;
|
|
3475
3516
|
};
|
|
3476
|
-
overridable?: Array<"displayName" | "include" | "exclude" | "headers">;
|
|
3517
|
+
overridable?: Array<"displayName" | "include" | "exclude" | "headers" | "signIn">;
|
|
3477
3518
|
}>;
|
|
3478
3519
|
webhooks?: Array<{
|
|
3479
3520
|
name: string;
|
|
@@ -4001,6 +4042,11 @@ export type ManagementProcedures = {
|
|
|
4001
4042
|
value: string;
|
|
4002
4043
|
};
|
|
4003
4044
|
}>;
|
|
4045
|
+
signIn?: {
|
|
4046
|
+
connects: "shared" | "endUser";
|
|
4047
|
+
scope?: string;
|
|
4048
|
+
credential?: string;
|
|
4049
|
+
};
|
|
4004
4050
|
include?: Array<string>;
|
|
4005
4051
|
exclude?: Array<string>;
|
|
4006
4052
|
audience: "all" | {
|
|
@@ -4008,7 +4054,7 @@ export type ManagementProcedures = {
|
|
|
4008
4054
|
} | {
|
|
4009
4055
|
agents: Array<string>;
|
|
4010
4056
|
};
|
|
4011
|
-
overridable?: Array<"displayName" | "include" | "exclude" | "headers">;
|
|
4057
|
+
overridable?: Array<"displayName" | "include" | "exclude" | "headers" | "signIn">;
|
|
4012
4058
|
}>;
|
|
4013
4059
|
webhooks?: Array<{
|
|
4014
4060
|
name: string;
|
|
@@ -4104,7 +4150,30 @@ export type ManagementProcedures = {
|
|
|
4104
4150
|
id: string;
|
|
4105
4151
|
};
|
|
4106
4152
|
};
|
|
4107
|
-
/**
|
|
4153
|
+
/** Find how Cortex would sign in to the MCP server with OAuth, from its metadata: the authorization server's issuer, the method Cortex would use (`preRegistered`, `clientIdDocument`, `dynamicRegistration`, or null for none), the scopes on offer, whether PKCE with S256 is supported, and the resource tokens are for. A pre-registered app for another issuer is refused as `sign_in_issuer_mismatch`. */
|
|
4154
|
+
"mcpServers.detectSignIn": {
|
|
4155
|
+
input: {
|
|
4156
|
+
id: string;
|
|
4157
|
+
};
|
|
4158
|
+
output: {
|
|
4159
|
+
issuer: string;
|
|
4160
|
+
method: "preRegistered" | "clientIdDocument" | "dynamicRegistration" | null;
|
|
4161
|
+
scopes: Array<string>;
|
|
4162
|
+
pkce: boolean;
|
|
4163
|
+
resource: string;
|
|
4164
|
+
};
|
|
4165
|
+
};
|
|
4166
|
+
/** Forget every connection Cortex holds to the MCP server: the shared one, or every end user's. Its turns report it not connected until someone signs in again. The tokens are not revoked at the authorization server. */
|
|
4167
|
+
"mcpServers.disconnect": {
|
|
4168
|
+
input: {
|
|
4169
|
+
id: string;
|
|
4170
|
+
};
|
|
4171
|
+
output: {
|
|
4172
|
+
id: string;
|
|
4173
|
+
name: string;
|
|
4174
|
+
};
|
|
4175
|
+
};
|
|
4176
|
+
/** One MCP server by id with its url, headers, sign-in, tool filters, and sharing; its shared connection, never its tokens, with `stepUp` once its server refused a call for lack of scope (the scopes it lacks, and whether a sign-in may still ask for them); how many end users are connected or must sign in again; and `signInUrl`, where a browser form-posts an operator token and the server's id to connect it (null while the engine or the console has no public URL). */
|
|
4108
4177
|
"mcpServers.get": {
|
|
4109
4178
|
input: {
|
|
4110
4179
|
id: string;
|
|
@@ -4143,6 +4212,11 @@ export type ManagementProcedures = {
|
|
|
4143
4212
|
value: string;
|
|
4144
4213
|
};
|
|
4145
4214
|
}>;
|
|
4215
|
+
signIn: {
|
|
4216
|
+
connects: "shared" | "endUser";
|
|
4217
|
+
scope?: string;
|
|
4218
|
+
credential?: string;
|
|
4219
|
+
} | null;
|
|
4146
4220
|
include: Array<string>;
|
|
4147
4221
|
exclude: Array<string>;
|
|
4148
4222
|
status: "draft" | "published" | "disabled";
|
|
@@ -4169,6 +4243,22 @@ export type ManagementProcedures = {
|
|
|
4169
4243
|
type: "string" | "number" | "boolean";
|
|
4170
4244
|
computed: boolean;
|
|
4171
4245
|
}>;
|
|
4246
|
+
connection: {
|
|
4247
|
+
status: "connected" | "needs_scope" | "broken";
|
|
4248
|
+
issuer: string;
|
|
4249
|
+
scope: string;
|
|
4250
|
+
expiresAt: string | null;
|
|
4251
|
+
updatedAt: string;
|
|
4252
|
+
stepUp: {
|
|
4253
|
+
missing: string;
|
|
4254
|
+
grantable: boolean;
|
|
4255
|
+
} | null;
|
|
4256
|
+
} | null;
|
|
4257
|
+
endUsers: {
|
|
4258
|
+
connected: number;
|
|
4259
|
+
broken: number;
|
|
4260
|
+
};
|
|
4261
|
+
signInUrl: string | null;
|
|
4172
4262
|
};
|
|
4173
4263
|
};
|
|
4174
4264
|
/** List MCP servers with pagination and search. */
|
|
@@ -4298,7 +4388,7 @@ export type ManagementProcedures = {
|
|
|
4298
4388
|
unchanged: boolean;
|
|
4299
4389
|
};
|
|
4300
4390
|
};
|
|
4301
|
-
/** Update an MCP server's draft: which of its tools agents may call (`include`, empty for every tool, and `exclude`, tool names as the server spells them). Saved as a draft; call publish to make it live. The url
|
|
4391
|
+
/** Update an MCP server's draft: which of its tools agents may call (`include`, empty for every tool, and `exclude`, tool names as the server spells them). Saved as a draft; call publish to make it live. The url, headers (each with a prefix and its value from a credential, the run token, a variable or a constant) and `signIn` apply live without a publish. `signIn` (null for none) has Cortex sign in with OAuth: `connects` is `shared` (an operator connects once for every agent) or `endUser` (each end user connects their own), `scope` what to ask for, and `credential` names the app registered with the authorization server beforehand, an `oauth2-client-credentials` credential naming its `issuer`. A server that signs in declares no Authorization header. */
|
|
4302
4392
|
"mcpServers.update": {
|
|
4303
4393
|
input: {
|
|
4304
4394
|
url: string;
|
|
@@ -4318,6 +4408,11 @@ export type ManagementProcedures = {
|
|
|
4318
4408
|
value: string;
|
|
4319
4409
|
};
|
|
4320
4410
|
}>;
|
|
4411
|
+
signIn: {
|
|
4412
|
+
connects: "shared" | "endUser";
|
|
4413
|
+
scope?: string;
|
|
4414
|
+
credential?: string;
|
|
4415
|
+
} | null;
|
|
4321
4416
|
include: Array<string>;
|
|
4322
4417
|
exclude: Array<string>;
|
|
4323
4418
|
id: string;
|
|
@@ -5042,7 +5137,7 @@ export type ManagementProcedures = {
|
|
|
5042
5137
|
displayName: Partial<Record<"en" | "ar", string>>;
|
|
5043
5138
|
}>;
|
|
5044
5139
|
};
|
|
5045
|
-
/** Replace a secret's value in place. */
|
|
5140
|
+
/** Replace a secret's value in place; a `private_key_jwt` credential's generated key is refused (`signing_key_secret`), since only `credentials.rotateKey` rewrites it. */
|
|
5046
5141
|
"secrets.rotate": {
|
|
5047
5142
|
input: {
|
|
5048
5143
|
id: string;
|
|
@@ -9219,6 +9314,14 @@ declare const manifestMcpServerSchema: z.ZodObject<{
|
|
|
9219
9314
|
kind: "runToken";
|
|
9220
9315
|
}>>;
|
|
9221
9316
|
}, z.core.$strict>>>;
|
|
9317
|
+
signIn: z.ZodOptional<z.ZodObject<{
|
|
9318
|
+
connects: z.ZodEnum<{
|
|
9319
|
+
shared: "shared";
|
|
9320
|
+
endUser: "endUser";
|
|
9321
|
+
}>;
|
|
9322
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
9323
|
+
credential: z.ZodOptional<z.ZodString>;
|
|
9324
|
+
}, z.core.$strict>>;
|
|
9222
9325
|
include: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
9223
9326
|
exclude: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
9224
9327
|
audience: z.ZodUnion<readonly [
|
|
@@ -9233,6 +9336,7 @@ declare const manifestMcpServerSchema: z.ZodObject<{
|
|
|
9233
9336
|
overridable: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
9234
9337
|
displayName: "displayName";
|
|
9235
9338
|
headers: "headers";
|
|
9339
|
+
signIn: "signIn";
|
|
9236
9340
|
include: "include";
|
|
9237
9341
|
exclude: "exclude";
|
|
9238
9342
|
}>>>;
|
|
@@ -11482,6 +11586,14 @@ declare const manifestSchema: z.ZodObject<{
|
|
|
11482
11586
|
kind: "runToken";
|
|
11483
11587
|
}>>;
|
|
11484
11588
|
}, z.core.$strict>>>;
|
|
11589
|
+
signIn: z.ZodOptional<z.ZodObject<{
|
|
11590
|
+
connects: z.ZodEnum<{
|
|
11591
|
+
shared: "shared";
|
|
11592
|
+
endUser: "endUser";
|
|
11593
|
+
}>;
|
|
11594
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
11595
|
+
credential: z.ZodOptional<z.ZodString>;
|
|
11596
|
+
}, z.core.$strict>>;
|
|
11485
11597
|
include: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
11486
11598
|
exclude: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
11487
11599
|
audience: z.ZodUnion<readonly [
|
|
@@ -11496,6 +11608,7 @@ declare const manifestSchema: z.ZodObject<{
|
|
|
11496
11608
|
overridable: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
11497
11609
|
displayName: "displayName";
|
|
11498
11610
|
headers: "headers";
|
|
11611
|
+
signIn: "signIn";
|
|
11499
11612
|
include: "include";
|
|
11500
11613
|
exclude: "exclude";
|
|
11501
11614
|
}>>>;
|
|
@@ -12589,9 +12702,14 @@ export declare function defineManifest(manifest: Manifest): {
|
|
|
12589
12702
|
};
|
|
12590
12703
|
prefix?: string | undefined;
|
|
12591
12704
|
}[] | undefined;
|
|
12705
|
+
signIn?: {
|
|
12706
|
+
connects: "shared" | "endUser";
|
|
12707
|
+
scope?: string | undefined;
|
|
12708
|
+
credential?: string | undefined;
|
|
12709
|
+
} | undefined;
|
|
12592
12710
|
include?: string[] | undefined;
|
|
12593
12711
|
exclude?: string[] | undefined;
|
|
12594
|
-
overridable?: ("displayName" | "headers" | "include" | "exclude")[] | undefined;
|
|
12712
|
+
overridable?: ("displayName" | "headers" | "signIn" | "include" | "exclude")[] | undefined;
|
|
12595
12713
|
}[] | undefined;
|
|
12596
12714
|
webhooks?: {
|
|
12597
12715
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -6953,6 +6953,8 @@ import { z as z2 } from "zod";
|
|
|
6953
6953
|
|
|
6954
6954
|
// ../../internal/contracts/src/client-tools/index.ts
|
|
6955
6955
|
var REQUEST_LOCATION_TOOL = "requestLocation";
|
|
6956
|
+
var CONNECT_ACCOUNT_TOOL = "connectAccount";
|
|
6957
|
+
var SIGN_IN_TTL_MS = 10 * 60 * 1000;
|
|
6956
6958
|
|
|
6957
6959
|
// ../../internal/contracts/src/triggers/index.ts
|
|
6958
6960
|
import { z } from "zod";
|
|
@@ -7125,6 +7127,7 @@ var BUILT_IN_TOOL_NAMES = [
|
|
|
7125
7127
|
"searchRegistries",
|
|
7126
7128
|
"searchThreadHistory",
|
|
7127
7129
|
REQUEST_LOCATION_TOOL,
|
|
7130
|
+
CONNECT_ACCOUNT_TOOL,
|
|
7128
7131
|
TRIGGER_ANSWER_TOOL_NAME
|
|
7129
7132
|
];
|
|
7130
7133
|
function isBuiltInToolName(name) {
|
|
@@ -7527,6 +7530,7 @@ var managementProcedureKinds = {
|
|
|
7527
7530
|
"credentials.delete": "mutation",
|
|
7528
7531
|
"credentials.list": "query",
|
|
7529
7532
|
"credentials.names": "query",
|
|
7533
|
+
"credentials.rotateKey": "mutation",
|
|
7530
7534
|
"credentials.update": "mutation",
|
|
7531
7535
|
"datasetHosts.create": "mutation",
|
|
7532
7536
|
"datasetHosts.delete": "mutation",
|
|
@@ -7551,6 +7555,8 @@ var managementProcedureKinds = {
|
|
|
7551
7555
|
"manifests.sync": "mutation",
|
|
7552
7556
|
"mcpServers.create": "mutation",
|
|
7553
7557
|
"mcpServers.delete": "mutation",
|
|
7558
|
+
"mcpServers.detectSignIn": "query",
|
|
7559
|
+
"mcpServers.disconnect": "mutation",
|
|
7554
7560
|
"mcpServers.get": "query",
|
|
7555
7561
|
"mcpServers.list": "query",
|
|
7556
7562
|
"mcpServers.publish": "mutation",
|
|
@@ -8362,15 +8368,34 @@ var manifestDatasetHostSchema = z5.strictObject({
|
|
|
8362
8368
|
}
|
|
8363
8369
|
});
|
|
8364
8370
|
var mcpToolNamesSchema = z5.array(z5.string().trim().min(1).max(128).regex(/^[^,]*$/, "a tool name holds no comma")).max(200);
|
|
8371
|
+
var MCP_CONNECTION_OWNERS = ["shared", "endUser"];
|
|
8372
|
+
var mcpSignInSchema = z5.strictObject({
|
|
8373
|
+
connects: z5.enum(MCP_CONNECTION_OWNERS),
|
|
8374
|
+
scope: z5.string().trim().min(1).max(1000).optional(),
|
|
8375
|
+
credential: nameSchema.optional()
|
|
8376
|
+
});
|
|
8377
|
+
function authorizationBesideSignIn(server) {
|
|
8378
|
+
return server.signIn ? server.headers.findIndex((entry) => entry.header.toLowerCase() === "authorization") : -1;
|
|
8379
|
+
}
|
|
8365
8380
|
var manifestMcpServerSchema = z5.strictObject({
|
|
8366
8381
|
name: identifierSchema,
|
|
8367
8382
|
displayName: displayNameSchema.default({}),
|
|
8368
8383
|
url: upstreamUrlSchema,
|
|
8369
8384
|
headers: declaredHeadersSchema(presentedHeaderSchema.refine((name) => !mcpTransportHeaders.has(name.toLowerCase()), "a header the MCP transport sets"), headerSourceSchema),
|
|
8385
|
+
signIn: mcpSignInSchema.optional(),
|
|
8370
8386
|
include: mcpToolNamesSchema.default([]),
|
|
8371
8387
|
exclude: mcpToolNamesSchema.default([]),
|
|
8372
8388
|
audience: audienceSchema,
|
|
8373
|
-
overridable: overridable(["displayName", "include", "exclude", "headers"])
|
|
8389
|
+
overridable: overridable(["displayName", "include", "exclude", "headers", "signIn"])
|
|
8390
|
+
}).superRefine((server, context) => {
|
|
8391
|
+
const index = authorizationBesideSignIn(server);
|
|
8392
|
+
if (index >= 0) {
|
|
8393
|
+
context.addIssue({
|
|
8394
|
+
code: "custom",
|
|
8395
|
+
path: ["headers", index, "header"],
|
|
8396
|
+
message: "the sign-in's token travels under Authorization"
|
|
8397
|
+
});
|
|
8398
|
+
}
|
|
8374
8399
|
});
|
|
8375
8400
|
var manifestWebhookSchema = z5.strictObject({
|
|
8376
8401
|
name: nameSchema,
|
package/package.json
CHANGED