@gethmy/mcp 2.4.6 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -258,7 +258,6 @@ A single command for both creating and executing plans. It auto-detects intent b
258
258
  - `harmony_update_agent_progress` - Update progress, status, blockers
259
259
  - `harmony_end_agent_session` - End session (completed/paused); triggers active learning extraction
260
260
  - `harmony_get_agent_session` - Get current session state
261
- - `harmony_get_agent_profile` - Get aggregate performance profile for an agent
262
261
 
263
262
  ### Auto-Session Detection
264
263
 
@@ -512,3 +511,37 @@ Add this to prevent accidentally committing local config:
512
511
  - Any Harmony user can use it
513
512
  - Business logic stays in Harmony
514
513
  - Centralized security and rate limiting
514
+
515
+ ## Testing
516
+
517
+ ```bash
518
+ bun run test:unit # fast — covers dispatch + skills
519
+ bun run test:integration # spins up real memory pipeline
520
+ bun run typecheck # type-only check
521
+ ```
522
+
523
+ ### MCP bridge verification harness
524
+
525
+ Three test files pin the contract every MCP client depends on. They are mandatory — agents lose tools silently if any of these drift:
526
+
527
+ | File | What it pins |
528
+ |---|---|
529
+ | `src/__tests__/skills.test.ts` | `buildSkillFile` frontmatter, version-marker injection, agent-id substitution, parameterized over `SKILL_DEFINITIONS`. |
530
+ | `src/__tests__/tool-dispatch.test.ts` | `TOOLS` registry shape, name uniqueness + `harmony_*` namespace, `inputSchema` validity, handler routing via `registerHandlers`, tool ↔ skill namespace boundary. |
531
+ | `src/__tests__/mcp-integration.test.ts` | End-to-end `Client ↔ Server` round-trip over `InMemoryTransport` — `listTools`, `callTool`, `listResources`, `readResource`, plus error paths. |
532
+
533
+ ### Adding a new tool
534
+
535
+ 1. Append the entry to `TOOLS` in `src/server.ts` (`name`, `description`, `inputSchema`).
536
+ 2. Add a `case "harmony_..."` branch in `handleToolCall`.
537
+ 3. Run `bun run test:unit` — the parameterized assertions in `tool-dispatch.test.ts` automatically cover the new entry's shape.
538
+ 4. If the tool needs a unique round-trip assertion, extend `mcp-integration.test.ts` with one extra case.
539
+
540
+ ### Adding a new skill
541
+
542
+ 1. Define `MY_SKILL_CONTENT` in `src/skills.ts`.
543
+ 2. Add it to `SKILL_DEFINITIONS` with `name`, `description`, `argumentHint`, and `content`.
544
+ 3. Bump `SKILLS_VERSION` so installed clients refresh on next startup.
545
+ 4. Run `bun run test:unit` — the parameterized assertions in `skills.test.ts` automatically cover the new skill.
546
+
547
+ CI gates the full `test:unit` suite on every PR that touches `src/server.ts`, `src/skills.ts`, or any file under `src/__tests__/`.