mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-16 06:42:14 +00:00
src/mcp/resources.ts registers the catalogue as a resource template for principals with read:catalog — five listable documents (one per kind), each read through list_models and served as JSON. src/mcp/prompts.ts registers plan_generation: given a brief (and optionally a kind), walk list_models → estimate_cost → get_credit_balance and recommend, without generating anything. Tests (3, via the SDK's in-memory client): template and resource listing, a JSON read, an unknown kind refused; the resource withheld without read:catalog; the prompt listed and rendered with its steps. pnpm check: typecheck, eslint, prettier, 231 tests passing. Claude-Session: https://claude.ai/code/session_01H3gfN2NCx3hBXSrZXYHUQ3