From 5d775eac700e681aa407feb01f2ec27028b63fa0 Mon Sep 17 00:00:00 2001 From: Loewy Date: Wed, 22 Jul 2026 15:13:17 -0700 Subject: [PATCH 1/3] Expose Session Coach agent summary --- src/index.tsx | 5 +++++ src/operations/session-coach.gql | 1 + src/schema.gql | 1 + 3 files changed, 7 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index a4f6332..cf560d6 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3633,6 +3633,7 @@ export type SessionCoachDecisionGql = { practiceAttemptCount?: Maybe; practiceTarget?: Maybe; selectedCandidateId?: Maybe; + sessionSummary?: Maybe; suggestedAction?: Maybe; title?: Maybe; }; @@ -7072,6 +7073,7 @@ export type GetSessionCoachQuery = { decision?: { __typename?: "SessionCoachDecisionGQL"; selectedCandidateId?: string | null; + sessionSummary?: string | null; title?: string | null; body?: string | null; suggestedAction?: string | null; @@ -7122,6 +7124,7 @@ export type RequestSessionCoachGenerationMutation = { decision?: { __typename?: "SessionCoachDecisionGQL"; selectedCandidateId?: string | null; + sessionSummary?: string | null; title?: string | null; body?: string | null; suggestedAction?: string | null; @@ -7192,6 +7195,7 @@ export type SessionCoachGenerationFieldsFragment = { decision?: { __typename?: "SessionCoachDecisionGQL"; selectedCandidateId?: string | null; + sessionSummary?: string | null; title?: string | null; body?: string | null; suggestedAction?: string | null; @@ -9775,6 +9779,7 @@ export const SessionCoachGenerationFieldsFragmentDoc = gql` completedAt decision { selectedCandidateId + sessionSummary title body suggestedAction diff --git a/src/operations/session-coach.gql b/src/operations/session-coach.gql index 1cd9548..a15df84 100644 --- a/src/operations/session-coach.gql +++ b/src/operations/session-coach.gql @@ -69,6 +69,7 @@ fragment SessionCoachGenerationFields on SessionCoachGenerationGQL { completedAt decision { selectedCandidateId + sessionSummary title body suggestedAction diff --git a/src/schema.gql b/src/schema.gql index d779b7b..883419e 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -1343,6 +1343,7 @@ enum SessionCoachCandidateKindEnum { type SessionCoachDecisionGQL { selectedCandidateId: ID + sessionSummary: String title: String body: String suggestedAction: String -- 2.49.1 From d6cc81ef9ff026d4279849509c4641a171fa902f Mon Sep 17 00:00:00 2001 From: Loewy Date: Wed, 22 Jul 2026 20:54:13 -0700 Subject: [PATCH 2/3] Add multi-signal coach decision fields --- src/index.tsx | 15 +++++++++++++++ src/operations/session-coach.gql | 3 +++ src/schema.gql | 3 +++ 3 files changed, 21 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index cf560d6..75a64f3 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3635,6 +3635,8 @@ export type SessionCoachDecisionGql = { selectedCandidateId?: Maybe; sessionSummary?: Maybe; suggestedAction?: Maybe; + supportingCandidateIds: Array; + supportingShotIds: Array; title?: Maybe; }; @@ -3693,6 +3695,7 @@ export type SessionCoachGenerationDiagnosticsGql = { promptVersion: Scalars["String"]["output"]; providerKey: Scalars["String"]["output"]; startedAt?: Maybe; + synthesisRationale?: Maybe; updatedAt: Scalars["DateTime"]["output"]; }; @@ -7073,6 +7076,8 @@ export type GetSessionCoachQuery = { decision?: { __typename?: "SessionCoachDecisionGQL"; selectedCandidateId?: string | null; + supportingCandidateIds: Array; + supportingShotIds: Array; sessionSummary?: string | null; title?: string | null; body?: string | null; @@ -7101,6 +7106,7 @@ export type GetSessionCoachQuery = { startedAt?: any | null; lastEnqueuedAt?: any | null; abstentionReason?: string | null; + synthesisRationale?: string | null; } | null; } | null; }; @@ -7124,6 +7130,8 @@ export type RequestSessionCoachGenerationMutation = { decision?: { __typename?: "SessionCoachDecisionGQL"; selectedCandidateId?: string | null; + supportingCandidateIds: Array; + supportingShotIds: Array; sessionSummary?: string | null; title?: string | null; body?: string | null; @@ -7152,6 +7160,7 @@ export type RequestSessionCoachGenerationMutation = { startedAt?: any | null; lastEnqueuedAt?: any | null; abstentionReason?: string | null; + synthesisRationale?: string | null; } | null; } | null; }; @@ -7195,6 +7204,8 @@ export type SessionCoachGenerationFieldsFragment = { decision?: { __typename?: "SessionCoachDecisionGQL"; selectedCandidateId?: string | null; + supportingCandidateIds: Array; + supportingShotIds: Array; sessionSummary?: string | null; title?: string | null; body?: string | null; @@ -7223,6 +7234,7 @@ export type SessionCoachGenerationFieldsFragment = { startedAt?: any | null; lastEnqueuedAt?: any | null; abstentionReason?: string | null; + synthesisRationale?: string | null; } | null; }; @@ -9779,6 +9791,8 @@ export const SessionCoachGenerationFieldsFragmentDoc = gql` completedAt decision { selectedCandidateId + supportingCandidateIds + supportingShotIds sessionSummary title body @@ -9806,6 +9820,7 @@ export const SessionCoachGenerationFieldsFragmentDoc = gql` startedAt lastEnqueuedAt abstentionReason + synthesisRationale } } `; diff --git a/src/operations/session-coach.gql b/src/operations/session-coach.gql index a15df84..74a03c8 100644 --- a/src/operations/session-coach.gql +++ b/src/operations/session-coach.gql @@ -69,6 +69,8 @@ fragment SessionCoachGenerationFields on SessionCoachGenerationGQL { completedAt decision { selectedCandidateId + supportingCandidateIds + supportingShotIds sessionSummary title body @@ -96,5 +98,6 @@ fragment SessionCoachGenerationFields on SessionCoachGenerationGQL { startedAt lastEnqueuedAt abstentionReason + synthesisRationale } } diff --git a/src/schema.gql b/src/schema.gql index 883419e..de6e0f8 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -1343,6 +1343,8 @@ enum SessionCoachCandidateKindEnum { type SessionCoachDecisionGQL { selectedCandidateId: ID + supportingCandidateIds: [ID!]! + supportingShotIds: [Int!]! sessionSummary: String title: String body: String @@ -1406,6 +1408,7 @@ type SessionCoachGenerationDiagnosticsGQL { startedAt: DateTime lastEnqueuedAt: DateTime abstentionReason: String + synthesisRationale: String } type SessionCoachGenerationGQL { -- 2.49.1 From 43e944e82f0aa74de71cf4e663302dde2bddd77a Mon Sep 17 00:00:00 2001 From: Loewy Date: Thu, 23 Jul 2026 01:26:58 -0700 Subject: [PATCH 3/3] Expose grounded Coach strengths --- src/index.tsx | 100 +++++++++++++++++++++++++++++++ src/operations/session-coach.gql | 17 ++++++ src/schema.gql | 21 +++++++ 3 files changed, 138 insertions(+) diff --git a/src/index.tsx b/src/index.tsx index 75a64f3..58662f8 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3595,12 +3595,21 @@ export type SerializedShotPathsGql = { b64EncodedBuffer?: Maybe; }; +export type SessionCoachBaselineGql = { + __typename?: "SessionCoachBaselineGQL"; + attemptCount: Scalars["Int"]["output"]; + madeCount: Scalars["Int"]["output"]; + makePercentage: Scalars["Float"]["output"]; + sessionCount: Scalars["Int"]["output"]; +}; + export enum SessionCoachCandidateFamilyEnum { Aiming = "AIMING", BackCut = "BACK_CUT", CueToObjectDistance = "CUE_TO_OBJECT_DISTANCE", CutAngle = "CUT_ANGLE", ObjectToPocketDistance = "OBJECT_TO_POCKET_DISTANCE", + Overall = "OVERALL", Spin = "SPIN", } @@ -3620,8 +3629,11 @@ export type SessionCoachCandidateGql = { }; export enum SessionCoachCandidateKindEnum { + BaselineComparison = "BASELINE_COMPARISON", DirectionalMiss = "DIRECTIONAL_MISS", OutcomePattern = "OUTCOME_PATTERN", + SessionStreak = "SESSION_STREAK", + StrengthPattern = "STRENGTH_PATTERN", UsagePattern = "USAGE_PATTERN", } @@ -3630,9 +3642,12 @@ export type SessionCoachDecisionGql = { body?: Maybe; drillId?: Maybe; drillReason?: Maybe; + positiveBody?: Maybe; + positiveTitle?: Maybe; practiceAttemptCount?: Maybe; practiceTarget?: Maybe; selectedCandidateId?: Maybe; + selectedPositiveCandidateId?: Maybe; sessionSummary?: Maybe; suggestedAction?: Maybe; supportingCandidateIds: Array; @@ -3643,6 +3658,10 @@ export type SessionCoachDecisionGql = { export type SessionCoachEvidenceGql = { __typename?: "SessionCoachEvidenceGQL"; attemptCount: Scalars["Int"]["output"]; + baselineAttemptCount: Scalars["Int"]["output"]; + baselineMadeCount: Scalars["Int"]["output"]; + baselineMakePercentage?: Maybe; + baselineSessionCount: Scalars["Int"]["output"]; bucketKey: Scalars["String"]["output"]; bucketLabel: Scalars["String"]["output"]; comparisonAttemptCount: Scalars["Int"]["output"]; @@ -3664,12 +3683,15 @@ export type SessionCoachGql = { candidates: Array; generatedAt: Scalars["DateTime"]["output"]; ineligibilityReason?: Maybe; + longestMakeStreak: Scalars["Int"]["output"]; madeCount: Scalars["Int"]["output"]; makePercentage?: Maybe; missedCount: Scalars["Int"]["output"]; + positiveCandidates: Array; primaryCandidate?: Maybe; processingId?: Maybe; processingStatus?: Maybe; + recentBaseline?: Maybe; shotCount: Scalars["Int"]["output"]; state: SessionCoachStateEnum; summary?: Maybe; @@ -7011,6 +7033,46 @@ export type GetSessionCoachQuery = { unknownOutcomeCount: number; analyzedShotCount: number; makePercentage?: number | null; + longestMakeStreak: number; + recentBaseline?: { + __typename?: "SessionCoachBaselineGQL"; + sessionCount: number; + attemptCount: number; + madeCount: number; + makePercentage: number; + } | null; + positiveCandidates: Array<{ + __typename?: "SessionCoachCandidateGQL"; + id: string; + rank: number; + family: SessionCoachCandidateFamilyEnum; + kind: SessionCoachCandidateKindEnum; + title: string; + body: string; + action: string; + supportingShotIds: Array; + drillId?: string | null; + limitations: Array; + evidence: { + __typename?: "SessionCoachEvidenceGQL"; + bucketKey: string; + bucketLabel: string; + attemptCount: number; + madeCount: number; + missedCount: number; + makePercentage: number; + comparisonAttemptCount: number; + comparisonMadeCount: number; + comparisonMakePercentage?: number | null; + patternShotCount: number; + score: number; + rankReason: string; + baselineSessionCount: number; + baselineAttemptCount: number; + baselineMadeCount: number; + baselineMakePercentage?: number | null; + }; + }>; primaryCandidate?: { __typename?: "SessionCoachCandidateGQL"; id: string; @@ -7037,6 +7099,10 @@ export type GetSessionCoachQuery = { patternShotCount: number; score: number; rankReason: string; + baselineSessionCount: number; + baselineAttemptCount: number; + baselineMadeCount: number; + baselineMakePercentage?: number | null; }; } | null; candidates: Array<{ @@ -7065,6 +7131,10 @@ export type GetSessionCoachQuery = { patternShotCount: number; score: number; rankReason: string; + baselineSessionCount: number; + baselineAttemptCount: number; + baselineMadeCount: number; + baselineMakePercentage?: number | null; }; }>; agentGeneration?: { @@ -7075,6 +7145,9 @@ export type GetSessionCoachQuery = { completedAt?: any | null; decision?: { __typename?: "SessionCoachDecisionGQL"; + selectedPositiveCandidateId?: string | null; + positiveTitle?: string | null; + positiveBody?: string | null; selectedCandidateId?: string | null; supportingCandidateIds: Array; supportingShotIds: Array; @@ -7129,6 +7202,9 @@ export type RequestSessionCoachGenerationMutation = { completedAt?: any | null; decision?: { __typename?: "SessionCoachDecisionGQL"; + selectedPositiveCandidateId?: string | null; + positiveTitle?: string | null; + positiveBody?: string | null; selectedCandidateId?: string | null; supportingCandidateIds: Array; supportingShotIds: Array; @@ -7192,6 +7268,10 @@ export type SessionCoachCandidateFieldsFragment = { patternShotCount: number; score: number; rankReason: string; + baselineSessionCount: number; + baselineAttemptCount: number; + baselineMadeCount: number; + baselineMakePercentage?: number | null; }; }; @@ -7203,6 +7283,9 @@ export type SessionCoachGenerationFieldsFragment = { completedAt?: any | null; decision?: { __typename?: "SessionCoachDecisionGQL"; + selectedPositiveCandidateId?: string | null; + positiveTitle?: string | null; + positiveBody?: string | null; selectedCandidateId?: string | null; supportingCandidateIds: Array; supportingShotIds: Array; @@ -9780,6 +9863,10 @@ export const SessionCoachCandidateFieldsFragmentDoc = gql` patternShotCount score rankReason + baselineSessionCount + baselineAttemptCount + baselineMadeCount + baselineMakePercentage } } `; @@ -9790,6 +9877,9 @@ export const SessionCoachGenerationFieldsFragmentDoc = gql` createdAt completedAt decision { + selectedPositiveCandidateId + positiveTitle + positiveBody selectedCandidateId supportingCandidateIds supportingShotIds @@ -15453,6 +15543,16 @@ export const GetSessionCoachDocument = gql` unknownOutcomeCount analyzedShotCount makePercentage + longestMakeStreak + recentBaseline { + sessionCount + attemptCount + madeCount + makePercentage + } + positiveCandidates { + ...SessionCoachCandidateFields + } primaryCandidate { ...SessionCoachCandidateFields } diff --git a/src/operations/session-coach.gql b/src/operations/session-coach.gql index 74a03c8..b33afbb 100644 --- a/src/operations/session-coach.gql +++ b/src/operations/session-coach.gql @@ -14,6 +14,16 @@ query GetSessionCoach($videoId: Int!) { unknownOutcomeCount analyzedShotCount makePercentage + longestMakeStreak + recentBaseline { + sessionCount + attemptCount + madeCount + makePercentage + } + positiveCandidates { + ...SessionCoachCandidateFields + } primaryCandidate { ...SessionCoachCandidateFields } @@ -59,6 +69,10 @@ fragment SessionCoachCandidateFields on SessionCoachCandidateGQL { patternShotCount score rankReason + baselineSessionCount + baselineAttemptCount + baselineMadeCount + baselineMakePercentage } } @@ -68,6 +82,9 @@ fragment SessionCoachGenerationFields on SessionCoachGenerationGQL { createdAt completedAt decision { + selectedPositiveCandidateId + positiveTitle + positiveBody selectedCandidateId supportingCandidateIds supportingShotIds diff --git a/src/schema.gql b/src/schema.gql index de6e0f8..e537050 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -1312,7 +1312,15 @@ type SerializedShotPathsGQL { b64EncodedBuffer: String } +type SessionCoachBaselineGQL { + sessionCount: Int! + attemptCount: Int! + madeCount: Int! + makePercentage: Float! +} + enum SessionCoachCandidateFamilyEnum { + OVERALL AIMING CUT_ANGLE SPIN @@ -1336,12 +1344,18 @@ type SessionCoachCandidateGQL { } enum SessionCoachCandidateKindEnum { + BASELINE_COMPARISON + SESSION_STREAK + STRENGTH_PATTERN DIRECTIONAL_MISS OUTCOME_PATTERN USAGE_PATTERN } type SessionCoachDecisionGQL { + selectedPositiveCandidateId: ID + positiveTitle: String + positiveBody: String selectedCandidateId: ID supportingCandidateIds: [ID!]! supportingShotIds: [Int!]! @@ -1368,6 +1382,10 @@ type SessionCoachEvidenceGQL { patternShotCount: Int! score: Float! rankReason: String! + baselineSessionCount: Int! + baselineAttemptCount: Int! + baselineMadeCount: Int! + baselineMakePercentage: Float } type SessionCoachGQL { @@ -1385,6 +1403,9 @@ type SessionCoachGQL { unknownOutcomeCount: Int! analyzedShotCount: Int! makePercentage: Float + longestMakeStreak: Int! + recentBaseline: SessionCoachBaselineGQL + positiveCandidates: [SessionCoachCandidateGQL!]! primaryCandidate: SessionCoachCandidateGQL candidates: [SessionCoachCandidateGQL!]! agentGeneration: SessionCoachGenerationGQL -- 2.49.1