Files
claude-mnemonic/scripts/generate-plugin-config.sh
T
lukaszraczylo 7a061c85eb general improvements (#17)
* 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
2026-01-07 00:26:20 +00:00

50 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
# Generate plugin configuration files with version substitution
# Called from .goreleaser.yaml before hooks
set -e
# Get version from GoReleaser environment variable
if [ -n "$GORELEASER_CURRENT_TAG" ]; then
VERSION="${GORELEASER_CURRENT_TAG#v}"
echo "Using version from GORELEASER_CURRENT_TAG: $VERSION"
else
# Fallback: Use latest git tag instead of 0.0.0-dev
# This prevents version mismatch when Claude installs from GitHub
LATEST_TAG=$(git tag --sort=-v:refname | head -1 || echo "v0.0.0-dev")
if [ -z "$LATEST_TAG" ]; then
LATEST_TAG="v0.0.0-dev"
fi
VERSION="${LATEST_TAG#v}"
echo "GORELEASER_CURRENT_TAG not set, using latest git tag: $VERSION"
fi
# Source and destination directories
TEMPLATE_DIR="plugin/.claude-plugin"
OUTPUT_DIR=".claude-plugin"
# Create output directory
mkdir -p "$OUTPUT_DIR"
# Generate plugin.json
if [ -f "$TEMPLATE_DIR/plugin.json.tpl" ]; then
sed "s/{{ .Version }}/$VERSION/g; s/{{.Version}}/$VERSION/g" \
"$TEMPLATE_DIR/plugin.json.tpl" > "$OUTPUT_DIR/plugin.json"
echo "Generated $OUTPUT_DIR/plugin.json"
else
echo "ERROR: Template file not found: $TEMPLATE_DIR/plugin.json.tpl"
exit 1
fi
# Generate marketplace.json
if [ -f "$TEMPLATE_DIR/marketplace.json.tpl" ]; then
sed "s/{{ .Version }}/$VERSION/g; s/{{.Version}}/$VERSION/g" \
"$TEMPLATE_DIR/marketplace.json.tpl" > "$OUTPUT_DIR/marketplace.json"
echo "Generated $OUTPUT_DIR/marketplace.json"
else
echo "ERROR: Template file not found: $TEMPLATE_DIR/marketplace.json.tpl"
exit 1
fi
echo "Plugin config files generated successfully with version $VERSION"