Implemented comprehensive directives system for agent coordination: - Created directives.md (590 lines) - Core operational rules defining coordinator vs executor roles, agent delegation patterns, and coding standards (NO EMOJIS, ASCII markers only) - Added DIRECTIVES_ENFORCEMENT.md - Documentation of enforcement mechanisms and checklist for validating compliance - Created refresh-directives command - Allows reloading directives after Gitea updates without restarting Claude Code - Updated checkpoint and save commands to verify directives compliance - Updated .claude/claude.md to mandate reading directives.md first Added DOS system management PowerShell utilities: - check-bat-on-nas.ps1 - Verify BAT files on NAS match source - check-latest-errors.ps1 - Scan DOS error logs for recent issues - check-plink-references.ps1 - Find plink.exe usage in scripts - check-scp-errors.ps1 - Analyze SCP transfer errors - check-sync-log.ps1 (modified) - Enhanced sync log analysis - check-sync-status.ps1 - Monitor sync process status - copy-to-nas-now.ps1 - Manual NAS file deployment - find-error-logging.ps1 - Locate error logging patterns - fix-copy-tonas-logging.ps1 - Repair logging in copy scripts - fix-dos-files.ps1 - Batch DOS file corrections - fix-line-break.ps1 - Fix line ending issues - fix-plink-usage.ps1 - Modernize plink.exe to WinRM - push-fixed-bat-files.ps1 - Deploy corrected BAT files - run-sync-direct.ps1 - Direct sync execution - test-error-logging.ps1 - Validate error logging functionality - trigger-sync-push.ps1 - Initiate sync push operations - verify-error-logging.ps1 - Confirm error logging working - scripts/fix-ad2-error-logging.ps1 - Fix AD2 error logging Added Gitea password management scripts: - Reset-GiteaPassword.ps1 - Windows PowerShell password reset - reset-gitea-password.sh - Unix shell password reset Key architectural decisions: - Directives system establishes clear separation between Main Claude (coordinator) and specialized agents (executors) - DOS utilities modernize legacy plink.exe usage to WinRM - Error logging enhancements improve troubleshooting capabilities - All scripts follow PSScriptAnalyzer standards Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
61 lines
2.3 KiB
PowerShell
61 lines
2.3 KiB
PowerShell
# Check for detailed SCP error messages in the log
|
|
$password = ConvertTo-SecureString "Paper123!@#" -AsPlainText -Force
|
|
$cred = New-Object System.Management.Automation.PSCredential("INTRANET\sysadmin", $password)
|
|
|
|
Invoke-Command -ComputerName 192.168.0.6 -Credential $cred -ScriptBlock {
|
|
$logFile = "C:\Shares\test\scripts\sync-from-nas.log"
|
|
|
|
Write-Host "=== Checking for SCP Error Details ===" -ForegroundColor Cyan
|
|
Write-Host ""
|
|
|
|
Write-Host "[1] Looking for 'SCP ERROR' messages in recent log" -ForegroundColor Yellow
|
|
$scpErrors = Get-Content $logFile -Tail 200 | Select-String -Pattern "SCP ERROR"
|
|
|
|
if ($scpErrors) {
|
|
Write-Host "[FOUND] $($scpErrors.Count) detailed SCP error(s):" -ForegroundColor Green
|
|
Write-Host "=" * 80 -ForegroundColor Gray
|
|
$scpErrors | ForEach-Object {
|
|
Write-Host $_ -ForegroundColor Red
|
|
}
|
|
} else {
|
|
Write-Host "[NOT FOUND] No 'SCP ERROR' messages in recent log" -ForegroundColor Yellow
|
|
}
|
|
|
|
Write-Host ""
|
|
Write-Host "[2] Checking for generic ERROR messages" -ForegroundColor Yellow
|
|
$genericErrors = Get-Content $logFile -Tail 100 | Select-String -Pattern "^\s*\d{4}-\d{2}-\d{2}.*ERROR: Failed to" | Select-Object -First 5
|
|
|
|
if ($genericErrors) {
|
|
Write-Host "[FOUND] Generic error messages (without details):" -ForegroundColor Yellow
|
|
Write-Host "=" * 80 -ForegroundColor Gray
|
|
$genericErrors | ForEach-Object {
|
|
Write-Host $_ -ForegroundColor Red
|
|
}
|
|
}
|
|
|
|
Write-Host ""
|
|
Write-Host "[3] Checking Copy-ToNAS function in script" -ForegroundColor Yellow
|
|
$scriptContent = Get-Content "C:\Shares\test\scripts\Sync-FromNAS.ps1" -Raw
|
|
|
|
if ($scriptContent -match 'function Copy-ToNAS') {
|
|
Write-Host "[INFO] Looking at Copy-ToNAS function..." -ForegroundColor Cyan
|
|
|
|
$lines = Get-Content "C:\Shares\test\scripts\Sync-FromNAS.ps1"
|
|
$inFunction = $false
|
|
$lineNum = 0
|
|
|
|
foreach ($line in $lines) {
|
|
$lineNum++
|
|
if ($line -match 'function Copy-ToNAS') {
|
|
$inFunction = $true
|
|
}
|
|
if ($inFunction) {
|
|
Write-Host "Line $lineNum : $line" -ForegroundColor Gray
|
|
if ($line -match '^\}' -and $inFunction) {
|
|
break
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|