sync: Multi-project updates - SolverBot, GuruRMM, Dataforth
SolverBot: - Inject active project path into agent system prompts so agents know which directory to scope file operations to GuruRMM: - Bump agent version to 0.6.0 - Add serde aliases for PowerShell/ClaudeTask command types - Add typed CommandType enum on server for proper serialization - Support claude_task command type in send_command API Dataforth: - Fix SCP space-escaping in Sync-FromNAS.ps1 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
37
tmp_fix2.ps1
Normal file
37
tmp_fix2.ps1
Normal file
@@ -0,0 +1,37 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
$pass = ConvertTo-SecureString ("Paper123" + [char]33 + "@#") -AsPlainText -Force
|
||||
$cred = New-Object PSCredential("INTRANET\sysadmin", $pass)
|
||||
$uncRoot = "\\192.168.0.6\C$"
|
||||
|
||||
try {
|
||||
New-PSDrive -Name AD2 -PSProvider FileSystem -Root $uncRoot -Credential $cred -ErrorAction Stop | Out-Null
|
||||
$scriptPath = "AD2:\Shares\test\scripts\Sync-FromNAS.ps1"
|
||||
$lines = Get-Content $scriptPath
|
||||
|
||||
# Fix line 70 (0-indexed: 69) - the Copy-FromNAS SCP line
|
||||
$oldLine = $lines[69]
|
||||
Write-Output "OLD LINE 70: $oldLine"
|
||||
|
||||
# The correct line should have backtick-quoted remote path and quoted local path
|
||||
$lines[69] = ' $result = & $SCP -O -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile="C:\Shares\test\scripts\.ssh\known_hosts" "${NAS_USER}@${NAS_IP}:`"${RemotePath}`"" "$LocalPath" 2>&1'
|
||||
|
||||
Write-Output "NEW LINE 70: $($lines[69])"
|
||||
|
||||
# Write back
|
||||
Set-Content -Path $scriptPath -Value $lines
|
||||
Write-Output "=== LINE 70 FIXED ==="
|
||||
|
||||
# Verify both SCP lines are now correct
|
||||
$verify = Get-Content $scriptPath
|
||||
Write-Output "=== FINAL SCP LINES ==="
|
||||
for ($i = 0; $i -lt $verify.Count; $i++) {
|
||||
if ($verify[$i] -match "result.*SCP") {
|
||||
Write-Output ("{0,3}: {1}" -f ($i+1), $verify[$i].TrimEnd())
|
||||
}
|
||||
}
|
||||
|
||||
Remove-PSDrive -Name AD2 -ErrorAction SilentlyContinue
|
||||
} catch {
|
||||
Write-Output "ERROR: $_"
|
||||
Write-Output $_.ScriptStackTrace
|
||||
}
|
||||
Reference in New Issue
Block a user