pi-agent: Implement progressive Target detection

This commit is contained in:
proxyctl coordinator
2026-07-17 21:01:35 +08:00
parent fbb81ffb40
commit ad651402fd
15 changed files with 558 additions and 31 deletions
+16
View File
@@ -40,6 +40,22 @@ type Inspection struct {
Evidence string
}
// Detection is one presentation-independent availability and configuration
// inspection outcome. Err distinguishes a failed check from a truthful
// unavailable or disabled result.
type Detection struct {
Availability Availability
Inspection Inspection
Err error
}
// Detector is the optional structured detection seam. Targets which can
// preserve lower-level check failures implement it; legacy Targets continue to
// participate through Availability and Inspect.
type Detector interface {
Detect(context.Context, *profile.Profile) Detection
}
// OperationResult reports the adapter's immediate operation outcome. When Err
// is non-nil, Inspection is advisory because it may have been captured before a
// partial write or command failure. The Application explicitly calls Inspect