Slices 1-3 of the local agent IPC surface: - Read model (local_status.go, loop wired): update counts, scanner status, check-in state, token receipt counts — no token material exposed - Local IPC (localapi/): Unix socket (group=redflag-local, 0660) + Windows named pipe (SDDL: LocalSystem/Admins/RedFlagLocal); five read-only endpoints - `redflag-agent -local-status` CLI probe of the local API surface - Screenshot capture handler (screenshot.go, dispatch wired) - Tauri desktop spine (desktop/): tray icon, left-click window, local IPC reader - Desktop React entry (web/src/desktop/LocalAgentApp.tsx, index.desktop.html, vite.desktop.config.ts) - Installer group provisioning: linux.sh creates redflag-local, sets SupplementaryGroups; windows.ps1 creates RedFlagLocal security group - Server-side: screenshot receipt handler on agents, updates handler additions - web/package.json: @tauri-apps/api + tauri CLI dev dep added
21 lines
429 B
Go
21 lines
429 B
Go
//go:build windows
|
|
|
|
package localapi
|
|
|
|
import (
|
|
"context"
|
|
"net"
|
|
|
|
winio "github.com/Microsoft/go-winio"
|
|
)
|
|
|
|
func platformDialLocalContext(opts ClientOptions) func(context.Context, string, string) (net.Conn, error) {
|
|
pipeName := opts.WindowsPipeName
|
|
if pipeName == "" {
|
|
pipeName = DefaultWindowsPipeName
|
|
}
|
|
|
|
return func(ctx context.Context, _, _ string) (net.Conn, error) {
|
|
return winio.DialPipeContext(ctx, pipeName)
|
|
}
|
|
}
|