Add "out" field to actions in JSON profile.

This provides a way to link the JSON profile to aquery's [text]proto output via the actions' primary output.

Also added `primary_output_id` to analysis_v2.proto.

RELNOTES: Add actions' primary output details in JSON profile and analysis_v2.proto.
PiperOrigin-RevId: 295940635
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
index 0659fe5..218dd2d 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/CommonCommandOptions.java
@@ -313,6 +313,16 @@
   public boolean enableJsonProfileDiet;
 
   @Option(
+      name = "experimental_include_primary_output",
+      defaultValue = "false",
+      documentationCategory = OptionDocumentationCategory.LOGGING,
+      effectTags = {OptionEffectTag.AFFECTS_OUTPUTS, OptionEffectTag.BAZEL_MONITORING},
+      help =
+          "Includes the extra \"out\" attribute in action events that contains the exec path "
+              + "to the action's primary output.")
+  public boolean includePrimaryOutput;
+
+  @Option(
       name = "experimental_announce_profile_path",
       defaultValue = "false",
       documentationCategory = OptionDocumentationCategory.LOGGING,