universal-agent-memory 6.1.1 → 6.2.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.
@@ -1,302 +0,0 @@
1
- #!/bin/bash
2
- #
3
- # Run Terminal-Bench 2.0 with UAM-integrated agents
4
- # Compares Droid with and without UAM memory across multiple models
5
- #
6
- # This benchmark uses the FACTORY_API_KEY which provides access to all models:
7
- # - Claude Opus 4.5 (Anthropic)
8
- # - GPT 5.2 Codex (OpenAI)
9
- # - GLM 4.7 (Zhipu)
10
- #
11
- # Usage:
12
- # export FACTORY_API_KEY="your-factory-api-key"
13
- # ./scripts/run-terminal-bench.sh
14
- #
15
-
16
- set -e
17
-
18
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
19
- PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
20
- RESULTS_DIR="$PROJECT_ROOT/benchmark-results"
21
- TIMESTAMP=$(date +%Y%m%d_%H%M%S)
22
-
23
- # Models to test - Harbor/LiteLLM format (provider/model)
24
- # These are mapped through Factory API when using droid
25
- HARBOR_MODELS=(
26
- "anthropic/claude-opus-4-5"
27
- "openai/gpt-5.2-codex"
28
- "zhipu/glm-4.7"
29
- )
30
-
31
- # Factory/Droid model names (used by improved-benchmark.ts)
32
- FACTORY_MODELS=(
33
- "claude-opus-4-5-20251101"
34
- "gpt-5.2-codex"
35
- "glm-4.7"
36
- )
37
-
38
- # Configuration
39
- N_CONCURRENT=${N_CONCURRENT:-4}
40
- TIMEOUT_MULT=${TIMEOUT_MULT:-1.0}
41
- DATASET="terminal-bench@2.0"
42
-
43
- # Check for API keys
44
- check_api_keys() {
45
- # Factory API key provides access to all models
46
- if [ -z "$FACTORY_API_KEY" ] && [ -z "$DROID_API_KEY" ]; then
47
- echo "Error: FACTORY_API_KEY or DROID_API_KEY must be set"
48
- echo ""
49
- echo "The Factory API key provides unified access to:"
50
- echo " - Claude Opus 4.5 (Anthropic)"
51
- echo " - GPT 5.2 Codex (OpenAI)"
52
- echo " - GLM 4.7 (Zhipu)"
53
- echo ""
54
- echo "Get your key at: https://app.factory.ai/settings/api-keys"
55
- exit 1
56
- fi
57
-
58
- echo "Using Factory API for model access"
59
-
60
- # For Harbor's direct provider access, these may also be needed
61
- if [ -z "$ANTHROPIC_API_KEY" ]; then
62
- echo "Note: ANTHROPIC_API_KEY not set - Harbor will use Factory routing"
63
- fi
64
-
65
- if [ -z "$OPENAI_API_KEY" ]; then
66
- echo "Note: OPENAI_API_KEY not set - Harbor will use Factory routing"
67
- fi
68
- }
69
-
70
- # Create results directory
71
- mkdir -p "$RESULTS_DIR"
72
-
73
- # Run benchmark for a specific model with UAM
74
- run_with_uam() {
75
- local model=$1
76
- local model_safe=$(echo "$model" | tr '.-' '_')
77
- local job_name="uam_${model_safe}_${TIMESTAMP}"
78
-
79
- echo "=================================================="
80
- echo "Running: $model WITH UAM memory"
81
- echo "=================================================="
82
-
83
- harbor run \
84
- -d "$DATASET" \
85
- -a claude-code \
86
- -m "$model" \
87
- -n "$N_CONCURRENT" \
88
- --timeout-multiplier "$TIMEOUT_MULT" \
89
- --job-name "$job_name" \
90
- --jobs-dir "$RESULTS_DIR" \
91
- --ak "use_uam=true" \
92
- --ak "project_root=$PROJECT_ROOT" \
93
- 2>&1 | tee "$RESULTS_DIR/${job_name}.log"
94
-
95
- echo "Results saved to: $RESULTS_DIR/$job_name"
96
- }
97
-
98
- # Run benchmark for a specific model without UAM (baseline)
99
- run_without_uam() {
100
- local model=$1
101
- local model_safe=$(echo "$model" | tr '.-' '_')
102
- local job_name="baseline_${model_safe}_${TIMESTAMP}"
103
-
104
- echo "=================================================="
105
- echo "Running: $model WITHOUT UAM (baseline)"
106
- echo "=================================================="
107
-
108
- harbor run \
109
- -d "$DATASET" \
110
- -a claude-code \
111
- -m "$model" \
112
- -n "$N_CONCURRENT" \
113
- --timeout-multiplier "$TIMEOUT_MULT" \
114
- --job-name "$job_name" \
115
- --jobs-dir "$RESULTS_DIR" \
116
- 2>&1 | tee "$RESULTS_DIR/${job_name}.log"
117
-
118
- echo "Results saved to: $RESULTS_DIR/$job_name"
119
- }
120
-
121
- # Run with custom UAM agent
122
- run_custom_agent() {
123
- local model=$1
124
- local with_memory=$2
125
- local model_safe=$(echo "$model" | tr '.-' '_')
126
- local memory_label=$([ "$with_memory" = "true" ] && echo "uam" || echo "baseline")
127
- local job_name="${memory_label}_custom_${model_safe}_${TIMESTAMP}"
128
-
129
- echo "=================================================="
130
- echo "Running: $model with custom UAM agent (memory=$with_memory)"
131
- echo "=================================================="
132
-
133
- harbor run \
134
- -d "$DATASET" \
135
- --agent-import-path "$PROJECT_ROOT/src/harbor/uam_agent:UAMAgent" \
136
- -m "$model" \
137
- -n "$N_CONCURRENT" \
138
- --timeout-multiplier "$TIMEOUT_MULT" \
139
- --job-name "$job_name" \
140
- --jobs-dir "$RESULTS_DIR" \
141
- --ak "use_memory=$with_memory" \
142
- --ak "project_root=$PROJECT_ROOT" \
143
- 2>&1 | tee "$RESULTS_DIR/${job_name}.log"
144
-
145
- echo "Results saved to: $RESULTS_DIR/$job_name"
146
- }
147
-
148
- # Generate comparison report
149
- generate_report() {
150
- echo "=================================================="
151
- echo "Generating comparison report..."
152
- echo "=================================================="
153
-
154
- local report_file="$RESULTS_DIR/TERMINAL_BENCH_COMPARISON_${TIMESTAMP}.md"
155
-
156
- cat > "$report_file" << EOF
157
- # Terminal-Bench 2.0 UAM Comparison Report
158
-
159
- **Generated:** $(date -Iseconds)
160
- **Dataset:** $DATASET (89 tasks)
161
-
162
- ## Configuration
163
- - Concurrent trials: $N_CONCURRENT
164
- - Timeout multiplier: $TIMEOUT_MULT
165
- - Models tested: ${MODELS[*]}
166
-
167
- ## Results Summary
168
-
169
- | Model | Without UAM | With UAM | Improvement |
170
- |-------|-------------|----------|-------------|
171
- EOF
172
-
173
- # Parse results from each run
174
- for model in "${MODELS[@]}"; do
175
- local model_safe=$(echo "$model" | tr '.-' '_')
176
- local baseline_dir="$RESULTS_DIR/baseline_${model_safe}_${TIMESTAMP}"
177
- local uam_dir="$RESULTS_DIR/uam_${model_safe}_${TIMESTAMP}"
178
-
179
- local baseline_acc="N/A"
180
- local uam_acc="N/A"
181
- local improvement="N/A"
182
-
183
- # Try to read results
184
- if [ -f "$baseline_dir/summary.json" ]; then
185
- baseline_acc=$(jq -r '.accuracy // "N/A"' "$baseline_dir/summary.json" 2>/dev/null || echo "N/A")
186
- fi
187
-
188
- if [ -f "$uam_dir/summary.json" ]; then
189
- uam_acc=$(jq -r '.accuracy // "N/A"' "$uam_dir/summary.json" 2>/dev/null || echo "N/A")
190
- fi
191
-
192
- if [[ "$baseline_acc" != "N/A" && "$uam_acc" != "N/A" ]]; then
193
- improvement=$(echo "$uam_acc - $baseline_acc" | bc 2>/dev/null || echo "N/A")
194
- improvement="${improvement}%"
195
- fi
196
-
197
- echo "| $model | $baseline_acc | $uam_acc | $improvement |" >> "$report_file"
198
- done
199
-
200
- cat >> "$report_file" << EOF
201
-
202
- ## Detailed Results
203
-
204
- See individual job directories for full task-level results.
205
-
206
- ### Key Findings
207
-
208
- Based on our improved UAM implementation:
209
- - Dynamic memory retrieval based on task classification
210
- - Hierarchical prompting with recency bias
211
- - Multi-turn execution with error feedback
212
-
213
- ### Files
214
- EOF
215
-
216
- ls -la "$RESULTS_DIR"/*_${TIMESTAMP}* 2>/dev/null >> "$report_file" || echo "No result directories found" >> "$report_file"
217
-
218
- echo ""
219
- echo "Report saved to: $report_file"
220
- }
221
-
222
- # Main execution
223
- main() {
224
- echo "=================================================="
225
- echo "Terminal-Bench 2.0 UAM Comparison Benchmark"
226
- echo "=================================================="
227
- echo "Timestamp: $TIMESTAMP"
228
- echo "Results directory: $RESULTS_DIR"
229
- echo ""
230
-
231
- check_api_keys
232
-
233
- # Parse arguments
234
- local run_baseline=true
235
- local run_uam=true
236
- local use_custom=false
237
- local selected_models=("${HARBOR_MODELS[@]}")
238
-
239
- while [[ $# -gt 0 ]]; do
240
- case $1 in
241
- --baseline-only)
242
- run_uam=false
243
- shift
244
- ;;
245
- --uam-only)
246
- run_baseline=false
247
- shift
248
- ;;
249
- --custom-agent)
250
- use_custom=true
251
- shift
252
- ;;
253
- --model)
254
- selected_models=("$2")
255
- shift 2
256
- ;;
257
- --help)
258
- echo "Usage: $0 [options]"
259
- echo "Options:"
260
- echo " --baseline-only Run only baseline (no UAM)"
261
- echo " --uam-only Run only with UAM"
262
- echo " --custom-agent Use custom UAM agent instead of claude-code"
263
- echo " --model MODEL Test only this model"
264
- echo " --help Show this help"
265
- exit 0
266
- ;;
267
- *)
268
- echo "Unknown option: $1"
269
- exit 1
270
- ;;
271
- esac
272
- done
273
-
274
- # Run benchmarks
275
- for model in "${selected_models[@]}"; do
276
- if [ "$run_baseline" = true ]; then
277
- if [ "$use_custom" = true ]; then
278
- run_custom_agent "$model" "false"
279
- else
280
- run_without_uam "$model"
281
- fi
282
- fi
283
-
284
- if [ "$run_uam" = true ]; then
285
- if [ "$use_custom" = true ]; then
286
- run_custom_agent "$model" "true"
287
- else
288
- run_with_uam "$model"
289
- fi
290
- fi
291
- done
292
-
293
- # Generate report
294
- generate_report
295
-
296
- echo ""
297
- echo "=================================================="
298
- echo "Benchmark complete!"
299
- echo "=================================================="
300
- }
301
-
302
- main "$@"
@@ -1,72 +0,0 @@
1
- #!/bin/bash
2
- #
3
- # Run UAM Improved Benchmark using Factory API
4
- #
5
- # This benchmark tests UAM memory impact on coding tasks using droid CLI
6
- # which accesses all models through a single Factory API key.
7
- #
8
- # Models tested:
9
- # - Claude Opus 4.5 (Anthropic)
10
- # - GPT 5.2 Codex (OpenAI)
11
- # - GLM 4.7 (Zhipu)
12
- #
13
- # Usage:
14
- # export FACTORY_API_KEY="your-factory-api-key"
15
- # ./scripts/run-uam-benchmark.sh
16
- #
17
-
18
- set -e
19
-
20
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
21
- PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
22
-
23
- echo "=================================================="
24
- echo "UAM Improved Benchmark"
25
- echo "=================================================="
26
-
27
- # Check for Factory API key
28
- if [ -z "$FACTORY_API_KEY" ] && [ -z "$DROID_API_KEY" ]; then
29
- echo "Error: FACTORY_API_KEY or DROID_API_KEY must be set"
30
- echo ""
31
- echo "The Factory API key provides unified access to:"
32
- echo " - Claude Opus 4.5 (Anthropic)"
33
- echo " - GPT 5.2 Codex (OpenAI)"
34
- echo " - GLM 4.7 (Zhipu)"
35
- echo ""
36
- echo "Get your key at: https://app.factory.ai/settings/api-keys"
37
- exit 1
38
- fi
39
-
40
- echo "Factory API key is set ✓"
41
- echo ""
42
-
43
- # Verify droid is available
44
- if ! command -v droid &> /dev/null; then
45
- echo "Error: droid CLI not found"
46
- echo "Install with: npm install -g @anthropic-ai/droid"
47
- exit 1
48
- fi
49
-
50
- echo "droid CLI is available ✓"
51
- echo ""
52
-
53
- # Build project
54
- echo "Building project..."
55
- cd "$PROJECT_ROOT"
56
- npm run build
57
-
58
- # Run benchmark
59
- echo ""
60
- echo "Starting benchmark..."
61
- echo "Models: Claude Opus 4.5, GLM 4.7, GPT 5.2 Codex"
62
- echo "Tasks: 6 coding challenges"
63
- echo "Comparison: With vs Without UAM Memory"
64
- echo ""
65
-
66
- npx tsx src/benchmarks/improved-benchmark.ts
67
-
68
- echo ""
69
- echo "=================================================="
70
- echo "Benchmark Complete"
71
- echo "=================================================="
72
- echo "Results saved to: IMPROVED_BENCHMARK_RESULTS.md"
package/scripts/setup.sh DELETED
@@ -1,337 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- # Colors
5
- GREEN='\033[0;32m'
6
- YELLOW='\033[1;33m'
7
- RED='\033[0;31m'
8
- BLUE='\033[0;34m'
9
- NC='\033[0m' # No Color
10
-
11
- # Configuration
12
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
13
- PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
14
- HOOKS_DIR="${PROJECT_ROOT}/.git/hooks"
15
-
16
- echo -e "${BLUE}🔧 Universal Agent Memory - Complete Setup${NC}"
17
- echo "================================================"
18
- echo ""
19
-
20
- # ============================================================================
21
- # DEPENDENCY CHECKS
22
- # ============================================================================
23
-
24
- echo -e "${BLUE}Checking dependencies...${NC}"
25
- echo ""
26
-
27
- MISSING_DEPS=()
28
- RECOMMENDED_DEPS=()
29
-
30
- # Required dependencies
31
- echo -e "${YELLOW}Required dependencies:${NC}"
32
-
33
- if ! command -v node &> /dev/null; then
34
- echo -e " ${RED}✗${NC} Node.js (>= 18.0.0)"
35
- MISSING_DEPS+=("Node.js >= 18.0.0")
36
- else
37
- NODE_VERSION=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)
38
- if [ "$NODE_VERSION" -lt 18 ]; then
39
- echo -e " ${RED}✗${NC} Node.js (>= 18.0.0, found $(node -v))"
40
- MISSING_DEPS+=("Node.js >= 18.0.0")
41
- else
42
- echo -e " ${GREEN}✓${NC} Node.js $(node -v)"
43
- fi
44
- fi
45
-
46
- if ! command -v npm &> /dev/null; then
47
- echo -e " ${RED}✗${NC} npm"
48
- MISSING_DEPS+=("npm")
49
- else
50
- echo -e " ${GREEN}✓${NC} npm $(npm -v)"
51
- fi
52
-
53
- if ! command -v git &> /dev/null; then
54
- echo -e " ${RED}✗${NC} git"
55
- MISSING_DEPS+=("git")
56
- else
57
- echo -e " ${GREEN}✓${NC} git $(git --version | cut -d' ' -f3)"
58
- fi
59
-
60
- if ! command -v npx &> /dev/null; then
61
- echo -e " ${RED}✗${NC} npx"
62
- MISSING_DEPS+=("npx")
63
- else
64
- echo -e " ${GREEN}✓${NC} npx"
65
- fi
66
-
67
- echo ""
68
- echo -e "${YELLOW}Recommended dependencies (optional but useful):${NC}"
69
-
70
- if command -v docker &> /dev/null; then
71
- echo -e " ${GREEN}✓${NC} Docker (enables local Qdrant for semantic search)"
72
- else
73
- echo -e " ${YELLOW}⚠${NC} Docker (install for local Qdrant: `curl -fsSL https://get.docker.com | sh`)"
74
- RECOMMENDED_DEPS+=("Docker")
75
- fi
76
-
77
- if command -v python3 &> /dev/null; then
78
- PYTHON_VERSION=$(python3 --version | cut -d' ' -f2)
79
- echo -e " ${GREEN}✓${NC} Python 3 (${PYTHON_VERSION}) (enables Pattern RAG)"
80
- else
81
- echo -e " ${YELLOW}⚠${NC} Python 3 (install for Pattern RAG: `brew install python` or `apt install python3`)"
82
- RECOMMENDED_DEPS+=("Python 3")
83
- fi
84
-
85
- if command -v pre-commit &> /dev/null; then
86
- echo -e " ${GREEN}✓${NC} pre-commit (enables advanced git hooks)"
87
- else
88
- echo -e " ${YELLOW}⚠${NC} pre-commit (install for advanced hooks: `pip install pre-commit`)"
89
- fi
90
-
91
- echo ""
92
-
93
- # ============================================================================
94
- # INSTALLATION
95
- # ============================================================================
96
-
97
- if [ ${#MISSING_DEPS[@]} -gt 0 ]; then
98
- echo -e "${RED}❌ Missing required dependencies:${NC}"
99
- for dep in "${MISSING_DEPS[@]}"; do
100
- echo -e " - ${dep}"
101
- done
102
- echo ""
103
- echo "Please install the missing dependencies and run this script again."
104
- echo ""
105
- echo "Quick install commands:"
106
- echo " # macOS:"
107
- echo " brew install node git python docker"
108
- echo ""
109
- echo " # Ubuntu/Debian:"
110
- echo " curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -"
111
- echo " sudo apt-get install -y nodejs python3 docker.io"
112
- echo ""
113
- echo " # Windows (using winget):"
114
- echo " winget install OpenJS.NodeJS.LTS"
115
- echo " winget install Git.Git"
116
- echo " winget install Python.Python.3.12"
117
- echo " winget install Docker.DockerDesktop"
118
- echo ""
119
- exit 1
120
- fi
121
-
122
- # Install npm dependencies
123
- echo -e "${BLUE}Installing npm dependencies...${NC}"
124
- cd "$PROJECT_ROOT"
125
-
126
- if [ ! -d "node_modules" ]; then
127
- npm install
128
- echo -e "${GREEN}✓${NC} npm dependencies installed"
129
- else
130
- echo -e "${GREEN}✓${NC} npm dependencies already installed (skipping)"
131
- fi
132
-
133
- # Build TypeScript
134
- echo ""
135
- echo -e "${BLUE}Building TypeScript...${NC}"
136
- npm run build
137
- if [ $? -eq 0 ]; then
138
- echo -e "${GREEN}✓${NC} TypeScript build completed"
139
- else
140
- echo -e "${RED}✗${NC} TypeScript build failed"
141
- exit 1
142
- fi
143
-
144
- # ============================================================================
145
- # GIT HOOKS SETUP
146
- # ============================================================================
147
-
148
- echo ""
149
- echo -e "${BLUE}Setting up git hooks...${NC}"
150
-
151
- # Create hooks directory if it doesn't exist
152
- if [ ! -d "$HOOKS_DIR" ]; then
153
- echo -e " ${YELLOW}⚠${NC} Not a git repository, skipping hooks setup"
154
- else
155
- # Create hooks directory
156
- mkdir -p "$HOOKS_DIR"
157
-
158
- # Pre-commit hook - ensures worktree usage and code quality
159
- cat > "${HOOKS_DIR}/pre-commit" << 'EOF'
160
- #!/bin/bash
161
- #
162
- # UAM Pre-commit Hook
163
- #
164
- # Ensures:
165
- # 1. No secrets are committed
166
- # 2. Code passes linting
167
- # 3. Tests pass (if modified files include tests)
168
- #
169
-
170
- # Check for secrets
171
- if grep -rE "(api_key|apikey|password|secret|token)\s*=\s*['\"][^'\"]+['\"]" --include="*.ts" --include="*.js" --include="*.json" . 2>/dev/null | grep -v node_modules | grep -v ".worktrees" | grep -v dist; then
172
- echo "Error: Potential secrets detected in committed files!"
173
- echo "Please use environment variables for sensitive data."
174
- exit 1
175
- fi
176
-
177
- # Run linter
178
- if npm run lint -- --max-warnings=0 2>/dev/null; then
179
- echo "✓ Linting passed"
180
- else
181
- echo "Error: Linting failed. Run 'npm run lint:fix' to fix automatically."
182
- exit 1
183
- fi
184
-
185
- echo "Pre-commit checks passed"
186
- exit 0
187
- EOF
188
- chmod +x "${HOOKS_DIR}/pre-commit"
189
- echo " ✓ Created pre-commit hook"
190
-
191
- # Commit-msg hook - validates commit messages
192
- cat > "${HOOKS_DIR}/commit-msg" << 'EOF'
193
- #!/bin/bash
194
- #
195
- # UAM Commit-msg Hook
196
- #
197
- # Ensures commit messages follow conventional commits format:
198
- # - feat: New feature
199
- # - fix: Bug fix
200
- # - docs: Documentation
201
- # - style: Formatting
202
- # - refactor: Code refactoring
203
- # - test: Tests
204
- # - chore: Maintenance
205
- #
206
-
207
- COMMIT_MSG_FILE=$1
208
- COMMIT_MSG=$(cat "$COMMIT_MSG_FILE")
209
-
210
- # Skip if commit is empty or merge commit
211
- if [[ -z "$COMMIT_MSG" ]] || [[ "$COMMIT_MSG" == "Merge"* ]]; then
212
- exit 0
213
- fi
214
-
215
- # Check for conventional commit format
216
- if echo "$COMMIT_MSG" | grep -qE "^(feat|fix|docs|style|refactor|test|chore|perf|ci|build|revert)(\([a-z-]+\))?: .+"; then
217
- echo "✓ Commit message format valid"
218
- exit 0
219
- else
220
- echo "Warning: Commit message doesn't follow conventional commits format."
221
- echo "Recommended format: type(scope): description"
222
- echo "Types: feat, fix, docs, style, refactor, test, chore, perf, ci, build, revert"
223
- echo ""
224
- echo "Examples:"
225
- echo " feat: Add worktree creation command"
226
- echo " fix(api): Resolve memory database path issue"
227
- echo " docs: Update README with setup instructions"
228
- echo ""
229
- echo "Continue with commit? [y/N] "
230
- read -r response
231
- if [[ "$response" =~ ^(yes|y|Y)$ ]]; then
232
- exit 0
233
- else
234
- echo "Commit aborted. Please edit your commit message."
235
- exit 1
236
- fi
237
- fi
238
- EOF
239
- chmod +x "${HOOKS_DIR}/commit-msg"
240
- echo " ✓ Created commit-msg hook"
241
-
242
- # Pre-push hook - runs tests before pushing
243
- cat > "${HOOKS_DIR}/pre-push" << 'EOF'
244
- #!/bin/bash
245
- #
246
- # UAM Pre-push Hook
247
- #
248
- # Runs tests before pushing to remote
249
- #
250
-
251
- echo "Running tests before push..."
252
- if npm test 2>&1 | tail -5; then
253
- if [ ${PIPESTATUS[0]} -eq 0 ]; then
254
- echo "✓ All tests passed"
255
- exit 0
256
- fi
257
- fi
258
-
259
- echo "Error: Tests failed. Fix tests before pushing."
260
- exit 1
261
- EOF
262
- chmod +x "${HOOKS_DIR}/pre-push"
263
- echo " ✓ Created pre-push hook"
264
-
265
- echo ""
266
- echo -e "${GREEN}✓${NC} Git hooks configured successfully"
267
- fi
268
-
269
- # ============================================================================
270
- # OPTIONAL: CREATE .GITCHRCL (for GitHub CLI)
271
- # ============================================================================
272
-
273
- if command -v gh &> /dev/null; then
274
- echo ""
275
- echo -e "${BLUE}GitHub CLI detected. Setting up default PR template...${NC}"
276
-
277
- if [ ! -f "${PROJECT_ROOT}/.github/pull_request_template.md" ]; then
278
- mkdir -p "${PROJECT_ROOT}/.github"
279
- cat > "${PROJECT_ROOT}/.github/pull_request_template.md" << 'EOF'
280
- <!-- UAM Worktree PR Template -->
281
- ## Summary
282
- <!-- Describe what this PR does -->
283
-
284
- ## Changes
285
- <!-- List key changes -->
286
- -
287
-
288
- ## Testing
289
- <!-- How did you test this? -->
290
- - [ ] Tests pass: `npm test`
291
- - [ ] Linting passes: `npm run lint`
292
- - [ ] Manually tested (if applicable)
293
-
294
- ## Related Issue
295
- <!-- Link to related issue if any -->
296
- Closes #
297
-
298
- ---
299
- <!-- UAM - Created via worktree: uam worktree pr -->
300
- EOF
301
- echo " ✓ Created PR template"
302
- fi
303
- fi
304
-
305
- # ============================================================================
306
- # SETUP COMPLETE
307
- # ============================================================================
308
-
309
- echo ""
310
- echo -e "${GREEN}✅ Setup complete!${NC}"
311
- echo ""
312
-
313
- if [ ${#RECOMMENDED_DEPS[@]} -gt 0 ]; then
314
- echo -e "${YELLOW}Recommended: Install missing optional dependencies${NC}"
315
- for dep in "${RECOMMENDED_DEPS[@]}"; do
316
- echo " - ${dep}"
317
- done
318
- echo ""
319
- echo "You can install these later. Core functionality will work without them."
320
- echo ""
321
- fi
322
-
323
- echo -e "${BLUE}Next steps:${NC}"
324
- echo ""
325
- echo "1. Initialize UAM in your project:"
326
- echo " npx universal-agent-memory init"
327
- echo ""
328
- echo "2. Review the generated CLAUDE.md"
329
- echo ""
330
- echo "3. Start working - your AI assistant will follow the workflows!"
331
- echo ""
332
- echo "Optional: Set up cloud memory backends"
333
- echo " export GITHUB_TOKEN=your_token"
334
- echo " export QDRANT_API_KEY=your_key"
335
- echo " export QDRANT_URL=your_url"
336
- echo ""
337
- echo "Documentation: https://github.com/DammianMiller/universal-agent-memory"