@plune-ai/cairn 0.3.5 → 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 (84) hide show
  1. package/README.md +20 -7
  2. package/dist/agent/graph.d.ts +17 -530
  3. package/dist/agent/graph.d.ts.map +1 -1
  4. package/dist/agent/graph.js +144 -215
  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 +205 -202
  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.js +5 -5
  19. package/dist/cli/index.js.map +1 -1
  20. package/dist/codegen/lint.d.ts +11 -0
  21. package/dist/codegen/lint.d.ts.map +1 -0
  22. package/dist/codegen/lint.js +37 -0
  23. package/dist/codegen/lint.js.map +1 -0
  24. package/dist/config/index.d.ts.map +1 -1
  25. package/dist/config/index.js +7 -0
  26. package/dist/config/index.js.map +1 -1
  27. package/dist/config/schema.d.ts +2 -0
  28. package/dist/config/schema.d.ts.map +1 -1
  29. package/dist/core/modalities/explore.js +2 -2
  30. package/dist/core/modalities/explore.js.map +1 -1
  31. package/dist/design/dedup.d.ts +14 -0
  32. package/dist/design/dedup.d.ts.map +1 -0
  33. package/dist/design/dedup.js +64 -0
  34. package/dist/design/dedup.js.map +1 -0
  35. package/dist/design/index.d.ts.map +1 -1
  36. package/dist/design/index.js +3 -1
  37. package/dist/design/index.js.map +1 -1
  38. package/dist/eval/scorers.d.ts.map +1 -1
  39. package/dist/eval/scorers.js +33 -0
  40. package/dist/eval/scorers.js.map +1 -1
  41. package/dist/index.d.ts +4 -2
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +2 -1
  44. package/dist/index.js.map +1 -1
  45. package/dist/llm/routing.d.ts +5 -1
  46. package/dist/llm/routing.d.ts.map +1 -1
  47. package/dist/llm/routing.js +7 -2
  48. package/dist/llm/routing.js.map +1 -1
  49. package/dist/llm/structured.d.ts +1 -1
  50. package/dist/llm/structured.d.ts.map +1 -1
  51. package/dist/llm/structured.js +2 -2
  52. package/dist/llm/structured.js.map +1 -1
  53. package/dist/prompts/local/qa-playwright-ts-writer.d.ts +1 -1
  54. package/dist/prompts/local/qa-playwright-ts-writer.d.ts.map +1 -1
  55. package/dist/prompts/local/qa-playwright-ts-writer.js +1 -0
  56. package/dist/prompts/local/qa-playwright-ts-writer.js.map +1 -1
  57. package/dist/prompts/local/qa-testcase-from-ui.d.ts +1 -1
  58. package/dist/prompts/local/qa-testcase-from-ui.d.ts.map +1 -1
  59. package/dist/prompts/local/qa-testcase-from-ui.js +2 -1
  60. package/dist/prompts/local/qa-testcase-from-ui.js.map +1 -1
  61. package/dist/telemetry/index.d.ts +6 -0
  62. package/dist/telemetry/index.d.ts.map +1 -1
  63. package/dist/telemetry/index.js +15 -2
  64. package/dist/telemetry/index.js.map +1 -1
  65. package/dist/tui/hooks/use-runner.d.ts.map +1 -1
  66. package/dist/tui/hooks/use-runner.js +4 -2
  67. package/dist/tui/hooks/use-runner.js.map +1 -1
  68. package/dist/tui/index.d.ts.map +1 -1
  69. package/dist/tui/index.js +18 -3
  70. package/dist/tui/index.js.map +1 -1
  71. package/dist/tui/screens/form-screen.d.ts.map +1 -1
  72. package/dist/tui/screens/form-screen.js +42 -3
  73. package/dist/tui/screens/form-screen.js.map +1 -1
  74. package/dist/tui/types.d.ts +3 -0
  75. package/dist/tui/types.d.ts.map +1 -1
  76. package/dist/validate/index.d.ts +4 -0
  77. package/dist/validate/index.d.ts.map +1 -1
  78. package/dist/validate/index.js +7 -2
  79. package/dist/validate/index.js.map +1 -1
  80. package/dist/validate/runner.d.ts +5 -1
  81. package/dist/validate/runner.d.ts.map +1 -1
  82. package/dist/validate/runner.js +7 -4
  83. package/dist/validate/runner.js.map +1 -1
  84. package/package.json +7 -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";
@@ -49,537 +50,23 @@ export interface ExploreDeps {
49
50
  /** Session name (for the expired-session message). */
50
51
  sessionName?: string;
51
52
  }
52
- export declare const ExploreState: import("@langchain/langgraph").AnnotationRoot<{
53
- url: {
54
- (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
55
- (): import("@langchain/langgraph").LastValue<string>;
56
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
57
- };
58
- runId: {
59
- (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
60
- (): import("@langchain/langgraph").LastValue<string>;
61
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
62
- };
63
- study: {
64
- (annotation: import("@langchain/langgraph").SingleReducer<PageStudy | undefined, PageStudy | undefined>): import("@langchain/langgraph").BaseChannel<PageStudy | undefined, PageStudy | import("@langchain/langgraph").OverwriteValue<PageStudy | undefined> | undefined, unknown>;
65
- (): import("@langchain/langgraph").LastValue<PageStudy | undefined>;
66
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
67
- };
68
- analysis: {
69
- (annotation: import("@langchain/langgraph").SingleReducer<{
70
- pageSemantics: string;
71
- primaryRefs: string[];
72
- viewSwitchers: string[];
73
- } | undefined, {
74
- pageSemantics: string;
75
- primaryRefs: string[];
76
- viewSwitchers: string[];
77
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
78
- pageSemantics: string;
79
- primaryRefs: string[];
80
- viewSwitchers: string[];
81
- } | undefined, {
82
- pageSemantics: string;
83
- primaryRefs: string[];
84
- viewSwitchers: string[];
85
- } | import("@langchain/langgraph").OverwriteValue<{
86
- pageSemantics: string;
87
- primaryRefs: string[];
88
- viewSwitchers: string[];
89
- } | undefined> | undefined, unknown>;
90
- (): import("@langchain/langgraph").LastValue<{
91
- pageSemantics: string;
92
- primaryRefs: string[];
93
- viewSwitchers: string[];
94
- } | undefined>;
95
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
96
- };
97
- verified: import("@langchain/langgraph").BaseChannel<VerifiedElement[], VerifiedElement[] | import("@langchain/langgraph").OverwriteValue<VerifiedElement[]>, unknown>;
98
- transitions: import("@langchain/langgraph").BaseChannel<Transition[], Transition[] | import("@langchain/langgraph").OverwriteValue<Transition[]>, unknown>;
99
- testCases: import("@langchain/langgraph").BaseChannel<TestCase[], TestCase[] | import("@langchain/langgraph").OverwriteValue<TestCase[]>, unknown>;
100
- suite: {
101
- (annotation: import("@langchain/langgraph").SingleReducer<{
102
- files: {
103
- path: string;
104
- content: string;
105
- }[];
106
- } | undefined, {
107
- files: {
108
- path: string;
109
- content: string;
110
- }[];
111
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
112
- files: {
113
- path: string;
114
- content: string;
115
- }[];
116
- } | undefined, {
117
- files: {
118
- path: string;
119
- content: string;
120
- }[];
121
- } | import("@langchain/langgraph").OverwriteValue<{
122
- files: {
123
- path: string;
124
- content: string;
125
- }[];
126
- } | undefined> | undefined, unknown>;
127
- (): import("@langchain/langgraph").LastValue<{
128
- files: {
129
- path: string;
130
- content: string;
131
- }[];
132
- } | undefined>;
133
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
134
- };
135
- validation: {
136
- (annotation: import("@langchain/langgraph").SingleReducer<ValidationReport | undefined, ValidationReport | undefined>): import("@langchain/langgraph").BaseChannel<ValidationReport | undefined, ValidationReport | import("@langchain/langgraph").OverwriteValue<ValidationReport | undefined> | undefined, unknown>;
137
- (): import("@langchain/langgraph").LastValue<ValidationReport | undefined>;
138
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
139
- };
140
- attempts: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
141
- bestSuite: {
142
- (annotation: import("@langchain/langgraph").SingleReducer<{
143
- files: {
144
- path: string;
145
- content: string;
146
- }[];
147
- } | undefined, {
148
- files: {
149
- path: string;
150
- content: string;
151
- }[];
152
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
153
- files: {
154
- path: string;
155
- content: string;
156
- }[];
157
- } | undefined, {
158
- files: {
159
- path: string;
160
- content: string;
161
- }[];
162
- } | import("@langchain/langgraph").OverwriteValue<{
163
- files: {
164
- path: string;
165
- content: string;
166
- }[];
167
- } | undefined> | undefined, unknown>;
168
- (): import("@langchain/langgraph").LastValue<{
169
- files: {
170
- path: string;
171
- content: string;
172
- }[];
173
- } | undefined>;
174
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
175
- };
176
- bestValidation: {
177
- (annotation: import("@langchain/langgraph").SingleReducer<ValidationReport | undefined, ValidationReport | undefined>): import("@langchain/langgraph").BaseChannel<ValidationReport | undefined, ValidationReport | import("@langchain/langgraph").OverwriteValue<ValidationReport | undefined> | undefined, unknown>;
178
- (): import("@langchain/langgraph").LastValue<ValidationReport | undefined>;
179
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
180
- };
181
- bestGreen: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
182
- prevSnapshot: {
183
- (annotation: import("@langchain/langgraph").SingleReducer<ProgressSnapshot | undefined, ProgressSnapshot | undefined>): import("@langchain/langgraph").BaseChannel<ProgressSnapshot | undefined, ProgressSnapshot | import("@langchain/langgraph").OverwriteValue<ProgressSnapshot | undefined> | undefined, unknown>;
184
- (): import("@langchain/langgraph").LastValue<ProgressSnapshot | undefined>;
185
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
186
- };
187
- stoppedEarly: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
188
- }>;
189
- /** Sprint 3: observe → identify → design → generateCode → validate ⇄ repair (bounded by maxRepair). */
190
- export declare function buildExploreGraph(deps: ExploreDeps): import("@langchain/langgraph").CompiledStateGraph<{
191
- url: string;
192
- runId: string;
193
- study: PageStudy | undefined;
194
- analysis: {
195
- pageSemantics: string;
196
- primaryRefs: string[];
197
- viewSwitchers: string[];
198
- } | undefined;
53
+ export interface ExploreOutcome {
54
+ study: PageStudy;
55
+ analysis: PageAnalysis;
199
56
  verified: VerifiedElement[];
200
57
  transitions: Transition[];
201
58
  testCases: TestCase[];
202
- suite: {
203
- files: {
204
- path: string;
205
- content: string;
206
- }[];
207
- } | undefined;
208
- validation: ValidationReport | undefined;
209
- attempts: number;
210
- bestSuite: {
211
- files: {
212
- path: string;
213
- content: string;
214
- }[];
215
- } | undefined;
216
- bestValidation: ValidationReport | undefined;
217
- bestGreen: number;
218
- prevSnapshot: ProgressSnapshot | undefined;
59
+ suite?: GeneratedSuite;
60
+ validation?: ValidationReport;
61
+ bestSuite?: GeneratedSuite;
62
+ bestValidation?: ValidationReport;
219
63
  stoppedEarly: boolean;
220
- }, {
221
- url?: string | undefined;
222
- runId?: string | undefined;
223
- study?: PageStudy | undefined;
224
- analysis?: {
225
- pageSemantics: string;
226
- primaryRefs: string[];
227
- viewSwitchers: string[];
228
- } | undefined;
229
- verified?: VerifiedElement[] | import("@langchain/langgraph").OverwriteValue<VerifiedElement[]> | undefined;
230
- transitions?: Transition[] | import("@langchain/langgraph").OverwriteValue<Transition[]> | undefined;
231
- testCases?: TestCase[] | import("@langchain/langgraph").OverwriteValue<TestCase[]> | undefined;
232
- suite?: {
233
- files: {
234
- path: string;
235
- content: string;
236
- }[];
237
- } | undefined;
238
- validation?: ValidationReport | undefined;
239
- attempts?: number | import("@langchain/langgraph").OverwriteValue<number> | undefined;
240
- bestSuite?: {
241
- files: {
242
- path: string;
243
- content: string;
244
- }[];
245
- } | undefined;
246
- bestValidation?: ValidationReport | undefined;
247
- bestGreen?: number | import("@langchain/langgraph").OverwriteValue<number> | undefined;
248
- prevSnapshot?: ProgressSnapshot | undefined;
249
- stoppedEarly?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
250
- }, "repair" | "__start__" | "observe" | "identifyElements" | "verifyLocators" | "exploreStates" | "probeInteractions" | "designTestCases" | "generateCode" | "validate", {
251
- url: {
252
- (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
253
- (): import("@langchain/langgraph").LastValue<string>;
254
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
255
- };
256
- runId: {
257
- (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
258
- (): import("@langchain/langgraph").LastValue<string>;
259
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
260
- };
261
- study: {
262
- (annotation: import("@langchain/langgraph").SingleReducer<PageStudy | undefined, PageStudy | undefined>): import("@langchain/langgraph").BaseChannel<PageStudy | undefined, PageStudy | import("@langchain/langgraph").OverwriteValue<PageStudy | undefined> | undefined, unknown>;
263
- (): import("@langchain/langgraph").LastValue<PageStudy | undefined>;
264
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
265
- };
266
- analysis: {
267
- (annotation: import("@langchain/langgraph").SingleReducer<{
268
- pageSemantics: string;
269
- primaryRefs: string[];
270
- viewSwitchers: string[];
271
- } | undefined, {
272
- pageSemantics: string;
273
- primaryRefs: string[];
274
- viewSwitchers: string[];
275
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
276
- pageSemantics: string;
277
- primaryRefs: string[];
278
- viewSwitchers: string[];
279
- } | undefined, {
280
- pageSemantics: string;
281
- primaryRefs: string[];
282
- viewSwitchers: string[];
283
- } | import("@langchain/langgraph").OverwriteValue<{
284
- pageSemantics: string;
285
- primaryRefs: string[];
286
- viewSwitchers: string[];
287
- } | undefined> | undefined, unknown>;
288
- (): import("@langchain/langgraph").LastValue<{
289
- pageSemantics: string;
290
- primaryRefs: string[];
291
- viewSwitchers: string[];
292
- } | undefined>;
293
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
294
- };
295
- verified: import("@langchain/langgraph").BaseChannel<VerifiedElement[], VerifiedElement[] | import("@langchain/langgraph").OverwriteValue<VerifiedElement[]>, unknown>;
296
- transitions: import("@langchain/langgraph").BaseChannel<Transition[], Transition[] | import("@langchain/langgraph").OverwriteValue<Transition[]>, unknown>;
297
- testCases: import("@langchain/langgraph").BaseChannel<TestCase[], TestCase[] | import("@langchain/langgraph").OverwriteValue<TestCase[]>, unknown>;
298
- suite: {
299
- (annotation: import("@langchain/langgraph").SingleReducer<{
300
- files: {
301
- path: string;
302
- content: string;
303
- }[];
304
- } | undefined, {
305
- files: {
306
- path: string;
307
- content: string;
308
- }[];
309
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
310
- files: {
311
- path: string;
312
- content: string;
313
- }[];
314
- } | undefined, {
315
- files: {
316
- path: string;
317
- content: string;
318
- }[];
319
- } | import("@langchain/langgraph").OverwriteValue<{
320
- files: {
321
- path: string;
322
- content: string;
323
- }[];
324
- } | undefined> | undefined, unknown>;
325
- (): import("@langchain/langgraph").LastValue<{
326
- files: {
327
- path: string;
328
- content: string;
329
- }[];
330
- } | undefined>;
331
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
332
- };
333
- validation: {
334
- (annotation: import("@langchain/langgraph").SingleReducer<ValidationReport | undefined, ValidationReport | undefined>): import("@langchain/langgraph").BaseChannel<ValidationReport | undefined, ValidationReport | import("@langchain/langgraph").OverwriteValue<ValidationReport | undefined> | undefined, unknown>;
335
- (): import("@langchain/langgraph").LastValue<ValidationReport | undefined>;
336
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
337
- };
338
- attempts: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
339
- bestSuite: {
340
- (annotation: import("@langchain/langgraph").SingleReducer<{
341
- files: {
342
- path: string;
343
- content: string;
344
- }[];
345
- } | undefined, {
346
- files: {
347
- path: string;
348
- content: string;
349
- }[];
350
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
351
- files: {
352
- path: string;
353
- content: string;
354
- }[];
355
- } | undefined, {
356
- files: {
357
- path: string;
358
- content: string;
359
- }[];
360
- } | import("@langchain/langgraph").OverwriteValue<{
361
- files: {
362
- path: string;
363
- content: string;
364
- }[];
365
- } | undefined> | undefined, unknown>;
366
- (): import("@langchain/langgraph").LastValue<{
367
- files: {
368
- path: string;
369
- content: string;
370
- }[];
371
- } | undefined>;
372
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
373
- };
374
- bestValidation: {
375
- (annotation: import("@langchain/langgraph").SingleReducer<ValidationReport | undefined, ValidationReport | undefined>): import("@langchain/langgraph").BaseChannel<ValidationReport | undefined, ValidationReport | import("@langchain/langgraph").OverwriteValue<ValidationReport | undefined> | undefined, unknown>;
376
- (): import("@langchain/langgraph").LastValue<ValidationReport | undefined>;
377
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
378
- };
379
- bestGreen: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
380
- prevSnapshot: {
381
- (annotation: import("@langchain/langgraph").SingleReducer<ProgressSnapshot | undefined, ProgressSnapshot | undefined>): import("@langchain/langgraph").BaseChannel<ProgressSnapshot | undefined, ProgressSnapshot | import("@langchain/langgraph").OverwriteValue<ProgressSnapshot | undefined> | undefined, unknown>;
382
- (): import("@langchain/langgraph").LastValue<ProgressSnapshot | undefined>;
383
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
384
- };
385
- stoppedEarly: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
386
- }, {
387
- url: {
388
- (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
389
- (): import("@langchain/langgraph").LastValue<string>;
390
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
391
- };
392
- runId: {
393
- (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
394
- (): import("@langchain/langgraph").LastValue<string>;
395
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
396
- };
397
- study: {
398
- (annotation: import("@langchain/langgraph").SingleReducer<PageStudy | undefined, PageStudy | undefined>): import("@langchain/langgraph").BaseChannel<PageStudy | undefined, PageStudy | import("@langchain/langgraph").OverwriteValue<PageStudy | undefined> | undefined, unknown>;
399
- (): import("@langchain/langgraph").LastValue<PageStudy | undefined>;
400
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
401
- };
402
- analysis: {
403
- (annotation: import("@langchain/langgraph").SingleReducer<{
404
- pageSemantics: string;
405
- primaryRefs: string[];
406
- viewSwitchers: string[];
407
- } | undefined, {
408
- pageSemantics: string;
409
- primaryRefs: string[];
410
- viewSwitchers: string[];
411
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
412
- pageSemantics: string;
413
- primaryRefs: string[];
414
- viewSwitchers: string[];
415
- } | undefined, {
416
- pageSemantics: string;
417
- primaryRefs: string[];
418
- viewSwitchers: string[];
419
- } | import("@langchain/langgraph").OverwriteValue<{
420
- pageSemantics: string;
421
- primaryRefs: string[];
422
- viewSwitchers: string[];
423
- } | undefined> | undefined, unknown>;
424
- (): import("@langchain/langgraph").LastValue<{
425
- pageSemantics: string;
426
- primaryRefs: string[];
427
- viewSwitchers: string[];
428
- } | undefined>;
429
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
430
- };
431
- verified: import("@langchain/langgraph").BaseChannel<VerifiedElement[], VerifiedElement[] | import("@langchain/langgraph").OverwriteValue<VerifiedElement[]>, unknown>;
432
- transitions: import("@langchain/langgraph").BaseChannel<Transition[], Transition[] | import("@langchain/langgraph").OverwriteValue<Transition[]>, unknown>;
433
- testCases: import("@langchain/langgraph").BaseChannel<TestCase[], TestCase[] | import("@langchain/langgraph").OverwriteValue<TestCase[]>, unknown>;
434
- suite: {
435
- (annotation: import("@langchain/langgraph").SingleReducer<{
436
- files: {
437
- path: string;
438
- content: string;
439
- }[];
440
- } | undefined, {
441
- files: {
442
- path: string;
443
- content: string;
444
- }[];
445
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
446
- files: {
447
- path: string;
448
- content: string;
449
- }[];
450
- } | undefined, {
451
- files: {
452
- path: string;
453
- content: string;
454
- }[];
455
- } | import("@langchain/langgraph").OverwriteValue<{
456
- files: {
457
- path: string;
458
- content: string;
459
- }[];
460
- } | undefined> | undefined, unknown>;
461
- (): import("@langchain/langgraph").LastValue<{
462
- files: {
463
- path: string;
464
- content: string;
465
- }[];
466
- } | undefined>;
467
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
468
- };
469
- validation: {
470
- (annotation: import("@langchain/langgraph").SingleReducer<ValidationReport | undefined, ValidationReport | undefined>): import("@langchain/langgraph").BaseChannel<ValidationReport | undefined, ValidationReport | import("@langchain/langgraph").OverwriteValue<ValidationReport | undefined> | undefined, unknown>;
471
- (): import("@langchain/langgraph").LastValue<ValidationReport | undefined>;
472
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
473
- };
474
- attempts: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
475
- bestSuite: {
476
- (annotation: import("@langchain/langgraph").SingleReducer<{
477
- files: {
478
- path: string;
479
- content: string;
480
- }[];
481
- } | undefined, {
482
- files: {
483
- path: string;
484
- content: string;
485
- }[];
486
- } | undefined>): import("@langchain/langgraph").BaseChannel<{
487
- files: {
488
- path: string;
489
- content: string;
490
- }[];
491
- } | undefined, {
492
- files: {
493
- path: string;
494
- content: string;
495
- }[];
496
- } | import("@langchain/langgraph").OverwriteValue<{
497
- files: {
498
- path: string;
499
- content: string;
500
- }[];
501
- } | undefined> | undefined, unknown>;
502
- (): import("@langchain/langgraph").LastValue<{
503
- files: {
504
- path: string;
505
- content: string;
506
- }[];
507
- } | undefined>;
508
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
509
- };
510
- bestValidation: {
511
- (annotation: import("@langchain/langgraph").SingleReducer<ValidationReport | undefined, ValidationReport | undefined>): import("@langchain/langgraph").BaseChannel<ValidationReport | undefined, ValidationReport | import("@langchain/langgraph").OverwriteValue<ValidationReport | undefined> | undefined, unknown>;
512
- (): import("@langchain/langgraph").LastValue<ValidationReport | undefined>;
513
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
514
- };
515
- bestGreen: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
516
- prevSnapshot: {
517
- (annotation: import("@langchain/langgraph").SingleReducer<ProgressSnapshot | undefined, ProgressSnapshot | undefined>): import("@langchain/langgraph").BaseChannel<ProgressSnapshot | undefined, ProgressSnapshot | import("@langchain/langgraph").OverwriteValue<ProgressSnapshot | undefined> | undefined, unknown>;
518
- (): import("@langchain/langgraph").LastValue<ProgressSnapshot | undefined>;
519
- Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
520
- };
521
- stoppedEarly: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
522
- }, import("@langchain/langgraph").StateDefinition, {
523
- observe: {
524
- study: PageStudy;
525
- };
526
- identifyElements: {
527
- analysis: {
528
- pageSemantics: string;
529
- primaryRefs: string[];
530
- viewSwitchers: string[];
531
- };
532
- };
533
- verifyLocators: {
534
- verified: VerifiedElement[];
535
- };
536
- exploreStates: {
537
- verified?: undefined;
538
- } | {
539
- verified: VerifiedElement[];
540
- };
541
- probeInteractions: {
542
- transitions: Transition[];
543
- };
544
- designTestCases: {
545
- testCases: TestCase[];
546
- };
547
- generateCode: {
548
- suite: {
549
- files: {
550
- path: string;
551
- content: string;
552
- }[];
553
- };
554
- };
555
- validate: {
556
- validation: ValidationReport;
557
- prevSnapshot: ProgressSnapshot;
558
- stoppedEarly: boolean;
559
- bestSuite: {
560
- files: {
561
- path: string;
562
- content: string;
563
- }[];
564
- } | undefined;
565
- bestValidation: ValidationReport;
566
- bestGreen: number;
567
- } | {
568
- validation: ValidationReport;
569
- prevSnapshot: ProgressSnapshot;
570
- stoppedEarly: boolean;
571
- bestSuite?: undefined;
572
- bestValidation?: undefined;
573
- bestGreen?: undefined;
574
- };
575
- repair: {
576
- suite: {
577
- files: {
578
- path: string;
579
- content: string;
580
- }[];
581
- };
582
- attempts: number;
583
- };
584
- }, 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>;
585
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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