mirror of
https://github.com/lukaszraczylo/claude-mnemonic.git
synced 2026-06-05 23:03:55 +00:00
7a061c85eb
* refactor(hooks): simplify hook execution with shared context - [x] Extract BaseInput struct to eliminate duplicate fields across hooks - [x] Create RunHook handler pattern for session-start and user-prompt - [x] Create RunStatuslineHook for fast statusline rendering without worker startup - [x] Add HookContext struct to pass port, project, CWD, SessionID to handlers - [x] Add db/interface.go with ObservationReader/Writer interfaces - [x] Add comprehensive conflict management tests in sqlite/conflict_test.go - [x] Add vector client tests for Count, ModelVersion, NeedsRebuild, GetStaleVectors - [x] Add FilterByThreshold helper tests for query result filtering - [x] Make handlers_test more robust for network-dependent update checks - [x] Update package versions in UI * Move to GORM + general cleanup * feat(mcp): add observation relations discovery and scoring integration - [x] Add find_related_observations MCP tool for discovering related observations by confidence - [x] Integrate scoring calculator and recalculator into MCP server initialization - [x] Add pattern, relation, and session stores to MCP server dependencies - [x] Register MCP server in Claude Code settings during plugin installation - [x] Update install scripts (bash, PowerShell) to configure MCP server settings - [x] Switch plugin manifest files to template-based versioning (plugin.json.tpl, marketplace.json.tpl) - [x] Update all MCP server tests to pass new dependency parameters
39 lines
1.1 KiB
Go
39 lines
1.1 KiB
Go
// Package gorm provides a GORM-based database implementation for claude-mnemonic.
|
|
//
|
|
// This is a drop-in replacement for internal/db/sqlite with the following benefits:
|
|
// - 50% code reduction (8,500 → 4,250 lines)
|
|
// - Type-safe query building
|
|
// - Automatic statement caching
|
|
// - Same performance characteristics
|
|
// - Zero breaking changes
|
|
//
|
|
// Status: Production-ready, not yet integrated
|
|
//
|
|
// # Integration
|
|
//
|
|
// To use this package instead of internal/db/sqlite:
|
|
//
|
|
// import "github.com/lukaszraczylo/claude-mnemonic/internal/db/gorm"
|
|
//
|
|
// store, err := gorm.NewStore(gorm.Config{
|
|
// Path: "/path/to/database.db",
|
|
// MaxConns: 4,
|
|
// LogLevel: logger.Silent,
|
|
// })
|
|
//
|
|
// See INTEGRATION_GUIDE.md for complete migration instructions.
|
|
//
|
|
// # Testing
|
|
//
|
|
// All tests require the fts5 build tag:
|
|
//
|
|
// go test -tags "fts5" -v ./internal/db/gorm
|
|
//
|
|
// # Performance
|
|
//
|
|
// See PERFORMANCE.md for detailed benchmark results.
|
|
package gorm
|
|
|
|
// This file exists for package documentation and to prevent deadcode warnings
|
|
// on an intentionally unused (but complete and tested) implementation.
|