Commit Graph
4 Commits
Author SHA1 Message Date
Rohit Ghumare f9e31fedc8 chore: bump version to 1.8.1 2026-02-01 17:33:24 +00:00
Rohit Ghumare e22193f823 chore: bump version to 1.8.0 2026-01-30 18:03:16 +00:00
Rohit Ghumare 3067cbdb5b docs: add README files for memory, mesh, and messaging packages 2026-01-30 17:58:08 +00:00
Rohit Ghumare 4257e8555b feat: Memory, Mesh Network with Security, Messaging, MCP Server (#27)
* feat: add persistent memory, mesh network, and agent messaging (v2.0.0)

Add three major features to SkillKit:

@skillkit/memory - CozoDB-backed semantic memory with embeddings
- 384-dim embeddings via @xenova/transformers (all-MiniLM-L6-v2)
- Memory tiers (warm/long) with promotion logic based on access patterns
- HNSW semantic search for context retrieval
- Storage: ~/.skillkit/agents/{agentId}/memory.db

@skillkit/mesh - Peer mesh network for multi-machine agent distribution
- Local LAN discovery via UDP multicast (239.255.255.250)
- Tailscale VPN support for secure remote connections
- Bidirectional peer registration with health checks
- HTTP and WebSocket transports
- Storage: ~/.skillkit/hosts.json

@skillkit/messaging - Inter-agent messaging system
- Inbox/sent/archived storage with JSON persistence
- Message router for local and cross-host delivery
- Priority levels (low/normal/high/urgent)
- Message types (request/response/notification/update)
- Storage: ~/.skillkit/messages/{inbox|sent|archived}/{agentId}/

CLI Commands:
- skillkit mesh: init, add, remove, list, health, discover, status
- skillkit message: send, inbox, read, reply, archive, forward, sent, status

All packages bumped to version 2.0.0

* feat: add advanced learning, automation, and workflow features

Implements comprehensive enhancement plan with 9 phases:

Phase 1: @skillkit/resources Package
- Bundled agents (9): architect, build-error-resolver, code-reviewer,
  doc-updater, e2e-runner, planner, refactor-cleaner, security-reviewer, tdd-guide
- Command templates (10): /tdd, /plan, /e2e, /learn, /build-fix, etc.
- Operational profiles (4): dev, review, research, security
- Guidelines (5): security, code-style, testing, git, performance
- Hook templates (12): typescript-check, eslint-check, security-scan, etc.

Phase 2-3: Pattern Learning & Confidence Scoring
- skillkit learn: Extract patterns from git history
- skillkit pattern status|feedback|approve|reject|export|import|cluster
- Confidence evolution: success +0.05, failure -0.10

Phase 4: Session State Persistence
- skillkit session status|start|load|list|note|complete|in-progress
- Cross-session context preservation in ~/.skillkit/sessions/

Phase 5: Workflow Pipelines
- skillkit workflow pipeline list|<name>
- Built-in: feature, bugfix, refactor, security-audit, documentation

Phase 6: Operational Profiles
- skillkit profile list|<name>|create|remove
- Mode switching for different work contexts

Phase 7: Guidelines System
- skillkit guideline list|show|enable|disable|create|remove
- Always-on coding standards

Phase 8: Hook Templates
- skillkit hook template list|apply|show
- Pre-built automation patterns

Phase 9: Slash Command Templates
- skillkit command available|install <id>
- Install bundled command templates

* feat: add MCP memory server for Claude/Cursor integration

Adds @skillkit/mcp-memory package - an MCP (Model Context Protocol) server
that exposes SkillKit's persistent memory system to Claude, Cursor, and
other MCP-compatible AI tools.

Tools:
- memory_store: Store memories with semantic embeddings
- memory_search: Semantic search through memories
- memory_recall: Recall by category/tier/tags
- memory_get: Get memory by ID
- memory_forget: Delete a memory
- memory_link: Create relationships between memories
- memory_reinforce: Strengthen/weaken memories
- memory_stats: Get memory statistics

Resources:
- memory://stats: Current statistics (JSON)
- memory://recent: Recent memories (JSON)

Usage with Claude Desktop:
```json
{
  "mcpServers": {
    "skillkit-memory": {
      "command": "npx",
      "args": ["@skillkit/mcp-memory"],
      "env": { "SKILLKIT_AGENT_ID": "claude-desktop" }
    }
  }
}
```

* feat(mesh): add comprehensive security hardening

- Add cryptographic identity layer (Ed25519 keypairs, fingerprints)
- Add message encryption (XChaCha20-Poly1305) and signing
- Add secure keystore with AES-256-GCM at-rest encryption
- Add JWT authentication and challenge-response handshake
- Add secure WebSocket (WSS) and HTTPS transports
- Add signed discovery messages with trust modes (open/signed/trusted-only)
- Add TLS certificate management (self-signed)
- Add CLI commands: mesh security init/status, mesh peer trust/revoke/list
- Add security presets: development, signed, secure, strict
- Align all package versions to 1.7.11

Security stack: @noble/ed25519, @noble/curves, @noble/ciphers, @noble/hashes, jose

* docs(website): add mesh network and security features

- Add Mesh Network feature card with P2P description
- Add Security feature card with Ed25519/TLS details
- Add Mesh command group with security commands

* fix: address CodeRabbit review suggestions

- cli/mesh: validate port input (1-65535 range check)
- memory/cozo-adapter: call db.close() before nullifying reference
- memory/schema: fix primary key definitions (id => columns)
- resources/hooks: guard pre-commit hooks against empty file lists
- mcp-memory: prevent double-initialization with memoized promise
- mcp-memory: don't mask reinforce failures as "not found"
- mcp-memory: guard main() to prevent auto-start on import
- mcp-memory: add js language identifiers to README code blocks
- mesh/test: update MESH_VERSION test expectation to 1.7.11

* fix: address additional CodeRabbit and Devin review suggestions

Memory package:
- encoder: reset initPromise on failure to allow retry
- encoder: call pipeline.dispose() in disposeEncoder to free GPU resources
- schema: fix probe query to use named-column matching for correct arity

Mesh package:
- hosts-config: add file locking to prevent race conditions
- local discovery: reduce multicast TTL to 1 for LAN-only traffic
- local discovery: handle announce errors in setInterval
- local discovery: close socket on membership setup failure
- local discovery: validate inbound packets (type, hostId, port range)
- local discovery: use rinfo.address to prevent spoofing
- health: guard against overlapping health checks with checking flag
- websocket: prevent auto-reconnect on explicit disconnect()

* fix(memory): increase semantic search fetch multiplier for better filter coverage

Increase from 2x to 5x results to reduce likelihood of incomplete
results when agentId/category/tier filters exclude many candidates.
Filters are applied in application code after HNSW vector search.

* feat(cli): add 'add' as alias for 'install' command

* fix(mesh/auth): use asymmetric EdDSA signing for JWT tokens

Tokens are now signed with the sender's Ed25519 private key and
verified using the sender's public key embedded in the token.
This fixes the issue where tokens couldn't be verified across
different AuthManager instances/hosts because each had a random
symmetric secret.

Changes:
- Switch from HS256 (symmetric) to EdDSA (asymmetric) algorithm
- Include sender's publicKey in JWT payload
- Add privateKey/privateKeyHex getters to PeerIdentity
- Verify fingerprint matches publicKey before accepting token
2026-01-30 17:48:10 +00:00