@inkeep/agents-manage-api 0.1.1 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/LICENSE.md +29 -17
  2. package/README.md +1 -1
  3. package/SUPPLEMENTAL_TERMS.md +40 -0
  4. package/dist/index.cjs +5083 -0
  5. package/dist/index.d.cts +15 -0
  6. package/dist/index.d.ts +15 -4
  7. package/dist/index.js +5046 -35
  8. package/package.json +15 -13
  9. package/dist/ManagementServer.d.ts +0 -28
  10. package/dist/ManagementServer.d.ts.map +0 -1
  11. package/dist/ManagementServer.js +0 -41
  12. package/dist/__tests__/setup.d.ts +0 -2
  13. package/dist/__tests__/setup.d.ts.map +0 -1
  14. package/dist/__tests__/setup.js +0 -26
  15. package/dist/__tests__/utils/testProject.d.ts +0 -18
  16. package/dist/__tests__/utils/testProject.d.ts.map +0 -1
  17. package/dist/__tests__/utils/testProject.js +0 -26
  18. package/dist/__tests__/utils/testRequest.d.ts +0 -2
  19. package/dist/__tests__/utils/testRequest.d.ts.map +0 -1
  20. package/dist/__tests__/utils/testRequest.js +0 -11
  21. package/dist/__tests__/utils/testTenant.d.ts +0 -64
  22. package/dist/__tests__/utils/testTenant.d.ts.map +0 -1
  23. package/dist/__tests__/utils/testTenant.js +0 -71
  24. package/dist/app.d.ts +0 -4
  25. package/dist/app.d.ts.map +0 -1
  26. package/dist/app.js +0 -140
  27. package/dist/data/conversations.d.ts +0 -59
  28. package/dist/data/conversations.d.ts.map +0 -1
  29. package/dist/data/conversations.js +0 -216
  30. package/dist/data/db/clean.d.ts +0 -6
  31. package/dist/data/db/clean.d.ts.map +0 -1
  32. package/dist/data/db/clean.js +0 -77
  33. package/dist/data/db/dbClient.d.ts +0 -3
  34. package/dist/data/db/dbClient.d.ts.map +0 -1
  35. package/dist/data/db/dbClient.js +0 -13
  36. package/dist/data/graphFull.d.ts +0 -11
  37. package/dist/data/graphFull.d.ts.map +0 -1
  38. package/dist/data/graphFull.js +0 -90
  39. package/dist/data/graphFullClient.d.ts +0 -22
  40. package/dist/data/graphFullClient.d.ts.map +0 -1
  41. package/dist/data/graphFullClient.js +0 -189
  42. package/dist/data/tools.d.ts +0 -81
  43. package/dist/data/tools.d.ts.map +0 -1
  44. package/dist/data/tools.js +0 -266
  45. package/dist/env.d.ts +0 -41
  46. package/dist/env.d.ts.map +0 -1
  47. package/dist/env.js +0 -59
  48. package/dist/index.d.ts.map +0 -1
  49. package/dist/logger.d.ts +0 -4
  50. package/dist/logger.d.ts.map +0 -1
  51. package/dist/logger.js +0 -32
  52. package/dist/middleware/auth.d.ts +0 -12
  53. package/dist/middleware/auth.d.ts.map +0 -1
  54. package/dist/middleware/auth.js +0 -36
  55. package/dist/openapi.d.ts +0 -2
  56. package/dist/openapi.d.ts.map +0 -1
  57. package/dist/openapi.js +0 -38
  58. package/dist/routes/agentArtifactComponents.d.ts +0 -4
  59. package/dist/routes/agentArtifactComponents.d.ts.map +0 -1
  60. package/dist/routes/agentArtifactComponents.js +0 -230
  61. package/dist/routes/agentDataComponents.d.ts +0 -4
  62. package/dist/routes/agentDataComponents.d.ts.map +0 -1
  63. package/dist/routes/agentDataComponents.js +0 -225
  64. package/dist/routes/agentGraph.d.ts +0 -4
  65. package/dist/routes/agentGraph.d.ts.map +0 -1
  66. package/dist/routes/agentGraph.js +0 -289
  67. package/dist/routes/agentRelations.d.ts +0 -4
  68. package/dist/routes/agentRelations.d.ts.map +0 -1
  69. package/dist/routes/agentRelations.js +0 -290
  70. package/dist/routes/agentToolRelations.d.ts +0 -4
  71. package/dist/routes/agentToolRelations.d.ts.map +0 -1
  72. package/dist/routes/agentToolRelations.js +0 -342
  73. package/dist/routes/agents.d.ts +0 -4
  74. package/dist/routes/agents.d.ts.map +0 -1
  75. package/dist/routes/agents.js +0 -213
  76. package/dist/routes/apiKeys.d.ts +0 -4
  77. package/dist/routes/apiKeys.d.ts.map +0 -1
  78. package/dist/routes/apiKeys.js +0 -236
  79. package/dist/routes/artifactComponents.d.ts +0 -4
  80. package/dist/routes/artifactComponents.d.ts.map +0 -1
  81. package/dist/routes/artifactComponents.js +0 -202
  82. package/dist/routes/contextConfigs.d.ts +0 -4
  83. package/dist/routes/contextConfigs.d.ts.map +0 -1
  84. package/dist/routes/contextConfigs.js +0 -181
  85. package/dist/routes/credentials.d.ts +0 -4
  86. package/dist/routes/credentials.d.ts.map +0 -1
  87. package/dist/routes/credentials.js +0 -219
  88. package/dist/routes/dataComponents.d.ts +0 -4
  89. package/dist/routes/dataComponents.d.ts.map +0 -1
  90. package/dist/routes/dataComponents.js +0 -188
  91. package/dist/routes/externalAgents.d.ts +0 -4
  92. package/dist/routes/externalAgents.d.ts.map +0 -1
  93. package/dist/routes/externalAgents.js +0 -216
  94. package/dist/routes/graphFull.d.ts +0 -4
  95. package/dist/routes/graphFull.d.ts.map +0 -1
  96. package/dist/routes/graphFull.js +0 -248
  97. package/dist/routes/index.d.ts +0 -4
  98. package/dist/routes/index.d.ts.map +0 -1
  99. package/dist/routes/index.js +0 -37
  100. package/dist/routes/oauth.d.ts +0 -14
  101. package/dist/routes/oauth.d.ts.map +0 -1
  102. package/dist/routes/oauth.js +0 -191
  103. package/dist/routes/projects.d.ts +0 -4
  104. package/dist/routes/projects.d.ts.map +0 -1
  105. package/dist/routes/projects.js +0 -221
  106. package/dist/routes/tools.d.ts +0 -4
  107. package/dist/routes/tools.d.ts.map +0 -1
  108. package/dist/routes/tools.js +0 -547
  109. package/dist/utils/auth-detection.d.ts +0 -22
  110. package/dist/utils/auth-detection.d.ts.map +0 -1
  111. package/dist/utils/auth-detection.js +0 -149
  112. package/dist/utils/oauth-service.d.ts +0 -88
  113. package/dist/utils/oauth-service.d.ts.map +0 -1
  114. package/dist/utils/oauth-service.js +0 -240
@@ -1,547 +0,0 @@
1
- import { createRoute, OpenAPIHono } from '@hono/zod-openapi';
2
- import { nanoid } from 'nanoid';
3
- import { z } from 'zod';
4
- import { commonGetErrorResponses, createApiError } from '@inkeep/agents-core';
5
- import { getLogger } from '../logger.js';
6
- import { ErrorResponseSchema, IdParamsSchema, ListResponseSchema, PaginationQueryParamsSchema, SingleResponseSchema, TenantProjectParamsSchema, ToolStatusSchema, createTool, dbResultToMcpTool, deleteTool, getToolById, listTools, listToolsByStatus, updateTool, ToolApiInsertSchema, ToolApiUpdateSchema, McpToolSchema, } from '@inkeep/agents-core';
7
- import { checkAllToolsHealth, checkToolHealth, syncToolDefinitions, updateToolHealth, } from '../data/tools.js';
8
- import { oauthService } from '../utils/oauth-service.js';
9
- import dbClient from '../data/db/dbClient.js';
10
- const app = new OpenAPIHono();
11
- // List tools
12
- app.openapi(createRoute({
13
- method: 'get',
14
- path: '/',
15
- summary: 'List Tools',
16
- operationId: 'list-tools',
17
- tags: ['CRUD Tools'],
18
- request: {
19
- params: TenantProjectParamsSchema,
20
- query: PaginationQueryParamsSchema.extend({
21
- status: ToolStatusSchema.optional(),
22
- }),
23
- },
24
- responses: {
25
- 200: {
26
- description: 'List of tools retrieved successfully',
27
- content: {
28
- 'application/json': {
29
- schema: ListResponseSchema(McpToolSchema),
30
- },
31
- },
32
- },
33
- ...commonGetErrorResponses,
34
- },
35
- }), async (c) => {
36
- const { tenantId, projectId } = c.req.valid('param');
37
- const { page, limit, status } = c.req.valid('query');
38
- let result;
39
- // Filter by status if provided
40
- if (status) {
41
- const tools = await listToolsByStatus(dbClient)({ scopes: { tenantId, projectId }, status });
42
- result = {
43
- data: tools.map((tool) => dbResultToMcpTool(tool)),
44
- pagination: {
45
- page: 1,
46
- limit: tools.length,
47
- total: tools.length,
48
- pages: 1,
49
- },
50
- };
51
- }
52
- else {
53
- // Use paginated results from crud operations
54
- const dbResult = await listTools(dbClient)({
55
- scopes: { tenantId, projectId },
56
- pagination: { page, limit },
57
- });
58
- result = {
59
- data: dbResult.data.map((tool) => dbResultToMcpTool(tool)),
60
- pagination: dbResult.pagination,
61
- };
62
- }
63
- return c.json(result);
64
- });
65
- // Get tool by ID
66
- app.openapi(createRoute({
67
- method: 'get',
68
- path: '/{id}',
69
- summary: 'Get Tool',
70
- operationId: 'get-tool',
71
- tags: ['CRUD Tools'],
72
- request: {
73
- params: TenantProjectParamsSchema.extend(IdParamsSchema.shape),
74
- },
75
- responses: {
76
- 200: {
77
- description: 'Tool found',
78
- content: {
79
- 'application/json': {
80
- schema: SingleResponseSchema(McpToolSchema),
81
- },
82
- },
83
- },
84
- ...commonGetErrorResponses,
85
- },
86
- }), async (c) => {
87
- const { tenantId, projectId, id } = c.req.valid('param');
88
- const tool = await getToolById(dbClient)({ scopes: { tenantId, projectId }, toolId: id });
89
- if (!tool) {
90
- throw createApiError({
91
- code: 'not_found',
92
- message: 'Tool not found',
93
- });
94
- }
95
- return c.json({
96
- data: dbResultToMcpTool(tool),
97
- });
98
- });
99
- // Create tool
100
- app.openapi(createRoute({
101
- method: 'post',
102
- path: '/',
103
- summary: 'Create Tool',
104
- operationId: 'create-tool',
105
- tags: ['CRUD Tools'],
106
- request: {
107
- params: TenantProjectParamsSchema,
108
- body: {
109
- content: {
110
- 'application/json': {
111
- schema: ToolApiInsertSchema,
112
- },
113
- },
114
- },
115
- },
116
- responses: {
117
- 201: {
118
- description: 'Tool created successfully',
119
- content: {
120
- 'application/json': {
121
- schema: SingleResponseSchema(McpToolSchema),
122
- },
123
- },
124
- },
125
- ...commonGetErrorResponses,
126
- },
127
- }), async (c) => {
128
- const { tenantId, projectId } = c.req.valid('param');
129
- const body = c.req.valid('json');
130
- getLogger().info({ body }, 'body');
131
- const id = body.id || nanoid();
132
- const tool = await createTool(dbClient)({
133
- tenantId,
134
- projectId,
135
- id,
136
- name: body.name,
137
- config: body.config,
138
- credentialReferenceId: body.credentialReferenceId,
139
- imageUrl: body.imageUrl,
140
- headers: body.headers,
141
- });
142
- return c.json({
143
- data: dbResultToMcpTool(tool),
144
- }, 201);
145
- });
146
- // Update tool
147
- app.openapi(createRoute({
148
- method: 'put',
149
- path: '/{id}',
150
- summary: 'Update Tool',
151
- operationId: 'update-tool',
152
- tags: ['CRUD Tools'],
153
- request: {
154
- params: TenantProjectParamsSchema.extend(IdParamsSchema.shape),
155
- body: {
156
- content: {
157
- 'application/json': {
158
- schema: ToolApiUpdateSchema,
159
- },
160
- },
161
- },
162
- },
163
- responses: {
164
- 200: {
165
- description: 'Tool updated successfully',
166
- content: {
167
- 'application/json': {
168
- schema: SingleResponseSchema(McpToolSchema),
169
- },
170
- },
171
- },
172
- ...commonGetErrorResponses,
173
- },
174
- }), async (c) => {
175
- const { tenantId, projectId, id } = c.req.valid('param');
176
- const body = c.req.valid('json');
177
- // Check if there are any fields to update
178
- if (Object.keys(body).length === 0) {
179
- throw createApiError({
180
- code: 'bad_request',
181
- message: 'No fields to update',
182
- });
183
- }
184
- const updatedTool = await updateTool(dbClient)({
185
- scopes: { tenantId, projectId },
186
- toolId: id,
187
- data: {
188
- name: body.name,
189
- config: body.config,
190
- credentialReferenceId: body.credentialReferenceId,
191
- imageUrl: body.imageUrl,
192
- headers: body.headers,
193
- },
194
- });
195
- if (!updatedTool) {
196
- throw createApiError({
197
- code: 'not_found',
198
- message: 'Tool not found',
199
- });
200
- }
201
- return c.json({
202
- data: dbResultToMcpTool(updatedTool),
203
- });
204
- });
205
- // Delete tool
206
- app.openapi(createRoute({
207
- method: 'delete',
208
- path: '/{id}',
209
- summary: 'Delete Tool',
210
- operationId: 'delete-tool',
211
- tags: ['CRUD Tools'],
212
- request: {
213
- params: TenantProjectParamsSchema.extend(IdParamsSchema.shape),
214
- },
215
- responses: {
216
- 204: {
217
- description: 'Tool deleted successfully',
218
- },
219
- 404: {
220
- description: 'Tool not found',
221
- content: {
222
- 'application/json': {
223
- schema: ErrorResponseSchema,
224
- },
225
- },
226
- },
227
- },
228
- }), async (c) => {
229
- const { tenantId, projectId, id } = c.req.valid('param');
230
- const deleted = await deleteTool(dbClient)({ scopes: { tenantId, projectId }, toolId: id });
231
- if (!deleted) {
232
- throw createApiError({
233
- code: 'not_found',
234
- message: 'Tool not found',
235
- });
236
- }
237
- return c.body(null, 204);
238
- });
239
- // Health check single tool
240
- app.openapi(createRoute({
241
- method: 'post',
242
- path: '/{id}/health-check',
243
- summary: 'Check Tool Health',
244
- operationId: 'check-tool-health',
245
- tags: ['CRUD Tools'],
246
- request: {
247
- params: TenantProjectParamsSchema.extend(IdParamsSchema.shape),
248
- },
249
- responses: {
250
- 200: {
251
- description: 'Tool health check completed',
252
- content: {
253
- 'application/json': {
254
- schema: SingleResponseSchema(z.object({
255
- tool: McpToolSchema,
256
- healthCheck: z.object({
257
- status: ToolStatusSchema,
258
- error: z.string().optional(),
259
- }),
260
- })),
261
- },
262
- },
263
- },
264
- ...commonGetErrorResponses,
265
- },
266
- }), async (c) => {
267
- const { tenantId, projectId, id } = c.req.valid('param');
268
- const tool = await getToolById(dbClient)({ scopes: { tenantId, projectId }, toolId: id });
269
- if (!tool) {
270
- throw createApiError({
271
- code: 'not_found',
272
- message: 'Tool not found',
273
- });
274
- }
275
- const healthResult = await checkToolHealth(dbResultToMcpTool(tool));
276
- const updatedTool = await updateToolHealth({
277
- tenantId,
278
- projectId,
279
- toolId: id,
280
- status: healthResult.status,
281
- error: healthResult.error,
282
- });
283
- return c.json({
284
- data: {
285
- tool: dbResultToMcpTool(updatedTool),
286
- healthCheck: healthResult,
287
- },
288
- });
289
- });
290
- // Health check all tools for tenant
291
- app.openapi(createRoute({
292
- method: 'post',
293
- path: '/health-check-all',
294
- summary: 'Check All Tools Health',
295
- operationId: 'check-all-tools-health',
296
- tags: ['CRUD Tools'],
297
- request: {
298
- params: TenantProjectParamsSchema,
299
- },
300
- responses: {
301
- 200: {
302
- description: 'All tools health check completed',
303
- content: {
304
- 'application/json': {
305
- schema: SingleResponseSchema(z.object({
306
- total: z.number(),
307
- successful: z.number(),
308
- failed: z.number(),
309
- results: z.array(z.object({
310
- index: z.number(),
311
- status: z.enum(['fulfilled', 'rejected']),
312
- data: z.string().optional(),
313
- error: z.string().optional(),
314
- })),
315
- })),
316
- },
317
- },
318
- },
319
- ...commonGetErrorResponses,
320
- },
321
- }), async (c) => {
322
- const { tenantId, projectId } = c.req.valid('param');
323
- const results = await checkAllToolsHealth(tenantId, projectId);
324
- const summary = {
325
- total: results.length,
326
- successful: results.filter((r) => r.status === 'fulfilled').length,
327
- failed: results.filter((r) => r.status === 'rejected').length,
328
- results: results.map((result, index) => {
329
- const baseResult = {
330
- index,
331
- status: result.status,
332
- };
333
- if (result.status === 'fulfilled') {
334
- return {
335
- ...baseResult,
336
- data: `Tool ${index} health check completed`,
337
- };
338
- }
339
- return {
340
- ...baseResult,
341
- error: result.reason?.message || 'Unknown error',
342
- };
343
- }),
344
- };
345
- return c.json({ data: summary });
346
- });
347
- // Sync tool definitions from MCP server
348
- app.openapi(createRoute({
349
- method: 'post',
350
- path: '/{id}/sync',
351
- summary: 'Sync Tool Definitions',
352
- operationId: 'sync-tool-definitions',
353
- tags: ['CRUD Tools'],
354
- request: {
355
- params: TenantProjectParamsSchema.extend(IdParamsSchema.shape),
356
- },
357
- responses: {
358
- 200: {
359
- description: 'Tool definitions synchronized successfully',
360
- content: {
361
- 'application/json': {
362
- schema: SingleResponseSchema(McpToolSchema),
363
- },
364
- },
365
- },
366
- ...commonGetErrorResponses,
367
- },
368
- }), async (c) => {
369
- const { tenantId, projectId, id } = c.req.valid('param');
370
- // Check if tool exists first
371
- const tool = await getToolById(dbClient)({ scopes: { tenantId, projectId }, toolId: id });
372
- if (!tool) {
373
- throw createApiError({
374
- code: 'not_found',
375
- message: 'Tool not found',
376
- });
377
- }
378
- const updatedTool = await syncToolDefinitions({ tenantId, projectId, toolId: id });
379
- return c.json({
380
- data: dbResultToMcpTool(updatedTool),
381
- message: 'Tool definitions synchronized successfully',
382
- });
383
- });
384
- // Get available tools from MCP server (without storing)
385
- app.openapi(createRoute({
386
- method: 'get',
387
- path: '/{id}/available-tools',
388
- summary: 'Get Available Tools',
389
- operationId: 'get-available-tools',
390
- tags: ['CRUD Tools'],
391
- request: {
392
- params: TenantProjectParamsSchema.extend(IdParamsSchema.shape),
393
- },
394
- responses: {
395
- 200: {
396
- description: 'Available tools retrieved successfully',
397
- content: {
398
- 'application/json': {
399
- schema: SingleResponseSchema(z.object({
400
- availableTools: z.array(z.object({
401
- name: z.string(),
402
- description: z.string().optional(),
403
- inputSchema: z.record(z.string(), z.unknown()).optional(),
404
- })),
405
- lastSync: z.string().optional(),
406
- status: ToolStatusSchema,
407
- })),
408
- },
409
- },
410
- },
411
- ...commonGetErrorResponses,
412
- },
413
- }), async (c) => {
414
- const { tenantId, projectId, id } = c.req.valid('param');
415
- const tool = await getToolById(dbClient)({ scopes: { tenantId, projectId }, toolId: id });
416
- if (!tool) {
417
- throw createApiError({
418
- code: 'not_found',
419
- message: 'Tool not found',
420
- });
421
- }
422
- return c.json({
423
- data: {
424
- availableTools: tool.availableTools || [],
425
- lastSync: tool.lastToolsSync || undefined,
426
- status: tool.status,
427
- },
428
- });
429
- });
430
- // Enable/disable tool
431
- app.openapi(createRoute({
432
- method: 'patch',
433
- path: '/{id}/status',
434
- summary: 'Update Tool Status',
435
- operationId: 'update-tool-status',
436
- tags: ['CRUD Tools'],
437
- request: {
438
- params: TenantProjectParamsSchema.extend(IdParamsSchema.shape),
439
- body: {
440
- content: {
441
- 'application/json': {
442
- schema: z.object({
443
- status: ToolStatusSchema,
444
- }),
445
- },
446
- },
447
- },
448
- },
449
- responses: {
450
- 200: {
451
- description: 'Tool status updated successfully',
452
- content: {
453
- 'application/json': {
454
- schema: SingleResponseSchema(McpToolSchema),
455
- },
456
- },
457
- },
458
- ...commonGetErrorResponses,
459
- },
460
- }), async (c) => {
461
- const { tenantId, projectId, id } = c.req.valid('param');
462
- const { status } = c.req.valid('json');
463
- const updatedTool = await updateToolHealth({
464
- tenantId,
465
- projectId,
466
- toolId: id,
467
- status: status,
468
- });
469
- return c.json({
470
- data: dbResultToMcpTool(updatedTool),
471
- message: `Tool status updated to ${status}`,
472
- });
473
- });
474
- app.openapi(createRoute({
475
- method: 'get',
476
- path: '/{id}/oauth-login',
477
- summary: 'Initiate OAuth login for MCP tool',
478
- description: 'Detects OAuth requirements and redirects to authorization server',
479
- operationId: 'initiate-oauth-login',
480
- tags: ['Tools'],
481
- request: {
482
- params: TenantProjectParamsSchema.merge(IdParamsSchema),
483
- },
484
- responses: {
485
- 302: {
486
- description: 'Redirect to OAuth authorization server',
487
- },
488
- 400: {
489
- description: 'OAuth not supported or configuration error',
490
- content: {
491
- 'application/json': {
492
- schema: ErrorResponseSchema,
493
- },
494
- },
495
- },
496
- 404: {
497
- description: 'Tool not found',
498
- content: {
499
- 'application/json': {
500
- schema: ErrorResponseSchema,
501
- },
502
- },
503
- },
504
- 500: {
505
- description: 'Internal server error',
506
- content: {
507
- 'application/json': {
508
- schema: ErrorResponseSchema,
509
- },
510
- },
511
- },
512
- },
513
- }), async (c) => {
514
- const { tenantId, projectId, id } = c.req.valid('param');
515
- const logger = getLogger('oauth-login');
516
- try {
517
- // 1. Get the tool
518
- const tool = await getToolById(dbClient)({ scopes: { tenantId, projectId }, toolId: id });
519
- if (!tool) {
520
- throw createApiError({
521
- code: 'not_found',
522
- message: 'Tool not found',
523
- });
524
- }
525
- const mcpTool = dbResultToMcpTool(tool);
526
- // 2. Initiate OAuth flow using centralized service
527
- const { redirectUrl } = await oauthService.initiateOAuthFlow({
528
- tool: mcpTool,
529
- tenantId,
530
- projectId,
531
- toolId: id,
532
- });
533
- // 4. Immediate redirect
534
- return c.redirect(redirectUrl, 302);
535
- }
536
- catch (error) {
537
- logger.error({ toolId: id, error }, 'OAuth login failed');
538
- if (error && typeof error === 'object' && 'code' in error) {
539
- const apiError = error;
540
- return c.json({ error: apiError.message }, apiError.code === 'not_found' ? 404 : 400);
541
- }
542
- return c.json({
543
- error: 'Failed to initiate OAuth login',
544
- }, 500);
545
- }
546
- });
547
- export default app;
@@ -1,22 +0,0 @@
1
- /**
2
- * Centralized authentication detection utilities for MCP tools
3
- */
4
- import type { McpTool } from '@inkeep/agents-core';
5
- /**
6
- * OAuth configuration interface
7
- */
8
- export interface OAuthConfig {
9
- authorizationUrl: string;
10
- tokenUrl: string;
11
- registrationUrl?: string;
12
- supportsDynamicRegistration: boolean;
13
- }
14
- /**
15
- * Full OAuth endpoint discovery with complete configuration
16
- */
17
- export declare const discoverOAuthEndpoints: (serverUrl: string) => Promise<OAuthConfig | null>;
18
- /**
19
- * Detect if OAuth 2.1/PKCE authentication is specifically required for a tool
20
- */
21
- export declare const detectAuthenticationRequired: (tool: McpTool, error: Error) => Promise<boolean>;
22
- //# sourceMappingURL=auth-detection.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-detection.d.ts","sourceRoot":"","sources":["../../src/utils/auth-detection.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAKnD;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,2BAA2B,EAAE,OAAO,CAAC;CACtC;AA0DD;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAU,WAAW,MAAM,KAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAkC1F,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,GACvC,MAAM,OAAO,EACb,OAAO,KAAK,KACX,OAAO,CAAC,OAAO,CAsEjB,CAAC"}