@aglyn/plugins-ai 1.14.0 → 1.15.1

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 (131) hide show
  1. package/package.json +17 -17
  2. package/src/lib/components/ai-site-build-page.component.js +5 -3
  3. package/src/lib/components/ai-site-build-page.component.js.map +1 -1
  4. package/src/lib/components/ai-site-import-finish.component.d.ts +3 -1
  5. package/src/lib/components/ai-site-import-finish.component.js +3 -3
  6. package/src/lib/components/ai-site-import-finish.component.js.map +1 -1
  7. package/src/lib/components/ai-site-import-job.component.d.ts +4 -3
  8. package/src/lib/components/ai-site-import-job.component.js +141 -43
  9. package/src/lib/components/ai-site-import-job.component.js.map +1 -1
  10. package/src/lib/components/ai-site-import-plan.component.d.ts +42 -0
  11. package/src/lib/components/ai-site-import-plan.component.js +246 -0
  12. package/src/lib/components/ai-site-import-plan.component.js.map +1 -0
  13. package/src/lib/components/ai-site-import-start.component.d.ts +3 -1
  14. package/src/lib/components/ai-site-import-start.component.js +6 -3
  15. package/src/lib/components/ai-site-import-start.component.js.map +1 -1
  16. package/src/lib/components/ai-site-start-card.component.js +6 -2
  17. package/src/lib/components/ai-site-start-card.component.js.map +1 -1
  18. package/src/lib/components/ai-site-start-steps.component.d.ts +3 -2
  19. package/src/lib/components/ai-site-start-steps.component.js +12 -5
  20. package/src/lib/components/ai-site-start-steps.component.js.map +1 -1
  21. package/src/lib/jobs/ai-job-import-step.d.ts +63 -2
  22. package/src/lib/jobs/ai-job-import-step.js +372 -22
  23. package/src/lib/jobs/ai-job-import-step.js.map +1 -1
  24. package/src/lib/jobs/ai-job-layout-language.js +4 -1
  25. package/src/lib/jobs/ai-job-layout-language.js.map +1 -1
  26. package/src/lib/jobs/ai-job-page-language.d.ts +23 -2
  27. package/src/lib/jobs/ai-job-page-language.js +252 -5
  28. package/src/lib/jobs/ai-job-page-language.js.map +1 -1
  29. package/src/lib/jobs/ai-job-page-step.d.ts +7 -0
  30. package/src/lib/jobs/ai-job-page-step.js +75 -12
  31. package/src/lib/jobs/ai-job-page-step.js.map +1 -1
  32. package/src/lib/jobs/ai-job-plan-step.js +4 -2
  33. package/src/lib/jobs/ai-job-plan-step.js.map +1 -1
  34. package/src/lib/jobs/ai-job-site-look.js +14 -5
  35. package/src/lib/jobs/ai-job-site-look.js.map +1 -1
  36. package/src/lib/jobs/ai-job-text-step.d.ts +11 -2
  37. package/src/lib/jobs/ai-job-text-step.js.map +1 -1
  38. package/src/lib/jobs/ai-jobs.js +2 -1
  39. package/src/lib/jobs/ai-jobs.js.map +1 -1
  40. package/src/lib/jobs/ai-site-import-compile.d.ts +43 -2
  41. package/src/lib/jobs/ai-site-import-compile.js +131 -63
  42. package/src/lib/jobs/ai-site-import-compile.js.map +1 -1
  43. package/src/lib/jobs/ai-site-import-document.d.ts +25 -1
  44. package/src/lib/jobs/ai-site-import-document.js +26 -7
  45. package/src/lib/jobs/ai-site-import-document.js.map +1 -1
  46. package/src/lib/jobs/ai-site-import-honesty.d.ts +65 -0
  47. package/src/lib/jobs/ai-site-import-honesty.js +271 -0
  48. package/src/lib/jobs/ai-site-import-honesty.js.map +1 -0
  49. package/src/lib/jobs/ai-site-import-improve.d.ts +286 -0
  50. package/src/lib/jobs/ai-site-import-improve.js +1281 -0
  51. package/src/lib/jobs/ai-site-import-improve.js.map +1 -0
  52. package/src/lib/jobs/ai-site-import-look.d.ts +4 -0
  53. package/src/lib/jobs/ai-site-import-look.js +16 -6
  54. package/src/lib/jobs/ai-site-import-look.js.map +1 -1
  55. package/src/lib/jobs/ai-site-import-pictures.d.ts +83 -0
  56. package/src/lib/jobs/ai-site-import-pictures.js +261 -0
  57. package/src/lib/jobs/ai-site-import-pictures.js.map +1 -0
  58. package/src/lib/jobs/ai-site-import-plan.d.ts +78 -0
  59. package/src/lib/jobs/ai-site-import-plan.js +627 -0
  60. package/src/lib/jobs/ai-site-import-plan.js.map +1 -0
  61. package/src/lib/jobs/ai-site-import-wording.js +2 -5
  62. package/src/lib/jobs/ai-site-import-wording.js.map +1 -1
  63. package/src/lib/layout-language/ai-layout-compiler.d.ts +6 -0
  64. package/src/lib/layout-language/ai-layout-compiler.js +10 -6
  65. package/src/lib/layout-language/ai-layout-compiler.js.map +1 -1
  66. package/src/lib/layout-language/ai-layout-design.d.ts +9 -0
  67. package/src/lib/layout-language/ai-layout-design.js +29 -3
  68. package/src/lib/layout-language/ai-layout-design.js.map +1 -1
  69. package/src/lib/layout-language/ai-layout-frame-source.d.ts +5 -0
  70. package/src/lib/layout-language/ai-layout-frame-source.js +4 -2
  71. package/src/lib/layout-language/ai-layout-frame-source.js.map +1 -1
  72. package/src/lib/layout-language/ai-layout-frame.d.ts +2 -0
  73. package/src/lib/layout-language/ai-layout-frame.js +20 -12
  74. package/src/lib/layout-language/ai-layout-frame.js.map +1 -1
  75. package/src/lib/layout-language/ai-layout-language.d.ts +8 -0
  76. package/src/lib/layout-language/ai-layout-language.js +7 -3
  77. package/src/lib/layout-language/ai-layout-language.js.map +1 -1
  78. package/src/lib/model/ai-credit-estimate.d.ts +16 -0
  79. package/src/lib/model/ai-credit-estimate.js +14 -0
  80. package/src/lib/model/ai-credit-estimate.js.map +1 -1
  81. package/src/lib/model/ai-site-import-fidelity.d.ts +64 -0
  82. package/src/lib/model/ai-site-import-fidelity.js +380 -0
  83. package/src/lib/model/ai-site-import-fidelity.js.map +1 -1
  84. package/src/lib/model/ai-site-import-ledger.d.ts +82 -0
  85. package/src/lib/model/ai-site-import-ledger.js +254 -0
  86. package/src/lib/model/ai-site-import-ledger.js.map +1 -0
  87. package/src/lib/model/ai-site-import-view.d.ts +113 -7
  88. package/src/lib/model/ai-site-import-view.js +174 -16
  89. package/src/lib/model/ai-site-import-view.js.map +1 -1
  90. package/src/lib/model/ai-site-import.d.ts +253 -3
  91. package/src/lib/model/ai-site-import.js +371 -25
  92. package/src/lib/model/ai-site-import.js.map +1 -1
  93. package/src/lib/model/ai-site-job.js +4 -0
  94. package/src/lib/model/ai-site-job.js.map +1 -1
  95. package/src/lib/model/ai-site-kinds.d.ts +2 -0
  96. package/src/lib/model/ai-site-kinds.js +7 -0
  97. package/src/lib/model/ai-site-kinds.js.map +1 -1
  98. package/src/lib/model/ai-site-look.d.ts +14 -5
  99. package/src/lib/model/ai-site-look.js +22 -16
  100. package/src/lib/model/ai-site-look.js.map +1 -1
  101. package/src/lib/model/ai-site-start.d.ts +37 -7
  102. package/src/lib/model/ai-site-start.js +54 -10
  103. package/src/lib/model/ai-site-start.js.map +1 -1
  104. package/src/lib/model/ai-site-starter-look.d.ts +69 -0
  105. package/src/lib/model/ai-site-starter-look.js +90 -0
  106. package/src/lib/model/ai-site-starter-look.js.map +1 -0
  107. package/src/lib/runtime/ai-doctrine-validators.d.ts +7 -0
  108. package/src/lib/runtime/ai-doctrine-validators.js +3 -2
  109. package/src/lib/runtime/ai-doctrine-validators.js.map +1 -1
  110. package/src/lib/runtime/ai-doctrine.d.ts +10 -0
  111. package/src/lib/runtime/ai-doctrine.js +16 -2
  112. package/src/lib/runtime/ai-doctrine.js.map +1 -1
  113. package/src/lib/server/ai-jobs-resume.js +12 -3
  114. package/src/lib/server/ai-jobs-resume.js.map +1 -1
  115. package/src/lib/server/ai-jobs-route.js +5 -1
  116. package/src/lib/server/ai-jobs-route.js.map +1 -1
  117. package/src/lib/server/ai-site-import-route.d.ts +6 -0
  118. package/src/lib/server/ai-site-import-route.js +8 -1
  119. package/src/lib/server/ai-site-import-route.js.map +1 -1
  120. package/src/lib/site-import/fixtures/site-import-fidelity-replay.d.ts +46 -7
  121. package/src/lib/site-import/fixtures/site-import-fidelity-replay.js +260 -14
  122. package/src/lib/site-import/fixtures/site-import-fidelity-replay.js.map +1 -1
  123. package/src/lib/site-import/fixtures/site-import-improve-answers.d.ts +33 -0
  124. package/src/lib/site-import/fixtures/site-import-improve-answers.js +457 -0
  125. package/src/lib/site-import/fixtures/site-import-improve-answers.js.map +1 -0
  126. package/src/lib/site-import/fixtures/site-layout-recordings.d.ts +29 -0
  127. package/src/lib/site-import/fixtures/site-layout-recordings.js +26 -0
  128. package/src/lib/site-import/fixtures/site-layout-recordings.js.map +1 -1
  129. package/src/lib/site-import/site-import-flag.d.ts +17 -0
  130. package/src/lib/site-import/site-import-flag.js +15 -0
  131. package/src/lib/site-import/site-import-flag.js.map +1 -1
@@ -26,12 +26,14 @@ import { _ as _object_without_properties_loose } from "@swc/helpers/_/_object_wi
26
26
  * answers.
27
27
  */ import { DEFAULT_SITE_THEME } from "@aglyn/aglyn/app-utils/default-site";
28
28
  import { aiImportedPageCheck } from "../../jobs/ai-job-page-language.js";
29
+ import { aiReadImprovedPage, aiSiteImportImproveDestinations, aiSiteImportImproveLedger, aiSiteImportImproveScope, aiSiteImportImprovedPage } from "../../jobs/ai-site-import-improve.js";
29
30
  import { aiSiteImportFrameJob, aiSiteImportHomeOf } from "../../jobs/ai-job-import-step.js";
30
31
  import { aiLayoutSiteBrandOf, aiLayoutSiteFrameOf, aiLayoutSourceFrameBuild } from "../../jobs/ai-job-layout-language.js";
31
32
  import { aiLayoutChecks } from "../../jobs/ai-job-layout-step.js";
32
33
  import { aiSiteImportSectionNames } from "../../jobs/ai-site-import-compile.js";
33
34
  import { AI_LAYOUT_IMPORTED_SECTIONS_INPUT, aiSiteImportDocumentOf } from "../../jobs/ai-site-import-document.js";
34
35
  import { aiSiteImportStyle } from "../../jobs/ai-site-import-look.js";
36
+ import { aiLayoutDesignChoices } from "../../layout-language/ai-layout-design.js";
35
37
  import { aiSiteImportLedger } from "../../model/ai-site-import.js";
36
38
  import { siteImportFidelityThemeOf } from "../../model/ai-site-import-fidelity.js";
37
39
  import { aiSiteTheme } from "../../model/ai-site-look.js";
@@ -40,7 +42,27 @@ import { extractSiteImportPage } from "../site-import-html.js";
40
42
  import { siteImportLayout, siteImportLookOf } from "../site-import-layout.js";
41
43
  import { siteImportFooterColumns, siteImportNavTree } from "../site-import-nav.js";
42
44
  import { siteImportPageRead } from "../site-import-page.js";
43
- import { SITE_LAYOUT_PAGES, siteLayoutRecording, siteLayoutSameSite } from "./site-layout-recordings.js";
45
+ import { SITE_BASIC_PAGES, SITE_LAYOUT_PAGES, siteBasicRecording, siteLayoutRecording, siteLayoutSameSite } from "./site-layout-recordings.js";
46
+ const isBasic = (name)=>name in SITE_BASIC_PAGES;
47
+ /** A page's address, its markup and its stylesheet, and whether an address is its own site's. */ function recordingOf(name) {
48
+ if (!isBasic(name)) return {
49
+ url: SITE_LAYOUT_PAGES[name].url,
50
+ html: siteLayoutRecording(name),
51
+ sheets: [],
52
+ same: siteLayoutSameSite(name)
53
+ };
54
+ const { url } = SITE_BASIC_PAGES[name];
55
+ const { html, css } = siteBasicRecording(name);
56
+ const origin = new URL(url).origin;
57
+ return {
58
+ url,
59
+ html,
60
+ sheets: [
61
+ css
62
+ ],
63
+ same: (address)=>address.origin === origin
64
+ };
65
+ }
44
66
  /** The page's same-site addresses, each a page the import plans: every page a link may go to. */ function plannedLinks(blocks, origin) {
45
67
  const paths = new Set();
46
68
  for (const block of blocks){
@@ -61,8 +83,8 @@ import { SITE_LAYOUT_PAGES, siteLayoutRecording, siteLayoutSameSite } from "./si
61
83
  }));
62
84
  }
63
85
  /** A recorded page as a wave's read keeps it and the import step hands it on: its blocks, its layout, its photos in the library. */ export function siteImportReplayDocument(name) {
64
- const { url } = SITE_LAYOUT_PAGES[name];
65
- return siteImportReplayDocumentOf(siteLayoutRecording(name), url, siteLayoutSameSite(name));
86
+ const { url, html, sheets, same } = recordingOf(name);
87
+ return siteImportReplayDocumentOf(html, url, same, sheets);
66
88
  }
67
89
  /** Any page as a wave's read keeps it, read through its stylesheets (AGL-4152). */ export function siteImportReplayDocumentOf(html, url, sameSite, stylesheets = []) {
68
90
  var _read_blocks;
@@ -127,7 +149,7 @@ import { SITE_LAYOUT_PAGES, siteLayoutRecording, siteLayoutSameSite } from "./si
127
149
  return siteImportReplayBuild(siteImportReplayDocument(name), name === 'home' ? '/' : `/${name}`, name === 'home', options);
128
150
  }
129
151
  /** A page's read built and checked as the page step stores it: `siteImportReplayPage`, for any read (AGL-4152). */ export function siteImportReplayBuild(read, slug, home, options = {}) {
130
- var _options_wording, _options_forms, _options_answer, _ref;
152
+ var _options_wording, _options_forms, _options_seed, _options_answer, _ref;
131
153
  var _result_value;
132
154
  const { layout } = read, rest = _object_without_properties_loose(read, [
133
155
  "layout"
@@ -184,7 +206,7 @@ import { SITE_LAYOUT_PAGES, siteLayoutRecording, siteLayoutSameSite } from "./si
184
206
  },
185
207
  design: {
186
208
  kind: 'business',
187
- seed: 7,
209
+ seed: (_options_seed = options.seed) != null ? _options_seed : 7,
188
210
  home
189
211
  },
190
212
  doc
@@ -213,7 +235,7 @@ import { SITE_LAYOUT_PAGES, siteLayoutRecording, siteLayoutSameSite } from "./si
213
235
  * with the import's seed and no inspiration site, over the platform's
214
236
  * default theme, and is marked as computed from the site style. `finish` is handed to the
215
237
  * look's style as the pass hands it, for the pass that reads it.
216
- */ export function siteImportReplayTheme(name, finish) {
238
+ */ export function siteImportReplayTheme(name, finish, options = {}) {
217
239
  var _ref;
218
240
  var _read_layout;
219
241
  const read = siteImportReplayDocument(name);
@@ -223,10 +245,126 @@ import { SITE_LAYOUT_PAGES, siteLayoutRecording, siteLayoutSameSite } from "./si
223
245
  facts: (_ref = (_read_layout = read.layout) == null ? void 0 : _read_layout.look) != null ? _ref : null
224
246
  }, finish ? {
225
247
  finish
248
+ } : {}, options.generative ? {
249
+ generative: true
226
250
  } : {});
227
251
  const style = aiSiteImportStyle(null, input);
228
252
  return style ? siteImportFidelityThemeOf(aiSiteTheme(style, DEFAULT_SITE_THEME), 'style') : null;
229
253
  }
254
+ /**
255
+ * A site's design seed whose bands run on one ground (AGL-4152), as the 11/5
256
+ * Improve it test drew its pages: what today's build leaves of a page's rhythm
257
+ * on such a site, whatever its answer asks.
258
+ */ export function siteImportReplayOneGroundSeed() {
259
+ for(let seed = 1; seed < 1000; seed += 1){
260
+ if (aiLayoutDesignChoices({
261
+ kind: 'business',
262
+ seed,
263
+ home: true
264
+ }).bandRhythm === 'plain') return seed;
265
+ }
266
+ throw new Error('no seed draws one ground');
267
+ }
268
+ /** The forms the basic sites hold a saved form for. */ const BASIC_FORMS = [
269
+ {
270
+ id: 'form-basic',
271
+ name: 'Contact'
272
+ }
273
+ ];
274
+ /**
275
+ * A recorded redesign built as the page step builds it (AGL-4152): its answer
276
+ * read, its `keep`s expanded, compiled, stored and checked; no model. `design`
277
+ * is the site the page is drawn for; a basic site has one form.
278
+ */ export function siteImportReplayImproved(name, answer, options = {}) {
279
+ var _options_seed, _ref, _options_theme, _ref1;
280
+ var _forms_, _result_value;
281
+ const read = siteImportReplayDocument(name);
282
+ const forms = BASIC_FORMS;
283
+ const doc = _extends({}, read, {
284
+ finish: 'improve',
285
+ wording: 'improved',
286
+ generative: true
287
+ });
288
+ const ledger = aiSiteImportImproveLedger(doc);
289
+ const given = aiReadImprovedPage(answer);
290
+ if (!given) throw new Error(`the recorded answer for ${name} has no section`);
291
+ const formAt = given.findIndex((section)=>section.blocks.some((block)=>block.kind === 'keep' && block.ref.startsWith('form:')));
292
+ const destinations = aiSiteImportImproveDestinations(doc, ledger, {
293
+ sections: given.length,
294
+ formSection: formAt === -1 ? null : formAt
295
+ });
296
+ const design = {
297
+ kind: 'business',
298
+ seed: (_options_seed = options.seed) != null ? _options_seed : 7,
299
+ home: true
300
+ };
301
+ const page = aiSiteImportImprovedPage(given, {
302
+ doc,
303
+ ledger,
304
+ design,
305
+ destinations,
306
+ formId: (_ref = (_forms_ = forms[0]) == null ? void 0 : _forms_.id) != null ? _ref : null,
307
+ theme: (_options_theme = options.theme) != null ? _options_theme : null
308
+ });
309
+ const sectionIds = page.names.map((_, index)=>`sec-${index}`);
310
+ const screen = {
311
+ title: doc.title,
312
+ slug: '/',
313
+ sections: page.names.map((section)=>({
314
+ name: section,
315
+ uses: [],
316
+ items: 0
317
+ }))
318
+ };
319
+ const targets = {
320
+ pageId: 'p0',
321
+ pages: [],
322
+ homeIds: [],
323
+ forms,
324
+ formPageId: null,
325
+ components: [],
326
+ facts: ''
327
+ };
328
+ const result = aiImportedPageCheck({
329
+ screen: screen,
330
+ sectionIds,
331
+ targets: targets,
332
+ context: {
333
+ screenIds: doc.links.map((link)=>link.id),
334
+ formIds: forms.map((form)=>form.id),
335
+ componentIds: [],
336
+ codeBuilt: true
337
+ },
338
+ design,
339
+ doc,
340
+ given: page.given,
341
+ rewritten: page.written
342
+ })(null);
343
+ const nodes = (_ref1 = (_result_value = result.value) == null ? void 0 : _result_value.nodes) != null ? _ref1 : {};
344
+ return {
345
+ doc,
346
+ source: {
347
+ layout: read.layout,
348
+ blocks: read.blocks,
349
+ photos: read.photos
350
+ },
351
+ tree: {
352
+ rootId: '_@_',
353
+ nodes
354
+ },
355
+ violations: result.violations,
356
+ page,
357
+ scope: aiSiteImportImproveScope(doc, null),
358
+ destinations: [
359
+ ...new Set(ledger.links.flatMap((link)=>{
360
+ const to = destinations.get(link.ref);
361
+ return to ? [
362
+ to
363
+ ] : [];
364
+ }))
365
+ ]
366
+ };
367
+ }
230
368
  /**
231
369
  * The design answer recorded for aglyn.com's Home, in the tool's shape: a
232
370
  * split hero, ruled cards, a dark band asked where the source drew its own
@@ -287,8 +425,8 @@ import { SITE_LAYOUT_PAGES, siteLayoutRecording, siteLayoutSameSite } from "./si
287
425
  };
288
426
  const NOW = new Date('2026-10-29T18:00:00.000Z');
289
427
  /** A recorded home page as the crawl keeps it: its menu, footer and look read as the source builds them. */ function crawledHome(name) {
290
- const { url } = SITE_LAYOUT_PAGES[name];
291
- const extract = extractSiteImportPage(siteLayoutRecording(name), url, siteLayoutSameSite(name), {
428
+ const { url, html, sheets, same } = recordingOf(name);
429
+ const extract = extractSiteImportPage(html, url, same, {
292
430
  structure: true
293
431
  });
294
432
  const source = extract;
@@ -301,17 +439,19 @@ const NOW = new Date('2026-10-29T18:00:00.000Z');
301
439
  path: '/',
302
440
  foundBy: 'home',
303
441
  bytes: 0,
304
- nav: siteImportNavTree(source),
305
- footer: siteImportFooterColumns(source),
306
- look: siteImportLookOf(source)
442
+ nav: siteImportNavTree(source, sheets),
443
+ footer: siteImportFooterColumns(source, sheets),
444
+ look: siteImportLookOf(source, sheets)
307
445
  });
308
446
  }
309
447
  /** A site planned for its first wave: Home, and two pages of its own. */ function replayState(name) {
310
- const origin = new URL(SITE_LAYOUT_PAGES[name].url).origin;
448
+ const origin = new URL(recordingOf(name).url).origin;
311
449
  const paths = name === 'home' ? [
312
450
  '/',
313
451
  '/product',
314
452
  '/pricing'
453
+ ] : isBasic(name) ? [
454
+ '/'
315
455
  ] : [
316
456
  '/',
317
457
  '/classes',
@@ -393,6 +533,104 @@ const NOW = new Date('2026-10-29T18:00:00.000Z');
393
533
  }
394
534
  };
395
535
  }
536
+ /**
537
+ * A recorded site as a generative Improve it's plan reads it (AGL-4152): its
538
+ * first wave read, its home page with its blocks and layout, and each page its
539
+ * menu names, its title the menu's label: what the plan may organize.
540
+ */ export function siteImportReplayPlanState(name) {
541
+ var _ref, _doc_layout;
542
+ var _base_home_nav, _base_home;
543
+ const base = replayState(name);
544
+ const doc = siteImportReplayDocument(name);
545
+ const origin = new URL(doc.url).origin;
546
+ const home = base.pages[0];
547
+ const paths = new Set(base.pages.map((page)=>page.path));
548
+ const listed = ((_ref = (_base_home = base.home) == null ? void 0 : (_base_home_nav = _base_home.nav) == null ? void 0 : _base_home_nav.items) != null ? _ref : []).flatMap((group)=>[
549
+ {
550
+ label: group.label,
551
+ href: group.href
552
+ },
553
+ ...group.items.map((entry)=>({
554
+ label: entry.label,
555
+ href: entry.href
556
+ }))
557
+ ]);
558
+ const pages = [
559
+ _extends({}, home, {
560
+ title: doc.title,
561
+ build: 'arranged',
562
+ wording: 'improved',
563
+ read: {
564
+ at: NOW.toISOString(),
565
+ title: doc.title,
566
+ text: '',
567
+ sections: [],
568
+ images: [],
569
+ blocks: doc.blocks,
570
+ words: 300,
571
+ forms: [],
572
+ layout: (_doc_layout = doc.layout) != null ? _doc_layout : null
573
+ }
574
+ })
575
+ ];
576
+ for (const entry of listed){
577
+ let path = '';
578
+ try {
579
+ var _entry_href;
580
+ const url = new URL((_entry_href = entry.href) != null ? _entry_href : '');
581
+ path = url.origin === origin ? url.pathname.replace(/\/+$/, '') || '/' : '';
582
+ } catch (unused) {
583
+ continue;
584
+ }
585
+ if (!path || path === '/' || paths.has(path) && pages.some((page)=>page.path === path)) continue;
586
+ paths.add(path);
587
+ const at = pages.length;
588
+ pages.push({
589
+ slot: `p${at}`,
590
+ url: `${origin}${path}`,
591
+ path,
592
+ title: entry.label,
593
+ group: 'main',
594
+ wave: 1,
595
+ draftId: `draft${at}`,
596
+ slug: path.split('/').filter(Boolean).join('-'),
597
+ words: 300,
598
+ images: 0,
599
+ build: 'arranged',
600
+ wording: 'improved',
601
+ read: {
602
+ at: NOW.toISOString(),
603
+ title: entry.label,
604
+ text: '',
605
+ sections: [],
606
+ images: [],
607
+ blocks: [
608
+ {
609
+ kind: 'heading',
610
+ level: 1,
611
+ text: entry.label,
612
+ region: 'main'
613
+ }
614
+ ],
615
+ words: 300,
616
+ forms: [],
617
+ layout: null
618
+ }
619
+ });
620
+ }
621
+ return _extends({}, base, {
622
+ pages,
623
+ finish: 'improve',
624
+ wording: true,
625
+ generative: true,
626
+ waves: base.waves.map((wave)=>_extends({}, wave, {
627
+ slots: pages.map((page)=>page.slot),
628
+ finish: 'improve',
629
+ wording: true,
630
+ generative: true
631
+ }))
632
+ });
633
+ }
396
634
  /** The pictures a home page's menus show, each once: what the look pass brings in. */ function siteImportMenuPictures(home) {
397
635
  var _ref;
398
636
  var _home_nav;
@@ -406,10 +644,18 @@ const NOW = new Date('2026-10-29T18:00:00.000Z');
406
644
  ...new Set(urls)
407
645
  ];
408
646
  }
409
- /** A recorded home page's header and footer, drawn with no model as the layout step stores them (AGL-4108). */ export function siteImportReplayFrame(name) {
647
+ /** A recorded home page's header and footer, drawn with no model as the layout step stores them (AGL-4108). */ export function siteImportReplayFrame(name, options = {}) {
410
648
  var _frameJob_plan, _ref, _ref1, _ref2, _ref3;
411
649
  var _frameJob_inputs, _state_home, _built_value, _state_home1, _state_home2;
412
- const state = replayState(name);
650
+ const base = options.plan ? _extends({}, siteImportReplayPlanState(name), {
651
+ plan: options.plan,
652
+ planAccepted: true
653
+ }) : replayState(name);
654
+ const state = options.generative ? _extends({}, base, {
655
+ waves: base.waves.map((wave)=>_extends({}, wave, {
656
+ generative: true
657
+ }))
658
+ }) : base;
413
659
  const job = {
414
660
  $id: 'importJob',
415
661
  orgId: 'org-replay',
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../../libs/plugins/ai/src/lib/site-import/fixtures/site-import-fidelity-replay.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The recorded pages brought in again, offline (AGL-4109), for the fidelity\n * spec and the fidelity report: each page of `site-layout/` read by the\n * reader, built by the import's compile and held to its page check as the\n * page step stores it, and each recorded home page's header and footer drawn\n * as the frame step draws them, with no model. Every page the source links\n * on its own site is a page the import plans, as on a whole-site import. No\n * live AI: a design answer here is a recorded one, in the shape the tool\n * answers.\n */\n\nimport { DEFAULT_SITE_THEME } from '@aglyn/aglyn/app-utils/default-site'\nimport { aiImportedPageCheck } from '../../jobs/ai-job-page-language'\nimport { aiSiteImportFrameJob, aiSiteImportHomeOf } from '../../jobs/ai-job-import-step'\nimport { aiLayoutSiteBrandOf, aiLayoutSiteFrameOf, aiLayoutSourceFrameBuild } from '../../jobs/ai-job-layout-language'\nimport { aiLayoutChecks } from '../../jobs/ai-job-layout-step'\nimport { aiSiteImportSectionNames } from '../../jobs/ai-site-import-compile'\nimport { AI_LAYOUT_IMPORTED_SECTIONS_INPUT, aiSiteImportDocumentOf, type AiSiteImportDocument } from '../../jobs/ai-site-import-document'\nimport { aiSiteImportStyle } from '../../jobs/ai-site-import-look'\nimport type { AiLayoutFrameSource } from '../../layout-language/ai-layout-frame-source'\nimport type { AiJob } from '../../model/ai-jobs.types'\nimport {\n aiSiteImportLedger,\n type AiSiteImportFinish,\n type AiSiteImportPage,\n type AiSiteImportState,\n type AiSiteImportWords,\n type SiteImportFooter,\n type SiteImportNavTree,\n} from '../../model/ai-site-import'\nimport { siteImportFidelityThemeOf, type SiteImportFidelitySource, type SiteImportFidelityTheme, type SiteImportFidelityTree } from '../../model/ai-site-import-fidelity'\nimport { aiSiteTheme } from '../../model/ai-site-look'\nimport { emptyAiSiteInventory } from '../../model/ai-site-inventory'\nimport type { SiteImportInventory } from '../site-import-crawl'\nimport { extractSiteImportPage, type SiteImportBlock } from '../site-import-html'\nimport { siteImportLayout, siteImportLookOf } from '../site-import-layout'\nimport { siteImportFooterColumns, siteImportNavTree, type SiteImportFrameSource } from '../site-import-nav'\nimport { siteImportPageRead } from '../site-import-page'\nimport { SITE_LAYOUT_PAGES, siteLayoutRecording, siteLayoutSameSite, type SiteLayoutPageName } from './site-layout-recordings'\n\n/** The page's same-site addresses, each a page the import plans: every page a link may go to. */\nfunction plannedLinks(blocks: readonly SiteImportBlock[], origin: string): Array<{ path: string; id: string }> {\n const paths = new Set<string>()\n for (const block of blocks) {\n if (block.kind !== 'link') continue\n try {\n const url = new URL(block.href)\n const path = url.pathname.replace(/\\/+$/, '') || '/'\n if (url.origin === origin && path !== '/') paths.add(path)\n } catch {\n // Not an address.\n }\n }\n return [...paths].map((path) => ({ path, id: `p${path.replace(/[^a-z0-9]+/gi, '-')}` }))\n}\n\n/** A page's read as the import step hands it on, and what it says it left out for the fidelity (AGL-4152). */\nexport type SiteImportReplayRead = AiSiteImportDocument & { concealed?: { pictures: string[]; words: string[] } }\n\n/** A recorded page as a wave's read keeps it and the import step hands it on: its blocks, its layout, its photos in the library. */\nexport function siteImportReplayDocument(name: SiteLayoutPageName): SiteImportReplayRead {\n const { url } = SITE_LAYOUT_PAGES[name]\n return siteImportReplayDocumentOf(siteLayoutRecording(name), url, siteLayoutSameSite(name))\n}\n\n/** Any page as a wave's read keeps it, read through its stylesheets (AGL-4152). */\nexport function siteImportReplayDocumentOf(html: string, url: string, sameSite: (url: URL) => boolean, stylesheets: readonly string[] = []): SiteImportReplayRead {\n const page = extractSiteImportPage(html, url, sameSite, { structure: true, stylesheets })\n const layout = siteImportLayout(page as Parameters<typeof siteImportLayout>[0], stylesheets)\n const path = new URL(url).pathname\n const read = siteImportPageRead({ ...page, layout, url, path, foundBy: path === '/' ? 'home' : 'sitemap', bytes: 0 } as never, 'now')\n const blocks = read.blocks ?? []\n const origin = new URL(url).origin\n const pictures = [...new Set(blocks.flatMap((block) => (block.kind === 'image' ? [block.url] : [])))]\n return {\n build: 'arranged',\n title: read.title,\n url,\n blocks,\n photos: pictures.map((from, index) => ({ mediaId: `m${index}`, src: `media:host-import/m${index}`, from, width: 1600, height: 900 })),\n links: plannedLinks(blocks, origin),\n origins: [origin, origin.replace('://', '://www.')],\n ...(read.layout ? { layout: read.layout } : {}),\n ...(read.videos?.length ? { videos: read.videos } : {}),\n ...(read.concealed ? { concealed: read.concealed } : {}),\n }\n}\n\n/** A recorded page built as the page step builds it: its source, its stored nodes, and what the page check said. */\nexport interface SiteImportReplayPage {\n doc: AiSiteImportDocument\n source: SiteImportFidelitySource\n tree: SiteImportFidelityTree\n violations: unknown[]\n}\n\n/** A recorded rewrite of one line of a page (AGL-4152, lane G), in the shape `submit_wording` answers: the line's index in the page's blocks, and its new words. */\nexport interface SiteImportReplayRewrite {\n line: number\n text: string\n}\n\n/** How a recorded page is built: its design answer, the site's forms, and how it is finished. */\nexport interface SiteImportReplayOptions {\n answer?: Record<string, unknown> | null\n forms?: Array<{ id: string; name: string }>\n layout?: boolean\n /** Keep my site or Improve it (AGL-4152), on the page's document as its wave stamps it; absent, the document names none. */\n finish?: AiSiteImportFinish\n /** Whether its words are kept or improved (AGL-4152), on its document. */\n words?: AiSiteImportWords\n /** Recorded rewrites of its lines (lane G): the page is built in them, and scored against the words as its source wrote them. */\n wording?: readonly SiteImportReplayRewrite[]\n}\n\n/**\n * A recorded page built and checked as the page step stores it (AGL-4109):\n * with a recorded design `answer`, as a main page is arranged, or with none,\n * as a page is drawn from its layout alone; `forms` are the site's saved\n * forms. `layout: false` builds it as a read with no layout was built, one\n * section at each second-level heading, as the 10/29 import did.\n *\n * `finish` and `words` (AGL-4152) ride the page's document as a wave stamps\n * them, so the compile builds it as that finish asks wherever it reads them;\n * `wording` builds it in recorded rewrites of its lines, while its source\n * keeps the words as written.\n */\nexport function siteImportReplayPage(name: SiteLayoutPageName, options: SiteImportReplayOptions = {}): SiteImportReplayPage {\n return siteImportReplayBuild(siteImportReplayDocument(name), name === 'home' ? '/' : `/${name}`, name === 'home', options)\n}\n\n/** A page's read built and checked as the page step stores it: `siteImportReplayPage`, for any read (AGL-4152). */\nexport function siteImportReplayBuild(read: SiteImportReplayRead, slug: string, home: boolean, options: SiteImportReplayOptions = {}): SiteImportReplayPage {\n const { layout, ...rest } = read\n const rewrites = new Map((options.wording ?? []).map((rewrite) => [rewrite.line, rewrite.text]))\n const finished = { ...(options.finish ? { finish: options.finish } : {}), ...(options.words ? { wording: options.words } : {}) }\n const given = {\n ...(options.layout === false ? rest : read),\n ...finished,\n blocks: read.blocks.map((block, index) => (rewrites.has(index) && block.kind !== 'image' ? { ...block, text: rewrites.get(index) as string } : block)),\n }\n // As the page step reads it: through the job's input, so a fact the reader drops is dropped here too (AGL-4138).\n const parsed = aiSiteImportDocumentOf({ [AI_LAYOUT_IMPORTED_SECTIONS_INPUT]: JSON.parse(JSON.stringify(given)) }) as AiSiteImportDocument\n const doc: AiSiteImportDocument = { ...parsed, ...finished }\n const names = aiSiteImportSectionNames(doc)\n const sectionIds = names.map((_, index) => `sec-${index}`)\n const screen = { title: doc.title, slug, sections: names.map((section) => ({ name: section, uses: [] as string[], items: 0 })) }\n const forms = options.forms ?? []\n const targets = { pageId: 'p0', pages: [], homeIds: [], forms, formPageId: null, components: [], facts: '' }\n const check = aiImportedPageCheck({\n screen: screen as never,\n sectionIds,\n targets: targets as never,\n context: { screenIds: doc.links.map((link) => link.id), formIds: forms.map((form) => form.id), componentIds: [], codeBuilt: true },\n design: { kind: 'business', seed: 7, home } as never,\n doc,\n })\n const result = check(options.answer ?? null)\n const nodes = (result.value?.nodes ?? {}) as unknown as SiteImportFidelityTree['nodes']\n return {\n doc,\n source: { layout: layout as NonNullable<typeof layout>, blocks: read.blocks, photos: read.photos, ...(read.concealed ? { concealed: read.concealed } : {}) },\n tree: { rootId: '_@_', nodes },\n violations: result.violations,\n }\n}\n\n/**\n * The theme a recorded page is drawn in (AGL-4152): no site stores one, so\n * it is computed as the look pass draws it, from the page's own look facts\n * with the import's seed and no inspiration site, over the platform's\n * default theme, and is marked as computed from the site style. `finish` is handed to the\n * look's style as the pass hands it, for the pass that reads it.\n */\nexport function siteImportReplayTheme(name: SiteLayoutPageName, finish?: AiSiteImportFinish): SiteImportFidelityTheme | null {\n const read = siteImportReplayDocument(name)\n const input = { seed: 7, description: read.title, facts: read.layout?.look ?? null, ...(finish ? { finish } : {}) }\n const style = aiSiteImportStyle(null, input as Parameters<typeof aiSiteImportStyle>[1])\n return style ? siteImportFidelityThemeOf(aiSiteTheme(style, DEFAULT_SITE_THEME), 'style') : null\n}\n\n/**\n * The design answer recorded for aglyn.com's Home, in the tool's shape: a\n * split hero, ruled cards, a dark band asked where the source drew its own\n * white, a style of pictures for a group that has none. The compile spec\n * holds the same one.\n */\nexport const SITE_IMPORT_REPLAY_HOME_ANSWER: Readonly<Record<string, unknown>> = {\n sections: [\n { hero: 'split', band: 'source', align: 'start', groups: [] },\n { hero: 'none', band: 'source', align: 'source', groups: [{ kind: 'source', style: 'ruled' }] },\n { hero: 'none', band: 'dark', align: 'source', groups: [] },\n { hero: 'none', band: 'source', align: 'source', groups: [{ kind: 'source', style: 'pictures' }] },\n ],\n}\n\n/**\n * The design answer the 11/5 live import took for aglyn.com's Home (AGL-4152):\n * the editorial hero at the start, on a page whose source centers its words\n * over a picture under them. Keep my site holds the source's own opening\n * whatever this says; Improve it draws what it asks.\n */\nexport const SITE_IMPORT_REPLAY_HOME_ANSWER_1105: Readonly<Record<string, unknown>> = {\n sections: [{ hero: 'editorial', band: 'source', align: 'start', groups: [] }],\n}\n\n/** The recorded home pages a header and footer is drawn from. */\nexport type SiteImportReplayHome = Extract<SiteLayoutPageName, 'home' | 'pottery'>\n\nconst NOW = new Date('2026-10-29T18:00:00.000Z')\n\n/** A recorded home page as the crawl keeps it: its menu, footer and look read as the source builds them. */\nfunction crawledHome(name: SiteImportReplayHome): SiteImportInventory['pages'][number] {\n const { url } = SITE_LAYOUT_PAGES[name]\n const extract = extractSiteImportPage(siteLayoutRecording(name), url, siteLayoutSameSite(name), { structure: true })\n const source = extract as SiteImportFrameSource\n const { structure: _structure, loginForm: _loginForm, ...rest } = extract\n return { ...rest, url, path: '/', foundBy: 'home', bytes: 0, nav: siteImportNavTree(source), footer: siteImportFooterColumns(source), look: siteImportLookOf(source) }\n}\n\n/** A site planned for its first wave: Home, and two pages of its own. */\nfunction replayState(name: SiteImportReplayHome): AiSiteImportState {\n const origin = new URL(SITE_LAYOUT_PAGES[name].url).origin\n const paths = name === 'home' ? ['/', '/product', '/pricing'] : ['/', '/classes', '/gallery']\n const home = aiSiteImportHomeOf({ pages: [crawledHome(name)] })\n const pages: AiSiteImportPage[] = paths.map((path, index) => {\n const slug = path === '/' ? '/' : (path.split('/').filter(Boolean).pop() as string)\n return { slot: `p${index}`, url: `${origin}${path}`, path, title: slug, group: 'main', wave: 1, draftId: `draft${index}`, slug, words: 300, images: 0 }\n })\n return {\n domain: new URL(origin).hostname.replace(/^www\\./, ''),\n siteName: 'import-check',\n ownership: { method: 'dns', provenAt: 1, detail: null },\n readAt: NOW.toISOString(),\n pageLimit: null,\n existingPages: 0,\n found: pages.length,\n stoppedBy: null,\n groups: [],\n pages,\n waves: [{ index: 1, label: 'Wave 1', group: 'main', slots: pages.map((page) => page.slot), frame: true, status: 'running', startedAt: NOW.toISOString(), finishedAt: null }],\n leftOut: [],\n leftOutCount: {},\n frame: { draftId: 'frameDraft' },\n home,\n look: {\n at: NOW.toISOString(),\n theme: 'applied',\n colors: [],\n logo: name === 'home' ? { mediaId: 'm1', src: 'media:host-import/m1', width: 632, height: 192 } : null,\n // The menus' pictures, in the library as the look pass brings them in (AGL-4139).\n pictures: siteImportMenuPictures(home).map((from, index) => ({ mediaId: `mp${index}`, src: `media:host-import/mp${index}`, from, width: 1200, height: 750 })),\n seo: true,\n seed: 7,\n },\n }\n}\n\n/** The pictures a home page's menus show, each once: what the look pass brings in. */\nfunction siteImportMenuPictures(home: AiSiteImportState['home']): string[] {\n const urls = (home?.nav?.items ?? []).flatMap((group) => (group.columns ?? []).flatMap((column) => (column.image ? [column.image.url] : [])))\n return [...new Set(urls)]\n}\n\n/** A recorded home page's header and footer as the frame step draws them: the source's menu and footer, the stored nodes, the check's word. */\nexport interface SiteImportReplayFrame {\n nav: SiteImportNavTree | null\n footer: SiteImportFooter | null\n tree: SiteImportFidelityTree\n violations: unknown[]\n}\n\n/** A recorded home page's header and footer, drawn with no model as the layout step stores them (AGL-4108). */\nexport function siteImportReplayFrame(name: SiteImportReplayHome): SiteImportReplayFrame {\n const state = replayState(name)\n const job = {\n $id: 'importJob',\n orgId: 'org-replay',\n hostId: 'host-replay',\n kind: 'import',\n status: 'running',\n brief: `Bring in ${state.domain}`,\n inputs: { domain: state.domain },\n steps: [],\n outputs: [],\n createdBy: 'uid-replay',\n createdAt: NOW,\n updatedAt: NOW,\n expiresAt: NOW,\n } as unknown as AiJob\n const frameJob = aiSiteImportFrameJob(job, state, state.waves[0] as AiSiteImportState['waves'][number], aiSiteImportLedger(state))\n const home = state.pages[0] as AiSiteImportPage\n const built = aiLayoutSourceFrameBuild({\n siteName: String(frameJob.inputs?.['businessName']),\n homeId: home.draftId,\n pages: [{ id: home.draftId, label: 'Home', slug: '/' }],\n targets: { pageId: null, pages: [], homeIds: [home.draftId], forms: [], formPageId: null, components: [], facts: '' } as never,\n extend: aiLayoutChecks(emptyAiSiteInventory('host-replay'), frameJob.plan ?? null, [frameJob.brief, ...(state.home?.facts.lines ?? [])].join('\\n')),\n brand: aiLayoutSiteBrandOf(frameJob.inputs),\n source: aiLayoutSiteFrameOf(frameJob.inputs) as AiLayoutFrameSource,\n })\n const nodes = (built.value?.nodes ?? {}) as unknown as SiteImportFidelityTree['nodes']\n return { nav: state.home?.nav ?? null, footer: state.home?.footer ?? null, tree: { rootId: '_@_', nodes }, violations: built.violations }\n}\n"],"names":["DEFAULT_SITE_THEME","aiImportedPageCheck","aiSiteImportFrameJob","aiSiteImportHomeOf","aiLayoutSiteBrandOf","aiLayoutSiteFrameOf","aiLayoutSourceFrameBuild","aiLayoutChecks","aiSiteImportSectionNames","AI_LAYOUT_IMPORTED_SECTIONS_INPUT","aiSiteImportDocumentOf","aiSiteImportStyle","aiSiteImportLedger","siteImportFidelityThemeOf","aiSiteTheme","emptyAiSiteInventory","extractSiteImportPage","siteImportLayout","siteImportLookOf","siteImportFooterColumns","siteImportNavTree","siteImportPageRead","SITE_LAYOUT_PAGES","siteLayoutRecording","siteLayoutSameSite","plannedLinks","blocks","origin","paths","Set","block","kind","url","URL","href","path","pathname","replace","add","map","id","siteImportReplayDocument","name","siteImportReplayDocumentOf","html","sameSite","stylesheets","read","page","structure","layout","foundBy","bytes","pictures","flatMap","build","title","photos","from","index","mediaId","src","width","height","links","origins","videos","length","concealed","siteImportReplayPage","options","siteImportReplayBuild","slug","home","result","rest","rewrites","Map","wording","rewrite","line","text","finished","finish","words","given","has","get","parsed","JSON","parse","stringify","doc","names","sectionIds","_","screen","sections","section","uses","items","forms","targets","pageId","pages","homeIds","formPageId","components","facts","check","context","screenIds","link","formIds","form","componentIds","codeBuilt","design","seed","answer","nodes","value","source","tree","rootId","violations","siteImportReplayTheme","input","description","look","style","SITE_IMPORT_REPLAY_HOME_ANSWER","hero","band","align","groups","SITE_IMPORT_REPLAY_HOME_ANSWER_1105","NOW","Date","crawledHome","extract","_structure","loginForm","_loginForm","nav","footer","replayState","split","filter","Boolean","pop","slot","group","wave","draftId","images","domain","hostname","siteName","ownership","method","provenAt","detail","readAt","toISOString","pageLimit","existingPages","found","stoppedBy","waves","label","slots","frame","status","startedAt","finishedAt","leftOut","leftOutCount","at","theme","colors","logo","siteImportMenuPictures","seo","urls","columns","column","image","siteImportReplayFrame","frameJob","state","built","job","$id","orgId","hostId","brief","inputs","steps","outputs","createdBy","createdAt","updatedAt","expiresAt","String","homeId","extend","plan","lines","join","brand"],"mappings":";;AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;CASC,GAED,SAASA,kBAAkB,QAAQ,sCAAqC;AACxE,SAASC,mBAAmB,QAAQ,qCAAiC;AACrE,SAASC,oBAAoB,EAAEC,kBAAkB,QAAQ,mCAA+B;AACxF,SAASC,mBAAmB,EAAEC,mBAAmB,EAAEC,wBAAwB,QAAQ,uCAAmC;AACtH,SAASC,cAAc,QAAQ,mCAA+B;AAC9D,SAASC,wBAAwB,QAAQ,uCAAmC;AAC5E,SAASC,iCAAiC,EAAEC,sBAAsB,QAAmC,wCAAoC;AACzI,SAASC,iBAAiB,QAAQ,oCAAgC;AAGlE,SACEC,kBAAkB,QAOb,gCAA4B;AACnC,SAASC,yBAAyB,QAAkG,yCAAqC;AACzK,SAASC,WAAW,QAAQ,8BAA0B;AACtD,SAASC,oBAAoB,QAAQ,mCAA+B;AAEpE,SAASC,qBAAqB,QAA8B,yBAAqB;AACjF,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,2BAAuB;AAC1E,SAASC,uBAAuB,EAAEC,iBAAiB,QAAoC,wBAAoB;AAC3G,SAASC,kBAAkB,QAAQ,y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,KAAK,CAAC,EAAE;IAC3B,MAAMuF,QAAQzL,yBAAyB;QACrCwJ,UAAU8C,QAAOf,mBAAAA,SAASQ,MAAM,qBAAfR,gBAAiB,CAAC,eAAe;QAClDgB,QAAQpI,KAAKiF,OAAO;QACpBlD,OAAO;YAAC;gBAAEhE,IAAIiC,KAAKiF,OAAO;gBAAEgB,OAAO;gBAAQlG,MAAM;YAAI;SAAE;QACvD8B,SAAS;YAAEC,QAAQ;YAAMC,OAAO,EAAE;YAAEC,SAAS;gBAAChC,KAAKiF,OAAO;aAAC;YAAErD,OAAO,EAAE;YAAEK,YAAY;YAAMC,YAAY,EAAE;YAAEC,OAAO;QAAG;QACpHkG,QAAQvM,eAAeQ,qBAAqB,iBAAgB8K,iBAAAA,SAASkB,IAAI,YAAblB,iBAAiB,MAAM;YAACA,SAASO,KAAK;wBAAMN,cAAAA,MAAMrH,IAAI,qBAAVqH,YAAYlF,KAAK,CAACoG,KAAK,mBAAI,EAAE;SAAE,CAACC,IAAI,CAAC;QAC7IC,OAAO9M,oBAAoByL,SAASQ,MAAM;QAC1C3E,QAAQrH,oBAAoBwL,SAASQ,MAAM;IAC7C;IACA,MAAM7E,kBAASuE,eAAAA,MAAMtE,KAAK,qBAAXsE,aAAavE,KAAK,oBAAI,CAAC;IACtC,OAAO;QAAEwB,GAAG,YAAE8C,eAAAA,MAAMrH,IAAI,qBAAVqH,aAAY9C,GAAG,oBAAI;QAAMC,MAAM,YAAE6C,eAAAA,MAAMrH,IAAI,qBAAVqH,aAAY7C,MAAM,oBAAI;QAAMtB,MAAM;YAAEC,QAAQ;YAAOJ;QAAM;QAAGK,YAAYkE,MAAMlE,UAAU;IAAC;AAC1I"}
1
+ {"version":3,"sources":["../../../../../../../../libs/plugins/ai/src/lib/site-import/fixtures/site-import-fidelity-replay.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * The recorded pages brought in again, offline (AGL-4109), for the fidelity\n * spec and the fidelity report: each page of `site-layout/` read by the\n * reader, built by the import's compile and held to its page check as the\n * page step stores it, and each recorded home page's header and footer drawn\n * as the frame step draws them, with no model. Every page the source links\n * on its own site is a page the import plans, as on a whole-site import. No\n * live AI: a design answer here is a recorded one, in the shape the tool\n * answers.\n */\n\nimport { DEFAULT_SITE_THEME } from '@aglyn/aglyn/app-utils/default-site'\nimport { aiImportedPageCheck } from '../../jobs/ai-job-page-language'\nimport { aiReadImprovedPage, aiSiteImportImproveDestinations, aiSiteImportImproveLedger, aiSiteImportImproveScope, aiSiteImportImprovedPage, type AiSiteImportImprovedPage } from '../../jobs/ai-site-import-improve'\nimport { aiSiteImportFrameJob, aiSiteImportHomeOf } from '../../jobs/ai-job-import-step'\nimport { aiLayoutSiteBrandOf, aiLayoutSiteFrameOf, aiLayoutSourceFrameBuild } from '../../jobs/ai-job-layout-language'\nimport { aiLayoutChecks } from '../../jobs/ai-job-layout-step'\nimport { aiSiteImportSectionNames } from '../../jobs/ai-site-import-compile'\nimport { AI_LAYOUT_IMPORTED_SECTIONS_INPUT, aiSiteImportDocumentOf, type AiSiteImportDocument } from '../../jobs/ai-site-import-document'\nimport { aiSiteImportStyle } from '../../jobs/ai-site-import-look'\nimport { aiLayoutDesignChoices } from '../../layout-language/ai-layout-design'\nimport type { AiLayoutFrameSource } from '../../layout-language/ai-layout-frame-source'\nimport type { AiJob } from '../../model/ai-jobs.types'\nimport {\n aiSiteImportLedger,\n type AiSiteImportFinish,\n type AiSiteImportPage,\n type AiSiteImportPlan,\n type AiSiteImportState,\n type AiSiteImportWords,\n type SiteImportFooter,\n type SiteImportNavTree,\n} from '../../model/ai-site-import'\nimport { siteImportFidelityThemeOf, type SiteImportFidelitySource, type SiteImportFidelityTheme, type SiteImportFidelityTree } from '../../model/ai-site-import-fidelity'\nimport { aiSiteTheme } from '../../model/ai-site-look'\nimport { emptyAiSiteInventory } from '../../model/ai-site-inventory'\nimport type { SiteImportInventory } from '../site-import-crawl'\nimport { extractSiteImportPage, type SiteImportBlock } from '../site-import-html'\nimport { siteImportLayout, siteImportLookOf } from '../site-import-layout'\nimport { siteImportFooterColumns, siteImportNavTree, type SiteImportFrameSource } from '../site-import-nav'\nimport { siteImportPageRead } from '../site-import-page'\nimport { SITE_BASIC_PAGES, SITE_LAYOUT_PAGES, siteBasicRecording, siteLayoutRecording, siteLayoutSameSite, type SiteBasicPageName, type SiteLayoutPageName } from './site-layout-recordings'\n\n/** A page the replay reads: one of the recorded pages, or a basic site that does not exist (AGL-4152). */\nexport type SiteImportReplayName = SiteLayoutPageName | SiteBasicPageName\n\nconst isBasic = (name: SiteImportReplayName): name is SiteBasicPageName => name in SITE_BASIC_PAGES\n\n/** A page's address, its markup and its stylesheet, and whether an address is its own site's. */\nfunction recordingOf(name: SiteImportReplayName): { url: string; html: string; sheets: string[]; same: (url: URL) => boolean } {\n if (!isBasic(name)) return { url: SITE_LAYOUT_PAGES[name].url, html: siteLayoutRecording(name), sheets: [], same: siteLayoutSameSite(name) }\n const { url } = SITE_BASIC_PAGES[name]\n const { html, css } = siteBasicRecording(name)\n const origin = new URL(url).origin\n return { url, html, sheets: [css], same: (address) => address.origin === origin }\n}\n\n/** The page's same-site addresses, each a page the import plans: every page a link may go to. */\nfunction plannedLinks(blocks: readonly SiteImportBlock[], origin: string): Array<{ path: string; id: string }> {\n const paths = new Set<string>()\n for (const block of blocks) {\n if (block.kind !== 'link') continue\n try {\n const url = new URL(block.href)\n const path = url.pathname.replace(/\\/+$/, '') || '/'\n if (url.origin === origin && path !== '/') paths.add(path)\n } catch {\n // Not an address.\n }\n }\n return [...paths].map((path) => ({ path, id: `p${path.replace(/[^a-z0-9]+/gi, '-')}` }))\n}\n\n/** A page's read as the import step hands it on, and what it says it left out for the fidelity (AGL-4152). */\nexport type SiteImportReplayRead = AiSiteImportDocument & { concealed?: { pictures: string[]; words: string[] } }\n\n/** A recorded page as a wave's read keeps it and the import step hands it on: its blocks, its layout, its photos in the library. */\nexport function siteImportReplayDocument(name: SiteImportReplayName): SiteImportReplayRead {\n const { url, html, sheets, same } = recordingOf(name)\n return siteImportReplayDocumentOf(html, url, same, sheets)\n}\n\n/** Any page as a wave's read keeps it, read through its stylesheets (AGL-4152). */\nexport function siteImportReplayDocumentOf(html: string, url: string, sameSite: (url: URL) => boolean, stylesheets: readonly string[] = []): SiteImportReplayRead {\n const page = extractSiteImportPage(html, url, sameSite, { structure: true, stylesheets })\n const layout = siteImportLayout(page as Parameters<typeof siteImportLayout>[0], stylesheets)\n const path = new URL(url).pathname\n const read = siteImportPageRead({ ...page, layout, url, path, foundBy: path === '/' ? 'home' : 'sitemap', bytes: 0 } as never, 'now')\n const blocks = read.blocks ?? []\n const origin = new URL(url).origin\n const pictures = [...new Set(blocks.flatMap((block) => (block.kind === 'image' ? [block.url] : [])))]\n return {\n build: 'arranged',\n title: read.title,\n url,\n blocks,\n photos: pictures.map((from, index) => ({ mediaId: `m${index}`, src: `media:host-import/m${index}`, from, width: 1600, height: 900 })),\n links: plannedLinks(blocks, origin),\n origins: [origin, origin.replace('://', '://www.')],\n ...(read.layout ? { layout: read.layout } : {}),\n ...(read.videos?.length ? { videos: read.videos } : {}),\n ...(read.concealed ? { concealed: read.concealed } : {}),\n }\n}\n\n/** A recorded page built as the page step builds it: its source, its stored nodes, and what the page check said. */\nexport interface SiteImportReplayPage {\n doc: AiSiteImportDocument\n source: SiteImportFidelitySource\n tree: SiteImportFidelityTree\n violations: unknown[]\n}\n\n/** A recorded rewrite of one line of a page (AGL-4152, lane G), in the shape `submit_wording` answers: the line's index in the page's blocks, and its new words. */\nexport interface SiteImportReplayRewrite {\n line: number\n text: string\n}\n\n/** How a recorded page is built: its design answer, the site's forms, and how it is finished. */\nexport interface SiteImportReplayOptions {\n answer?: Record<string, unknown> | null\n forms?: Array<{ id: string; name: string }>\n layout?: boolean\n /** Keep my site or Improve it (AGL-4152), on the page's document as its wave stamps it; absent, the document names none. */\n finish?: AiSiteImportFinish\n /** Whether its words are kept or improved (AGL-4152), on its document. */\n words?: AiSiteImportWords\n /** Recorded rewrites of its lines (lane G): the page is built in them, and scored against the words as its source wrote them. */\n wording?: readonly SiteImportReplayRewrite[]\n /** The site's design seed; absent, one kept the same in every report. */\n seed?: number\n}\n\n/**\n * A recorded page built and checked as the page step stores it (AGL-4109):\n * with a recorded design `answer`, as a main page is arranged, or with none,\n * as a page is drawn from its layout alone; `forms` are the site's saved\n * forms. `layout: false` builds it as a read with no layout was built, one\n * section at each second-level heading, as the 10/29 import did.\n *\n * `finish` and `words` (AGL-4152) ride the page's document as a wave stamps\n * them, so the compile builds it as that finish asks wherever it reads them;\n * `wording` builds it in recorded rewrites of its lines, while its source\n * keeps the words as written.\n */\nexport function siteImportReplayPage(name: SiteImportReplayName, options: SiteImportReplayOptions = {}): SiteImportReplayPage {\n return siteImportReplayBuild(siteImportReplayDocument(name), name === 'home' ? '/' : `/${name}`, name === 'home', options)\n}\n\n/** A page's read built and checked as the page step stores it: `siteImportReplayPage`, for any read (AGL-4152). */\nexport function siteImportReplayBuild(read: SiteImportReplayRead, slug: string, home: boolean, options: SiteImportReplayOptions = {}): SiteImportReplayPage {\n const { layout, ...rest } = read\n const rewrites = new Map((options.wording ?? []).map((rewrite) => [rewrite.line, rewrite.text]))\n const finished = { ...(options.finish ? { finish: options.finish } : {}), ...(options.words ? { wording: options.words } : {}) }\n const given = {\n ...(options.layout === false ? rest : read),\n ...finished,\n blocks: read.blocks.map((block, index) => (rewrites.has(index) && block.kind !== 'image' ? { ...block, text: rewrites.get(index) as string } : block)),\n }\n // As the page step reads it: through the job's input, so a fact the reader drops is dropped here too (AGL-4138).\n const parsed = aiSiteImportDocumentOf({ [AI_LAYOUT_IMPORTED_SECTIONS_INPUT]: JSON.parse(JSON.stringify(given)) }) as AiSiteImportDocument\n const doc: AiSiteImportDocument = { ...parsed, ...finished }\n const names = aiSiteImportSectionNames(doc)\n const sectionIds = names.map((_, index) => `sec-${index}`)\n const screen = { title: doc.title, slug, sections: names.map((section) => ({ name: section, uses: [] as string[], items: 0 })) }\n const forms = options.forms ?? []\n const targets = { pageId: 'p0', pages: [], homeIds: [], forms, formPageId: null, components: [], facts: '' }\n const check = aiImportedPageCheck({\n screen: screen as never,\n sectionIds,\n targets: targets as never,\n context: { screenIds: doc.links.map((link) => link.id), formIds: forms.map((form) => form.id), componentIds: [], codeBuilt: true },\n design: { kind: 'business', seed: options.seed ?? 7, home } as never,\n doc,\n })\n const result = check(options.answer ?? null)\n const nodes = (result.value?.nodes ?? {}) as unknown as SiteImportFidelityTree['nodes']\n return {\n doc,\n source: { layout: layout as NonNullable<typeof layout>, blocks: read.blocks, photos: read.photos, ...(read.concealed ? { concealed: read.concealed } : {}) },\n tree: { rootId: '_@_', nodes },\n violations: result.violations,\n }\n}\n\n/**\n * The theme a recorded page is drawn in (AGL-4152): no site stores one, so\n * it is computed as the look pass draws it, from the page's own look facts\n * with the import's seed and no inspiration site, over the platform's\n * default theme, and is marked as computed from the site style. `finish` is handed to the\n * look's style as the pass hands it, for the pass that reads it.\n */\nexport function siteImportReplayTheme(name: SiteImportReplayName, finish?: AiSiteImportFinish, options: { generative?: boolean } = {}): SiteImportFidelityTheme | null {\n const read = siteImportReplayDocument(name)\n const input = { seed: 7, description: read.title, facts: read.layout?.look ?? null, ...(finish ? { finish } : {}), ...(options.generative ? { generative: true } : {}) }\n const style = aiSiteImportStyle(null, input as Parameters<typeof aiSiteImportStyle>[1])\n return style ? siteImportFidelityThemeOf(aiSiteTheme(style, DEFAULT_SITE_THEME), 'style') : null\n}\n\n/**\n * A site's design seed whose bands run on one ground (AGL-4152), as the 11/5\n * Improve it test drew its pages: what today's build leaves of a page's rhythm\n * on such a site, whatever its answer asks.\n */\nexport function siteImportReplayOneGroundSeed(): number {\n for (let seed = 1; seed < 1_000; seed += 1) {\n if (aiLayoutDesignChoices({ kind: 'business', seed, home: true }).bandRhythm === 'plain') return seed\n }\n throw new Error('no seed draws one ground')\n}\n\n/** A basic site's page as a recorded `submit_improved_page` answer draws it (AGL-4152), with what the code that keeps it reads. */\nexport interface SiteImportReplayImproved extends SiteImportReplayPage {\n page: AiSiteImportImprovedPage\n /** Every line the facts may come from. */\n scope: string[]\n /** Every destination the source's links have here. */\n destinations: string[]\n}\n\n/** The forms the basic sites hold a saved form for. */\nconst BASIC_FORMS = [{ id: 'form-basic', name: 'Contact' }]\n\n/**\n * A recorded redesign built as the page step builds it (AGL-4152): its answer\n * read, its `keep`s expanded, compiled, stored and checked; no model. `design`\n * is the site the page is drawn for; a basic site has one form.\n */\nexport function siteImportReplayImproved(name: SiteImportReplayName, answer: unknown, options: { seed?: number; theme?: SiteImportFidelityTheme | null } = {}): SiteImportReplayImproved {\n const read = siteImportReplayDocument(name)\n const forms = BASIC_FORMS\n const doc: AiSiteImportDocument = { ...read, finish: 'improve', wording: 'improved', generative: true }\n const ledger = aiSiteImportImproveLedger(doc)\n const given = aiReadImprovedPage(answer)\n if (!given) throw new Error(`the recorded answer for ${name} has no section`)\n const formAt = given.findIndex((section) => section.blocks.some((block) => block.kind === 'keep' && block.ref.startsWith('form:')))\n const destinations = aiSiteImportImproveDestinations(doc, ledger, { sections: given.length, formSection: formAt === -1 ? null : formAt })\n const design = { kind: 'business', seed: options.seed ?? 7, home: true } as never\n const page = aiSiteImportImprovedPage(given, { doc, ledger, design, destinations, formId: forms[0]?.id ?? null, theme: options.theme ?? null })\n const sectionIds = page.names.map((_, index) => `sec-${index}`)\n const screen = { title: doc.title, slug: '/', sections: page.names.map((section) => ({ name: section, uses: [] as string[], items: 0 })) }\n const targets = { pageId: 'p0', pages: [], homeIds: [], forms, formPageId: null, components: [], facts: '' }\n const result = aiImportedPageCheck({\n screen: screen as never,\n sectionIds,\n targets: targets as never,\n context: { screenIds: doc.links.map((link) => link.id), formIds: forms.map((form) => form.id), componentIds: [], codeBuilt: true },\n design,\n doc,\n given: page.given,\n rewritten: page.written,\n })(null)\n const nodes = (result.value?.nodes ?? {}) as unknown as SiteImportFidelityTree['nodes']\n return {\n doc,\n source: { layout: read.layout as NonNullable<typeof read.layout>, blocks: read.blocks, photos: read.photos },\n tree: { rootId: '_@_', nodes },\n violations: result.violations,\n page,\n scope: aiSiteImportImproveScope(doc, null),\n destinations: [...new Set(ledger.links.flatMap((link) => {\n const to = destinations.get(link.ref)\n return to ? [to] : []\n }))],\n }\n}\n\n/**\n * The design answer recorded for aglyn.com's Home, in the tool's shape: a\n * split hero, ruled cards, a dark band asked where the source drew its own\n * white, a style of pictures for a group that has none. The compile spec\n * holds the same one.\n */\nexport const SITE_IMPORT_REPLAY_HOME_ANSWER: Readonly<Record<string, unknown>> = {\n sections: [\n { hero: 'split', band: 'source', align: 'start', groups: [] },\n { hero: 'none', band: 'source', align: 'source', groups: [{ kind: 'source', style: 'ruled' }] },\n { hero: 'none', band: 'dark', align: 'source', groups: [] },\n { hero: 'none', band: 'source', align: 'source', groups: [{ kind: 'source', style: 'pictures' }] },\n ],\n}\n\n/**\n * The design answer the 11/5 live import took for aglyn.com's Home (AGL-4152):\n * the editorial hero at the start, on a page whose source centers its words\n * over a picture under them. Keep my site holds the source's own opening\n * whatever this says; Improve it draws what it asks.\n */\nexport const SITE_IMPORT_REPLAY_HOME_ANSWER_1105: Readonly<Record<string, unknown>> = {\n sections: [{ hero: 'editorial', band: 'source', align: 'start', groups: [] }],\n}\n\n/** The recorded home pages a header and footer is drawn from. */\nexport type SiteImportReplayHome = Extract<SiteLayoutPageName, 'home' | 'pottery'> | SiteBasicPageName\n\nconst NOW = new Date('2026-10-29T18:00:00.000Z')\n\n/** A recorded home page as the crawl keeps it: its menu, footer and look read as the source builds them. */\nfunction crawledHome(name: SiteImportReplayHome): SiteImportInventory['pages'][number] {\n const { url, html, sheets, same } = recordingOf(name)\n const extract = extractSiteImportPage(html, url, same, { structure: true })\n const source = extract as SiteImportFrameSource\n const { structure: _structure, loginForm: _loginForm, ...rest } = extract\n return { ...rest, url, path: '/', foundBy: 'home', bytes: 0, nav: siteImportNavTree(source, sheets), footer: siteImportFooterColumns(source, sheets), look: siteImportLookOf(source, sheets) }\n}\n\n/** A site planned for its first wave: Home, and two pages of its own. */\nfunction replayState(name: SiteImportReplayHome): AiSiteImportState {\n const origin = new URL(recordingOf(name).url).origin\n const paths = name === 'home' ? ['/', '/product', '/pricing'] : isBasic(name) ? ['/'] : ['/', '/classes', '/gallery']\n const home = aiSiteImportHomeOf({ pages: [crawledHome(name)] })\n const pages: AiSiteImportPage[] = paths.map((path, index) => {\n const slug = path === '/' ? '/' : (path.split('/').filter(Boolean).pop() as string)\n return { slot: `p${index}`, url: `${origin}${path}`, path, title: slug, group: 'main', wave: 1, draftId: `draft${index}`, slug, words: 300, images: 0 }\n })\n return {\n domain: new URL(origin).hostname.replace(/^www\\./, ''),\n siteName: 'import-check',\n ownership: { method: 'dns', provenAt: 1, detail: null },\n readAt: NOW.toISOString(),\n pageLimit: null,\n existingPages: 0,\n found: pages.length,\n stoppedBy: null,\n groups: [],\n pages,\n waves: [{ index: 1, label: 'Wave 1', group: 'main', slots: pages.map((page) => page.slot), frame: true, status: 'running', startedAt: NOW.toISOString(), finishedAt: null }],\n leftOut: [],\n leftOutCount: {},\n frame: { draftId: 'frameDraft' },\n home,\n look: {\n at: NOW.toISOString(),\n theme: 'applied',\n colors: [],\n logo: name === 'home' ? { mediaId: 'm1', src: 'media:host-import/m1', width: 632, height: 192 } : null,\n // The menus' pictures, in the library as the look pass brings them in (AGL-4139).\n pictures: siteImportMenuPictures(home).map((from, index) => ({ mediaId: `mp${index}`, src: `media:host-import/mp${index}`, from, width: 1200, height: 750 })),\n seo: true,\n seed: 7,\n },\n }\n}\n\n/**\n * A recorded site as a generative Improve it's plan reads it (AGL-4152): its\n * first wave read, its home page with its blocks and layout, and each page its\n * menu names, its title the menu's label: what the plan may organize.\n */\nexport function siteImportReplayPlanState(name: SiteImportReplayHome): AiSiteImportState {\n const base = replayState(name)\n const doc = siteImportReplayDocument(name)\n const origin = new URL(doc.url).origin\n const home = base.pages[0] as AiSiteImportPage\n const paths = new Set(base.pages.map((page) => page.path))\n const listed = (base.home?.nav?.items ?? []).flatMap((group) => [{ label: group.label, href: group.href }, ...group.items.map((entry) => ({ label: entry.label, href: entry.href }))])\n const pages: AiSiteImportPage[] = [{ ...home, title: doc.title, build: 'arranged', wording: 'improved', read: { at: NOW.toISOString(), title: doc.title, text: '', sections: [], images: [], blocks: doc.blocks, words: 300, forms: [], layout: doc.layout ?? null } }]\n for (const entry of listed) {\n let path = ''\n try {\n const url = new URL(entry.href ?? '')\n path = url.origin === origin ? url.pathname.replace(/\\/+$/, '') || '/' : ''\n } catch {\n continue\n }\n if (!path || path === '/' || paths.has(path) && pages.some((page) => page.path === path)) continue\n paths.add(path)\n const at = pages.length\n pages.push({ slot: `p${at}`, url: `${origin}${path}`, path, title: entry.label, group: 'main', wave: 1, draftId: `draft${at}`, slug: path.split('/').filter(Boolean).join('-'), words: 300, images: 0, build: 'arranged', wording: 'improved', read: { at: NOW.toISOString(), title: entry.label, text: '', sections: [], images: [], blocks: [{ kind: 'heading', level: 1, text: entry.label, region: 'main' }], words: 300, forms: [], layout: null } })\n }\n return {\n ...base,\n pages,\n finish: 'improve',\n wording: true,\n generative: true,\n waves: base.waves.map((wave) => ({ ...wave, slots: pages.map((page) => page.slot), finish: 'improve', wording: true, generative: true as const })),\n }\n}\n\n/** The pictures a home page's menus show, each once: what the look pass brings in. */\nfunction siteImportMenuPictures(home: AiSiteImportState['home']): string[] {\n const urls = (home?.nav?.items ?? []).flatMap((group) => (group.columns ?? []).flatMap((column) => (column.image ? [column.image.url] : [])))\n return [...new Set(urls)]\n}\n\n/** A recorded home page's header and footer as the frame step draws them: the source's menu and footer, the stored nodes, the check's word. */\nexport interface SiteImportReplayFrame {\n nav: SiteImportNavTree | null\n footer: SiteImportFooter | null\n tree: SiteImportFidelityTree\n violations: unknown[]\n}\n\n/** A recorded home page's header and footer, drawn with no model as the layout step stores them (AGL-4108). */\nexport function siteImportReplayFrame(name: SiteImportReplayHome, options: { generative?: boolean; plan?: AiSiteImportPlan } = {}): SiteImportReplayFrame {\n const base = options.plan ? { ...siteImportReplayPlanState(name), plan: options.plan, planAccepted: true as const } : replayState(name)\n const state = options.generative ? { ...base, waves: base.waves.map((wave) => ({ ...wave, generative: true as const })) } : base\n const job = {\n $id: 'importJob',\n orgId: 'org-replay',\n hostId: 'host-replay',\n kind: 'import',\n status: 'running',\n brief: `Bring in ${state.domain}`,\n inputs: { domain: state.domain },\n steps: [],\n outputs: [],\n createdBy: 'uid-replay',\n createdAt: NOW,\n updatedAt: NOW,\n expiresAt: NOW,\n } as unknown as AiJob\n const frameJob = aiSiteImportFrameJob(job, state, state.waves[0] as AiSiteImportState['waves'][number], aiSiteImportLedger(state))\n const home = state.pages[0] as AiSiteImportPage\n const built = aiLayoutSourceFrameBuild({\n siteName: String(frameJob.inputs?.['businessName']),\n homeId: home.draftId,\n pages: [{ id: home.draftId, label: 'Home', slug: '/' }],\n targets: { pageId: null, pages: [], homeIds: [home.draftId], forms: [], formPageId: null, components: [], facts: '' } as never,\n extend: aiLayoutChecks(emptyAiSiteInventory('host-replay'), frameJob.plan ?? null, [frameJob.brief, ...(state.home?.facts.lines ?? [])].join('\\n')),\n brand: aiLayoutSiteBrandOf(frameJob.inputs),\n source: aiLayoutSiteFrameOf(frameJob.inputs) as AiLayoutFrameSource,\n })\n const nodes = (built.value?.nodes ?? {}) as unknown as SiteImportFidelityTree['nodes']\n return { nav: state.home?.nav ?? null, footer: state.home?.footer ?? null, tree: { rootId: '_@_', nodes }, violations: built.violations }\n}\n"],"names":["DEFAULT_SITE_THEME","aiImportedPageCheck","aiReadImprovedPage","aiSiteImportImproveDestinations","aiSiteImportImproveLedger","aiSiteImportImproveScope","aiSiteImportImprovedPage","aiSiteImportFrameJob","aiSiteImportHomeOf","aiLayoutSiteBrandOf","aiLayoutSiteFrameOf","aiLayoutSourceFrameBuild","aiLayoutChecks","aiSiteImportSectionNames","AI_LAYOUT_IMPORTED_SECTIONS_INPUT","aiSiteImportDocumentOf","aiSiteImportStyle","aiLayoutDesignChoices","aiSiteImportLedger","siteImportFidelityThemeOf","aiSiteTheme","emptyAiSiteInventory","extractSiteImportPage","siteImportLayout","siteImportLookOf","siteImportFooterColumns","siteImportNavTree","siteImportPageRead","SITE_BASIC_PAGES","SITE_LAYOUT_PAGES","siteBasicRecording","siteLayoutRecording","siteLayoutSameSite","isBasic","name","recordingOf","url","html","sheets","same","css","origin","URL","address","plannedLinks","blocks","paths","Set","block","kind","href","path","pathname","replace","add","map","id","siteImportReplayDocument","siteImportReplayDocumentOf","sameSite","stylesheets","read","page","structure","layout","foundBy","bytes","pictures","flatMap","build","title","photos","from","index","mediaId","src","width","height","links","origins","videos","length","concealed","siteImportReplayPage","options","siteImportReplayBuild","slug","home","result","rest","rewrites","Map","wording","rewrite","line","text","finished","finish","words","given","has","get","parsed","JSON","parse","stringify","doc","names","sectionIds","_","screen","sections","section","uses","items","forms","targets","pageId","pages","homeIds","formPageId","components","facts","check","context","screenIds","link","formIds","form","componentIds","codeBuilt","design","seed","answer","nodes","value","source","tree","rootId","violations","siteImportReplayTheme","input","description","look","generative","style","siteImportReplayOneGroundSeed","bandRhythm","Error","BASIC_FORMS","siteImportReplayImproved","ledger","formAt","findIndex","some","ref","startsWith","destinations","formSection","formId","theme","rewritten","written","scope","to","SITE_IMPORT_REPLAY_HOME_ANSWER","hero","band","align","groups","SITE_IMPORT_REPLAY_HOME_ANSWER_1105","NOW","Date","crawledHome","extract","_structure","loginForm","_loginForm","nav","footer","replayState","split","filter","Boolean","pop","slot","group","wave","draftId","images","domain","hostname","siteName","ownership","method","provenAt","detail","readAt","toISOString","pageLimit","existingPages","found","stoppedBy","waves","label","slots","frame","status","startedAt","finishedAt","leftOut","leftOutCount","at","colors","logo","siteImportMenuPictures","seo","siteImportReplayPlanState","base","listed","entry","push","join","level","region","urls","columns","column","image","siteImportReplayFrame","frameJob","state","built","plan","planAccepted","job","$id","orgId","hostId","brief","inputs","steps","outputs","createdBy","createdAt","updatedAt","expiresAt","String","homeId","extend","lines","brand"],"mappings":";;AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;;CASC,GAED,SAASA,kBAAkB,QAAQ,sCAAqC;AACxE,SAASC,mBAAmB,QAAQ,qCAAiC;AACrE,SAASC,kBAAkB,EAAEC,+BAA+B,EAAEC,yBAAyB,EAAEC,wBAAwB,EAAEC,wBAAwB,QAAuC,uCAAmC;AACrN,SAASC,oBAAoB,EAAEC,kBAAkB,QAAQ,mCAA+B;AACxF,SAASC,mBAAmB,EAAEC,mBAAmB,EAAEC,wBAAwB,QAAQ,uCAAmC;AACtH,SAASC,cAAc,QAAQ,mCAA+B;AAC9D,SAASC,wBAAwB,QAAQ,uCAAmC;AAC5E,SAASC,iCAAiC,EAAEC,sBAAsB,QAAmC,wCAAoC;AACzI,SAASC,iBAAiB,QAAQ,oCAAgC;AAClE,SAASC,qBAAqB,QAAQ,4CAAwC;AAG9E,SACEC,kBAAkB,QAQb,gCAA4B;AACnC,SAASC,yBAAyB,QAAkG,yCAAqC;AACzK,SAASC,WAAW,QAAQ,8BAA0B;AACtD,SAASC,oBAAoB,QAAQ,mCAA+B;AAEpE,SAASC,qBAAqB,QAA8B,yBAAqB;AACjF,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,2BAAuB;AAC1E,SAASC,uBAAuB,EAAEC,iBAAiB,QAAoC,wBAAoB;AAC3G,SAASC,kBAAkB,QAAQ,yBAAqB;AACxD,SAASC,gBAAgB,EAAEC,iBAAiB,EAAEC,kBAAkB,EAAEC,mBAAmB,EAAEC,kBAAkB,QAAyD,8BAA0B;AAK5L,MAAMC,UAAU,CAAC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L,UAAUuD,QAAOjB,mBAAAA,SAASU,MAAM,qBAAfV,gBAAiB,CAAC,eAAe;QAClDkB,QAAQjK,KAAKqG,OAAO;QACpBtE,OAAO;YAAC;gBAAE9D,IAAI+B,KAAKqG,OAAO;gBAAEgB,OAAO;gBAAQtH,MAAM;YAAI;SAAE;QACvD8B,SAAS;YAAEC,QAAQ;YAAMC,OAAO,EAAE;YAAEC,SAAS;gBAAChC,KAAKqG,OAAO;aAAC;YAAEzE,OAAO,EAAE;YAAEK,YAAY;YAAMC,YAAY,EAAE;YAAEC,OAAO;QAAG;QACpH+H,QAAQ7O,eAAeS,qBAAqB,iBAAgBiN,iBAAAA,SAASG,IAAI,YAAbH,iBAAiB,MAAM;YAACA,SAASS,KAAK;wBAAMR,cAAAA,MAAMhJ,IAAI,qBAAVgJ,YAAY7G,KAAK,CAACgI,KAAK,mBAAI,EAAE;SAAE,CAAC5B,IAAI,CAAC;QAC7I6B,OAAOlP,oBAAoB6N,SAASU,MAAM;QAC1CxG,QAAQ9H,oBAAoB4N,SAASU,MAAM;IAC7C;IACA,MAAM1G,kBAASkG,eAAAA,MAAMjG,KAAK,qBAAXiG,aAAalG,KAAK,oBAAI,CAAC;IACtC,OAAO;QAAE4C,GAAG,YAAEqD,eAAAA,MAAMhJ,IAAI,qBAAVgJ,aAAYrD,GAAG,oBAAI;QAAMC,MAAM,YAAEoD,eAAAA,MAAMhJ,IAAI,qBAAVgJ,aAAYpD,MAAM,oBAAI;QAAM1C,MAAM;YAAEC,QAAQ;YAAOJ;QAAM;QAAGK,YAAY6F,MAAM7F,UAAU;IAAC;AAC1I"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Answers to `submit_improved_page` for the four basic sites (AGL-4152),
19
+ * WRITTEN BY HAND, in the shape the tool answers. No model wrote these and none
20
+ * was called: they say what a good redesign of each page looks like in structure,
21
+ * so the code that draws and scores one can be held offline. The paid eval
22
+ * records real answers; these are not a measure of what a model will do.
23
+ *
24
+ * Each is a designer's page, as the redesign is asked for one: a hero beside
25
+ * its picture, like things as a group, and the two new sections a home page
26
+ * needs, written from what the page says and inventing nothing.
27
+ */
28
+ import type { SiteBasicPageName } from './site-layout-recordings';
29
+ type Answer = Record<string, unknown>;
30
+ export declare const SITE_IMPORT_IMPROVE_ANSWERS: Readonly<Record<SiteBasicPageName, {
31
+ sections: Answer[];
32
+ }>>;
33
+ export {};