vector-mcp 2.1.2__tar.gz → 3.3.1__tar.gz
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.
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/.pre-commit-config.yaml +21 -46
- vector_mcp-3.3.1/AGENTS.md +231 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/LICENSE +1 -1
- vector_mcp-3.3.1/PKG-INFO +510 -0
- vector_mcp-3.3.1/README.md +467 -0
- vector_mcp-3.3.1/connector_manifest.yml +226 -0
- vector_mcp-3.3.1/mcp_config.json +17 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/mkdocs.yml +5 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/opencode.json +4 -4
- vector_mcp-3.3.1/pyproject.toml +86 -0
- vector_mcp-3.3.1/release-readiness.json +34914 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/requirements.txt +1 -4
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/scripts/investigate_timeout.py +37 -29
- vector_mcp-3.3.1/scripts/security_sanitizer.py +272 -0
- vector_mcp-3.3.1/scripts/validate_a2a_agent.py +144 -0
- vector_mcp-3.3.1/scripts/validate_agents.py +206 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/scripts/validate_all_dbs.py +0 -3
- vector_mcp-3.3.1/tests/conftest.py +17 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/tests/test_all_backends.py +8 -6
- vector_mcp-3.3.1/tests/test_database_transport_security.py +90 -0
- vector_mcp-3.3.1/tests/test_doctor.py +76 -0
- vector_mcp-3.3.1/tests/test_document_inputs.py +126 -0
- vector_mcp-3.3.1/tests/test_identity_scoped_resources.py +60 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/tests/test_mcp_server.py +90 -106
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/tests/test_optional_dependencies.py +25 -15
- vector_mcp-3.3.1/tests/test_optional_dependency_boundary.py +27 -0
- vector_mcp-3.3.1/tests/test_package.py +10 -0
- vector_mcp-3.3.1/tests/test_protocol_compliance.py +22 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/tests/test_retrievers.py +2 -11
- vector_mcp-3.3.1/tests/test_secure_backends.py +313 -0
- vector_mcp-3.3.1/tests/test_store_extras.py +35 -0
- vector_mcp-3.3.1/tests/test_uv_sources_contract.py +19 -0
- vector_mcp-3.3.1/tests/test_vector_api.py +167 -0
- vector_mcp-3.3.1/tests/test_vectordbs_mock.py +222 -0
- vector_mcp-3.3.1/vector_mcp/__init__.py +5 -0
- vector_mcp-3.3.1/vector_mcp/action_split.py +108 -0
- vector_mcp-3.3.1/vector_mcp/backend_policy.py +55 -0
- vector_mcp-3.3.1/vector_mcp/bundled_mcp.json +13 -0
- vector_mcp-3.3.1/vector_mcp/connectors/__init__.py +1 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/connectors/mcp_source_presets.json +3 -3
- vector_mcp-3.3.1/vector_mcp/connectors/tool_schema_fingerprints.json +8 -0
- vector_mcp-3.3.1/vector_mcp/doctor.py +148 -0
- vector_mcp-3.3.1/vector_mcp/document_inputs.py +193 -0
- vector_mcp-3.3.1/vector_mcp/mcp_config.json +28 -0
- vector_mcp-3.3.1/vector_mcp/mcp_server.py +455 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/ontology/__init__.py +1 -1
- vector_mcp-3.3.1/vector_mcp/ontology/certification.json +36 -0
- vector_mcp-3.3.1/vector_mcp/ontology/fixtures/records.json +18 -0
- vector_mcp-3.3.1/vector_mcp/ontology/mappings/source.yaml +20 -0
- vector_mcp-3.3.1/vector_mcp/ontology/migrations/manifest.json +6 -0
- vector_mcp-3.3.1/vector_mcp/ontology/shapes/connector.shacl.ttl +124 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/ontology/vector.ttl +10 -4
- vector_mcp-3.3.1/vector_mcp/prompts/retrieval_specialist.json +45 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/retriever/chromadb_retriever.py +16 -14
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/retriever/couchbase_retriever.py +16 -14
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/retriever/epistemic_graph_retriever.py +15 -13
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/retriever/llamaindex_retriever.py +16 -14
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/retriever/mongodb_retriever.py +16 -14
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/retriever/postgres_retriever.py +16 -14
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/retriever/qdrant_retriever.py +16 -14
- vector_mcp-3.3.1/vector_mcp/session.py +114 -0
- vector_mcp-3.3.1/vector_mcp/skills/__init__.py +1 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/skills/vector-collection-management/SKILL.md +2 -2
- vector_mcp-3.3.1/vector_mcp/skills/vector-mcp-operations/SKILL.md +51 -0
- vector_mcp-3.3.1/vector_mcp/skills/vector-mcp-operations/agents/openai.yaml +4 -0
- vector_mcp-3.3.1/vector_mcp/skills/vector-mcp-operations/references/catalog.md +46 -0
- vector_mcp-3.3.1/vector_mcp/vector_api.py +620 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/vectordb/__init__.py +6 -14
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/vectordb/base.py +73 -26
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/vectordb/chromadb.py +67 -70
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/vectordb/couchbase.py +174 -140
- vector_mcp-3.3.1/vector_mcp/vectordb/db_utils.py +113 -0
- vector_mcp-3.3.1/vector_mcp/vectordb/epistemic_graph.py +411 -0
- vector_mcp-3.3.1/vector_mcp/vectordb/mongodb.py +336 -0
- vector_mcp-3.3.1/vector_mcp/vectordb/postgres.py +377 -0
- vector_mcp-3.3.1/vector_mcp/vectordb/qdrant.py +317 -0
- vector_mcp-3.3.1/vector_mcp.egg-info/PKG-INFO +510 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp.egg-info/SOURCES.txt +27 -11
- vector_mcp-3.3.1/vector_mcp.egg-info/entry_points.txt +15 -0
- vector_mcp-3.3.1/vector_mcp.egg-info/requires.txt +34 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp.egg-info/top_level.txt +3 -0
- vector_mcp-2.1.2/AGENTS.md +0 -340
- vector_mcp-2.1.2/PKG-INFO +0 -609
- vector_mcp-2.1.2/README.md +0 -546
- vector_mcp-2.1.2/a2a.json +0 -22
- vector_mcp-2.1.2/mcp_config.json +0 -24
- vector_mcp-2.1.2/pyproject.toml +0 -78
- vector_mcp-2.1.2/scripts/security_sanitizer.py +0 -160
- vector_mcp-2.1.2/scripts/validate_a2a_agent.py +0 -139
- vector_mcp-2.1.2/scripts/validate_agents.py +0 -198
- vector_mcp-2.1.2/tests/conftest.py +0 -11
- vector_mcp-2.1.2/tests/test_action_discovery.py +0 -105
- vector_mcp-2.1.2/tests/test_agent_server.py +0 -133
- vector_mcp-2.1.2/tests/test_auth.py +0 -57
- vector_mcp-2.1.2/tests/test_concept_parity.py +0 -87
- vector_mcp-2.1.2/tests/test_protocol_compliance.py +0 -71
- vector_mcp-2.1.2/tests/test_pruning.py +0 -46
- vector_mcp-2.1.2/tests/test_vectordbs_mock.py +0 -235
- vector_mcp-2.1.2/vector_mcp/__init__.py +0 -59
- vector_mcp-2.1.2/vector_mcp/agent_server.py +0 -83
- vector_mcp-2.1.2/vector_mcp/auth.py +0 -15
- vector_mcp-2.1.2/vector_mcp/mcp/__init__.py +0 -15
- vector_mcp-2.1.2/vector_mcp/mcp/mcp_collection_management.py +0 -129
- vector_mcp-2.1.2/vector_mcp/mcp/mcp_search.py +0 -115
- vector_mcp-2.1.2/vector_mcp/mcp_config.json +0 -24
- vector_mcp-2.1.2/vector_mcp/mcp_server.py +0 -308
- vector_mcp-2.1.2/vector_mcp/prompts/__init__.py +0 -0
- vector_mcp-2.1.2/vector_mcp/prompts/retrieval_specialist.json +0 -43
- vector_mcp-2.1.2/vector_mcp/skills/__init__.py +0 -0
- vector_mcp-2.1.2/vector_mcp/vector_api.py +0 -40
- vector_mcp-2.1.2/vector_mcp/vectordb/db_utils.py +0 -565
- vector_mcp-2.1.2/vector_mcp/vectordb/epistemic_graph.py +0 -339
- vector_mcp-2.1.2/vector_mcp/vectordb/mongodb.py +0 -269
- vector_mcp-2.1.2/vector_mcp/vectordb/postgres.py +0 -480
- vector_mcp-2.1.2/vector_mcp/vectordb/qdrant.py +0 -318
- vector_mcp-2.1.2/vector_mcp.egg-info/PKG-INFO +0 -609
- vector_mcp-2.1.2/vector_mcp.egg-info/entry_points.txt +0 -15
- vector_mcp-2.1.2/vector_mcp.egg-info/requires.txt +0 -58
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/CHANGELOG.md +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/CLAUDE.md +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/MANIFEST.in +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/scripts/verify_deps.py +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/setup.cfg +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/tests/reproduce_chunking.py +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/tests/test_databases.py +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/tests/test_init_dynamics.py +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/tests/test_placeholder.py +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/tests/test_startup.py +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/tests/test_vector_mcp.py +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/__main__.py +0 -0
- {vector_mcp-2.1.2/vector_mcp/connectors → vector_mcp-3.3.1/vector_mcp/prompts}/__init__.py +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/prompts/main_agent.json +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/retriever/__init__.py +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/retriever/retriever.py +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/skills/vector-backend-operations/SKILL.md +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp/skills/vector-hybrid-search/SKILL.md +0 -0
- {vector_mcp-2.1.2 → vector_mcp-3.3.1}/vector_mcp.egg-info/dependency_links.txt +0 -0
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
# Without this, `pre-commit install` wires ONLY the pre-commit hook, so `git push`
|
|
2
|
+
# runs nothing and every hook staged pre-push is silently dead code.
|
|
3
|
+
default_install_hook_types: [pre-commit, pre-push]
|
|
1
4
|
default_language_version:
|
|
2
5
|
python: python3
|
|
6
|
+
# Phase 0 dev-velocity contract (arbora-completion-program): a hook with no
|
|
7
|
+
# explicit `stages:` below is commit-only, never both.
|
|
8
|
+
default_stages: [pre-commit]
|
|
3
9
|
exclude: 'dotnet|node_modules'
|
|
4
10
|
ci:
|
|
5
11
|
autofix_prs: true
|
|
@@ -8,7 +14,7 @@ ci:
|
|
|
8
14
|
|
|
9
15
|
repos:
|
|
10
16
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
11
|
-
rev: v6.0.0
|
|
17
|
+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # v6.0.0
|
|
12
18
|
hooks:
|
|
13
19
|
- id: check-added-large-files
|
|
14
20
|
args: ["--maxkb=2000"]
|
|
@@ -25,54 +31,44 @@ repos:
|
|
|
25
31
|
- id: end-of-file-fixer
|
|
26
32
|
- id: no-commit-to-branch
|
|
27
33
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
28
|
-
rev: v0.
|
|
34
|
+
rev: 38bfb07c0c64c304f47eb52090f8288150c77730 # v0.17.1
|
|
29
35
|
hooks:
|
|
30
36
|
- id: ruff
|
|
31
37
|
types_or: [python, pyi, jupyter]
|
|
32
38
|
args: ["--fix", "--ignore=E402"]
|
|
33
39
|
exclude: ^(tests/|test/|scripts/|script/)
|
|
34
40
|
- repo: https://github.com/jendrikseipp/vulture
|
|
35
|
-
rev: v2.16
|
|
41
|
+
rev: b0f67ba0044693aa9ec0d38fe460590facc98004 # v2.16
|
|
36
42
|
hooks:
|
|
37
43
|
- id: vulture
|
|
38
44
|
pass_filenames: false
|
|
39
45
|
args: [".", "--min-confidence", "95", --exclude, '.venv,venv,node_modules,.git,build,dist'] # or 100 if you want very high confidence only
|
|
40
46
|
require_serial: true
|
|
41
47
|
- repo: https://github.com/codespell-project/codespell
|
|
42
|
-
rev: v2.4.
|
|
48
|
+
rev: 57b21406f092110c18776e39b0bda50d37c945c8 # v2.4.3
|
|
43
49
|
hooks:
|
|
44
50
|
- id: codespell
|
|
45
51
|
args: ["-L", "ans,linar,nam,tread,ot,"]
|
|
46
52
|
- repo: https://github.com/PyCQA/bandit
|
|
47
|
-
rev: 1.8.6
|
|
53
|
+
rev: 2d0b675b04c80ae42277e10500db06a0a37bae17 # 1.8.6
|
|
48
54
|
hooks:
|
|
49
55
|
- id: bandit
|
|
50
56
|
args: ["--skip", "B101,B404,B603"]
|
|
51
57
|
exclude: ^(tests/|test/|scripts/|script/|__tests__/)
|
|
52
58
|
- repo: https://github.com/nbQA-dev/nbQA
|
|
53
|
-
rev: 1.9.1
|
|
59
|
+
rev: d31b7eae1767c43460afb3ba130e0a6602933abe # 1.9.1
|
|
54
60
|
hooks:
|
|
55
61
|
- id: nbqa-ruff
|
|
56
62
|
exclude: ^(\.\/test/|\./tests/)
|
|
57
63
|
- repo: local
|
|
58
64
|
hooks:
|
|
59
|
-
- id:
|
|
60
|
-
name:
|
|
61
|
-
entry:
|
|
65
|
+
- id: dependency-readiness
|
|
66
|
+
name: Dependency readiness — every declared intra-fleet constraint is installable
|
|
67
|
+
entry: bash -c 'P=""; d="$PWD"; while [ "$d" != "/" ]; do [ -d "$d/agent-packages/agents/repository-manager" ] && { P="$d/agent-packages/agents/repository-manager"; break; }; d=$(dirname "$d"); done; [ -n "$P" ] || P=repository-manager; uv run --no-project --python 3.12 --prerelease=allow --with "$P" python -m repository_manager.dependency_readiness .'
|
|
62
68
|
language: system
|
|
63
69
|
pass_filenames: false
|
|
64
70
|
always_run: true
|
|
65
|
-
|
|
66
|
-
name: Check Mermaid syntax
|
|
67
|
-
entry: python3 /home/apps/workspace/agent-packages/agent-utilities/scripts/mermaid_linter.py
|
|
68
|
-
language: system
|
|
69
|
-
files: \.md$
|
|
70
|
-
pass_filenames: true
|
|
71
|
-
- id: check-stubs
|
|
72
|
-
name: Check for Active Stubs and TODOs
|
|
73
|
-
entry: python3 /home/apps/workspace/agent-packages/agent-utilities/scripts/check_stubs.py
|
|
74
|
-
language: system
|
|
75
|
-
types: [python]
|
|
71
|
+
stages: [manual, pre-push]
|
|
76
72
|
- id: mermaid-validate
|
|
77
73
|
name: mermaid-validate
|
|
78
74
|
entry: mermaid-validate
|
|
@@ -83,41 +79,20 @@ repos:
|
|
|
83
79
|
- id: check-agent-standards
|
|
84
80
|
name: check agent standards
|
|
85
81
|
entry: |-
|
|
86
|
-
bash -c 'for f in $(find . -type f -name "
|
|
82
|
+
bash -c 'for f in $(find . -type f -name "mcp_server.py" -not -path "*/\.venv/*" -not -path "*/__pycache__/*"); do grep -q "warnings.filterwarnings\|import warnings" "$f" || { echo "Missing warnings.filterwarnings in $f"; exit 1; }; done'
|
|
87
83
|
language: system
|
|
88
84
|
pass_filenames: false
|
|
89
85
|
always_run: true
|
|
90
|
-
- id: mcp-readme-table
|
|
91
|
-
name: sync MCP tools table in README
|
|
92
|
-
entry: |-
|
|
93
|
-
bash -c 'if [ -f uv.lock ]; then uv run python -m agent_utilities.mcp.readme_tools; else python -m agent_utilities.mcp.readme_tools; fi'
|
|
94
|
-
language: system
|
|
95
|
-
files: ^(README\.md|.*/mcp_server\.py|.*/mcp/.*\.py)$
|
|
96
|
-
pass_filenames: false
|
|
97
|
-
- id: readme-env-vars
|
|
98
|
-
name: sync env-vars table in README
|
|
99
|
-
entry: |-
|
|
100
|
-
bash -c 'if [ -f uv.lock ]; then uv run python -m agent_utilities.mcp.readme_env_vars; else python -m agent_utilities.mcp.readme_env_vars; fi'
|
|
101
|
-
language: system
|
|
102
|
-
files: ^(README\.md|\.env\.example)$
|
|
103
|
-
pass_filenames: false
|
|
104
|
-
- id: readme-mcp-examples
|
|
105
|
-
name: sync mcp_config examples in README + env blocks
|
|
106
|
-
entry: |-
|
|
107
|
-
bash -c 'if [ -f uv.lock ]; then uv run python -m agent_utilities.mcp.readme_mcp_examples; else python -m agent_utilities.mcp.readme_mcp_examples; fi'
|
|
108
|
-
language: system
|
|
109
|
-
files: ^(README\.md|\.env\.example|mcp_config.*\.json|.*/mcp_config.*\.json|.*/mcp_server\.py)$
|
|
110
|
-
pass_filenames: false
|
|
111
86
|
- id: env-var-drift
|
|
112
87
|
name: check env-var/config drift
|
|
113
|
-
entry: bash -c 'if [ -f uv.lock ]; then uv run python -m
|
|
88
|
+
entry: bash -c 'if [ -f uv.lock ]; then uv run python -m agent_connector_sdk.mcp.env_drift --check; else python -m agent_connector_sdk.mcp.env_drift --check; fi'
|
|
114
89
|
language: system
|
|
115
90
|
pass_filenames: false
|
|
116
91
|
files: ^(README\.md|\.env\.example|mcp_config.*\.json|.*/mcp_config.*\.json|docker/.*compose.*\.ya?ml|.*/auth\.py|.*/mcp_server\.py)$
|
|
117
92
|
- id: check-cli-help
|
|
118
93
|
name: check cli help
|
|
119
94
|
entry: |-
|
|
120
|
-
bash -c 'for f in $(find . -type f \( -name "mcp_server.py" -o -name "
|
|
95
|
+
bash -c 'for f in $(find . -type f \( -name "mcp_server.py" -o -name "mcp_server.py" \) -not -path "*/\.venv/*" -not -path "*/__pycache__/*"); do mod=$(echo "$f" | sed -e "s/^\.\///" -e "s/\.py$//" -e "s/\//./g"); uv run python -m "$mod" --help >/dev/null || exit 1; done'
|
|
121
96
|
language: system
|
|
122
97
|
pass_filenames: false
|
|
123
98
|
always_run: true
|
|
@@ -129,7 +104,7 @@ repos:
|
|
|
129
104
|
pass_filenames: false
|
|
130
105
|
always_run: true
|
|
131
106
|
- repo: https://github.com/AleksaC/hadolint-py
|
|
132
|
-
rev: v2.
|
|
107
|
+
rev: 6e7504451511eaeb62a3e7f14d63b0296cbf86eb # v2.15.1
|
|
133
108
|
hooks:
|
|
134
109
|
- id: hadolint
|
|
135
110
|
args:
|
|
@@ -139,7 +114,7 @@ repos:
|
|
|
139
114
|
- --ignore=DL4006
|
|
140
115
|
- --ignore=SC2102
|
|
141
116
|
- repo: https://github.com/IamTheFij/docker-pre-commit
|
|
142
|
-
rev: v3.0.1
|
|
117
|
+
rev: f626253b23de45412865c07fd076ff95d4cd77a7 # v3.0.1
|
|
143
118
|
hooks:
|
|
144
119
|
- id: docker-compose-check
|
|
145
120
|
- repo: local
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
<!-- agent-contract:start -->
|
|
4
|
+
## Agent contract
|
|
5
|
+
|
|
6
|
+
Tool-neutral rules for any AI agent or human working in this repository. This block is maintained by the fleet standard; edit outside the markers.
|
|
7
|
+
|
|
8
|
+
- **Owner boundary:** this repository owns one external system's calls, mappings and MCP tools (spec prefix `CONN-VECTOR-MCP-`); it depends on the connector SDK only. Feature routing across repositories: [ecosystem boundaries](https://github.com/Knuckles-Team/pipelines/blob/main/reference/ecosystem-boundaries.md).
|
|
9
|
+
- **Setup:** run `scripts/bootstrap.sh`. It is idempotent and non-interactive: it pins uv and Python, syncs the locked environment, installs the git hooks and prints the gate command.
|
|
10
|
+
- **Gates:** `uvx pre-commit run --all-files` must pass before you push. Do not bypass hooks to get green.
|
|
11
|
+
- **Commits:** one logical change per commit with a `Spec: <ID>` trailer (or `Spec: none (<reason>)`), plus a `Co-Authored-By:` trailer naming the assisting agent. Stage explicit paths only; never `git add -A` or `git add .`. Use your own configured Git identity, never a tool or bot name.
|
|
12
|
+
- **Org rules:** [organization AGENTS.md](https://github.com/Knuckles-Team/.github/blob/main/AGENTS.md).
|
|
13
|
+
<!-- agent-contract:end -->
|
|
14
|
+
|
|
15
|
+
## Scope
|
|
16
|
+
|
|
17
|
+
This repository provides the action-routed `vector-mcp` server, optional vector provider
|
|
18
|
+
adapters, an agent entry point, packaged skills/prompts, a vector ontology, and a read-only
|
|
19
|
+
collection-inventory connector preset.
|
|
20
|
+
|
|
21
|
+
- Language/Version: Python 3.11+
|
|
22
|
+
- Core Libraries: `agent-connector-sdk`, `fastmcp`, `epistemic-graph` (client)
|
|
23
|
+
- Key principles: Functional patterns, Pydantic for data validation, asynchronous tool execution.
|
|
24
|
+
|
|
25
|
+
## Current architecture
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
MCP client
|
|
29
|
+
-> vector_collection_management / vector_search
|
|
30
|
+
-> validation, privacy, and backend policy
|
|
31
|
+
-> verified GraphSession boundary
|
|
32
|
+
-> configured provider
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Epistemic-graph is the native default. Optional providers are isolated behind extras and imported
|
|
36
|
+
only when selected.
|
|
37
|
+
|
|
38
|
+
## Non-negotiable design rules
|
|
39
|
+
|
|
40
|
+
- Do not add legacy paths, fallback implementations, deprecated aliases, compatibility shims, or
|
|
41
|
+
backward-compatibility branches. Migrate the current contract directly.
|
|
42
|
+
- Do not accept credentials or local database paths as MCP tool arguments.
|
|
43
|
+
- Do not persist endpoints, credentials, personal identity, raw content, hostnames, or local
|
|
44
|
+
filesystem paths in source, skills, docs, traces, reports, fixtures, or generated evidence.
|
|
45
|
+
- Resolve runtime values through AgentConfig, environment variables, and supported secret
|
|
46
|
+
references.
|
|
47
|
+
- Resolve TLS through the shared transport profile. Do not add certificate-verification bypasses.
|
|
48
|
+
- Keep document ingestion confined to the configured root and relative caller-selected paths.
|
|
49
|
+
- Keep optional dependencies lazy; importing `vector_mcp` must not start services or require
|
|
50
|
+
every provider SDK.
|
|
51
|
+
- Never fabricate connector signatures, live test evidence, trace evidence, or safe dependency
|
|
52
|
+
versions.
|
|
53
|
+
|
|
54
|
+
## Source layout
|
|
55
|
+
|
|
56
|
+
- `vector_mcp/mcp_server.py`: condensed MCP registration and request boundary
|
|
57
|
+
- `vector_mcp/vector_api.py`: checked session, privacy, secret, TLS, and provider boundary
|
|
58
|
+
- `vector_mcp/vectordb/`: optional provider adapters
|
|
59
|
+
- `vector_mcp/backend_policy.py`: canonical backend and exposure policy
|
|
60
|
+
- `vector_mcp/document_inputs.py`: bounded root-confined ingestion inputs
|
|
61
|
+
- `vector_mcp/doctor.py`: privacy-safe readiness output
|
|
62
|
+
- `vector_mcp/skills/`, `prompts/`, `ontology/`, `connectors/`: packaged extensions
|
|
63
|
+
- `tests/`: unit and explicitly configured integration tests
|
|
64
|
+
- `docs/`: operator documentation
|
|
65
|
+
|
|
66
|
+
### Supported backends
|
|
67
|
+
|
|
68
|
+
- **Epistemic-Graph** (**DEFAULT**): the native local AI-native engine — durable
|
|
69
|
+
(redb-authoritative) with a native ANN/HNSW index, so semantic search is the engine's
|
|
70
|
+
O(log N) vector search. Zero external infra (autostarts). Selected when `db_type` is
|
|
71
|
+
unspecified (override with `DATABASE_TYPE`, alias `VECTOR_DB_TYPE`).
|
|
72
|
+
- **PostgreSQL/PGVector**, **Qdrant**, **MongoDB**: secure opt-in providers, TLS-checked and
|
|
73
|
+
secret-reference-only — the current, certified contract (`VectorDBFactory.PREDEFINED_VECTOR_DB`
|
|
74
|
+
and `backend_policy.ensure_backend_available` agree on exactly these four names, and both the
|
|
75
|
+
factory and the MCP tool boundary reject any other `db_type`, including legacy spellings like
|
|
76
|
+
`eg`/`epistemic-graph`).
|
|
77
|
+
- **ChromaDB / Couchbase — removed from the supported contract.** `vector_mcp/vectordb/chromadb.py`
|
|
78
|
+
and `couchbase.py` remain in the tree (real, previously-shipped adapters) but are no longer wired
|
|
79
|
+
into `VectorDBFactory`, `vectordb.__init__`'s exports, or the packaged extras —
|
|
80
|
+
`db_type="chroma"|"couchbase"` raises `vector_database_type_unsupported` (see
|
|
81
|
+
`tests/test_protocol_compliance.py`, `tests/test_database_transport_security.py`). They can still
|
|
82
|
+
be imported directly (`from vector_mcp.vectordb.chromadb import ChromaVectorDB`) by a caller who
|
|
83
|
+
installs `chromadb`/`couchbase` + `llama-index` themselves, but that path is unsupported/untested
|
|
84
|
+
by the current contract.
|
|
85
|
+
|
|
86
|
+
### Implementation notes
|
|
87
|
+
|
|
88
|
+
- **Epistemic-Graph**: stores each chunk as an engine node (text in the indexed
|
|
89
|
+
`description` property, plus metadata) with its embedding in the engine's native ANN
|
|
90
|
+
index via `SyncEpistemicGraphClient` (transactional `.txn.add_node` + `.txn.add_embedding`,
|
|
91
|
+
session-authority-cached connections). Semantic search is `.graph.semantic_search` (native
|
|
92
|
+
ANN); lexical/keyword search is the engine's one-round-trip `.graph.discover` (keyword overlap
|
|
93
|
+
+ semantic, scalable — a client-side term scan is only a fallback for an engine too old for
|
|
94
|
+
`discover`). A collection maps to an engine graph (`graph_name`); embeddings come from the
|
|
95
|
+
shared `create_embedding_model`.
|
|
96
|
+
- **PostgreSQL / Qdrant / MongoDB**: rewritten on raw `psycopg`/`qdrant_client`/`pymongo` (no
|
|
97
|
+
`llama-index` dependency) behind the shared TLS-pinned transport layer.
|
|
98
|
+
|
|
99
|
+
Removed root-level debug scripts and obsolete test compose artifacts must remain removed.
|
|
100
|
+
Maintained container definitions live under `docker/`.
|
|
101
|
+
|
|
102
|
+
## Development rules
|
|
103
|
+
|
|
104
|
+
- Use `agent_connector_sdk` primitives for MCP construction, secrets, identity, transport
|
|
105
|
+
security, and observability.
|
|
106
|
+
- Keep public tool schemas bounded and explicit.
|
|
107
|
+
- Use Pydantic fields/models where they define a public validation boundary.
|
|
108
|
+
- Log stable status and exception types, not values or response bodies.
|
|
109
|
+
- Require runtime credentials for integration tests; never provide checked-in password defaults.
|
|
110
|
+
- Preserve unrelated user work and do not commit caches, databases, traces, logs, build outputs,
|
|
111
|
+
or environment files.
|
|
112
|
+
- Keep `pyproject.toml`, module versions, and `uv.lock` synchronized. Do not regenerate the
|
|
113
|
+
lock as a side effect of unrelated work.
|
|
114
|
+
|
|
115
|
+
## Cheap validation
|
|
116
|
+
|
|
117
|
+
These checks do not start providers:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
python scripts/security_sanitizer.py
|
|
121
|
+
python scripts/security_contract.py --contract .security/security-contract.json validate
|
|
122
|
+
python -m compileall -q vector_mcp
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Also parse JSON/TOML/YAML, run `git diff --check`, and run the configured formatter/linter.
|
|
126
|
+
Provider tests, services, lock regeneration, and native compilation are separate serialized gates
|
|
127
|
+
and must not be run concurrently on a constrained workstation.
|
|
128
|
+
|
|
129
|
+
## Connector evidence
|
|
130
|
+
|
|
131
|
+
The source preset follows the installed action-routed tool schema. Exact tool-schema fingerprints,
|
|
132
|
+
connector manifests, and certification files are generated release evidence. Generate them only
|
|
133
|
+
after observing the installed MCP schema and resolving an authorized runtime signing key. If
|
|
134
|
+
source ontology or tool schemas change, old signatures are invalid and must not be copied forward.
|
|
135
|
+
|
|
136
|
+
## ⛔ Keep the Repository Root Pristine — No Scratch / Temp / Debug Files
|
|
137
|
+
|
|
138
|
+
**The repository ROOT must contain only canonical project files** (packaging,
|
|
139
|
+
config, docs, lockfiles). The only hidden directories allowed at root are
|
|
140
|
+
`.git/`, `.github/`, and `.specify/` (plus a local, git-ignored `.venv/`).
|
|
141
|
+
|
|
142
|
+
**NEVER write any of the following — anywhere in the repo, and ESPECIALLY at the root:**
|
|
143
|
+
- One-off / debug / migration scripts: `fix_*.py`, `migrate_*.py`, `refactor_*.py`,
|
|
144
|
+
`replace_*.py`, `update_*.py`, `debug_*.py`, or `test_*.py` **at the root**
|
|
145
|
+
(real tests live in `tests/` only).
|
|
146
|
+
- Databases / data dumps: `*.db`, `*.db-wal`, `*.sqlite*`, `*.corrupted`.
|
|
147
|
+
- Logs / command output: `*.log`, scratch `*.txt`, `*.orig`, `*.rej`, `*.bak`.
|
|
148
|
+
- Build artifacts: `*.tsbuildinfo`, compiled binaries, coverage files.
|
|
149
|
+
- AI agent scratch directories: `.agent/`, `.agents/`, `.agent_data/`, `.tmp/`,
|
|
150
|
+
`.hypothesis/`, or any per-tool cache committed to git.
|
|
151
|
+
- Any file that is NOT production source, a test in `tests/`, documentation, or
|
|
152
|
+
a recognized config/lockfile.
|
|
153
|
+
|
|
154
|
+
**Why:** these files expose private filesystem paths, credentials, and internal infrastructure
|
|
155
|
+
details when pushed to GitHub publicly; scratch at the root also bloats the tree and erodes a
|
|
156
|
+
pristine codebase.
|
|
157
|
+
|
|
158
|
+
**Where to put scratch work instead:**
|
|
159
|
+
- Use `~/workspace/scratch/` for temporary scripts and experiments
|
|
160
|
+
- Use `~/workspace/reports/` for command output and reports
|
|
161
|
+
- Keep test scripts in the `tests/` directory following proper pytest conventions
|
|
162
|
+
|
|
163
|
+
Before finishing a task, run `git status` and confirm no stray root files were added.
|
|
164
|
+
|
|
165
|
+
<!-- BEGIN concept-coordination (generated) -->
|
|
166
|
+
## Concept-ID Coordination (multi-session)
|
|
167
|
+
|
|
168
|
+
Working in parallel with other sessions/worktrees? **Reserve a concept id before you write its `CONCEPT:` marker** so two sessions never collide:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
agent-utilities --json concept reserve --ns EG-KG.compute.backend # or a package prefix, e.g. KEY
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Full protocol (ledger, merge=union, reconcile, MCP/REST): <https://knuckles-team.github.io/agent-utilities/concept_coordination/>
|
|
175
|
+
<!-- END concept-coordination (generated) -->
|
|
176
|
+
|
|
177
|
+
## Version & lockfile drift edict (keep the version mirrors AND the lock in sync)
|
|
178
|
+
|
|
179
|
+
The two most common release-breakers in this fleet are **version drift** (the version in
|
|
180
|
+
`pyproject.toml`/`.bumpversion.cfg` advancing while `README.md`, `docker/Dockerfile`, and the
|
|
181
|
+
module `__version__`s lag) and a **stale `uv.lock`** (shipping known-vulnerable transitive deps).
|
|
182
|
+
A version mismatch makes the next `bump-my-version` throw `VersionNotFoundException`; a stale lock
|
|
183
|
+
is what Dependabot flags. Rules:
|
|
184
|
+
|
|
185
|
+
1. **Never hand-edit a version string.** Change the version ONLY via
|
|
186
|
+
`bump-my-version bump {patch|minor|major}` (a.k.a. `bump2version`), which rewrites every file
|
|
187
|
+
registered in `.bumpversion.cfg` in one atomic, tagged commit. If the operator edited the version in
|
|
188
|
+
`pyproject.toml` by hand, the operator created drift — revert and use the bumper.
|
|
189
|
+
2. **Every version-bearing file must be registered in `.bumpversion.cfg`** — at minimum
|
|
190
|
+
`pyproject.toml` AND `README.md`, plus `docker/Dockerfile` and any module `__version__`. Never
|
|
191
|
+
add a file that embeds the version without a `[bumpversion:file:...]` entry for it.
|
|
192
|
+
3. **Re-lock on every dependency change.** After editing `pyproject.toml` deps/extras, run
|
|
193
|
+
`uv lock` and commit `uv.lock` in the SAME change. The `uv-lock` pre-commit hook runs with
|
|
194
|
+
`--locked` and fails on drift — never bypass it. The committed `uv.lock` is the
|
|
195
|
+
Dependabot/security surface.
|
|
196
|
+
4. **Patch CVEs with a version floor at the source, then re-lock.** `uv` resolves one version
|
|
197
|
+
graph-wide, so a lower-bound in the extra that pulls a dependency raises it for the whole lock.
|
|
198
|
+
|
|
199
|
+
## Upstream currency edict — target the newest release; a pin is a hypothesis, not a fact (READ BEFORE capping, deferring, or opt-in-gating an upgrade)
|
|
200
|
+
|
|
201
|
+
This governs how this repository treat **other people's** releases, deprecations, and version caps in
|
|
202
|
+
this repo (fleet-wide edict, propagated from `agent-utilities/AGENTS.md`).
|
|
203
|
+
|
|
204
|
+
1. **Latest by default.** Target the newest upstream release -- including a pre-release
|
|
205
|
+
where the ecosystem has already moved onto it. Sitting on an old major because the
|
|
206
|
+
upgrade is work is not a reason to defer it.
|
|
207
|
+
2. **A conservative upstream pin is a hypothesis, not a fact -- test it, don't inherit
|
|
208
|
+
it.** Upstream maintainers cap defensively (an unreleased major, an untested surface)
|
|
209
|
+
as often as they cap for a known break. Worked example (from `agent-utilities`):
|
|
210
|
+
`pydantic-ai-slim` 2.18.0 declared `fastmcp-slim[client]>=3.3.0` with no upper bound;
|
|
211
|
+
2.19.0 added `<4` purely as a defensive guard while fastmcp 4 was still pre-release --
|
|
212
|
+
not because of an observed incompatibility. Blocking an upgrade on that kind of cap
|
|
213
|
+
without testing it is the wrong default.
|
|
214
|
+
3. **Forward-fix only.** When an upgrade breaks something, fix the break to proceed --
|
|
215
|
+
do not pin backwards, vendor a fork, or route around it. If a break is genuinely
|
|
216
|
+
unfixable inside this repo, say exactly what and why, and carry a plan to unblock it
|
|
217
|
+
-- never an indefinite pin.
|
|
218
|
+
4. **Deprecations are fixed on sight, in code AND in tests.** A `DeprecationWarning` from
|
|
219
|
+
an upstream library is a defect to fix now, not noise to filter. **Never** silence one
|
|
220
|
+
with a warning filter, `# noqa`, or a pytest `filterwarnings` entry to go
|
|
221
|
+
green.
|
|
222
|
+
5. **Adopt upstream features rather than reimplementing them.** If upstream ships a
|
|
223
|
+
capability this repo hand-rolled, migrate to theirs and remove the local one.
|
|
224
|
+
6. **Nothing built on an upgrade ships opt-in.** A new capability an upgrade unlocks is
|
|
225
|
+
default-on unless it genuinely costs compute, in which case it is policy-selected,
|
|
226
|
+
never flag-gated. An opt-in extra or a dependency-conflict fork is an interim state
|
|
227
|
+
that must carry a written plan to become the default, never a resting place.
|
|
228
|
+
|
|
229
|
+
## Specs: extend first
|
|
230
|
+
|
|
231
|
+
Find the spec row that owns the behavior before any code change. Search with `git grep -n "<term>" -- specs`. Cite the row ID in the commit `Spec:` trailer. Extend the owning spec before any new spec text. Add a child row, a new rollup, or a dated `plan.md` "Amendments" entry. Create a new spec only for a capability that no spec owns. Audits, reviews, and carry-overs land in the owning spec. They never get a spec directory. Reuse an existing function, module, or store before adding one. The rules are the ecosystem [spec standard](https://github.com/Knuckles-Team/pipelines/blob/main/reference/spec-standard.md).
|