@noresponse/mcp 0.4.11 → 0.5.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/CHANGELOG.md +35 -0
- package/README.md +5 -1
- package/bin/mcp-server.js +925 -39
- package/bin/mcp-server.js.map +35 -9
- package/manifest.json +17 -1
- package/package.json +1 -1
package/bin/mcp-server.js
CHANGED
|
@@ -48104,9 +48104,9 @@ var init_config = __esm(() => {
|
|
|
48104
48104
|
SDK_METADATA = {
|
|
48105
48105
|
language: "typescript",
|
|
48106
48106
|
openapiDocVersion: "1",
|
|
48107
|
-
sdkVersion: "0.
|
|
48107
|
+
sdkVersion: "0.5.0",
|
|
48108
48108
|
genVersion: "internal",
|
|
48109
|
-
userAgent: "noresponse-sdk/mcp-typescript 0.
|
|
48109
|
+
userAgent: "noresponse-sdk/mcp-typescript 0.5.0 internal 1 @noresponse/mcp"
|
|
48110
48110
|
};
|
|
48111
48111
|
});
|
|
48112
48112
|
|
|
@@ -51200,7 +51200,9 @@ var init_conflicterrorcode = __esm(() => {
|
|
|
51200
51200
|
"webhook_endpoint_limit_reached",
|
|
51201
51201
|
"webhook_endpoint_unverified",
|
|
51202
51202
|
"too_many_integrations",
|
|
51203
|
-
"risk_version_ahead"
|
|
51203
|
+
"risk_version_ahead",
|
|
51204
|
+
"key_limit_reached",
|
|
51205
|
+
"self_revocation"
|
|
51204
51206
|
]).describe("Machine codes an HTTP 409 answer can carry.");
|
|
51205
51207
|
});
|
|
51206
51208
|
|
|
@@ -51254,7 +51256,8 @@ var PermissionDeniedErrorCode$zodSchema;
|
|
|
51254
51256
|
var init_permissiondeniederrorcode = __esm(() => {
|
|
51255
51257
|
init_zod();
|
|
51256
51258
|
PermissionDeniedErrorCode$zodSchema = _enum([
|
|
51257
|
-
"workspace_forbidden"
|
|
51259
|
+
"workspace_forbidden",
|
|
51260
|
+
"role_forbidden"
|
|
51258
51261
|
]).describe("Machine codes an HTTP 403 answer can carry.");
|
|
51259
51262
|
});
|
|
51260
51263
|
|
|
@@ -54231,6 +54234,857 @@ For Auth0, send {} and the answer's secret is the new shared secret, shown once.
|
|
|
54231
54234
|
};
|
|
54232
54235
|
});
|
|
54233
54236
|
|
|
54237
|
+
// src/models/keyenvironment.ts
|
|
54238
|
+
var KeyEnvironment$zodSchema;
|
|
54239
|
+
var init_keyenvironment = __esm(() => {
|
|
54240
|
+
init_zod();
|
|
54241
|
+
KeyEnvironment$zodSchema = _enum([
|
|
54242
|
+
"live",
|
|
54243
|
+
"test"
|
|
54244
|
+
]).describe("The environment the key belongs to. A live key assesses with live sources; a test key answers from the deterministic simulator.");
|
|
54245
|
+
});
|
|
54246
|
+
|
|
54247
|
+
// src/models/keystatus.ts
|
|
54248
|
+
var KeyStatus$zodSchema;
|
|
54249
|
+
var init_keystatus = __esm(() => {
|
|
54250
|
+
init_zod();
|
|
54251
|
+
KeyStatus$zodSchema = _enum([
|
|
54252
|
+
"active",
|
|
54253
|
+
"expired",
|
|
54254
|
+
"revoked"
|
|
54255
|
+
]).describe("active: the key authenticates. expired: a rotation's overlap window has ended (expires_at). revoked: the key was revoked (revoked_at) and answers 401.");
|
|
54256
|
+
});
|
|
54257
|
+
|
|
54258
|
+
// src/models/key.ts
|
|
54259
|
+
var KeyScope$zodSchema, Key$zodSchema;
|
|
54260
|
+
var init_key = __esm(() => {
|
|
54261
|
+
init_zod();
|
|
54262
|
+
init_keyenvironment();
|
|
54263
|
+
init_keystatus();
|
|
54264
|
+
KeyScope$zodSchema = _enum([
|
|
54265
|
+
"assess",
|
|
54266
|
+
"history",
|
|
54267
|
+
"delete",
|
|
54268
|
+
"webhooks",
|
|
54269
|
+
"detailed",
|
|
54270
|
+
"integrations",
|
|
54271
|
+
"management"
|
|
54272
|
+
]);
|
|
54273
|
+
Key$zodSchema = object({
|
|
54274
|
+
created_at: string2(),
|
|
54275
|
+
created_by: string2().optional().describe("The external user id of the member who created the key through the console, or the prefix (nrk_<environment>_<key id>) of the management key that created it. Absent for a key NoResponse issued or a rotation made."),
|
|
54276
|
+
environment: KeyEnvironment$zodSchema.describe("The environment the key belongs to. A live key assesses with live sources; a test key answers from the deterministic simulator."),
|
|
54277
|
+
expires_at: string2().optional().describe("When a rotated key stops authenticating (POST /v1/keys/rotate). Absent for a key with no end."),
|
|
54278
|
+
id: string2().describe("The key's public id, a 26-character ULID."),
|
|
54279
|
+
key: string2().optional().describe("The credential, nrk_<environment>_<key id>_<secret>. Present only in the 201 answer that created the key."),
|
|
54280
|
+
prefix: string2().describe("The public start of the credential, nrk_<environment>_<key id>, which identifies the key in logs and secret stores without its secret."),
|
|
54281
|
+
revoked_at: string2().optional(),
|
|
54282
|
+
revoked_by: string2().optional().describe("The external user id of the member who revoked the key through the console, or the prefix of the management key that revoked it. Absent when the key is not revoked or NoResponse revoked it."),
|
|
54283
|
+
scopes: array(KeyScope$zodSchema).describe("The key's scopes, each at most once."),
|
|
54284
|
+
status: KeyStatus$zodSchema.describe("active: the key authenticates. expired: a rotation's overlap window has ended (expires_at). revoked: the key was revoked (revoked_at) and answers 401."),
|
|
54285
|
+
workspace_id: string2().describe("The workspace id, which is also its live environment's workspace id; the test environment's is the same id with :test appended. A workspace created through the API is tnt_ and a 26-character ULID.")
|
|
54286
|
+
}).describe("One API key of your workspace. A key belongs to exactly one environment. key, the secret credential, is present only in the answer that created the key: NoResponse keeps a peppered digest of it, so store it now. Every other field is safe to show.");
|
|
54287
|
+
});
|
|
54288
|
+
|
|
54289
|
+
// src/models/keylist.ts
|
|
54290
|
+
var KeyList$zodSchema;
|
|
54291
|
+
var init_keylist = __esm(() => {
|
|
54292
|
+
init_zod();
|
|
54293
|
+
init_key();
|
|
54294
|
+
KeyList$zodSchema = object({
|
|
54295
|
+
items: array(Key$zodSchema)
|
|
54296
|
+
}).describe("GET /v1/workspaces/{workspace_id}/keys: the keys of both of the workspace's environments, newest first, at most 200 of each, revoked and expired keys included. No item carries a secret.");
|
|
54297
|
+
});
|
|
54298
|
+
|
|
54299
|
+
// src/models/listkeysop.ts
|
|
54300
|
+
var ListKeysRequest$zodSchema, ListKeysResponseResult$zodSchema, ListKeysResponse$zodSchema;
|
|
54301
|
+
var init_listkeysop = __esm(() => {
|
|
54302
|
+
init_zod();
|
|
54303
|
+
init_authenticationerror();
|
|
54304
|
+
init_badrequesterror();
|
|
54305
|
+
init_conflicterror();
|
|
54306
|
+
init_keylist();
|
|
54307
|
+
init_notfounderror();
|
|
54308
|
+
init_permissiondeniederror();
|
|
54309
|
+
init_ratelimiterror();
|
|
54310
|
+
ListKeysRequest$zodSchema = object({
|
|
54311
|
+
workspace_id: string2().describe("Your workspace id, as each key lists it in workspace_id. Another workspace, a malformed id and a test environment's id answer 404.")
|
|
54312
|
+
});
|
|
54313
|
+
ListKeysResponseResult$zodSchema = union([
|
|
54314
|
+
BadRequestError$zodSchema,
|
|
54315
|
+
AuthenticationError$zodSchema,
|
|
54316
|
+
PermissionDeniedError$zodSchema,
|
|
54317
|
+
NotFoundError$zodSchema,
|
|
54318
|
+
ConflictError$zodSchema,
|
|
54319
|
+
RateLimitError$zodSchema,
|
|
54320
|
+
KeyList$zodSchema
|
|
54321
|
+
]);
|
|
54322
|
+
ListKeysResponse$zodSchema = object({
|
|
54323
|
+
Headers: record(string2(), array(string2())).default({}),
|
|
54324
|
+
Result: union([
|
|
54325
|
+
BadRequestError$zodSchema,
|
|
54326
|
+
AuthenticationError$zodSchema,
|
|
54327
|
+
PermissionDeniedError$zodSchema,
|
|
54328
|
+
NotFoundError$zodSchema,
|
|
54329
|
+
ConflictError$zodSchema,
|
|
54330
|
+
RateLimitError$zodSchema,
|
|
54331
|
+
KeyList$zodSchema
|
|
54332
|
+
])
|
|
54333
|
+
});
|
|
54334
|
+
});
|
|
54335
|
+
|
|
54336
|
+
// src/funcs/keysList.ts
|
|
54337
|
+
function keysList(client$, request, options) {
|
|
54338
|
+
return new APIPromise($do15(client$, request, options));
|
|
54339
|
+
}
|
|
54340
|
+
async function $do15(client$, request, options) {
|
|
54341
|
+
const parsed$ = safeParse2(request, (value$) => ListKeysRequest$zodSchema.parse(value$), "Input validation failed");
|
|
54342
|
+
if (!parsed$.ok) {
|
|
54343
|
+
return [parsed$, { status: "invalid" }];
|
|
54344
|
+
}
|
|
54345
|
+
const payload$ = parsed$.value;
|
|
54346
|
+
const body$ = null;
|
|
54347
|
+
const pathParams$ = {
|
|
54348
|
+
workspace_id: encodeSimple("workspace_id", payload$.workspace_id, {
|
|
54349
|
+
explode: false,
|
|
54350
|
+
charEncoding: "percent"
|
|
54351
|
+
})
|
|
54352
|
+
};
|
|
54353
|
+
const path$ = pathToFunc("/v1/workspaces/{workspace_id}/keys")(pathParams$);
|
|
54354
|
+
const headers$ = new Headers(compactMap({
|
|
54355
|
+
Accept: options?.acceptHeaderOverride || "application/json;q=1, application/problem+json;q=0"
|
|
54356
|
+
}));
|
|
54357
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
54358
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
54359
|
+
const context = {
|
|
54360
|
+
options: client$._options,
|
|
54361
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
54362
|
+
operationID: "listKeys",
|
|
54363
|
+
oAuth2Scopes: null,
|
|
54364
|
+
resolvedSecurity: requestSecurity,
|
|
54365
|
+
securitySource: client$._options.security,
|
|
54366
|
+
retryConfig: options?.retries || client$._options.retryConfig || {
|
|
54367
|
+
strategy: "backoff",
|
|
54368
|
+
backoff: {
|
|
54369
|
+
initialInterval: 500,
|
|
54370
|
+
maxInterval: 8000,
|
|
54371
|
+
exponent: 2,
|
|
54372
|
+
maxElapsedTime: 30000
|
|
54373
|
+
},
|
|
54374
|
+
retryConnectionErrors: true
|
|
54375
|
+
},
|
|
54376
|
+
retryCodes: options?.retryCodes || [
|
|
54377
|
+
"408",
|
|
54378
|
+
"429",
|
|
54379
|
+
"5XX"
|
|
54380
|
+
]
|
|
54381
|
+
};
|
|
54382
|
+
const requestRes = client$._createRequest(context, {
|
|
54383
|
+
security: requestSecurity,
|
|
54384
|
+
method: "GET",
|
|
54385
|
+
baseURL: options?.serverURL,
|
|
54386
|
+
path: path$,
|
|
54387
|
+
headers: headers$,
|
|
54388
|
+
body: body$,
|
|
54389
|
+
userAgent: client$._options.userAgent,
|
|
54390
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
54391
|
+
}, options);
|
|
54392
|
+
if (!requestRes.ok) {
|
|
54393
|
+
return [requestRes, { status: "invalid" }];
|
|
54394
|
+
}
|
|
54395
|
+
const req$ = requestRes.value;
|
|
54396
|
+
const doResult = await client$._do(req$, {
|
|
54397
|
+
context,
|
|
54398
|
+
errorCodes: [],
|
|
54399
|
+
retryConfig: context.retryConfig,
|
|
54400
|
+
retryCodes: context.retryCodes
|
|
54401
|
+
});
|
|
54402
|
+
if (!doResult.ok) {
|
|
54403
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
54404
|
+
}
|
|
54405
|
+
return [doResult, {
|
|
54406
|
+
status: "complete",
|
|
54407
|
+
request: req$,
|
|
54408
|
+
response: doResult.value
|
|
54409
|
+
}];
|
|
54410
|
+
}
|
|
54411
|
+
var init_keysList = __esm(() => {
|
|
54412
|
+
init_encodings();
|
|
54413
|
+
init_primitives();
|
|
54414
|
+
init_schemas3();
|
|
54415
|
+
init_security();
|
|
54416
|
+
init_url();
|
|
54417
|
+
init_listkeysop();
|
|
54418
|
+
init_async();
|
|
54419
|
+
});
|
|
54420
|
+
|
|
54421
|
+
// src/mcp-server/tools/keysList.ts
|
|
54422
|
+
var args15, tool$keysList;
|
|
54423
|
+
var init_keysList2 = __esm(() => {
|
|
54424
|
+
init_keysList();
|
|
54425
|
+
init_listkeysop();
|
|
54426
|
+
init_tools();
|
|
54427
|
+
args15 = {
|
|
54428
|
+
request: ListKeysRequest$zodSchema
|
|
54429
|
+
};
|
|
54430
|
+
tool$keysList = {
|
|
54431
|
+
name: "list_keys",
|
|
54432
|
+
description: `List API keys.
|
|
54433
|
+
|
|
54434
|
+
Lists the keys of the signing key's environment, newest first, at most 200, revoked and expired keys included, without secrets: each key's id, prefix, scopes, status, and who created and revoked it. Requires the management scope. Read-only and safe to retry.`,
|
|
54435
|
+
annotations: {
|
|
54436
|
+
title: "List the API keys of this environment",
|
|
54437
|
+
destructiveHint: false,
|
|
54438
|
+
idempotentHint: true,
|
|
54439
|
+
openWorldHint: false,
|
|
54440
|
+
readOnlyHint: true
|
|
54441
|
+
},
|
|
54442
|
+
args: args15,
|
|
54443
|
+
tool: async (client, args, ctx) => {
|
|
54444
|
+
const [result] = await keysList(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
54445
|
+
if (!result.ok) {
|
|
54446
|
+
return {
|
|
54447
|
+
content: [{ type: "text", text: result.error.message }],
|
|
54448
|
+
isError: true
|
|
54449
|
+
};
|
|
54450
|
+
}
|
|
54451
|
+
return formatResult(result.value);
|
|
54452
|
+
}
|
|
54453
|
+
};
|
|
54454
|
+
});
|
|
54455
|
+
|
|
54456
|
+
// src/models/revokekeyop.ts
|
|
54457
|
+
var RevokeKeyRequest$zodSchema, RevokeKeyResponseResult$zodSchema, RevokeKeyResponse$zodSchema;
|
|
54458
|
+
var init_revokekeyop = __esm(() => {
|
|
54459
|
+
init_zod();
|
|
54460
|
+
init_authenticationerror();
|
|
54461
|
+
init_badrequesterror();
|
|
54462
|
+
init_conflicterror();
|
|
54463
|
+
init_key();
|
|
54464
|
+
init_notfounderror();
|
|
54465
|
+
init_permissiondeniederror();
|
|
54466
|
+
init_ratelimiterror();
|
|
54467
|
+
RevokeKeyRequest$zodSchema = object({
|
|
54468
|
+
key_id: string2().describe("The key's id. A key of another workspace answers 404, as does a key of the other environment to an API key."),
|
|
54469
|
+
workspace_id: string2().describe("Your workspace id, as each key lists it in workspace_id. Another workspace, a malformed id and a test environment's id answer 404.")
|
|
54470
|
+
});
|
|
54471
|
+
RevokeKeyResponseResult$zodSchema = union([
|
|
54472
|
+
Key$zodSchema,
|
|
54473
|
+
BadRequestError$zodSchema,
|
|
54474
|
+
AuthenticationError$zodSchema,
|
|
54475
|
+
PermissionDeniedError$zodSchema,
|
|
54476
|
+
NotFoundError$zodSchema,
|
|
54477
|
+
ConflictError$zodSchema,
|
|
54478
|
+
RateLimitError$zodSchema
|
|
54479
|
+
]);
|
|
54480
|
+
RevokeKeyResponse$zodSchema = object({
|
|
54481
|
+
Headers: record(string2(), array(string2())).default({}),
|
|
54482
|
+
Result: union([
|
|
54483
|
+
Key$zodSchema,
|
|
54484
|
+
BadRequestError$zodSchema,
|
|
54485
|
+
AuthenticationError$zodSchema,
|
|
54486
|
+
PermissionDeniedError$zodSchema,
|
|
54487
|
+
NotFoundError$zodSchema,
|
|
54488
|
+
ConflictError$zodSchema,
|
|
54489
|
+
RateLimitError$zodSchema
|
|
54490
|
+
])
|
|
54491
|
+
});
|
|
54492
|
+
});
|
|
54493
|
+
|
|
54494
|
+
// src/funcs/keysRevoke.ts
|
|
54495
|
+
function keysRevoke(client$, request, options) {
|
|
54496
|
+
return new APIPromise($do16(client$, request, options));
|
|
54497
|
+
}
|
|
54498
|
+
async function $do16(client$, request, options) {
|
|
54499
|
+
const parsed$ = safeParse2(request, (value$) => RevokeKeyRequest$zodSchema.parse(value$), "Input validation failed");
|
|
54500
|
+
if (!parsed$.ok) {
|
|
54501
|
+
return [parsed$, { status: "invalid" }];
|
|
54502
|
+
}
|
|
54503
|
+
const payload$ = parsed$.value;
|
|
54504
|
+
const body$ = null;
|
|
54505
|
+
const pathParams$ = {
|
|
54506
|
+
key_id: encodeSimple("key_id", payload$.key_id, {
|
|
54507
|
+
explode: false,
|
|
54508
|
+
charEncoding: "percent"
|
|
54509
|
+
}),
|
|
54510
|
+
workspace_id: encodeSimple("workspace_id", payload$.workspace_id, {
|
|
54511
|
+
explode: false,
|
|
54512
|
+
charEncoding: "percent"
|
|
54513
|
+
})
|
|
54514
|
+
};
|
|
54515
|
+
const path$ = pathToFunc("/v1/workspaces/{workspace_id}/keys/{key_id}")(pathParams$);
|
|
54516
|
+
const headers$ = new Headers(compactMap({
|
|
54517
|
+
Accept: options?.acceptHeaderOverride || "application/json;q=1, application/problem+json;q=0"
|
|
54518
|
+
}));
|
|
54519
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
54520
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
54521
|
+
const context = {
|
|
54522
|
+
options: client$._options,
|
|
54523
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
54524
|
+
operationID: "revokeKey",
|
|
54525
|
+
oAuth2Scopes: null,
|
|
54526
|
+
resolvedSecurity: requestSecurity,
|
|
54527
|
+
securitySource: client$._options.security,
|
|
54528
|
+
retryConfig: options?.retries || client$._options.retryConfig || {
|
|
54529
|
+
strategy: "backoff",
|
|
54530
|
+
backoff: {
|
|
54531
|
+
initialInterval: 500,
|
|
54532
|
+
maxInterval: 8000,
|
|
54533
|
+
exponent: 2,
|
|
54534
|
+
maxElapsedTime: 30000
|
|
54535
|
+
},
|
|
54536
|
+
retryConnectionErrors: true
|
|
54537
|
+
},
|
|
54538
|
+
retryCodes: options?.retryCodes || [
|
|
54539
|
+
"408",
|
|
54540
|
+
"429",
|
|
54541
|
+
"5XX"
|
|
54542
|
+
]
|
|
54543
|
+
};
|
|
54544
|
+
const requestRes = client$._createRequest(context, {
|
|
54545
|
+
security: requestSecurity,
|
|
54546
|
+
method: "DELETE",
|
|
54547
|
+
baseURL: options?.serverURL,
|
|
54548
|
+
path: path$,
|
|
54549
|
+
headers: headers$,
|
|
54550
|
+
body: body$,
|
|
54551
|
+
userAgent: client$._options.userAgent,
|
|
54552
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
54553
|
+
}, options);
|
|
54554
|
+
if (!requestRes.ok) {
|
|
54555
|
+
return [requestRes, { status: "invalid" }];
|
|
54556
|
+
}
|
|
54557
|
+
const req$ = requestRes.value;
|
|
54558
|
+
const doResult = await client$._do(req$, {
|
|
54559
|
+
context,
|
|
54560
|
+
errorCodes: [],
|
|
54561
|
+
retryConfig: context.retryConfig,
|
|
54562
|
+
retryCodes: context.retryCodes
|
|
54563
|
+
});
|
|
54564
|
+
if (!doResult.ok) {
|
|
54565
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
54566
|
+
}
|
|
54567
|
+
return [doResult, {
|
|
54568
|
+
status: "complete",
|
|
54569
|
+
request: req$,
|
|
54570
|
+
response: doResult.value
|
|
54571
|
+
}];
|
|
54572
|
+
}
|
|
54573
|
+
var init_keysRevoke = __esm(() => {
|
|
54574
|
+
init_encodings();
|
|
54575
|
+
init_primitives();
|
|
54576
|
+
init_schemas3();
|
|
54577
|
+
init_security();
|
|
54578
|
+
init_url();
|
|
54579
|
+
init_revokekeyop();
|
|
54580
|
+
init_async();
|
|
54581
|
+
});
|
|
54582
|
+
|
|
54583
|
+
// src/mcp-server/tools/keysRevoke.ts
|
|
54584
|
+
var args16, tool$keysRevoke;
|
|
54585
|
+
var init_keysRevoke2 = __esm(() => {
|
|
54586
|
+
init_keysRevoke();
|
|
54587
|
+
init_revokekeyop();
|
|
54588
|
+
init_tools();
|
|
54589
|
+
args16 = {
|
|
54590
|
+
request: RevokeKeyRequest$zodSchema
|
|
54591
|
+
};
|
|
54592
|
+
tool$keysRevoke = {
|
|
54593
|
+
name: "revoke_key",
|
|
54594
|
+
description: `Revoke an API key.
|
|
54595
|
+
|
|
54596
|
+
Revokes a key of the signing key's environment at once: its next request answers 401. Requires the management scope. A key of the other environment or of another workspace answers 404 not_found. A key cannot revoke itself (409 self_revocation): rotate it with keys.rotate, or revoke it with another management key. Revoking a revoked key changes nothing and answers the key as it was revoked, so a retry is safe.`,
|
|
54597
|
+
annotations: {
|
|
54598
|
+
title: "Revoke an API key of this environment",
|
|
54599
|
+
destructiveHint: true,
|
|
54600
|
+
idempotentHint: true,
|
|
54601
|
+
openWorldHint: false,
|
|
54602
|
+
readOnlyHint: false
|
|
54603
|
+
},
|
|
54604
|
+
args: args16,
|
|
54605
|
+
tool: async (client, args, ctx) => {
|
|
54606
|
+
const [result] = await keysRevoke(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
54607
|
+
if (!result.ok) {
|
|
54608
|
+
return {
|
|
54609
|
+
content: [{ type: "text", text: result.error.message }],
|
|
54610
|
+
isError: true
|
|
54611
|
+
};
|
|
54612
|
+
}
|
|
54613
|
+
return formatResult(result.value);
|
|
54614
|
+
}
|
|
54615
|
+
};
|
|
54616
|
+
});
|
|
54617
|
+
|
|
54618
|
+
// src/models/admission.ts
|
|
54619
|
+
var Admission$zodSchema;
|
|
54620
|
+
var init_admission = __esm(() => {
|
|
54621
|
+
init_zod();
|
|
54622
|
+
Admission$zodSchema = _enum([
|
|
54623
|
+
"immediate",
|
|
54624
|
+
"held"
|
|
54625
|
+
]).describe("immediate (the default): an assessment of this flow is decided from the evidence its answer has, and later evidence may change the decision. held: while the account's current assessment of this flow has not completed, the account's decision for the flow is held, and the final decision arrives as account.risk_changed when the investigation completes or hold_seconds pass, whichever is first. Each flow has its own admission.");
|
|
54626
|
+
});
|
|
54627
|
+
|
|
54628
|
+
// src/models/defaultdepth.ts
|
|
54629
|
+
var DefaultDepth$zodSchema;
|
|
54630
|
+
var init_defaultdepth = __esm(() => {
|
|
54631
|
+
init_zod();
|
|
54632
|
+
DefaultDepth$zodSchema = _enum([
|
|
54633
|
+
"quick",
|
|
54634
|
+
"full"
|
|
54635
|
+
]).describe("The depth a request for this flow that names none is served at. Defaults: full for account_creation and purchase, quick for login.");
|
|
54636
|
+
});
|
|
54637
|
+
|
|
54638
|
+
// src/models/onexpiry.ts
|
|
54639
|
+
var OnExpiry$zodSchema;
|
|
54640
|
+
var init_onexpiry = __esm(() => {
|
|
54641
|
+
init_zod();
|
|
54642
|
+
OnExpiry$zodSchema = _enum([
|
|
54643
|
+
"allow",
|
|
54644
|
+
"review",
|
|
54645
|
+
"block"
|
|
54646
|
+
]).describe("The decision a held assessment takes when hold_seconds pass before its investigation completes, unless the evidence so far gives a stricter one (default review). It is announced as account.risk_changed like any other change, so an expired hold is always announced. A hosted provider hook, which cannot wait, answers a held account by it at once: deny for block, allow otherwise. Kept while the flow is immediate.");
|
|
54647
|
+
});
|
|
54648
|
+
|
|
54649
|
+
// src/models/flowsettings.ts
|
|
54650
|
+
var FlowSettings$zodSchema;
|
|
54651
|
+
var init_flowsettings = __esm(() => {
|
|
54652
|
+
init_zod();
|
|
54653
|
+
init_admission();
|
|
54654
|
+
init_defaultdepth();
|
|
54655
|
+
init_onexpiry();
|
|
54656
|
+
FlowSettings$zodSchema = object({
|
|
54657
|
+
admission: Admission$zodSchema.describe("immediate (the default): an assessment of this flow is decided from the evidence its answer has, and later evidence may change the decision. held: while the account's current assessment of this flow has not completed, the account's decision for the flow is held, and the final decision arrives as account.risk_changed when the investigation completes or hold_seconds pass, whichever is first. Each flow has its own admission."),
|
|
54658
|
+
block: int().optional().describe("The score from which the decision is block. Absent while blocking is off, the default."),
|
|
54659
|
+
default_depth: DefaultDepth$zodSchema.describe("The depth a request for this flow that names none is served at. Defaults: full for account_creation and purchase, quick for login."),
|
|
54660
|
+
hold_seconds: int().describe("How long a held flow's assessment is held after it was created, 30 to 86400 seconds (default 300). Kept while the flow is immediate."),
|
|
54661
|
+
inherits_account_creation: boolean2().describe("true while this flow has no thresholds of its own and uses account_creation's, the default for login and purchase. Always false for signup."),
|
|
54662
|
+
on_expiry: OnExpiry$zodSchema.describe("The decision a held assessment takes when hold_seconds pass before its investigation completes, unless the evidence so far gives a stricter one (default review). It is announced as account.risk_changed like any other change, so an expired hold is always announced. A hosted provider hook, which cannot wait, answers a held account by it at once: deny for block, allow otherwise. Kept while the flow is immediate."),
|
|
54663
|
+
review: int(),
|
|
54664
|
+
step_up: int()
|
|
54665
|
+
}).describe("One flow's policy in force. A score below step_up is allow, below review step_up, and from review review; from block, when present, the decision is block. admission says when the flow's decision is final.");
|
|
54666
|
+
});
|
|
54667
|
+
|
|
54668
|
+
// src/models/settingsflows.ts
|
|
54669
|
+
var SettingsFlows$zodSchema;
|
|
54670
|
+
var init_settingsflows = __esm(() => {
|
|
54671
|
+
init_zod();
|
|
54672
|
+
init_flowsettings();
|
|
54673
|
+
SettingsFlows$zodSchema = object({
|
|
54674
|
+
account_creation: FlowSettings$zodSchema.describe("One flow's policy in force. A score below step_up is allow, below review step_up, and from review review; from block, when present, the decision is block. admission says when the flow's decision is final."),
|
|
54675
|
+
login: FlowSettings$zodSchema.describe("One flow's policy in force. A score below step_up is allow, below review step_up, and from review review; from block, when present, the decision is block. admission says when the flow's decision is final."),
|
|
54676
|
+
purchase: FlowSettings$zodSchema.describe("One flow's policy in force. A score below step_up is allow, below review step_up, and from review review; from block, when present, the decision is block. admission says when the flow's decision is final.")
|
|
54677
|
+
});
|
|
54678
|
+
});
|
|
54679
|
+
|
|
54680
|
+
// src/models/sourceid.ts
|
|
54681
|
+
var SourceId$zodSchema;
|
|
54682
|
+
var init_sourceid = __esm(() => {
|
|
54683
|
+
init_zod();
|
|
54684
|
+
SourceId$zodSchema = _enum([
|
|
54685
|
+
"github",
|
|
54686
|
+
"phone",
|
|
54687
|
+
"breach",
|
|
54688
|
+
"rdap",
|
|
54689
|
+
"mx",
|
|
54690
|
+
"ipintel"
|
|
54691
|
+
]).describe("A NoResponse source: github (GitHub accounts), phone (the phone lookup), breach (breach exposure), rdap (the email domain's registration), mx (the email domain's mail servers) or ipintel (IP intelligence).");
|
|
54692
|
+
});
|
|
54693
|
+
|
|
54694
|
+
// src/models/settings.ts
|
|
54695
|
+
var Settings$zodSchema;
|
|
54696
|
+
var init_settings = __esm(() => {
|
|
54697
|
+
init_zod();
|
|
54698
|
+
init_keyenvironment();
|
|
54699
|
+
init_settingsflows();
|
|
54700
|
+
init_sourceid();
|
|
54701
|
+
Settings$zodSchema = object({
|
|
54702
|
+
environment: KeyEnvironment$zodSchema.describe("The environment the key belongs to. A live key assesses with live sources; a test key answers from the deterministic simulator."),
|
|
54703
|
+
flows: SettingsFlows$zodSchema,
|
|
54704
|
+
policy_version: int().describe("How many times this environment's policy has changed; 0 while the defaults apply. A served risk.policy_version ends in +t<policy_version> once it is above 0."),
|
|
54705
|
+
refused_sources: array(SourceId$zodSchema).describe("The sources this environment refuses, sorted; empty, the default, refuses none. An assessment leaves a refused source out: its coverage is missing (an identifier with no other source lists coverage-unavailable as unavailable) rather than not_found, and a stored result of a refused source is not reused."),
|
|
54706
|
+
retention_days: int().describe("Days an assessment is kept after it is created, 1 to 365 (default 365). Shortening hides older assessments at once."),
|
|
54707
|
+
updated_at: string2().optional().describe("When the policy last changed. Absent while the defaults apply."),
|
|
54708
|
+
updated_by: string2().optional().describe("Who last changed the policy: the member's external user id for a change made through the console, the prefix (nrk_<environment>_<key id>) of the management key that made it, or NoResponse. Absent while the defaults apply."),
|
|
54709
|
+
workspace_id: string2().describe("The workspace id, which is also its live environment's workspace id; the test environment's is the same id with :test appended. A workspace created through the API is tnt_ and a 26-character ULID.")
|
|
54710
|
+
}).describe("One environment's settings: how long its assessments are kept, and for each flow the risk thresholds that decide it and the depth a request that names none is served at, and the sources it refuses. Live and test each have their own. A flow without thresholds of its own uses account_creation's (inherits_account_creation). Every change is recorded in the audit log as settings.updated, with who made it.");
|
|
54711
|
+
});
|
|
54712
|
+
|
|
54713
|
+
// src/models/getsettingsop.ts
|
|
54714
|
+
var GetSettingsRequest$zodSchema, GetSettingsResponseResult$zodSchema, GetSettingsResponse$zodSchema;
|
|
54715
|
+
var init_getsettingsop = __esm(() => {
|
|
54716
|
+
init_zod();
|
|
54717
|
+
init_authenticationerror();
|
|
54718
|
+
init_badrequesterror();
|
|
54719
|
+
init_conflicterror();
|
|
54720
|
+
init_keyenvironment();
|
|
54721
|
+
init_notfounderror();
|
|
54722
|
+
init_permissiondeniederror();
|
|
54723
|
+
init_ratelimiterror();
|
|
54724
|
+
init_settings();
|
|
54725
|
+
GetSettingsRequest$zodSchema = object({
|
|
54726
|
+
environment: KeyEnvironment$zodSchema.describe("The environment: live or test. Each has its own settings. Any other value answers 400. An API key reads and changes only its own environment's; the other answers 404."),
|
|
54727
|
+
workspace_id: string2().describe("Your workspace id, as each key lists it in workspace_id. Another workspace, a malformed id and a test environment's id answer 404.")
|
|
54728
|
+
});
|
|
54729
|
+
GetSettingsResponseResult$zodSchema = union([
|
|
54730
|
+
Settings$zodSchema,
|
|
54731
|
+
BadRequestError$zodSchema,
|
|
54732
|
+
AuthenticationError$zodSchema,
|
|
54733
|
+
PermissionDeniedError$zodSchema,
|
|
54734
|
+
NotFoundError$zodSchema,
|
|
54735
|
+
ConflictError$zodSchema,
|
|
54736
|
+
RateLimitError$zodSchema
|
|
54737
|
+
]);
|
|
54738
|
+
GetSettingsResponse$zodSchema = object({
|
|
54739
|
+
Headers: record(string2(), array(string2())).default({}),
|
|
54740
|
+
Result: union([
|
|
54741
|
+
Settings$zodSchema,
|
|
54742
|
+
BadRequestError$zodSchema,
|
|
54743
|
+
AuthenticationError$zodSchema,
|
|
54744
|
+
PermissionDeniedError$zodSchema,
|
|
54745
|
+
NotFoundError$zodSchema,
|
|
54746
|
+
ConflictError$zodSchema,
|
|
54747
|
+
RateLimitError$zodSchema
|
|
54748
|
+
])
|
|
54749
|
+
});
|
|
54750
|
+
});
|
|
54751
|
+
|
|
54752
|
+
// src/funcs/settingsGet.ts
|
|
54753
|
+
function settingsGet(client$, request, options) {
|
|
54754
|
+
return new APIPromise($do17(client$, request, options));
|
|
54755
|
+
}
|
|
54756
|
+
async function $do17(client$, request, options) {
|
|
54757
|
+
const parsed$ = safeParse2(request, (value$) => GetSettingsRequest$zodSchema.parse(value$), "Input validation failed");
|
|
54758
|
+
if (!parsed$.ok) {
|
|
54759
|
+
return [parsed$, { status: "invalid" }];
|
|
54760
|
+
}
|
|
54761
|
+
const payload$ = parsed$.value;
|
|
54762
|
+
const body$ = null;
|
|
54763
|
+
const pathParams$ = {
|
|
54764
|
+
environment: encodeSimple("environment", payload$.environment, {
|
|
54765
|
+
explode: false,
|
|
54766
|
+
charEncoding: "percent"
|
|
54767
|
+
}),
|
|
54768
|
+
workspace_id: encodeSimple("workspace_id", payload$.workspace_id, {
|
|
54769
|
+
explode: false,
|
|
54770
|
+
charEncoding: "percent"
|
|
54771
|
+
})
|
|
54772
|
+
};
|
|
54773
|
+
const path$ = pathToFunc("/v1/workspaces/{workspace_id}/settings/{environment}")(pathParams$);
|
|
54774
|
+
const headers$ = new Headers(compactMap({
|
|
54775
|
+
Accept: options?.acceptHeaderOverride || "application/json;q=1, application/problem+json;q=0"
|
|
54776
|
+
}));
|
|
54777
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
54778
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
54779
|
+
const context = {
|
|
54780
|
+
options: client$._options,
|
|
54781
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
54782
|
+
operationID: "getSettings",
|
|
54783
|
+
oAuth2Scopes: null,
|
|
54784
|
+
resolvedSecurity: requestSecurity,
|
|
54785
|
+
securitySource: client$._options.security,
|
|
54786
|
+
retryConfig: options?.retries || client$._options.retryConfig || {
|
|
54787
|
+
strategy: "backoff",
|
|
54788
|
+
backoff: {
|
|
54789
|
+
initialInterval: 500,
|
|
54790
|
+
maxInterval: 8000,
|
|
54791
|
+
exponent: 2,
|
|
54792
|
+
maxElapsedTime: 30000
|
|
54793
|
+
},
|
|
54794
|
+
retryConnectionErrors: true
|
|
54795
|
+
},
|
|
54796
|
+
retryCodes: options?.retryCodes || [
|
|
54797
|
+
"408",
|
|
54798
|
+
"429",
|
|
54799
|
+
"5XX"
|
|
54800
|
+
]
|
|
54801
|
+
};
|
|
54802
|
+
const requestRes = client$._createRequest(context, {
|
|
54803
|
+
security: requestSecurity,
|
|
54804
|
+
method: "GET",
|
|
54805
|
+
baseURL: options?.serverURL,
|
|
54806
|
+
path: path$,
|
|
54807
|
+
headers: headers$,
|
|
54808
|
+
body: body$,
|
|
54809
|
+
userAgent: client$._options.userAgent,
|
|
54810
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
54811
|
+
}, options);
|
|
54812
|
+
if (!requestRes.ok) {
|
|
54813
|
+
return [requestRes, { status: "invalid" }];
|
|
54814
|
+
}
|
|
54815
|
+
const req$ = requestRes.value;
|
|
54816
|
+
const doResult = await client$._do(req$, {
|
|
54817
|
+
context,
|
|
54818
|
+
errorCodes: [],
|
|
54819
|
+
retryConfig: context.retryConfig,
|
|
54820
|
+
retryCodes: context.retryCodes
|
|
54821
|
+
});
|
|
54822
|
+
if (!doResult.ok) {
|
|
54823
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
54824
|
+
}
|
|
54825
|
+
return [doResult, {
|
|
54826
|
+
status: "complete",
|
|
54827
|
+
request: req$,
|
|
54828
|
+
response: doResult.value
|
|
54829
|
+
}];
|
|
54830
|
+
}
|
|
54831
|
+
var init_settingsGet = __esm(() => {
|
|
54832
|
+
init_encodings();
|
|
54833
|
+
init_primitives();
|
|
54834
|
+
init_schemas3();
|
|
54835
|
+
init_security();
|
|
54836
|
+
init_url();
|
|
54837
|
+
init_getsettingsop();
|
|
54838
|
+
init_async();
|
|
54839
|
+
});
|
|
54840
|
+
|
|
54841
|
+
// src/mcp-server/tools/settingsGet.ts
|
|
54842
|
+
var args17, tool$settingsGet;
|
|
54843
|
+
var init_settingsGet2 = __esm(() => {
|
|
54844
|
+
init_settingsGet();
|
|
54845
|
+
init_getsettingsop();
|
|
54846
|
+
init_tools();
|
|
54847
|
+
args17 = {
|
|
54848
|
+
request: GetSettingsRequest$zodSchema
|
|
54849
|
+
};
|
|
54850
|
+
tool$settingsGet = {
|
|
54851
|
+
name: "get_settings",
|
|
54852
|
+
description: `Read an environment's settings.
|
|
54853
|
+
|
|
54854
|
+
Reads the settings of the signing key's environment: retention in days; per flow (account_creation, login, purchase) the step_up, review and block thresholds, the default depth and the admission; and the sources the environment refuses. A flow without thresholds of its own shows account_creation's with inherits_account_creation true. Requires the management scope; the other environment answers 404 not_found. Read-only and safe to retry.`,
|
|
54855
|
+
annotations: {
|
|
54856
|
+
title: "Read this environment's settings",
|
|
54857
|
+
destructiveHint: false,
|
|
54858
|
+
idempotentHint: true,
|
|
54859
|
+
openWorldHint: false,
|
|
54860
|
+
readOnlyHint: true
|
|
54861
|
+
},
|
|
54862
|
+
args: args17,
|
|
54863
|
+
tool: async (client, args, ctx) => {
|
|
54864
|
+
const [result] = await settingsGet(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
54865
|
+
if (!result.ok) {
|
|
54866
|
+
return {
|
|
54867
|
+
content: [{ type: "text", text: result.error.message }],
|
|
54868
|
+
isError: true
|
|
54869
|
+
};
|
|
54870
|
+
}
|
|
54871
|
+
return formatResult(result.value);
|
|
54872
|
+
}
|
|
54873
|
+
};
|
|
54874
|
+
});
|
|
54875
|
+
|
|
54876
|
+
// src/models/flowchange.ts
|
|
54877
|
+
var FlowChange$zodSchema;
|
|
54878
|
+
var init_flowchange = __esm(() => {
|
|
54879
|
+
init_zod();
|
|
54880
|
+
init_admission();
|
|
54881
|
+
init_defaultdepth();
|
|
54882
|
+
init_onexpiry();
|
|
54883
|
+
FlowChange$zodSchema = object({
|
|
54884
|
+
admission: Admission$zodSchema.optional().describe("immediate (the default): an assessment of this flow is decided from the evidence its answer has, and later evidence may change the decision. held: while the account's current assessment of this flow has not completed, the account's decision for the flow is held, and the final decision arrives as account.risk_changed when the investigation completes or hold_seconds pass, whichever is first. Each flow has its own admission."),
|
|
54885
|
+
block: int().nullable().optional().describe("The score from which the decision is block; null turns blocking off."),
|
|
54886
|
+
default_depth: DefaultDepth$zodSchema.optional().describe("The depth a request for this flow that names none is served at. Defaults: full for account_creation and purchase, quick for login."),
|
|
54887
|
+
hold_seconds: int().optional().describe("How long a held flow's assessment is held after it was created, 30 to 86400 seconds (default 300). Kept while the flow is immediate."),
|
|
54888
|
+
inherits_account_creation: boolean2().optional().describe("Login or purchase only: drop the flow's own thresholds so it uses account_creation's again. Not combined with step_up, review or block. Send true; false is refused."),
|
|
54889
|
+
inherits_signup: boolean2().optional().describe("Alias of inherits_account_creation, still accepted. Send true; false is refused."),
|
|
54890
|
+
on_expiry: OnExpiry$zodSchema.optional().describe("The decision a held assessment takes when hold_seconds pass before its investigation completes, unless the evidence so far gives a stricter one (default review). It is announced as account.risk_changed like any other change, so an expired hold is always announced. A hosted provider hook, which cannot wait, answers a held account by it at once: deny for block, allow otherwise. Kept while the flow is immediate."),
|
|
54891
|
+
review: int().optional(),
|
|
54892
|
+
step_up: int().optional()
|
|
54893
|
+
}).describe("A change to one flow. A field left out keeps the value in force. Thresholds set on login or purchase start from the values in force, account_creation's while it inherits them. After the change, 0 < step_up < review <= 100 and block is off or review <= block <= 100.");
|
|
54894
|
+
});
|
|
54895
|
+
|
|
54896
|
+
// src/models/settingsrequestflows.ts
|
|
54897
|
+
var SettingsRequestFlows$zodSchema;
|
|
54898
|
+
var init_settingsrequestflows = __esm(() => {
|
|
54899
|
+
init_zod();
|
|
54900
|
+
init_flowchange();
|
|
54901
|
+
SettingsRequestFlows$zodSchema = object({
|
|
54902
|
+
account_creation: FlowChange$zodSchema.optional().describe("A change to one flow. A field left out keeps the value in force. Thresholds set on login or purchase start from the values in force, account_creation's while it inherits them. After the change, 0 < step_up < review <= 100 and block is off or review <= block <= 100."),
|
|
54903
|
+
login: FlowChange$zodSchema.optional().describe("A change to one flow. A field left out keeps the value in force. Thresholds set on login or purchase start from the values in force, account_creation's while it inherits them. After the change, 0 < step_up < review <= 100 and block is off or review <= block <= 100."),
|
|
54904
|
+
purchase: FlowChange$zodSchema.optional().describe("A change to one flow. A field left out keeps the value in force. Thresholds set on login or purchase start from the values in force, account_creation's while it inherits them. After the change, 0 < step_up < review <= 100 and block is off or review <= block <= 100."),
|
|
54905
|
+
signup: FlowChange$zodSchema.optional().describe("A change to one flow. A field left out keeps the value in force. Thresholds set on login or purchase start from the values in force, account_creation's while it inherits them. After the change, 0 < step_up < review <= 100 and block is off or review <= block <= 100.")
|
|
54906
|
+
}).describe("Use account_creation or its deprecated alias signup, not both.");
|
|
54907
|
+
});
|
|
54908
|
+
|
|
54909
|
+
// src/models/settingsrequest.ts
|
|
54910
|
+
var SettingsRequest$zodSchema;
|
|
54911
|
+
var init_settingsrequest = __esm(() => {
|
|
54912
|
+
init_zod();
|
|
54913
|
+
init_settingsrequestflows();
|
|
54914
|
+
init_sourceid();
|
|
54915
|
+
SettingsRequest$zodSchema = object({
|
|
54916
|
+
flows: SettingsRequestFlows$zodSchema.optional().describe("Use account_creation or its deprecated alias signup, not both."),
|
|
54917
|
+
refused_sources: array(SourceId$zodSchema).optional().describe("Replaces the refused sources; [] refuses none. A change applies to new assessments within a minute."),
|
|
54918
|
+
retention_days: int().optional()
|
|
54919
|
+
}).describe("PATCH /v1/workspaces/{workspace_id}/settings/{environment} body. Changes only what it names, in one transaction; a policy change is one new policy_version. Needs the admin or owner role, or an API key with the management scope for its own environment.");
|
|
54920
|
+
});
|
|
54921
|
+
|
|
54922
|
+
// src/models/updatesettingsop.ts
|
|
54923
|
+
var UpdateSettingsRequest$zodSchema, UpdateSettingsResponseResult$zodSchema, UpdateSettingsResponse$zodSchema;
|
|
54924
|
+
var init_updatesettingsop = __esm(() => {
|
|
54925
|
+
init_zod();
|
|
54926
|
+
init_authenticationerror();
|
|
54927
|
+
init_badrequesterror();
|
|
54928
|
+
init_conflicterror();
|
|
54929
|
+
init_keyenvironment();
|
|
54930
|
+
init_notfounderror();
|
|
54931
|
+
init_permissiondeniederror();
|
|
54932
|
+
init_ratelimiterror();
|
|
54933
|
+
init_settings();
|
|
54934
|
+
init_settingsrequest();
|
|
54935
|
+
UpdateSettingsRequest$zodSchema = object({
|
|
54936
|
+
body: SettingsRequest$zodSchema,
|
|
54937
|
+
environment: KeyEnvironment$zodSchema.describe("The environment: live or test. Each has its own settings. Any other value answers 400. An API key reads and changes only its own environment's; the other answers 404."),
|
|
54938
|
+
workspace_id: string2().describe("Your workspace id, as each key lists it in workspace_id. Another workspace, a malformed id and a test environment's id answer 404.")
|
|
54939
|
+
});
|
|
54940
|
+
UpdateSettingsResponseResult$zodSchema = union([
|
|
54941
|
+
Settings$zodSchema,
|
|
54942
|
+
BadRequestError$zodSchema,
|
|
54943
|
+
AuthenticationError$zodSchema,
|
|
54944
|
+
PermissionDeniedError$zodSchema,
|
|
54945
|
+
NotFoundError$zodSchema,
|
|
54946
|
+
ConflictError$zodSchema,
|
|
54947
|
+
RateLimitError$zodSchema
|
|
54948
|
+
]);
|
|
54949
|
+
UpdateSettingsResponse$zodSchema = object({
|
|
54950
|
+
Headers: record(string2(), array(string2())).default({}),
|
|
54951
|
+
Result: union([
|
|
54952
|
+
Settings$zodSchema,
|
|
54953
|
+
BadRequestError$zodSchema,
|
|
54954
|
+
AuthenticationError$zodSchema,
|
|
54955
|
+
PermissionDeniedError$zodSchema,
|
|
54956
|
+
NotFoundError$zodSchema,
|
|
54957
|
+
ConflictError$zodSchema,
|
|
54958
|
+
RateLimitError$zodSchema
|
|
54959
|
+
])
|
|
54960
|
+
});
|
|
54961
|
+
});
|
|
54962
|
+
|
|
54963
|
+
// src/funcs/settingsUpdate.ts
|
|
54964
|
+
function settingsUpdate(client$, request, options) {
|
|
54965
|
+
return new APIPromise($do18(client$, request, options));
|
|
54966
|
+
}
|
|
54967
|
+
async function $do18(client$, request, options) {
|
|
54968
|
+
const parsed$ = safeParse2(request, (value$) => UpdateSettingsRequest$zodSchema.parse(value$), "Input validation failed");
|
|
54969
|
+
if (!parsed$.ok) {
|
|
54970
|
+
return [parsed$, { status: "invalid" }];
|
|
54971
|
+
}
|
|
54972
|
+
const payload$ = parsed$.value;
|
|
54973
|
+
const body$ = encodeJSON("body", payload$.body, { explode: true });
|
|
54974
|
+
const pathParams$ = {
|
|
54975
|
+
environment: encodeSimple("environment", payload$.environment, {
|
|
54976
|
+
explode: false,
|
|
54977
|
+
charEncoding: "percent"
|
|
54978
|
+
}),
|
|
54979
|
+
workspace_id: encodeSimple("workspace_id", payload$.workspace_id, {
|
|
54980
|
+
explode: false,
|
|
54981
|
+
charEncoding: "percent"
|
|
54982
|
+
})
|
|
54983
|
+
};
|
|
54984
|
+
const path$ = pathToFunc("/v1/workspaces/{workspace_id}/settings/{environment}")(pathParams$);
|
|
54985
|
+
const headers$ = new Headers(compactMap({
|
|
54986
|
+
"Content-Type": "application/json",
|
|
54987
|
+
Accept: options?.acceptHeaderOverride || "application/json;q=1, application/problem+json;q=0"
|
|
54988
|
+
}));
|
|
54989
|
+
const securityInput = await extractSecurity(client$._options.security);
|
|
54990
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
54991
|
+
const context = {
|
|
54992
|
+
options: client$._options,
|
|
54993
|
+
baseURL: options?.serverURL ?? client$._baseURL ?? "",
|
|
54994
|
+
operationID: "updateSettings",
|
|
54995
|
+
oAuth2Scopes: null,
|
|
54996
|
+
resolvedSecurity: requestSecurity,
|
|
54997
|
+
securitySource: client$._options.security,
|
|
54998
|
+
retryConfig: options?.retries || client$._options.retryConfig || {
|
|
54999
|
+
strategy: "backoff",
|
|
55000
|
+
backoff: {
|
|
55001
|
+
initialInterval: 500,
|
|
55002
|
+
maxInterval: 8000,
|
|
55003
|
+
exponent: 2,
|
|
55004
|
+
maxElapsedTime: 30000
|
|
55005
|
+
},
|
|
55006
|
+
retryConnectionErrors: true
|
|
55007
|
+
},
|
|
55008
|
+
retryCodes: options?.retryCodes || [
|
|
55009
|
+
"408",
|
|
55010
|
+
"429",
|
|
55011
|
+
"5XX"
|
|
55012
|
+
]
|
|
55013
|
+
};
|
|
55014
|
+
const requestRes = client$._createRequest(context, {
|
|
55015
|
+
security: requestSecurity,
|
|
55016
|
+
method: "PATCH",
|
|
55017
|
+
baseURL: options?.serverURL,
|
|
55018
|
+
path: path$,
|
|
55019
|
+
headers: headers$,
|
|
55020
|
+
body: body$,
|
|
55021
|
+
userAgent: client$._options.userAgent,
|
|
55022
|
+
timeoutMs: options?.timeoutMs || client$._options.timeoutMs || -1
|
|
55023
|
+
}, options);
|
|
55024
|
+
if (!requestRes.ok) {
|
|
55025
|
+
return [requestRes, { status: "invalid" }];
|
|
55026
|
+
}
|
|
55027
|
+
const req$ = requestRes.value;
|
|
55028
|
+
const doResult = await client$._do(req$, {
|
|
55029
|
+
context,
|
|
55030
|
+
errorCodes: [],
|
|
55031
|
+
retryConfig: context.retryConfig,
|
|
55032
|
+
retryCodes: context.retryCodes
|
|
55033
|
+
});
|
|
55034
|
+
if (!doResult.ok) {
|
|
55035
|
+
return [doResult, { status: "request-error", request: req$ }];
|
|
55036
|
+
}
|
|
55037
|
+
return [doResult, {
|
|
55038
|
+
status: "complete",
|
|
55039
|
+
request: req$,
|
|
55040
|
+
response: doResult.value
|
|
55041
|
+
}];
|
|
55042
|
+
}
|
|
55043
|
+
var init_settingsUpdate = __esm(() => {
|
|
55044
|
+
init_encodings();
|
|
55045
|
+
init_primitives();
|
|
55046
|
+
init_schemas3();
|
|
55047
|
+
init_security();
|
|
55048
|
+
init_url();
|
|
55049
|
+
init_updatesettingsop();
|
|
55050
|
+
init_async();
|
|
55051
|
+
});
|
|
55052
|
+
|
|
55053
|
+
// src/mcp-server/tools/settingsUpdate.ts
|
|
55054
|
+
var args18, tool$settingsUpdate;
|
|
55055
|
+
var init_settingsUpdate2 = __esm(() => {
|
|
55056
|
+
init_settingsUpdate();
|
|
55057
|
+
init_updatesettingsop();
|
|
55058
|
+
init_tools();
|
|
55059
|
+
args18 = {
|
|
55060
|
+
request: UpdateSettingsRequest$zodSchema
|
|
55061
|
+
};
|
|
55062
|
+
tool$settingsUpdate = {
|
|
55063
|
+
name: "update_settings",
|
|
55064
|
+
description: `Change an environment's settings.
|
|
55065
|
+
|
|
55066
|
+
Changes only what the body names, in one transaction: retention_days, refused_sources, and per flow step_up, review, block (null turns blocking off), default_depth, admission, hold_seconds, on_expiry, or inherits_account_creation to return login or purchase to account_creation's thresholds. After the change each flow keeps 0 < step_up < review <= 100 and block off or review <= block <= 100; a change that breaks it answers 400 naming the flow. A policy change is one new policy_version with the signing key's prefix as updated_by, and every change is recorded in the workspace's audit log with the key as its actor. Requires the management scope; the other environment answers 404 not_found. A change reaches assessments within a minute.`,
|
|
55067
|
+
annotations: {
|
|
55068
|
+
title: "Change this environment's settings",
|
|
55069
|
+
destructiveHint: false,
|
|
55070
|
+
idempotentHint: false,
|
|
55071
|
+
openWorldHint: false,
|
|
55072
|
+
readOnlyHint: false
|
|
55073
|
+
},
|
|
55074
|
+
args: args18,
|
|
55075
|
+
tool: async (client, args, ctx) => {
|
|
55076
|
+
const [result] = await settingsUpdate(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
55077
|
+
if (!result.ok) {
|
|
55078
|
+
return {
|
|
55079
|
+
content: [{ type: "text", text: result.error.message }],
|
|
55080
|
+
isError: true
|
|
55081
|
+
};
|
|
55082
|
+
}
|
|
55083
|
+
return formatResult(result.value);
|
|
55084
|
+
}
|
|
55085
|
+
};
|
|
55086
|
+
});
|
|
55087
|
+
|
|
54234
55088
|
// src/models/webhookendpointrequest.ts
|
|
54235
55089
|
var WebhookEndpointRequest$zodSchema;
|
|
54236
55090
|
var init_webhookendpointrequest = __esm(() => {
|
|
@@ -54244,9 +55098,9 @@ var init_webhookendpointrequest = __esm(() => {
|
|
|
54244
55098
|
|
|
54245
55099
|
// src/funcs/webhookEndpointsCreate.ts
|
|
54246
55100
|
function webhookEndpointsCreate(client$, request, options) {
|
|
54247
|
-
return new APIPromise($
|
|
55101
|
+
return new APIPromise($do19(client$, request, options));
|
|
54248
55102
|
}
|
|
54249
|
-
async function $
|
|
55103
|
+
async function $do19(client$, request, options) {
|
|
54250
55104
|
const parsed$ = safeParse2(request, (value$) => WebhookEndpointRequest$zodSchema.parse(value$), "Input validation failed");
|
|
54251
55105
|
if (!parsed$.ok) {
|
|
54252
55106
|
return [parsed$, { status: "invalid" }];
|
|
@@ -54310,12 +55164,12 @@ var init_webhookEndpointsCreate = __esm(() => {
|
|
|
54310
55164
|
});
|
|
54311
55165
|
|
|
54312
55166
|
// src/mcp-server/tools/webhookEndpointsCreate.ts
|
|
54313
|
-
var
|
|
55167
|
+
var args19, tool$webhookEndpointsCreate;
|
|
54314
55168
|
var init_webhookEndpointsCreate2 = __esm(() => {
|
|
54315
55169
|
init_webhookEndpointsCreate();
|
|
54316
55170
|
init_webhookendpointrequest();
|
|
54317
55171
|
init_tools();
|
|
54318
|
-
|
|
55172
|
+
args19 = {
|
|
54319
55173
|
request: WebhookEndpointRequest$zodSchema
|
|
54320
55174
|
};
|
|
54321
55175
|
tool$webhookEndpointsCreate = {
|
|
@@ -54330,7 +55184,7 @@ Registers a webhook endpoint and returns it with its first signing secret, shown
|
|
|
54330
55184
|
openWorldHint: false,
|
|
54331
55185
|
readOnlyHint: false
|
|
54332
55186
|
},
|
|
54333
|
-
args:
|
|
55187
|
+
args: args19,
|
|
54334
55188
|
tool: async (client, args, ctx) => {
|
|
54335
55189
|
const [result] = await webhookEndpointsCreate(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
54336
55190
|
if (!result.ok) {
|
|
@@ -54380,9 +55234,9 @@ var init_deletewebhookendpointop = __esm(() => {
|
|
|
54380
55234
|
|
|
54381
55235
|
// src/funcs/webhookEndpointsDelete.ts
|
|
54382
55236
|
function webhookEndpointsDelete(client$, request, options) {
|
|
54383
|
-
return new APIPromise($
|
|
55237
|
+
return new APIPromise($do20(client$, request, options));
|
|
54384
55238
|
}
|
|
54385
|
-
async function $
|
|
55239
|
+
async function $do20(client$, request, options) {
|
|
54386
55240
|
const parsed$ = safeParse2(request, (value$) => DeleteWebhookEndpointRequest$zodSchema.parse(value$), "Input validation failed");
|
|
54387
55241
|
if (!parsed$.ok) {
|
|
54388
55242
|
return [parsed$, { status: "invalid" }];
|
|
@@ -54464,12 +55318,12 @@ var init_webhookEndpointsDelete = __esm(() => {
|
|
|
54464
55318
|
});
|
|
54465
55319
|
|
|
54466
55320
|
// src/mcp-server/tools/webhookEndpointsDelete.ts
|
|
54467
|
-
var
|
|
55321
|
+
var args20, tool$webhookEndpointsDelete;
|
|
54468
55322
|
var init_webhookEndpointsDelete2 = __esm(() => {
|
|
54469
55323
|
init_webhookEndpointsDelete();
|
|
54470
55324
|
init_deletewebhookendpointop();
|
|
54471
55325
|
init_tools();
|
|
54472
|
-
|
|
55326
|
+
args20 = {
|
|
54473
55327
|
request: DeleteWebhookEndpointRequest$zodSchema
|
|
54474
55328
|
};
|
|
54475
55329
|
tool$webhookEndpointsDelete = {
|
|
@@ -54484,7 +55338,7 @@ Deletes the endpoint and its signing keys. Deliveries still queued for it are dr
|
|
|
54484
55338
|
openWorldHint: false,
|
|
54485
55339
|
readOnlyHint: false
|
|
54486
55340
|
},
|
|
54487
|
-
args:
|
|
55341
|
+
args: args20,
|
|
54488
55342
|
tool: async (client, args, ctx) => {
|
|
54489
55343
|
const [result] = await webhookEndpointsDelete(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
54490
55344
|
if (!result.ok) {
|
|
@@ -54500,9 +55354,9 @@ Deletes the endpoint and its signing keys. Deliveries still queued for it are dr
|
|
|
54500
55354
|
|
|
54501
55355
|
// src/funcs/webhookEndpointsList.ts
|
|
54502
55356
|
function webhookEndpointsList(client$, options) {
|
|
54503
|
-
return new APIPromise($
|
|
55357
|
+
return new APIPromise($do21(client$, options));
|
|
54504
55358
|
}
|
|
54505
|
-
async function $
|
|
55359
|
+
async function $do21(client$, options) {
|
|
54506
55360
|
const path$ = pathToFunc("/v1/webhooks")();
|
|
54507
55361
|
const headers$ = new Headers(compactMap({
|
|
54508
55362
|
Accept: options?.acceptHeaderOverride || "application/json;q=1, application/problem+json;q=0"
|
|
@@ -54694,9 +55548,9 @@ var init_listwebhookdeliveriesop = __esm(() => {
|
|
|
54694
55548
|
|
|
54695
55549
|
// src/funcs/webhookEndpointsListDeliveries.ts
|
|
54696
55550
|
function webhookEndpointsListDeliveries(client$, request, options) {
|
|
54697
|
-
return new APIPromise($
|
|
55551
|
+
return new APIPromise($do22(client$, request, options));
|
|
54698
55552
|
}
|
|
54699
|
-
async function $
|
|
55553
|
+
async function $do22(client$, request, options) {
|
|
54700
55554
|
const parsed$ = safeParse2(request, (value$) => ListWebhookDeliveriesRequest$zodSchema.parse(value$), "Input validation failed");
|
|
54701
55555
|
if (!parsed$.ok) {
|
|
54702
55556
|
return [parsed$, { status: "invalid" }];
|
|
@@ -54783,12 +55637,12 @@ var init_webhookEndpointsListDeliveries = __esm(() => {
|
|
|
54783
55637
|
});
|
|
54784
55638
|
|
|
54785
55639
|
// src/mcp-server/tools/webhookEndpointsListDeliveries.ts
|
|
54786
|
-
var
|
|
55640
|
+
var args21, tool$webhookEndpointsListDeliveries;
|
|
54787
55641
|
var init_webhookEndpointsListDeliveries2 = __esm(() => {
|
|
54788
55642
|
init_webhookEndpointsListDeliveries();
|
|
54789
55643
|
init_listwebhookdeliveriesop();
|
|
54790
55644
|
init_tools();
|
|
54791
|
-
|
|
55645
|
+
args21 = {
|
|
54792
55646
|
request: ListWebhookDeliveriesRequest$zodSchema
|
|
54793
55647
|
};
|
|
54794
55648
|
tool$webhookEndpointsListDeliveries = {
|
|
@@ -54803,7 +55657,7 @@ Every POST the endpoint received, newest first: the event id and type, which att
|
|
|
54803
55657
|
openWorldHint: false,
|
|
54804
55658
|
readOnlyHint: true
|
|
54805
55659
|
},
|
|
54806
|
-
args:
|
|
55660
|
+
args: args21,
|
|
54807
55661
|
tool: async (client, args, ctx) => {
|
|
54808
55662
|
const [result] = await webhookEndpointsListDeliveries(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
54809
55663
|
if (!result.ok) {
|
|
@@ -54877,9 +55731,9 @@ var init_replaywebhookdeliveryop = __esm(() => {
|
|
|
54877
55731
|
|
|
54878
55732
|
// src/funcs/webhookEndpointsReplayDelivery.ts
|
|
54879
55733
|
function webhookEndpointsReplayDelivery(client$, request, options) {
|
|
54880
|
-
return new APIPromise($
|
|
55734
|
+
return new APIPromise($do23(client$, request, options));
|
|
54881
55735
|
}
|
|
54882
|
-
async function $
|
|
55736
|
+
async function $do23(client$, request, options) {
|
|
54883
55737
|
const parsed$ = safeParse2(request, (value$) => ReplayWebhookDeliveryRequest$zodSchema.parse(value$), "Input validation failed");
|
|
54884
55738
|
if (!parsed$.ok) {
|
|
54885
55739
|
return [parsed$, { status: "invalid" }];
|
|
@@ -54953,12 +55807,12 @@ var init_webhookEndpointsReplayDelivery = __esm(() => {
|
|
|
54953
55807
|
});
|
|
54954
55808
|
|
|
54955
55809
|
// src/mcp-server/tools/webhookEndpointsReplayDelivery.ts
|
|
54956
|
-
var
|
|
55810
|
+
var args22, tool$webhookEndpointsReplayDelivery;
|
|
54957
55811
|
var init_webhookEndpointsReplayDelivery2 = __esm(() => {
|
|
54958
55812
|
init_webhookEndpointsReplayDelivery();
|
|
54959
55813
|
init_replaywebhookdeliveryop();
|
|
54960
55814
|
init_tools();
|
|
54961
|
-
|
|
55815
|
+
args22 = {
|
|
54962
55816
|
request: ReplayWebhookDeliveryRequest$zodSchema
|
|
54963
55817
|
};
|
|
54964
55818
|
tool$webhookEndpointsReplayDelivery = {
|
|
@@ -54973,7 +55827,7 @@ Queues the event for the endpoint again: the same event id and body it received,
|
|
|
54973
55827
|
openWorldHint: false,
|
|
54974
55828
|
readOnlyHint: false
|
|
54975
55829
|
},
|
|
54976
|
-
args:
|
|
55830
|
+
args: args22,
|
|
54977
55831
|
tool: async (client, args, ctx) => {
|
|
54978
55832
|
const [result] = await webhookEndpointsReplayDelivery(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
54979
55833
|
if (!result.ok) {
|
|
@@ -55059,9 +55913,9 @@ var init_rotatewebhooksigningkeyop = __esm(() => {
|
|
|
55059
55913
|
|
|
55060
55914
|
// src/funcs/webhookEndpointsRotateSigningKey.ts
|
|
55061
55915
|
function webhookEndpointsRotateSigningKey(client$, request, options) {
|
|
55062
|
-
return new APIPromise($
|
|
55916
|
+
return new APIPromise($do24(client$, request, options));
|
|
55063
55917
|
}
|
|
55064
|
-
async function $
|
|
55918
|
+
async function $do24(client$, request, options) {
|
|
55065
55919
|
const parsed$ = safeParse2(request, (value$) => RotateWebhookSigningKeyRequest$zodSchema.parse(value$), "Input validation failed");
|
|
55066
55920
|
if (!parsed$.ok) {
|
|
55067
55921
|
return [parsed$, { status: "invalid" }];
|
|
@@ -55131,12 +55985,12 @@ var init_webhookEndpointsRotateSigningKey = __esm(() => {
|
|
|
55131
55985
|
});
|
|
55132
55986
|
|
|
55133
55987
|
// src/mcp-server/tools/webhookEndpointsRotateSigningKey.ts
|
|
55134
|
-
var
|
|
55988
|
+
var args23, tool$webhookEndpointsRotateSigningKey;
|
|
55135
55989
|
var init_webhookEndpointsRotateSigningKey2 = __esm(() => {
|
|
55136
55990
|
init_webhookEndpointsRotateSigningKey();
|
|
55137
55991
|
init_rotatewebhooksigningkeyop();
|
|
55138
55992
|
init_tools();
|
|
55139
|
-
|
|
55993
|
+
args23 = {
|
|
55140
55994
|
request: RotateWebhookSigningKeyRequest$zodSchema
|
|
55141
55995
|
};
|
|
55142
55996
|
tool$webhookEndpointsRotateSigningKey = {
|
|
@@ -55151,7 +56005,7 @@ Issues a new signing key for the endpoint and returns its secret once. Every del
|
|
|
55151
56005
|
openWorldHint: false,
|
|
55152
56006
|
readOnlyHint: false
|
|
55153
56007
|
},
|
|
55154
|
-
args:
|
|
56008
|
+
args: args23,
|
|
55155
56009
|
tool: async (client, args, ctx) => {
|
|
55156
56010
|
const [result] = await webhookEndpointsRotateSigningKey(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
55157
56011
|
if (!result.ok) {
|
|
@@ -55252,9 +56106,9 @@ var init_sendwebhooktesteventop = __esm(() => {
|
|
|
55252
56106
|
|
|
55253
56107
|
// src/funcs/webhookEndpointsSendTestEvent.ts
|
|
55254
56108
|
function webhookEndpointsSendTestEvent(client$, request, options) {
|
|
55255
|
-
return new APIPromise($
|
|
56109
|
+
return new APIPromise($do25(client$, request, options));
|
|
55256
56110
|
}
|
|
55257
|
-
async function $
|
|
56111
|
+
async function $do25(client$, request, options) {
|
|
55258
56112
|
const parsed$ = safeParse2(request, (value$) => SendWebhookTestEventRequest$zodSchema.parse(value$), "Input validation failed");
|
|
55259
56113
|
if (!parsed$.ok) {
|
|
55260
56114
|
return [parsed$, { status: "invalid" }];
|
|
@@ -55324,12 +56178,12 @@ var init_webhookEndpointsSendTestEvent = __esm(() => {
|
|
|
55324
56178
|
});
|
|
55325
56179
|
|
|
55326
56180
|
// src/mcp-server/tools/webhookEndpointsSendTestEvent.ts
|
|
55327
|
-
var
|
|
56181
|
+
var args24, tool$webhookEndpointsSendTestEvent;
|
|
55328
56182
|
var init_webhookEndpointsSendTestEvent2 = __esm(() => {
|
|
55329
56183
|
init_webhookEndpointsSendTestEvent();
|
|
55330
56184
|
init_sendwebhooktesteventop();
|
|
55331
56185
|
init_tools();
|
|
55332
|
-
|
|
56186
|
+
args24 = {
|
|
55333
56187
|
request: SendWebhookTestEventRequest$zodSchema
|
|
55334
56188
|
};
|
|
55335
56189
|
tool$webhookEndpointsSendTestEvent = {
|
|
@@ -55344,7 +56198,7 @@ endpoint.verification sends a signed challenge now and answers whether the endpo
|
|
|
55344
56198
|
openWorldHint: false,
|
|
55345
56199
|
readOnlyHint: false
|
|
55346
56200
|
},
|
|
55347
|
-
args:
|
|
56201
|
+
args: args24,
|
|
55348
56202
|
tool: async (client, args, ctx) => {
|
|
55349
56203
|
const [result] = await webhookEndpointsSendTestEvent(client, args.request, { fetchOptions: { signal: ctx.mcpReq.signal } }).$inspect();
|
|
55350
56204
|
if (!result.ok) {
|
|
@@ -55362,7 +56216,7 @@ endpoint.verification sends a signed challenge now and answers whether the endpo
|
|
|
55362
56216
|
function createMCPServer(deps) {
|
|
55363
56217
|
const server = new McpServer({
|
|
55364
56218
|
name: "NoResponse",
|
|
55365
|
-
version: "0.
|
|
56219
|
+
version: "0.5.0"
|
|
55366
56220
|
});
|
|
55367
56221
|
const getClient = deps.getSDK || (() => new NoResponseCore({
|
|
55368
56222
|
security: deps.security,
|
|
@@ -55391,6 +56245,8 @@ function createMCPServer(deps) {
|
|
|
55391
56245
|
tool(tool$accountsDelete);
|
|
55392
56246
|
tool(tool$accountsListAssessments);
|
|
55393
56247
|
tool(tool$accountsRecordEnforcement);
|
|
56248
|
+
tool(tool$keysList);
|
|
56249
|
+
tool(tool$keysRevoke);
|
|
55394
56250
|
tool(tool$integrationsCreate);
|
|
55395
56251
|
tool(tool$integrationsList);
|
|
55396
56252
|
tool(tool$integrationsDelete);
|
|
@@ -55402,6 +56258,8 @@ function createMCPServer(deps) {
|
|
|
55402
56258
|
tool(tool$webhookEndpointsSendTestEvent);
|
|
55403
56259
|
tool(tool$webhookEndpointsListDeliveries);
|
|
55404
56260
|
tool(tool$webhookEndpointsReplayDelivery);
|
|
56261
|
+
tool(tool$settingsGet);
|
|
56262
|
+
tool(tool$settingsUpdate);
|
|
55405
56263
|
if (deps.dynamic) {
|
|
55406
56264
|
registerDynamicTools(deps.logger, server, getClient, toolMap, scopes);
|
|
55407
56265
|
}
|
|
@@ -55429,6 +56287,10 @@ var init_server = __esm(() => {
|
|
|
55429
56287
|
init_integrationsDelete2();
|
|
55430
56288
|
init_integrationsList2();
|
|
55431
56289
|
init_integrationsRotate2();
|
|
56290
|
+
init_keysList2();
|
|
56291
|
+
init_keysRevoke2();
|
|
56292
|
+
init_settingsGet2();
|
|
56293
|
+
init_settingsUpdate2();
|
|
55432
56294
|
init_webhookEndpointsCreate2();
|
|
55433
56295
|
init_webhookEndpointsDelete2();
|
|
55434
56296
|
init_webhookEndpointsList2();
|
|
@@ -55501,6 +56363,18 @@ The account's history: the same page as POST /v1/assessments/query for this acco
|
|
|
55501
56363
|
description: `Record what you did to an account in your identity provider.
|
|
55502
56364
|
|
|
55503
56365
|
Records what you did to the account in your identity provider for one flow's decision at one risk_version: the action (or none), the account's state before it, the provider and whether it was applied or failed. It is your action, not an outcome, and it leaves the account's risk unchanged. A record is kept once per account, risk_version, flow and action: the first report answers 201, and a repeat answers 200 with the stored record unchanged, so retries are safe without an Idempotency-Key. An applied report after a failed one replaces the failed record, keeping its id and created_at, and answers 201. A risk_version older than the account's current one is accepted and stored, but only an applied record at the current risk_version takes the account out of listChanged with unenforced=true; a newer one answers 409 risk_version_ahead. An account with no current risk answers 404 not_found. error_code is allowed only with status failed. Requires the history scope.`
|
|
56366
|
+
},
|
|
56367
|
+
{
|
|
56368
|
+
name: "list_keys",
|
|
56369
|
+
description: `List API keys.
|
|
56370
|
+
|
|
56371
|
+
Lists the keys of the signing key's environment, newest first, at most 200, revoked and expired keys included, without secrets: each key's id, prefix, scopes, status, and who created and revoked it. Requires the management scope. Read-only and safe to retry.`
|
|
56372
|
+
},
|
|
56373
|
+
{
|
|
56374
|
+
name: "revoke_key",
|
|
56375
|
+
description: `Revoke an API key.
|
|
56376
|
+
|
|
56377
|
+
Revokes a key of the signing key's environment at once: its next request answers 401. Requires the management scope. A key of the other environment or of another workspace answers 404 not_found. A key cannot revoke itself (409 self_revocation): rotate it with keys.rotate, or revoke it with another management key. Revoking a revoked key changes nothing and answers the key as it was revoked, so a retry is safe.`
|
|
55504
56378
|
},
|
|
55505
56379
|
{
|
|
55506
56380
|
name: "create_integration",
|
|
@@ -55567,6 +56441,18 @@ Every POST the endpoint received, newest first: the event id and type, which att
|
|
|
55567
56441
|
description: `Send one delivery again.
|
|
55568
56442
|
|
|
55569
56443
|
Queues the event for the endpoint again: the same event id and body it received, with a new NR-Webhook-Timestamp and a signature from the endpoint's current signing key, retried like any other delivery and listed with replay: true. Your receiver deduplicates on the event id. The endpoint must be verified. Requires the webhooks scope. Not idempotent: each call, a retry included, sends the event again.`
|
|
56444
|
+
},
|
|
56445
|
+
{
|
|
56446
|
+
name: "get_settings",
|
|
56447
|
+
description: `Read an environment's settings.
|
|
56448
|
+
|
|
56449
|
+
Reads the settings of the signing key's environment: retention in days; per flow (account_creation, login, purchase) the step_up, review and block thresholds, the default depth and the admission; and the sources the environment refuses. A flow without thresholds of its own shows account_creation's with inherits_account_creation true. Requires the management scope; the other environment answers 404 not_found. Read-only and safe to retry.`
|
|
56450
|
+
},
|
|
56451
|
+
{
|
|
56452
|
+
name: "update_settings",
|
|
56453
|
+
description: `Change an environment's settings.
|
|
56454
|
+
|
|
56455
|
+
Changes only what the body names, in one transaction: retention_days, refused_sources, and per flow step_up, review, block (null turns blocking off), default_depth, admission, hold_seconds, on_expiry, or inherits_account_creation to return login or purchase to account_creation's thresholds. After the change each flow keeps 0 < step_up < review <= 100 and block off or review <= block <= 100; a change that breaks it answers 400 naming the flow. A policy change is one new policy_version with the signing key's prefix as updated_by, and every change is recorded in the workspace's audit log with the key as its actor. Requires the management scope; the other environment answers 404 not_found. A change reaches assessments within a minute.`
|
|
55570
56456
|
},
|
|
55571
56457
|
{
|
|
55572
56458
|
name: "wait_for_assessment",
|
|
@@ -64067,7 +64953,7 @@ var routes = buildRouteMap({
|
|
|
64067
64953
|
var app = buildApplication(routes, {
|
|
64068
64954
|
name: "mcp",
|
|
64069
64955
|
versionInfo: {
|
|
64070
|
-
currentVersion: "0.
|
|
64956
|
+
currentVersion: "0.5.0"
|
|
64071
64957
|
}
|
|
64072
64958
|
});
|
|
64073
64959
|
run(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -64075,5 +64961,5 @@ export {
|
|
|
64075
64961
|
app
|
|
64076
64962
|
};
|
|
64077
64963
|
|
|
64078
|
-
//# debugId=
|
|
64964
|
+
//# debugId=A1666D86531DF0D364756E2164756E21
|
|
64079
64965
|
//# sourceMappingURL=mcp-server.js.map
|