Add the content service and MCP server (phase 2)

services/content watches the vault's Site folder, runs every change through
fixed rules, keeps the last accepted version of each note with its history,
and serves one write API. The HTTP API, the MCP server for agents, and the
admin page and editing tools to come all write through it.

- SQLite store with history, review queue, redirects, links and full-text search
- Rules: invalid, misplaced, duplicate name or slug, text loss, secrets,
  agent contact details, agent edits, agent publishing, agent batches
- Watcher with debounce and a periodic full scan
- HTTP API with reader, agent, editor and admin tokens
- MCP tools: search, get_note, get_schema, list_held, set_status,
  add_library_item, update_fields, draft_post
- Tests, including taking in all 545 migrated notes with nothing held

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012aSbo2D1qP8cMFQCykf7kx
This commit is contained in:
Claude
2026-10-11 19:10:38 +00:00
parent a2f723ca2d
commit 3f646048a2
23 changed files with 3482 additions and 38 deletions
+4 -2
View File
@@ -5,18 +5,20 @@
"description": "GregKilmer.com: the note schema, content service and site that serve Greg's vault notes. The old site lives in legacy/ for reference only.",
"workspaces": [
"packages/*",
"services/*",
"tools/*"
],
"engines": {
"node": ">=22"
},
"scripts": {
"typecheck": "tsc -p packages/schema && tsc -p tools/migrate",
"typecheck": "tsc -p packages/schema && tsc -p tools/migrate && tsc -p services/content",
"test": "vitest run",
"check": "npm run typecheck && npm test",
"schema:json": "npm run json -w @gk/schema",
"templates": "npm run templates -w @gk/schema",
"migrate": "npm run migrate -w @gk/migrate --"
"migrate": "npm run migrate -w @gk/migrate --",
"content": "npm run start -w @gk/content"
},
"devDependencies": {
"@types/node": "^22.10.0",