aboutsummaryrefslogtreecommitdiff
path: root/tests/test-gptel-tools-git-diff.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-17 14:11:21 -0500
committerCraig Jennings <c@cjennings.net>2026-05-17 14:11:21 -0500
commit54d231be98bdde220355102abb8b37f3740db74d (patch)
treedbecd1198dc0965bc1cf7f207332c14d808ef436 /tests/test-gptel-tools-git-diff.el
parent2b61aa82afa39a0ff1b165fa9ff09d55d21bfabf (diff)
downloaddotemacs-54d231be98bdde220355102abb8b37f3740db74d.tar.gz
dotemacs-54d231be98bdde220355102abb8b37f3740db74d.zip
feat(ai-mcp): add pure-helper foundation with tests
First of nine phases for wiring mcp.el into GPTel. I scoped this phase to sections 1 (constants and defcustoms) and 3 (pure helpers) of the seven-section outline in the design doc. The other five sections ship in later phases. The module loads only under the test harness for now. init.el wiring waits for Phase 4. What I added: - cj/mcp-server-specs defconst: secret-free description of the 9 servers (linear, notion, figma, slack-deepsat, drawio, google-calendar, google-docs-personal, google-docs-work, google-keep). - Seven defcustoms: claude-config path, enabled-servers list, start-on-entry-points scope, two timeouts, per-tool confirm overrides, audit-log toggle. - cj/mcp--read-claude-config with an mtime cache and structured (:ok t/nil :reason ...) returns. - cj/mcp--get-server-entry, get-env, and get-secret-arg for pulling server data from the parsed config (figma's API key lives in args, not env). - cj/mcp--build-server-alist: pure transformer from specs plus config to the alist mcp-hub-servers expects. - cj/mcp--confirm-p classifier with write-pattern, read-pattern, and unknown-fails-closed branches, plus a cj/mcp-tool-confirm-overrides alist override. - cj/mcp--normalize-description prefixing tool descriptions with [SERVER], [SERVER WRITE], or [SERVER ?]. - cj/mcp--redact masking --token, --secret, --password, and --figma-api-key flags, Authorization headers, and ?token= URL params. Tests in tests/test-ai-mcp-helpers.el (41 ERT tests, all green): fixtures via make-temp-file, no real ~/.claude.json reads, no subprocesses, no network. Sentinel REDACTED_TEST_SECRET never appears in any redactor output. Design doc: docs/design/mcp-el-gptel-integration.org
Diffstat (limited to 'tests/test-gptel-tools-git-diff.el')
0 files changed, 0 insertions, 0 deletions