@plune-ai/cairn 0.3.4 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +20 -7
  2. package/dist/agent/graph.d.ts +24 -530
  3. package/dist/agent/graph.d.ts.map +1 -1
  4. package/dist/agent/graph.js +144 -207
  5. package/dist/agent/graph.js.map +1 -1
  6. package/dist/agent/index.d.ts +2 -2
  7. package/dist/agent/index.d.ts.map +1 -1
  8. package/dist/agent/index.js +260 -201
  9. package/dist/agent/index.js.map +1 -1
  10. package/dist/agent/repair-loop.d.ts +8 -0
  11. package/dist/agent/repair-loop.d.ts.map +1 -1
  12. package/dist/agent/repair-loop.js +17 -5
  13. package/dist/agent/repair-loop.js.map +1 -1
  14. package/dist/agent/summary.d.ts +7 -0
  15. package/dist/agent/summary.d.ts.map +1 -1
  16. package/dist/agent/summary.js +11 -2
  17. package/dist/agent/summary.js.map +1 -1
  18. package/dist/cli/index.d.ts.map +1 -1
  19. package/dist/cli/index.js +20 -10
  20. package/dist/cli/index.js.map +1 -1
  21. package/dist/codegen/lint.d.ts +11 -0
  22. package/dist/codegen/lint.d.ts.map +1 -0
  23. package/dist/codegen/lint.js +37 -0
  24. package/dist/codegen/lint.js.map +1 -0
  25. package/dist/config/index.d.ts.map +1 -1
  26. package/dist/config/index.js +7 -0
  27. package/dist/config/index.js.map +1 -1
  28. package/dist/config/schema.d.ts +2 -0
  29. package/dist/config/schema.d.ts.map +1 -1
  30. package/dist/core/index.d.ts +2 -0
  31. package/dist/core/index.d.ts.map +1 -1
  32. package/dist/core/index.js +1 -0
  33. package/dist/core/index.js.map +1 -1
  34. package/dist/core/modalities/explore.d.ts.map +1 -1
  35. package/dist/core/modalities/explore.js +8 -4
  36. package/dist/core/modalities/explore.js.map +1 -1
  37. package/dist/core/modality.d.ts +4 -0
  38. package/dist/core/modality.d.ts.map +1 -1
  39. package/dist/core/modality.js +1 -0
  40. package/dist/core/modality.js.map +1 -1
  41. package/dist/core/progress.d.ts +13 -0
  42. package/dist/core/progress.d.ts.map +1 -0
  43. package/dist/core/progress.js +63 -0
  44. package/dist/core/progress.js.map +1 -0
  45. package/dist/core/registry.js +1 -1
  46. package/dist/core/registry.js.map +1 -1
  47. package/dist/design/dedup.d.ts +14 -0
  48. package/dist/design/dedup.d.ts.map +1 -0
  49. package/dist/design/dedup.js +64 -0
  50. package/dist/design/dedup.js.map +1 -0
  51. package/dist/design/index.d.ts.map +1 -1
  52. package/dist/design/index.js +3 -1
  53. package/dist/design/index.js.map +1 -1
  54. package/dist/eval/scorers.d.ts.map +1 -1
  55. package/dist/eval/scorers.js +33 -0
  56. package/dist/eval/scorers.js.map +1 -1
  57. package/dist/index.d.ts +4 -2
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +2 -1
  60. package/dist/index.js.map +1 -1
  61. package/dist/llm/routing.d.ts +5 -1
  62. package/dist/llm/routing.d.ts.map +1 -1
  63. package/dist/llm/routing.js +7 -2
  64. package/dist/llm/routing.js.map +1 -1
  65. package/dist/llm/structured.d.ts +1 -1
  66. package/dist/llm/structured.d.ts.map +1 -1
  67. package/dist/llm/structured.js +2 -2
  68. package/dist/llm/structured.js.map +1 -1
  69. package/dist/prompts/local/qa-playwright-ts-writer.d.ts +1 -1
  70. package/dist/prompts/local/qa-playwright-ts-writer.d.ts.map +1 -1
  71. package/dist/prompts/local/qa-playwright-ts-writer.js +1 -0
  72. package/dist/prompts/local/qa-playwright-ts-writer.js.map +1 -1
  73. package/dist/prompts/local/qa-testcase-from-ui.d.ts +1 -1
  74. package/dist/prompts/local/qa-testcase-from-ui.d.ts.map +1 -1
  75. package/dist/prompts/local/qa-testcase-from-ui.js +2 -1
  76. package/dist/prompts/local/qa-testcase-from-ui.js.map +1 -1
  77. package/dist/telemetry/index.d.ts +6 -0
  78. package/dist/telemetry/index.d.ts.map +1 -1
  79. package/dist/telemetry/index.js +15 -2
  80. package/dist/telemetry/index.js.map +1 -1
  81. package/dist/tui/App.d.ts.map +1 -1
  82. package/dist/tui/App.js +17 -7
  83. package/dist/tui/App.js.map +1 -1
  84. package/dist/tui/hooks/use-runner.d.ts.map +1 -1
  85. package/dist/tui/hooks/use-runner.js +4 -2
  86. package/dist/tui/hooks/use-runner.js.map +1 -1
  87. package/dist/tui/index.d.ts.map +1 -1
  88. package/dist/tui/index.js +18 -3
  89. package/dist/tui/index.js.map +1 -1
  90. package/dist/tui/keys.d.ts +29 -0
  91. package/dist/tui/keys.d.ts.map +1 -0
  92. package/dist/tui/keys.js +27 -0
  93. package/dist/tui/keys.js.map +1 -0
  94. package/dist/tui/router-context.d.ts +6 -1
  95. package/dist/tui/router-context.d.ts.map +1 -1
  96. package/dist/tui/router-context.js.map +1 -1
  97. package/dist/tui/screens/form-screen.d.ts.map +1 -1
  98. package/dist/tui/screens/form-screen.js +55 -5
  99. package/dist/tui/screens/form-screen.js.map +1 -1
  100. package/dist/tui/types.d.ts +3 -0
  101. package/dist/tui/types.d.ts.map +1 -1
  102. package/dist/validate/index.d.ts +4 -0
  103. package/dist/validate/index.d.ts.map +1 -1
  104. package/dist/validate/index.js +7 -2
  105. package/dist/validate/index.js.map +1 -1
  106. package/dist/validate/runner.d.ts +5 -1
  107. package/dist/validate/runner.d.ts.map +1 -1
  108. package/dist/validate/runner.js +7 -4
  109. package/dist/validate/runner.js.map +1 -1
  110. package/package.json +8 -8
package/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ <p align="center">
2
+ <img src="docs/assets/hero.png" alt="Cairn — an AI that walks your system and leaves a trail of tests. Autonomous QA agent for UI, API, unit & docs testing. Node.js · TypeScript · Playwright." width="100%" />
3
+ </p>
4
+
1
5
  # Cairn
2
6
 
3
7
  > **Cairn — an AI that walks your system and leaves a trail of tests: UI, API, unit, docs.**
@@ -134,21 +138,30 @@ cairn explore --url https://your-app.example.com/dashboard --session myapp
134
138
 
135
139
  > Working inside the repo? `npm run session:save -- --url <u> --name <s>` still works — it's a thin wrapper over the same capture logic that ships as `cairn session capture`.
136
140
 
137
- ## Interactive TUI
141
+ ## Interactive TUI (optional)
142
+
143
+ Run `cairn` with **no arguments** in a terminal to open the interactive TUI (built with Ink / React-for-CLI).
144
+ Ink and React are **optional dependencies** — a default install omits them to keep the footprint small.
145
+ Install them once to enable the TUI:
146
+
147
+ ```bash
148
+ npm install ink react ink-select-input ink-spinner ink-text-input
149
+ ```
138
150
 
139
- Run `cairn` with **no arguments** in a terminal to open the interactive TUI (built with Ink):
151
+ Then:
140
152
 
141
153
  ```bash
142
- cairn # launches the terminal UI
154
+ cairn # launches the terminal UI (requires the Ink packages above)
143
155
  ```
144
156
 
145
157
  Pick a command (explore / design / automate), fill parameters (URL, session, checklist, style) via a
146
- guided form, watch a **live dashboard** of the graph nodes as the run progresses, read the result summary
158
+ guided form, watch a **live dashboard** of the pipeline stages as the run progresses, read the result summary
147
159
  (scores, green %, Pilot verdict, test cases), and **browse past runs** in `./runs` — opening any run to
148
160
  read its test cases, report and logs.
149
161
 
150
162
  The commands below stay available for scripting/CI; in a non-interactive (piped/CI) shell, `cairn` with
151
- no arguments prints help instead of starting the UI.
163
+ no arguments prints help instead of starting the UI. If the Ink packages are not installed, `cairn` with
164
+ no arguments also falls back to printing help.
152
165
 
153
166
  ## Commands
154
167
 
@@ -283,8 +296,8 @@ npm run lint
283
296
  ## Documentation
284
297
 
285
298
  - **[Getting started](docs/getting-started.md)** — step-by-step onboarding (session → design → review → promote → automate → validate), written for people new to the tool.
286
- - **[Architecture overview](docs/architecture/overview.md)** — how the agent works inside (the LangGraph state machine, locator grounding, self-improvement).
287
- - **[Architecture Decision Records](docs/adr/)** — why it's built this way (0001–0012, incl. the interactive TUI, the `@playwright/test` output format, the Lex-Bot → Cairn rename, and the Apache-2.0 relicense).
299
+ - **[Architecture overview](docs/architecture/overview.md)** — how the agent works inside (the plain async pipeline, locator grounding, self-improvement).
300
+ - **[Architecture Decision Records](docs/adr/)** — why it's built this way (0001–0013, incl. the interactive TUI, the `@playwright/test` output format, the Lex-Bot → Cairn rename, the Apache-2.0 relicense, and the drop of LangGraph in 0.4.0).
288
301
 
289
302
  ## License
290
303
 
@@ -1,7 +1,8 @@
1
1
  import { type PageStudy } from "../observe/index.js";
2
+ import { type PageAnalysis } from "../analyze/index.js";
2
3
  import { type TestCase } from "../design/index.js";
4
+ import { type GeneratedSuite } from "../codegen/index.js";
3
5
  import { type Transition } from "../probe/index.js";
4
- import { type ProgressSnapshot } from "./progress.js";
5
6
  import type { ValidationReport } from "../validate/index.js";
6
7
  import type { RunWriter } from "../artifacts/index.js";
7
8
  import type { BrowserGateway, VerifiedElement } from "../browser/index.js";
@@ -32,6 +33,13 @@ export interface ExploreDeps {
32
33
  * (L1-04, #38). Best-effort: a throw here must not break the run.
33
34
  */
34
35
  onStudy?: (study: PageStudy) => void | Promise<void>;
36
+ /**
37
+ * Called with the freshly designed cases the moment `designTestCases` succeeds — mirrors onStudy
38
+ * (#38) so an interrupt during the later codegen/validate phase doesn't lose the generated cases.
39
+ * Best-effort: a throw here must not break the run. `studyUrl` lets the caller derive the SAME
40
+ * suite label the final write uses, so the early and final writes produce identical files.
41
+ */
42
+ onTestCases?: (testCases: TestCase[], verified: VerifiedElement[], studyUrl: string) => void | Promise<void>;
35
43
  /** Codeless mode: stop after designTestCases (cases only, no codegen/validate). */
36
44
  codeless?: boolean;
37
45
  /**
@@ -42,537 +50,23 @@ export interface ExploreDeps {
42
50
  /** Session name (for the expired-session message). */
43
51
  sessionName?: string;
44
52
  }
45
- export declare const ExploreState: import("@langchain/langgraph").AnnotationRoot<{
46
- url: {
47
- (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
48
- (): import("@langchain/langgraph").LastValue<string>;
49
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
50
- };
51
- runId: {
52
- (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
53
- (): import("@langchain/langgraph").LastValue<string>;
54
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
55
- };
56
- study: {
57
- (annotation: import("@langchain/langgraph").SingleReducer<PageStudy | undefined, PageStudy | undefined>): import("@langchain/langgraph").BaseChannel<PageStudy | undefined, PageStudy | import("@langchain/langgraph").OverwriteValue<PageStudy | undefined> | undefined, unknown>;
58
- (): import("@langchain/langgraph").LastValue<PageStudy | undefined>;
59
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
60
- };
61
- analysis: {
62
- (annotation: import("@langchain/langgraph").SingleReducer<{
63
- pageSemantics: string;
64
- primaryRefs: string[];
65
- viewSwitchers: string[];
66
- } | undefined, {
67
- pageSemantics: string;
68
- primaryRefs: string[];
69
- viewSwitchers: string[];
70
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
71
- pageSemantics: string;
72
- primaryRefs: string[];
73
- viewSwitchers: string[];
74
- } | undefined, {
75
- pageSemantics: string;
76
- primaryRefs: string[];
77
- viewSwitchers: string[];
78
- } | import("@langchain/langgraph").OverwriteValue<{
79
- pageSemantics: string;
80
- primaryRefs: string[];
81
- viewSwitchers: string[];
82
- } | undefined> | undefined, unknown>;
83
- (): import("@langchain/langgraph").LastValue<{
84
- pageSemantics: string;
85
- primaryRefs: string[];
86
- viewSwitchers: string[];
87
- } | undefined>;
88
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
89
- };
90
- verified: import("@langchain/langgraph").BaseChannel<VerifiedElement[], VerifiedElement[] | import("@langchain/langgraph").OverwriteValue<VerifiedElement[]>, unknown>;
91
- transitions: import("@langchain/langgraph").BaseChannel<Transition[], Transition[] | import("@langchain/langgraph").OverwriteValue<Transition[]>, unknown>;
92
- testCases: import("@langchain/langgraph").BaseChannel<TestCase[], TestCase[] | import("@langchain/langgraph").OverwriteValue<TestCase[]>, unknown>;
93
- suite: {
94
- (annotation: import("@langchain/langgraph").SingleReducer<{
95
- files: {
96
- path: string;
97
- content: string;
98
- }[];
99
- } | undefined, {
100
- files: {
101
- path: string;
102
- content: string;
103
- }[];
104
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
105
- files: {
106
- path: string;
107
- content: string;
108
- }[];
109
- } | undefined, {
110
- files: {
111
- path: string;
112
- content: string;
113
- }[];
114
- } | import("@langchain/langgraph").OverwriteValue<{
115
- files: {
116
- path: string;
117
- content: string;
118
- }[];
119
- } | undefined> | undefined, unknown>;
120
- (): import("@langchain/langgraph").LastValue<{
121
- files: {
122
- path: string;
123
- content: string;
124
- }[];
125
- } | undefined>;
126
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
127
- };
128
- validation: {
129
- (annotation: import("@langchain/langgraph").SingleReducer<ValidationReport | undefined, ValidationReport | undefined>): import("@langchain/langgraph").BaseChannel<ValidationReport | undefined, ValidationReport | import("@langchain/langgraph").OverwriteValue<ValidationReport | undefined> | undefined, unknown>;
130
- (): import("@langchain/langgraph").LastValue<ValidationReport | undefined>;
131
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
132
- };
133
- attempts: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
134
- bestSuite: {
135
- (annotation: import("@langchain/langgraph").SingleReducer<{
136
- files: {
137
- path: string;
138
- content: string;
139
- }[];
140
- } | undefined, {
141
- files: {
142
- path: string;
143
- content: string;
144
- }[];
145
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
146
- files: {
147
- path: string;
148
- content: string;
149
- }[];
150
- } | undefined, {
151
- files: {
152
- path: string;
153
- content: string;
154
- }[];
155
- } | import("@langchain/langgraph").OverwriteValue<{
156
- files: {
157
- path: string;
158
- content: string;
159
- }[];
160
- } | undefined> | undefined, unknown>;
161
- (): import("@langchain/langgraph").LastValue<{
162
- files: {
163
- path: string;
164
- content: string;
165
- }[];
166
- } | undefined>;
167
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
168
- };
169
- bestValidation: {
170
- (annotation: import("@langchain/langgraph").SingleReducer<ValidationReport | undefined, ValidationReport | undefined>): import("@langchain/langgraph").BaseChannel<ValidationReport | undefined, ValidationReport | import("@langchain/langgraph").OverwriteValue<ValidationReport | undefined> | undefined, unknown>;
171
- (): import("@langchain/langgraph").LastValue<ValidationReport | undefined>;
172
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
173
- };
174
- bestGreen: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
175
- prevSnapshot: {
176
- (annotation: import("@langchain/langgraph").SingleReducer<ProgressSnapshot | undefined, ProgressSnapshot | undefined>): import("@langchain/langgraph").BaseChannel<ProgressSnapshot | undefined, ProgressSnapshot | import("@langchain/langgraph").OverwriteValue<ProgressSnapshot | undefined> | undefined, unknown>;
177
- (): import("@langchain/langgraph").LastValue<ProgressSnapshot | undefined>;
178
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
179
- };
180
- stoppedEarly: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
181
- }>;
182
- /** Sprint 3: observe → identify → design → generateCode → validate ⇄ repair (bounded by maxRepair). */
183
- export declare function buildExploreGraph(deps: ExploreDeps): import("@langchain/langgraph").CompiledStateGraph<{
184
- url: string;
185
- runId: string;
186
- study: PageStudy | undefined;
187
- analysis: {
188
- pageSemantics: string;
189
- primaryRefs: string[];
190
- viewSwitchers: string[];
191
- } | undefined;
53
+ export interface ExploreOutcome {
54
+ study: PageStudy;
55
+ analysis: PageAnalysis;
192
56
  verified: VerifiedElement[];
193
57
  transitions: Transition[];
194
58
  testCases: TestCase[];
195
- suite: {
196
- files: {
197
- path: string;
198
- content: string;
199
- }[];
200
- } | undefined;
201
- validation: ValidationReport | undefined;
202
- attempts: number;
203
- bestSuite: {
204
- files: {
205
- path: string;
206
- content: string;
207
- }[];
208
- } | undefined;
209
- bestValidation: ValidationReport | undefined;
210
- bestGreen: number;
211
- prevSnapshot: ProgressSnapshot | undefined;
59
+ suite?: GeneratedSuite;
60
+ validation?: ValidationReport;
61
+ bestSuite?: GeneratedSuite;
62
+ bestValidation?: ValidationReport;
212
63
  stoppedEarly: boolean;
213
- }, {
214
- url?: string | undefined;
215
- runId?: string | undefined;
216
- study?: PageStudy | undefined;
217
- analysis?: {
218
- pageSemantics: string;
219
- primaryRefs: string[];
220
- viewSwitchers: string[];
221
- } | undefined;
222
- verified?: VerifiedElement[] | import("@langchain/langgraph").OverwriteValue<VerifiedElement[]> | undefined;
223
- transitions?: Transition[] | import("@langchain/langgraph").OverwriteValue<Transition[]> | undefined;
224
- testCases?: TestCase[] | import("@langchain/langgraph").OverwriteValue<TestCase[]> | undefined;
225
- suite?: {
226
- files: {
227
- path: string;
228
- content: string;
229
- }[];
230
- } | undefined;
231
- validation?: ValidationReport | undefined;
232
- attempts?: number | import("@langchain/langgraph").OverwriteValue<number> | undefined;
233
- bestSuite?: {
234
- files: {
235
- path: string;
236
- content: string;
237
- }[];
238
- } | undefined;
239
- bestValidation?: ValidationReport | undefined;
240
- bestGreen?: number | import("@langchain/langgraph").OverwriteValue<number> | undefined;
241
- prevSnapshot?: ProgressSnapshot | undefined;
242
- stoppedEarly?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
243
- }, "repair" | "__start__" | "observe" | "identifyElements" | "verifyLocators" | "exploreStates" | "probeInteractions" | "designTestCases" | "generateCode" | "validate", {
244
- url: {
245
- (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
246
- (): import("@langchain/langgraph").LastValue<string>;
247
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
248
- };
249
- runId: {
250
- (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
251
- (): import("@langchain/langgraph").LastValue<string>;
252
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
253
- };
254
- study: {
255
- (annotation: import("@langchain/langgraph").SingleReducer<PageStudy | undefined, PageStudy | undefined>): import("@langchain/langgraph").BaseChannel<PageStudy | undefined, PageStudy | import("@langchain/langgraph").OverwriteValue<PageStudy | undefined> | undefined, unknown>;
256
- (): import("@langchain/langgraph").LastValue<PageStudy | undefined>;
257
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
258
- };
259
- analysis: {
260
- (annotation: import("@langchain/langgraph").SingleReducer<{
261
- pageSemantics: string;
262
- primaryRefs: string[];
263
- viewSwitchers: string[];
264
- } | undefined, {
265
- pageSemantics: string;
266
- primaryRefs: string[];
267
- viewSwitchers: string[];
268
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
269
- pageSemantics: string;
270
- primaryRefs: string[];
271
- viewSwitchers: string[];
272
- } | undefined, {
273
- pageSemantics: string;
274
- primaryRefs: string[];
275
- viewSwitchers: string[];
276
- } | import("@langchain/langgraph").OverwriteValue<{
277
- pageSemantics: string;
278
- primaryRefs: string[];
279
- viewSwitchers: string[];
280
- } | undefined> | undefined, unknown>;
281
- (): import("@langchain/langgraph").LastValue<{
282
- pageSemantics: string;
283
- primaryRefs: string[];
284
- viewSwitchers: string[];
285
- } | undefined>;
286
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
287
- };
288
- verified: import("@langchain/langgraph").BaseChannel<VerifiedElement[], VerifiedElement[] | import("@langchain/langgraph").OverwriteValue<VerifiedElement[]>, unknown>;
289
- transitions: import("@langchain/langgraph").BaseChannel<Transition[], Transition[] | import("@langchain/langgraph").OverwriteValue<Transition[]>, unknown>;
290
- testCases: import("@langchain/langgraph").BaseChannel<TestCase[], TestCase[] | import("@langchain/langgraph").OverwriteValue<TestCase[]>, unknown>;
291
- suite: {
292
- (annotation: import("@langchain/langgraph").SingleReducer<{
293
- files: {
294
- path: string;
295
- content: string;
296
- }[];
297
- } | undefined, {
298
- files: {
299
- path: string;
300
- content: string;
301
- }[];
302
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
303
- files: {
304
- path: string;
305
- content: string;
306
- }[];
307
- } | undefined, {
308
- files: {
309
- path: string;
310
- content: string;
311
- }[];
312
- } | import("@langchain/langgraph").OverwriteValue<{
313
- files: {
314
- path: string;
315
- content: string;
316
- }[];
317
- } | undefined> | undefined, unknown>;
318
- (): import("@langchain/langgraph").LastValue<{
319
- files: {
320
- path: string;
321
- content: string;
322
- }[];
323
- } | undefined>;
324
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
325
- };
326
- validation: {
327
- (annotation: import("@langchain/langgraph").SingleReducer<ValidationReport | undefined, ValidationReport | undefined>): import("@langchain/langgraph").BaseChannel<ValidationReport | undefined, ValidationReport | import("@langchain/langgraph").OverwriteValue<ValidationReport | undefined> | undefined, unknown>;
328
- (): import("@langchain/langgraph").LastValue<ValidationReport | undefined>;
329
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
330
- };
331
- attempts: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
332
- bestSuite: {
333
- (annotation: import("@langchain/langgraph").SingleReducer<{
334
- files: {
335
- path: string;
336
- content: string;
337
- }[];
338
- } | undefined, {
339
- files: {
340
- path: string;
341
- content: string;
342
- }[];
343
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
344
- files: {
345
- path: string;
346
- content: string;
347
- }[];
348
- } | undefined, {
349
- files: {
350
- path: string;
351
- content: string;
352
- }[];
353
- } | import("@langchain/langgraph").OverwriteValue<{
354
- files: {
355
- path: string;
356
- content: string;
357
- }[];
358
- } | undefined> | undefined, unknown>;
359
- (): import("@langchain/langgraph").LastValue<{
360
- files: {
361
- path: string;
362
- content: string;
363
- }[];
364
- } | undefined>;
365
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
366
- };
367
- bestValidation: {
368
- (annotation: import("@langchain/langgraph").SingleReducer<ValidationReport | undefined, ValidationReport | undefined>): import("@langchain/langgraph").BaseChannel<ValidationReport | undefined, ValidationReport | import("@langchain/langgraph").OverwriteValue<ValidationReport | undefined> | undefined, unknown>;
369
- (): import("@langchain/langgraph").LastValue<ValidationReport | undefined>;
370
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
371
- };
372
- bestGreen: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
373
- prevSnapshot: {
374
- (annotation: import("@langchain/langgraph").SingleReducer<ProgressSnapshot | undefined, ProgressSnapshot | undefined>): import("@langchain/langgraph").BaseChannel<ProgressSnapshot | undefined, ProgressSnapshot | import("@langchain/langgraph").OverwriteValue<ProgressSnapshot | undefined> | undefined, unknown>;
375
- (): import("@langchain/langgraph").LastValue<ProgressSnapshot | undefined>;
376
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
377
- };
378
- stoppedEarly: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
379
- }, {
380
- url: {
381
- (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
382
- (): import("@langchain/langgraph").LastValue<string>;
383
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
384
- };
385
- runId: {
386
- (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
387
- (): import("@langchain/langgraph").LastValue<string>;
388
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
389
- };
390
- study: {
391
- (annotation: import("@langchain/langgraph").SingleReducer<PageStudy | undefined, PageStudy | undefined>): import("@langchain/langgraph").BaseChannel<PageStudy | undefined, PageStudy | import("@langchain/langgraph").OverwriteValue<PageStudy | undefined> | undefined, unknown>;
392
- (): import("@langchain/langgraph").LastValue<PageStudy | undefined>;
393
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
394
- };
395
- analysis: {
396
- (annotation: import("@langchain/langgraph").SingleReducer<{
397
- pageSemantics: string;
398
- primaryRefs: string[];
399
- viewSwitchers: string[];
400
- } | undefined, {
401
- pageSemantics: string;
402
- primaryRefs: string[];
403
- viewSwitchers: string[];
404
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
405
- pageSemantics: string;
406
- primaryRefs: string[];
407
- viewSwitchers: string[];
408
- } | undefined, {
409
- pageSemantics: string;
410
- primaryRefs: string[];
411
- viewSwitchers: string[];
412
- } | import("@langchain/langgraph").OverwriteValue<{
413
- pageSemantics: string;
414
- primaryRefs: string[];
415
- viewSwitchers: string[];
416
- } | undefined> | undefined, unknown>;
417
- (): import("@langchain/langgraph").LastValue<{
418
- pageSemantics: string;
419
- primaryRefs: string[];
420
- viewSwitchers: string[];
421
- } | undefined>;
422
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
423
- };
424
- verified: import("@langchain/langgraph").BaseChannel<VerifiedElement[], VerifiedElement[] | import("@langchain/langgraph").OverwriteValue<VerifiedElement[]>, unknown>;
425
- transitions: import("@langchain/langgraph").BaseChannel<Transition[], Transition[] | import("@langchain/langgraph").OverwriteValue<Transition[]>, unknown>;
426
- testCases: import("@langchain/langgraph").BaseChannel<TestCase[], TestCase[] | import("@langchain/langgraph").OverwriteValue<TestCase[]>, unknown>;
427
- suite: {
428
- (annotation: import("@langchain/langgraph").SingleReducer<{
429
- files: {
430
- path: string;
431
- content: string;
432
- }[];
433
- } | undefined, {
434
- files: {
435
- path: string;
436
- content: string;
437
- }[];
438
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
439
- files: {
440
- path: string;
441
- content: string;
442
- }[];
443
- } | undefined, {
444
- files: {
445
- path: string;
446
- content: string;
447
- }[];
448
- } | import("@langchain/langgraph").OverwriteValue<{
449
- files: {
450
- path: string;
451
- content: string;
452
- }[];
453
- } | undefined> | undefined, unknown>;
454
- (): import("@langchain/langgraph").LastValue<{
455
- files: {
456
- path: string;
457
- content: string;
458
- }[];
459
- } | undefined>;
460
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
461
- };
462
- validation: {
463
- (annotation: import("@langchain/langgraph").SingleReducer<ValidationReport | undefined, ValidationReport | undefined>): import("@langchain/langgraph").BaseChannel<ValidationReport | undefined, ValidationReport | import("@langchain/langgraph").OverwriteValue<ValidationReport | undefined> | undefined, unknown>;
464
- (): import("@langchain/langgraph").LastValue<ValidationReport | undefined>;
465
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
466
- };
467
- attempts: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
468
- bestSuite: {
469
- (annotation: import("@langchain/langgraph").SingleReducer<{
470
- files: {
471
- path: string;
472
- content: string;
473
- }[];
474
- } | undefined, {
475
- files: {
476
- path: string;
477
- content: string;
478
- }[];
479
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
480
- files: {
481
- path: string;
482
- content: string;
483
- }[];
484
- } | undefined, {
485
- files: {
486
- path: string;
487
- content: string;
488
- }[];
489
- } | import("@langchain/langgraph").OverwriteValue<{
490
- files: {
491
- path: string;
492
- content: string;
493
- }[];
494
- } | undefined> | undefined, unknown>;
495
- (): import("@langchain/langgraph").LastValue<{
496
- files: {
497
- path: string;
498
- content: string;
499
- }[];
500
- } | undefined>;
501
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
502
- };
503
- bestValidation: {
504
- (annotation: import("@langchain/langgraph").SingleReducer<ValidationReport | undefined, ValidationReport | undefined>): import("@langchain/langgraph").BaseChannel<ValidationReport | undefined, ValidationReport | import("@langchain/langgraph").OverwriteValue<ValidationReport | undefined> | undefined, unknown>;
505
- (): import("@langchain/langgraph").LastValue<ValidationReport | undefined>;
506
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
507
- };
508
- bestGreen: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
509
- prevSnapshot: {
510
- (annotation: import("@langchain/langgraph").SingleReducer<ProgressSnapshot | undefined, ProgressSnapshot | undefined>): import("@langchain/langgraph").BaseChannel<ProgressSnapshot | undefined, ProgressSnapshot | import("@langchain/langgraph").OverwriteValue<ProgressSnapshot | undefined> | undefined, unknown>;
511
- (): import("@langchain/langgraph").LastValue<ProgressSnapshot | undefined>;
512
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
513
- };
514
- stoppedEarly: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
515
- }, import("@langchain/langgraph").StateDefinition, {
516
- observe: {
517
- study: PageStudy;
518
- };
519
- identifyElements: {
520
- analysis: {
521
- pageSemantics: string;
522
- primaryRefs: string[];
523
- viewSwitchers: string[];
524
- };
525
- };
526
- verifyLocators: {
527
- verified: VerifiedElement[];
528
- };
529
- exploreStates: {
530
- verified?: undefined;
531
- } | {
532
- verified: VerifiedElement[];
533
- };
534
- probeInteractions: {
535
- transitions: Transition[];
536
- };
537
- designTestCases: {
538
- testCases: TestCase[];
539
- };
540
- generateCode: {
541
- suite: {
542
- files: {
543
- path: string;
544
- content: string;
545
- }[];
546
- };
547
- };
548
- validate: {
549
- validation: ValidationReport;
550
- prevSnapshot: ProgressSnapshot;
551
- stoppedEarly: boolean;
552
- bestSuite: {
553
- files: {
554
- path: string;
555
- content: string;
556
- }[];
557
- } | undefined;
558
- bestValidation: ValidationReport;
559
- bestGreen: number;
560
- } | {
561
- validation: ValidationReport;
562
- prevSnapshot: ProgressSnapshot;
563
- stoppedEarly: boolean;
564
- bestSuite?: undefined;
565
- bestValidation?: undefined;
566
- bestGreen?: undefined;
567
- };
568
- repair: {
569
- suite: {
570
- files: {
571
- path: string;
572
- content: string;
573
- }[];
574
- };
575
- attempts: number;
576
- };
577
- }, unknown, unknown, []>;
64
+ /** Repair attempts actually run (0 = green on the first try, or maxRepair=0 or codeless). */
65
+ attempts: number;
66
+ }
67
+ /** Sprint 3: observe → identify → design → generateCode → validate ⇄ repair (bounded by maxRepair). */
68
+ export declare function runExploreGraph(deps: ExploreDeps, init: {
69
+ url: string;
70
+ runId: string;
71
+ }): Promise<ExploreOutcome>;
578
72
  //# sourceMappingURL=graph.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/agent/graph.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAG9D,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAA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