Skip to content

Commit 5d7cf3d

Browse files
jsonbaileyclaude
andcommitted
feat!: rename GraphMetricSummary to AIGraphMetricSummary
Renames the managed-layer graph metrics summary type for consistency with AIMetrics/AIMetricsSummary naming. The runner-level LDAIGraphMetrics and LDAIGraphMetricSummary types already use the AI prefix and are unchanged. BREAKING CHANGE: GraphMetricSummary is renamed to AIGraphMetricSummary. Consumers importing this type from @launchdarkly/server-sdk-ai must update the symbol name. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 70e4eb9 commit 5d7cf3d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

packages/sdk/server-ai/src/api/graph/ManagedAgentGraph.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import { LDAIMetricSummary } from '../model/types';
55
import { LDJudgeResult } from '../judge/types';
66
import { AgentGraphDefinition } from './AgentGraphDefinition';
77
import { LDGraphTracker } from './LDGraphTracker';
8-
import { AgentGraphRunnerResult, GraphMetricSummary, ManagedGraphResult } from './types';
8+
import { AgentGraphRunnerResult, AIGraphMetricSummary, ManagedGraphResult } from './types';
99

1010
/**
1111
* ManagedAgentGraph wraps an AgentGraphDefinition and provides a managed run()
1212
* method that returns ManagedGraphResult with async judge evaluations.
1313
*
1414
* The runner function is responsible for executing the graph and returning
1515
* an AgentGraphRunnerResult. ManagedAgentGraph builds the managed result from
16-
* the runner result, including GraphMetricSummary with the graphTracker's
16+
* the runner result, including AIGraphMetricSummary with the graphTracker's
1717
* resumptionToken.
1818
*/
1919
export class ManagedAgentGraph {
@@ -31,7 +31,7 @@ export class ManagedAgentGraph {
3131
* run() returns before ManagedGraphResult.evaluations resolves.
3232
*
3333
* @param runner Async function that executes the graph and returns AgentGraphRunnerResult.
34-
* @returns ManagedGraphResult with GraphMetricSummary and evaluations promise.
34+
* @returns ManagedGraphResult with AIGraphMetricSummary and evaluations promise.
3535
*/
3636
async run(
3737
runner: (
@@ -43,7 +43,7 @@ export class ManagedAgentGraph {
4343

4444
const runnerResult = await runner(this._graphDefinition, graphTracker);
4545

46-
const metrics: GraphMetricSummary = {
46+
const metrics: AIGraphMetricSummary = {
4747
success: runnerResult.metrics.success,
4848
path: runnerResult.metrics.path,
4949
durationMs: runnerResult.metrics.durationMs,

packages/sdk/server-ai/src/api/graph/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export interface AgentGraphRunnerResult {
129129
* Graph metric summary returned in ManagedGraphResult.
130130
* Includes per-node metrics and a resumption token.
131131
*/
132-
export interface GraphMetricSummary {
132+
export interface AIGraphMetricSummary {
133133
/**
134134
* Whether the graph invocation succeeded.
135135
*/
@@ -173,7 +173,7 @@ export interface ManagedGraphResult {
173173
/**
174174
* Summarized metrics for this graph invocation.
175175
*/
176-
metrics: GraphMetricSummary;
176+
metrics: AIGraphMetricSummary;
177177

178178
/**
179179
* The raw response object from the provider, if available.

0 commit comments

Comments
 (0)