@@ -22,17 +22,14 @@ The workspace structure follows Deno best practices with separate packages that
2222│ │ ├── mod.ts # Main exports
2323│ │ ├── src/
2424│ │ │ ├── client.ts # JSR API client implementation
25- │ │ │ └── types/
26- │ │ │ └── jsr.ts # TypeScript types and Zod schemas
25+ │ │ │ └── types.ts # TypeScript types and Zod schemas
2726│ │ └── tests/
2827│ │ └── client.test.ts
2928│ └── jsr-mcp/ # MCP server package
3029│ ├── deno.json # Package configuration
3130│ ├── mod.ts # Main entry point
3231│ ├── src/
33- │ │ ├── index.ts # MCP server implementation
34- │ │ └── types/
35- │ │ └── mcp.ts # MCP-specific types
32+ │ │ └── index.ts # MCP server implementation with inline tool definitions
3633│ └── tests/
3734│ └── server.test.ts
3835```
@@ -45,10 +42,17 @@ The workspace structure follows Deno best practices with separate packages that
4542- ** Lint all code** : ` deno lint `
4643- ** Type check all code** : ` deno check packages/jsr/mod.ts packages/jsr-mcp/mod.ts `
4744- ** Run all tests** : ` deno test --allow-net packages/ `
45+ - ** Run a single test file** : ` deno test --allow-net packages/jsr/tests/client.test.ts `
4846- ** Run development server** : ` deno run --allow-read --allow-write --allow-env --allow-run --allow-net --watch packages/jsr-mcp/mod.ts `
4947- ** Run production server** : ` deno run --allow-read --allow-write --allow-env --allow-run --allow-net packages/jsr-mcp/mod.ts `
5048- ** Build MCP server binary** : ` cd packages/jsr-mcp && deno compile --allow-read --allow-write --allow-env --allow-run --allow-net --output=jsr-mcp mod.ts `
5149
50+ ** Git hooks** (managed via deno-task-hooks):
51+
52+ - ** Install hooks** : ` deno task hooks:install `
53+ - ** Pre-commit** : Runs ` deno check ` , ` deno fmt --check ` , and ` deno lint `
54+ - ** Pre-push** : Runs ` deno publish --dry-run --allow-dirty `
55+
5256## Architecture
5357
5458### JSR Client Package (` packages/jsr/ ` )
@@ -57,23 +61,24 @@ The workspace structure follows Deno best practices with separate packages that
5761- ** Main exports** : ` mod.ts ` exports all client functions and types
5862- ** Dependencies** : Only ` zod ` for schema validation
5963- ** Can be used independently** of the MCP server
64+ - ** Testing** : Uses ` jsr:@std/assert ` for assertions
6065
6166### MCP Server Package (` packages/jsr-mcp/ ` )
6267
6368- ** Purpose** : MCP server that exposes JSR functionality to AI assistants
6469- ** Dependencies** :
65- - Local: ` @wyattjoh/jsr ` (the client package)
70+ - Local: ` @wyattjoh/jsr ` (the client package, imported via relative path )
6671 - External: ` @modelcontextprotocol/sdk ` , ` @std/dotenv ` , ` zod `
67- - ** Pattern** : Uses inline ` server.tool() ` calls (similar to iMessage MCP)
72+ - ** Pattern** : Uses inline ` server.tool() ` calls for MCP tool definitions
6873- ** Configuration** : Via environment variables (JSR_API_URL, JSR_REGISTRY_URL, JSR_API_TOKEN)
6974
7075## Key Design Patterns
7176
72- - ** Workspace imports** : The MCP server imports the JSR client using a relative path in ` deno.json `
77+ - ** Workspace imports** : The MCP server imports the JSR client using a relative path configured in workspace root
7378- ** Type safety** : All API interactions use Zod schemas for validation
7479- ** Error handling** : Consistent error wrapping and reporting
75- - ** Testing** : Each package has its own test suite
76- - ** MCP tools** : Defined inline using ` server.tool() ` with Zod schemas
80+ - ** Testing** : Each package has its own test suite using Deno's built-in test runner
81+ - ** MCP tools** : Defined inline using ` server.tool() ` with Zod schemas that mirror the JSR client types
7782
7883## Repository Management
7984
@@ -89,11 +94,4 @@ Each package can be published separately to JSR:
8994- ` packages/jsr/ ` as ` @wyattjoh/jsr `
9095- ` packages/jsr-mcp/ ` as ` @wyattjoh/jsr-mcp `
9196
92- Both packages include their own LICENSE file and are configured for JSR publishing.
93-
94- # important-instruction-reminders
95-
96- Do what has been asked; nothing more, nothing less.
97- NEVER create files unless they're absolutely necessary for achieving your goal.
98- ALWAYS prefer editing an existing file to creating a new one.
99- NEVER proactively create documentation files (* .md) or README files. Only create documentation files if explicitly requested by the User.
97+ Both packages include their own LICENSE file and are configured for JSR publishing via ` deno publish ` .
0 commit comments