@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 +34 -1
- package/dist/cli.js +20867 -18386
- package/dist/index.js +20999 -18518
- package/dist/lib/api-client.js +130 -926
- package/dist/lib/config.js +5 -1
- package/package.json +2 -2
- package/src/__tests__/mcp-integration.test.ts +141 -0
- package/src/__tests__/memory-floor.test.ts +126 -0
- package/src/__tests__/memory-park.test.ts +213 -0
- package/src/__tests__/memory-session.test.ts +77 -0
- package/src/__tests__/prompt-builder.test.ts +234 -0
- package/src/__tests__/remote-routing.test.ts +285 -0
- package/src/__tests__/skills.test.ts +111 -0
- package/src/__tests__/tool-dispatch.test.ts +260 -0
- package/src/api-client.ts +133 -96
- package/src/memory-floor.ts +264 -0
- package/src/memory-park.ts +252 -0
- package/src/memory-session.ts +61 -0
- package/src/prompt-builder.ts +93 -0
- package/src/remote.ts +270 -77
- package/src/server.ts +351 -1467
- package/src/__tests__/active-learning.test.ts +0 -483
- package/src/__tests__/agent-performance-profiles.test.ts +0 -468
- package/src/__tests__/context-assembly.test.ts +0 -506
- package/src/__tests__/lifecycle-maintenance.test.ts +0 -238
- package/src/__tests__/memory-audit.test.ts +0 -528
- package/src/__tests__/pattern-detection.test.ts +0 -438
- package/src/active-learning.ts +0 -1165
- package/src/consolidation.ts +0 -383
- package/src/context-assembly.ts +0 -1175
- package/src/lifecycle-maintenance.ts +0 -120
- package/src/memory-audit.ts +0 -578
- package/src/memory-cleanup.ts +0 -902
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__/`.
|