Skip to content

Commit eea6292

Browse files
araujofTeryl Taylorcrivetimihai
authored
feat: add plugins cli, external plugin support, plugin template (#722)
* feat: add support for external plugins Signed-off-by: Teryl Taylor <[email protected]> * feat(plugins): add external mcp server and associated test cases. Signed-off-by: Teryl Taylor <[email protected]> * fix(lint): fixed yamllint issues Signed-off-by: Teryl Taylor <[email protected]> * fix(lint): fixed flake8 issue. Signed-off-by: Teryl Taylor <[email protected]> * feat: define plugins cli and implement bootstrap command Signed-off-by: Frederico Araujo <[email protected]> * fix: implement install and package CLI commands Signed-off-by: Frederico Araujo <[email protected]> * fix: remote avoid insecure shell=True in subprocess invocation Signed-off-by: Frederico Araujo <[email protected]> * feat: add external plugin template Signed-off-by: Frederico Araujo <[email protected]> * feat: move copier config to repository root Signed-off-by: Frederico Araujo <[email protected]> * feat: update copier template Signed-off-by: Frederico Araujo <[email protected]> * feat: get default author from git config Signed-off-by: Frederico Araujo <[email protected]> * feat: update copier settings Signed-off-by: Frederico Araujo <[email protected]> * fix: copier config syntax Signed-off-by: Frederico Araujo <[email protected]> * feat: add external plugin template modules Signed-off-by: Frederico Araujo <[email protected]> * fix: template syntax Signed-off-by: Frederico Araujo <[email protected]> * fix: template syntax Signed-off-by: Frederico Araujo <[email protected]> * fix: make template Signed-off-by: Frederico Araujo <[email protected]> * feat: fix template issue Signed-off-by: Frederico Araujo <[email protected]> * fix: toml template Signed-off-by: Frederico Araujo <[email protected]> * fix: plugin mcp server initialization Signed-off-by: Frederico Araujo <[email protected]> * feat: init module for plugin framework Signed-off-by: Frederico Araujo <[email protected]> * feat: add chuck runtime and container wrapping Signed-off-by: Frederico Araujo <[email protected]> * fix: makefile template Signed-off-by: Frederico Araujo <[email protected]> * fix: plugins config path Signed-off-by: Frederico Araujo <[email protected]> * feat: add .env.template Signed-off-by: Frederico Araujo <[email protected]> * feat: add tools and resources support Signed-off-by: Frederico Araujo <[email protected]> * fix: lint yaml Signed-off-by: Frederico Araujo <[email protected]> * chore: cleanups Signed-off-by: Frederico Araujo <[email protected]> * feat: update manifest.in Signed-off-by: Frederico Araujo <[email protected]> * chore: linting Signed-off-by: Frederico Araujo <[email protected]> * fix: plugin config variable Signed-off-by: Frederico Araujo <[email protected]> * fix(tests): fixed doctests for plugins. Signed-off-by: Teryl Taylor <[email protected]> * refactor: external plugin server and plugin external API Signed-off-by: Frederico Araujo <[email protected]> * docs(plugins): removed subpackages from examples Signed-off-by: Teryl Taylor <[email protected]> * docs: update plugin docs to use public framework API Signed-off-by: Frederico Araujo <[email protected]> * fix(plugin): added resource payloads to base plugin. Signed-off-by: Teryl Taylor <[email protected]> * feat: udpate test templates Signed-off-by: Frederico Araujo <[email protected]> * feat: update test templates Signed-off-by: Frederico Araujo <[email protected]> * feat: update plugin template Signed-off-by: Frederico Araujo <[email protected]> * feat: update plugin template Signed-off-by: Frederico Araujo <[email protected]> * feat: update tempalte makefile Signed-off-by: Frederico Araujo <[email protected]> * feat: add template for native plugin Signed-off-by: Frederico Araujo <[email protected]> * feat: add readme for native template Signed-off-by: Frederico Araujo <[email protected]> * feat: force boostrap to be a subcommnand Signed-off-by: Frederico Araujo <[email protected]> * tests(plugin): added http streamable and error tests. Signed-off-by: Teryl Taylor <[email protected]> * tests: add tests for plugins CLI Signed-off-by: Frederico Araujo <[email protected]> * fix: deprecation warning Signed-off-by: Frederico Araujo <[email protected]> * tests: add CLI tests Signed-off-by: Frederico Araujo <[email protected]> * tests: update plugin cli Signed-off-by: Frederico Araujo <[email protected]> * tests(plugins): added client hook tests for external plugins. Signed-off-by: Teryl Taylor <[email protected]> * chore: update template readmes Signed-off-by: Frederico Araujo <[email protected]> * fix: lint docstrings in cli Signed-off-by: Frederico Araujo <[email protected]> * chore: fix lint errors in docstrings Signed-off-by: Frederico Araujo <[email protected]> * chore: fix lint errors Signed-off-by: Frederico Araujo <[email protected]> * tests: add external plugin server tests Signed-off-by: Frederico Araujo <[email protected]> * chore: cleanup Signed-off-by: Frederico Araujo <[email protected]> * chore: add missing docstrings Signed-off-by: Frederico Araujo <[email protected]> * chore: add missing docstrings Signed-off-by: Frederico Araujo <[email protected]> * tests: fix cli dryrun test Signed-off-by: Frederico Araujo <[email protected]> * chore: fix lint issues Signed-off-by: Frederico Araujo <[email protected]> * tests: fix teardown of client http tests Signed-off-by: Frederico Araujo <[email protected]> * tests: skipping flaky tests Signed-off-by: Frederico Araujo <[email protected]> * docs: plugin lifecycle tools Signed-off-by: Frederico Araujo <[email protected]> * docs: add missing plugin lifecycle doc Signed-off-by: Frederico Araujo <[email protected]> * Review, rebase and lint Signed-off-by: Mihai Criveti <[email protected]> --------- Signed-off-by: Teryl Taylor <[email protected]> Signed-off-by: Frederico Araujo <[email protected]> Signed-off-by: Mihai Criveti <[email protected]> Co-authored-by: Teryl Taylor <[email protected]> Co-authored-by: Mihai Criveti <[email protected]>
1 parent eb646e2 commit eea6292

File tree

106 files changed

+8733
-1766
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+8733
-1766
lines changed

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[run]
22
branch = True
3+
omit =
4+
mcpgateway/alembic/*
5+
*/__init__.py
36

47
[report]
58
exclude_lines =

.env.example

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,14 @@ SKIP_SSL_VERIFY=false
163163
# Header Passthrough (WARNING: Security implications)
164164
ENABLE_HEADER_PASSTHROUGH=false
165165
DEFAULT_PASSTHROUGH_HEADERS=["X-Tenant-Id", "X-Trace-Id"]
166+
167+
# Enable auto-completion for plugins CLI
168+
PLUGINS_CLI_COMPLETION=false
169+
170+
# Set markup mode for plugins CLI
171+
# Valid options:
172+
# rich: use rich markup
173+
# markdown: allow markdown in help strings
174+
# disabled: disable markup
175+
# If unset (commented out), uses "rich" if rich is detected, otherwise disables it.
176+
PLUGINS_CLI_MARKUP_MODE=rich

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ command_outputs.md
7676
.ica.env
7777
./snakefood.png
7878
./snakefood.svg
79+
./playground
7980

8081
.attic
8182
.vscode/settings.json

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ include *.txt
3030
recursive-include async_testing *.py
3131
recursive-include async_testing *.yaml
3232
recursive-include examples *.yaml
33+
recursive-include plugin_templates *
3334

3435
# 3️⃣ Tooling/lint configuration dot-files (explicit so they're not lost)
3536
include .env.make

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ CONTAINER_MEMORY = 2048m
5555
CONTAINER_CPUS = 2
5656

5757
# Virtual-environment variables
58-
VENVS_DIR := $(HOME)/.venv
59-
VENV_DIR := $(VENVS_DIR)/$(PROJECT_NAME)
58+
VENVS_DIR ?= $(HOME)/.venv
59+
VENV_DIR ?= $(VENVS_DIR)/$(PROJECT_NAME)
6060

6161
# -----------------------------------------------------------------------------
6262
# OS Specific

copier.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
_subdirectory: plugin_templates/{{template_type}}
2+
3+
template_type:
4+
type: str
5+
help: What plugin template would you like to use?
6+
choices:
7+
- native
8+
- external
9+
10+
plugin_name:
11+
type: str
12+
help: What is the plugin name?
13+
default: MyFilter
14+
15+
version:
16+
type: str
17+
help: What is the initial version of the plugin?
18+
default: 0.1.0
19+
20+
author:
21+
type: str
22+
help: Who is the author?
23+
default: "{{ _copier_conf.data.default_author_name }}"
24+
25+
email:
26+
type: str
27+
help: What's the author's e-mail?
28+
default: "{{ _copier_conf.data.default_author_email }}"
29+
30+
description:
31+
type: str
32+
help: Write a plugin description
33+
default: A filter plugin

0 commit comments

Comments
 (0)