gmaps: fix missing dependency install + wire verify (v6 / 1.1.0)
The connector shipped no requirements.txt, so ensure_installed_host()
installed nothing and every tool call failed with "No module named
'googlemaps'" while the server still answered tools/list — skald logged
"connected — 6 tool(s)" on a connector that could not work.
- add requirements.txt (googlemaps>=4.10.0); deps were declared in the
manifest's `dependencies` field, which skald only uses for the card
- wire the shipped verify.py through a `verify` manifest block, so a
broken install fails visibly at enable time instead of silently
- verify.py puts .pydeps on sys.path: skald sets PYTHONPATH only for the
server process, not for the `sh -c "python3 verify.py"` verify step
- drop the inert mcp_config.env {SECRET:…} placeholder — those tokens are
substituted in the URL only, never in env values
- realign manifest/fragment versions (were 2/1.0.1 vs 5/1.0.4); skald
prefers the manifest, so "update available" could never appear
- requires ENV -> API_KEY; drop deprecated secrets/ path from error text
- regenerate the index
This commit is contained in:
@@ -12,6 +12,14 @@ import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Skald installs our deps with `pip install --target .pydeps` beside this file and
|
||||
# puts that dir on PYTHONPATH for the *server* process only — the verify step gets
|
||||
# a bare `sh -c "python3 verify.py"`, so `import googlemaps` would fail here even
|
||||
# on a correctly installed connector. Put .pydeps on sys.path ourselves.
|
||||
_PYDEPS = os.path.join(os.path.dirname(os.path.abspath(__file__)), ".pydeps")
|
||||
if os.path.isdir(_PYDEPS):
|
||||
sys.path.insert(0, _PYDEPS)
|
||||
|
||||
|
||||
def main() -> None:
|
||||
api_key = os.environ.get("GOOGLE_MAPS_API_KEY", "").strip()
|
||||
|
||||
Reference in New Issue
Block a user