Commit c6bc820
committed
Add Agent Bridge addon
Agent Bridge embeds a control bridge in a running Gramps session so an AI
agent can drive the live application: read and modify the tree, operate the
UI, and create and load plugins on the fly.
It ships an MCP (Model Context Protocol) server so any MCP-capable AI can
drive Gramps through standard tools. The gramplet polls a watched control
directory on the GTK main thread and executes submitted Python in a
persistent namespace with dbstate, db, uistate, gui and gramps_lib bound;
the MCP server is a thin stdio adapter over that directory. No network port
is opened.
As defense-in-depth, every request must carry a shared secret token. The
gramplet generates it on first run at ~/.gramps_agent/token (owner-only) and
refuses any request without it; the MCP server and the debug CLI read the
same file automatically. GRAMPS_AGENT_TOKEN overrides the file.1 parent 771db58 commit c6bc820
7 files changed
Lines changed: 977 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
0 commit comments