feat: add manual export provider

This commit is contained in:
2026-06-15 11:06:00 +01:00
parent 94aaa80181
commit 1228d9f2db
3 changed files with 85 additions and 6 deletions
+21 -3
View File
@@ -6,11 +6,11 @@ ChatGPT MCP Server
## Status
Planning complete. Phase 0 complete. Phase 1 complete. Phase 2 complete. Phase 3 complete. Phase 4 complete. Task 5.1 complete. Task 5.2 complete. Task 5.3 complete. Task 5.4 complete. Task 5.5 complete. Phase 6 complete. Phase 7 complete.
Planning complete. Phase 0 complete. Phase 1 complete. Phase 2 complete. Phase 3 complete. Phase 4 complete. Task 5.1 complete. Task 5.2 complete. Task 5.3 complete. Task 5.4 complete. Task 5.5 complete. Phase 6 complete. Phase 7 complete. Phase 8 complete (Task 8.0 — Manual Export Provider).
## Current Phase
All planned phases complete. Provider abstraction (Phase 6) and all tests (Phase 7) finished.
All planned phases complete. Provider abstraction (Phase 6), integration tests (Phase 7), and manual export provider (Phase 8) finished.
## Completed Tasks
@@ -118,6 +118,24 @@ Project-local Claude Code discovery configured:
- All 579 tests pass across 20 test files with zero regressions
- `npm start` → tools/list shows same 5 tools with unchanged schemas
- Task 8.0 — Implement ReviewRequest and Manual Export Provider ✅
**Provider implementation:**
- `src/providers/manual-export.js` — Zero-API-cost provider that wraps pre-built prompts in copy/paste-ready format
- Returns `{ content: string }` via `send(reviewRequest, config)`
- Uses `https://chatgpt.com` (never `https://chat.openai.com`)
- Detects tool name from input fields for metadata
- Warns on prompts over 30k characters
- Preserves unicode, markdown, code blocks, and special characters exactly
**Factory integration:**
- `"manual"` added to SUPPORTED_PROVIDERS whitelist in `src/providers/factory.js`
- `CHATGPT_MCP_PROVIDER=manual` switches all tool handlers to manual export mode
- Defaults to `"openai"` when not set — OpenAI behaviour unchanged
**Tests:** 56 new tests in `test/providers/manual-export.test.js` + 9 new in `test/providers/factory.test.js`
- Total: 644 passing tests across 21 test files, zero regressions
- `.claude/` added to `.gitignore` (no machine-specific paths committed)
- README.md updated with Setup, MCP Tools, and Running sections
- MCP config snippet uses `"command": "npm"`, `"args": ["start"]` — no absolute paths
@@ -192,4 +210,4 @@ All tests rewritten and verified:
## Next Pending
No pending tasks. MVP is complete. Future work roadmap: additional provider implementations (Ollama, Anthropic), streaming responses, response caching, structured output parsing.
No pending tasks. MVP is complete. Future work roadmap: Ollama provider implementation, Anthropic provider, streaming responses, response caching, structured output parsing.