Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

Fix endpoint inventory JSON output ignoring --all flag

Cursor Agent5607fd8b3461
diff --git a/cli/beacon/cmd/endpoint_robust.go b/cli/beacon/cmd/endpoint_robust.go
index 9f5bbcde..95a3d3c1 100644
--- a/cli/beacon/cmd/endpoint_robust.go
+++ b/cli/beacon/cmd/endpoint_robust.go
@@ -117,6 +117,15 @@ func runEndpointInventory(cmd *cobra.Command, args []string) error {
LastEventObserved: status.LastEvent != "",
}
if endpointOpts.jsonOutput {
+ if !endpointOpts.allTargets {
+ filtered := []harness.Harness{}
+ for _, h := range result.Harnesses {
+ if h.Detected {
+ filtered = append(filtered, h)
+ }
+ }
+ result.Harnesses = filtered
+ }
return json.NewEncoder(os.Stdout).Encode(result)
}
fmt.Printf("Config: %s\n", result.ConfigPath)