소스 검색

Merge pull request #3 from 0xDarkMatter/feature/inter-session-mail

fix(scripts): migrate agentmail hook path to pigeon on install
0xDarkMatter 1 개월 전
부모
커밋
047d99aa1f
2개의 변경된 파일22개의 추가작업 그리고 4개의 파일을 삭제
  1. 13 2
      scripts/install.ps1
  2. 9 2
      scripts/install.sh

+ 13 - 2
scripts/install.ps1

@@ -41,7 +41,8 @@ $deprecated = @(
     "$claudeDir\commands\conclave.md",
     "$claudeDir\commands\pulse.md",
     "$claudeDir\skills\conclave",
-    "$claudeDir\skills\claude-code-templates"   # Replaced by skill-creator
+    "$claudeDir\skills\claude-code-templates",  # Replaced by skill-creator
+    "$claudeDir\skills\agentmail"               # Renamed to pigeon (v2.3.0)
 )
 
 # Renamed skills: -patterns -> -ops (March 2026)
@@ -178,7 +179,17 @@ if (Test-Path $checkMailSrc) {
 }
 
 $settingsPath = Join-Path $claudeDir "settings.json"
-if ((Test-Path $settingsPath) -and (Select-String -Path $settingsPath -Pattern "check-mail.sh" -Quiet)) {
+
+# Migrate stale agentmail hook path -> pigeon
+if ((Test-Path $settingsPath) -and (Select-String -Path $settingsPath -Pattern "agentmail/check-mail\.sh" -Quiet)) {
+    $content = Get-Content $settingsPath -Raw
+    $content = $content -replace 'agentmail/check-mail\.sh', 'pigeon/check-mail.sh'
+    Set-Content $settingsPath -Value $content -NoNewline
+    Write-Host "  Migrated agentmail hook -> pigeon in settings.json" -ForegroundColor Green
+}
+
+# Check if hook is already configured (pigeon path)
+if ((Test-Path $settingsPath) -and (Select-String -Path $settingsPath -Pattern "pigeon/check-mail\.sh" -Quiet)) {
     Write-Host "  Hook already configured in settings.json" -ForegroundColor Green
 } else {
     Write-Host ""

+ 9 - 2
scripts/install.sh

@@ -43,6 +43,7 @@ deprecated_items=(
     # Removed skills
     "$CLAUDE_DIR/skills/conclave"                # Deprecated
     "$CLAUDE_DIR/skills/claude-code-templates"   # Replaced by skill-creator
+    "$CLAUDE_DIR/skills/agentmail"               # Renamed to pigeon (v2.3.0)
 )
 
 # Renamed skills: -patterns -> -ops (March 2026)
@@ -187,8 +188,14 @@ if [ -f "$PROJECT_ROOT/hooks/check-mail.sh" ]; then
     echo -e "  ${GREEN}check-mail.sh${NC}"
 fi
 
-# Check if hook is already configured
-if grep -q "check-mail.sh" "$CLAUDE_DIR/settings.json" 2>/dev/null; then
+# Migrate stale agentmail hook path → pigeon
+if grep -q "agentmail/check-mail.sh" "$CLAUDE_DIR/settings.json" 2>/dev/null; then
+    sed -i 's|agentmail/check-mail\.sh|pigeon/check-mail.sh|g' "$CLAUDE_DIR/settings.json"
+    echo -e "  ${GREEN}Migrated agentmail hook → pigeon in settings.json${NC}"
+fi
+
+# Check if hook is already configured (pigeon path)
+if grep -q "pigeon/check-mail.sh" "$CLAUDE_DIR/settings.json" 2>/dev/null; then
     echo -e "  ${GREEN}Hook already configured in settings.json${NC}"
 else
     echo ""