M1: X11 active-window adapter + platform fallback

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-05-31 12:44:25 -04:00
parent 034cc16540
commit 1646321d0b
4 changed files with 147 additions and 2 deletions
+16
View File
@@ -0,0 +1,16 @@
//go:build !linux
package evidence
import "context"
// NewSource returns a sensor that reports evidence permanently unavailable on
// platforms without the X11 adapter.
func NewSource() Source { return noopSource{} }
type noopSource struct{}
func (noopSource) Watch(ctx context.Context, onChange func(WindowSnapshot)) {
onChange(WindowSnapshot{Health: EvidenceHealth{Available: false, Reason: "no active-window sensor on this platform"}})
<-ctx.Done()
}