Commit 3de6bc8
feat: add tool metadata and http headers to plugin tool hooks (IBM#854)
* rebase: rebased with main, fixing merge conflicts
Signed-off-by: Teryl Taylor <[email protected]>
* fix: plugin cleanup to support multiple external plugins.
Signed-off-by: Teryl Taylor <[email protected]>
* fix(lint): fixed linting issues
Signed-off-by: Teryl Taylor <[email protected]>
* feat(error): update error handling with enforce_ignore_error
Signed-off-by: Teryl Taylor <[email protected]>
* fix(plugins): updated documentation and addressed PR comments.
Signed-off-by: Teryl Taylor <[email protected]>
* fix(lint): fixed linting issue
Signed-off-by: Teryl Taylor <[email protected]>
* feat(plugins): added initial http header hooks.
Signed-off-by: Teryl Taylor <[email protected]>
* fix(comments): update docstrings to fix linting.
Signed-off-by: Teryl Taylor <[email protected]>
* fix: linting issue.
Signed-off-by: Teryl Taylor <[email protected]>
* feat: added hooks to the plugin manager for http pre/post header requests.
Signed-off-by: Teryl Taylor <[email protected]>
* feat: added tool metadata and headers to tool payloads.
Signed-off-by: Teryl Taylor <[email protected]>
* fix: fixed model to support passing tool metadata.
Signed-off-by: Teryl Taylor <[email protected]>
* feat: added example header plugin for tools.
Signed-off-by: Teryl Taylor <[email protected]>
* fix: refactored ToolMetaData, GatewayMetadata, removed http hooks, fixed test cases
Signed-off-by: Teryl Taylor <[email protected]>
* adding handlers for pluginerror and pluginviolationerror
Signed-off-by: Shriti Priya <[email protected]>
* fix for headers pydantic error in tool, plugin violation error handler
Signed-off-by: Shriti Priya <[email protected]>
* Error handling changes with test cases modification
Signed-off-by: Shriti Priya <[email protected]>
* fixing flake8 issues
Signed-off-by: Shriti Priya <[email protected]>
* refactored error handling in prompt and resource services, added unit tests for meta data, fixed existing tests.
Signed-off-by: Teryl Taylor <[email protected]>
* fix: made original_name optional
Signed-off-by: Teryl Taylor <[email protected]>
* tests(tools): added test to check both gateway and tool metadata
Signed-off-by: Teryl Taylor <[email protected]>
* tests(headers): added tool header tests
Signed-off-by: Teryl Taylor <[email protected]>
* tests(tool_post_invoke): tests cases for tool post invoke metadata.
Signed-off-by: Teryl Taylor <[email protected]>
* fix(tool): check whether tools payload headers are None
Signed-off-by: Teryl Taylor <[email protected]>
* docs(plugins): added some documentation on the headers and meta data.
Signed-off-by: Teryl Taylor <[email protected]>
* fix: updated error response values
Signed-off-by: Teryl Taylor <[email protected]>
* Rebase
Signed-off-by: Mihai Criveti <[email protected]>
---------
Signed-off-by: Teryl Taylor <[email protected]>
Signed-off-by: Shriti Priya <[email protected]>
Signed-off-by: Mihai Criveti <[email protected]>
Co-authored-by: Teryl Taylor <[email protected]>
Co-authored-by: Shriti Priya <[email protected]>
Co-authored-by: Mihai Criveti <[email protected]>1 parent 93d7033 commit 3de6bc8
File tree
20 files changed
+956
-291
lines changed- docs/docs/using/plugins
- mcpgateway
- plugins/framework
- external/mcp
- services
- plugins/external/opa/opapluginfilter
- tests
- integration
- unit/mcpgateway
- plugins
- fixtures
- configs
- plugins
- framework
- services
20 files changed
+956
-291
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
311 | 349 | | |
312 | 350 | | |
313 | 351 | | |
| |||
322 | 360 | | |
323 | 361 | | |
324 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
325 | 399 | | |
326 | 400 | | |
327 | 401 | | |
| |||
337 | 411 | | |
338 | 412 | | |
339 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
340 | 432 | | |
341 | 433 | | |
342 | 434 | | |
| |||
611 | 703 | | |
612 | 704 | | |
613 | 705 | | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
614 | 732 | | |
615 | 733 | | |
616 | 734 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
497 | 572 | | |
498 | 573 | | |
499 | 574 | | |
| |||
3214 | 3289 | | |
3215 | 3290 | | |
3216 | 3291 | | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
3217 | 3296 | | |
3218 | 3297 | | |
3219 | 3298 | | |
| |||
3324 | 3403 | | |
3325 | 3404 | | |
3326 | 3405 | | |
| 3406 | + | |
3327 | 3407 | | |
3328 | 3408 | | |
3329 | 3409 | | |
3330 | 3410 | | |
3331 | 3411 | | |
3332 | | - | |
3333 | | - | |
| 3412 | + | |
| 3413 | + | |
3334 | 3414 | | |
3335 | 3415 | | |
3336 | 3416 | | |
| |||
3343 | 3423 | | |
3344 | 3424 | | |
3345 | 3425 | | |
| 3426 | + | |
| 3427 | + | |
3346 | 3428 | | |
3347 | 3429 | | |
3348 | 3430 | | |
| |||
0 commit comments