Skip to content

Commit 95cb82f

Browse files
authored
add GraphDiagnostic flow metadata types (#103)
Add FlowDiagnosticMeta type and optional flow field to GraphDiagnostic for future flow-scoped diagnostics. No runtime behavior changes.
1 parent 2649c46 commit 95cb82f

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

.changeset/five-ducks-sleep.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@intent-framework/core": minor
3+
---
4+
5+
Add public `FlowDiagnosticMeta` type and optional `flow` metadata to `GraphDiagnostic` for future flow-scoped diagnostics.

packages/core/src/graph.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ import type { AnyResourceNode } from "./resource.js"
44

55
export type DiagnosticSeverity = "info" | "warning" | "error"
66

7+
export type FlowDiagnosticMeta = {
8+
flowNodeId: string
9+
flowSemanticNodeId?: string
10+
}
11+
712
export type GraphDiagnostic = {
813
severity: DiagnosticSeverity
914
code: string
1015
message: string
1116
nodeId?: string
1217
semanticNodeId?: string
18+
flow?: FlowDiagnosticMeta
1319
}
1420

1521
export type InspectedScreen = {

packages/core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export { screen } from "./screen.js"
22
export type { ScreenDefinition, ScreenBuilder } from "./screen.js"
33
export { inspectScreen } from "./graph.js"
4-
export type { InspectedScreen, GraphDiagnostic, DiagnosticSeverity } from "./graph.js"
4+
export type { InspectedScreen, GraphDiagnostic, DiagnosticSeverity, FlowDiagnosticMeta } from "./graph.js"
55
export type { TextState, BooleanState, ChoiceState } from "./state.js"
66
export type { AskNode, AnyAskNode, AskKind, AskBuilder } from "./ask.js"
77
export type { ActNode, ActCondition, ActStatus, FeedbackConfig, ActBuilder, NavigationService, ActionExecutionContext, DefaultScreenServices } from "./act.js"

0 commit comments

Comments
 (0)