@aglyn/plugins-ai 1.9.0 → 1.10.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.
- package/package.json +17 -17
- package/src/lib/components/ai-job-requests.d.ts +5 -0
- package/src/lib/components/ai-job-requests.js +4 -0
- package/src/lib/components/ai-job-requests.js.map +1 -1
- package/src/lib/components/ai-site-build-page.component.js +10 -3
- package/src/lib/components/ai-site-build-page.component.js.map +1 -1
- package/src/lib/components/ai-site-import-finish.component.d.ts +40 -0
- package/src/lib/components/ai-site-import-finish.component.js +174 -0
- package/src/lib/components/ai-site-import-finish.component.js.map +1 -0
- package/src/lib/components/ai-site-import-job.component.d.ts +11 -3
- package/src/lib/components/ai-site-import-job.component.js +220 -135
- package/src/lib/components/ai-site-import-job.component.js.map +1 -1
- package/src/lib/components/ai-site-import-start.component.d.ts +11 -2
- package/src/lib/components/ai-site-import-start.component.js +27 -5
- package/src/lib/components/ai-site-import-start.component.js.map +1 -1
- package/src/lib/components/ai-site-start-card.component.js +1 -1
- package/src/lib/components/ai-site-start-card.component.js.map +1 -1
- package/src/lib/jobs/ai-build-capabilities.js +2 -2
- package/src/lib/jobs/ai-build-capabilities.js.map +1 -1
- package/src/lib/jobs/ai-job-import-step.d.ts +2 -0
- package/src/lib/jobs/ai-job-import-step.js +31 -8
- package/src/lib/jobs/ai-job-import-step.js.map +1 -1
- package/src/lib/jobs/ai-job-page-language.d.ts +40 -2
- package/src/lib/jobs/ai-job-page-language.js +188 -9
- package/src/lib/jobs/ai-job-page-language.js.map +1 -1
- package/src/lib/jobs/ai-job-page-step.js +2 -0
- package/src/lib/jobs/ai-job-page-step.js.map +1 -1
- package/src/lib/jobs/ai-job-privacy-step.d.ts +5 -0
- package/src/lib/jobs/ai-job-privacy-step.js +9 -4
- package/src/lib/jobs/ai-job-privacy-step.js.map +1 -1
- package/src/lib/jobs/ai-job-text-step.d.ts +7 -1
- package/src/lib/jobs/ai-job-text-step.js.map +1 -1
- package/src/lib/jobs/ai-site-import-compile.d.ts +13 -2
- package/src/lib/jobs/ai-site-import-compile.js +115 -21
- package/src/lib/jobs/ai-site-import-compile.js.map +1 -1
- package/src/lib/jobs/ai-site-import-document.d.ts +5 -1
- package/src/lib/jobs/ai-site-import-document.js +5 -1
- package/src/lib/jobs/ai-site-import-document.js.map +1 -1
- package/src/lib/jobs/ai-site-import-look.d.ts +16 -4
- package/src/lib/jobs/ai-site-import-look.js +54 -13
- package/src/lib/jobs/ai-site-import-look.js.map +1 -1
- package/src/lib/jobs/ai-site-import-wording.d.ts +187 -0
- package/src/lib/jobs/ai-site-import-wording.js +747 -0
- package/src/lib/jobs/ai-site-import-wording.js.map +1 -0
- package/src/lib/layout-language/ai-layout-compiler.d.ts +12 -1
- package/src/lib/layout-language/ai-layout-compiler.js +29 -30
- package/src/lib/layout-language/ai-layout-compiler.js.map +1 -1
- package/src/lib/layout-language/ai-layout-language.d.ts +12 -0
- package/src/lib/layout-language/ai-layout-language.js.map +1 -1
- package/src/lib/model/ai-site-import-fidelity.d.ts +211 -2
- package/src/lib/model/ai-site-import-fidelity.js +1011 -14
- package/src/lib/model/ai-site-import-fidelity.js.map +1 -1
- package/src/lib/model/ai-site-import-report.d.ts +52 -1
- package/src/lib/model/ai-site-import-report.js +102 -5
- package/src/lib/model/ai-site-import-report.js.map +1 -1
- package/src/lib/model/ai-site-import-view.d.ts +62 -2
- package/src/lib/model/ai-site-import-view.js +83 -4
- package/src/lib/model/ai-site-import-view.js.map +1 -1
- package/src/lib/model/ai-site-import.d.ts +122 -6
- package/src/lib/model/ai-site-import.js +202 -9
- package/src/lib/model/ai-site-import.js.map +1 -1
- package/src/lib/model/ai-site-look.d.ts +51 -0
- package/src/lib/model/ai-site-look.js +205 -29
- package/src/lib/model/ai-site-look.js.map +1 -1
- package/src/lib/runtime/ai-doctrine-validators.d.ts +19 -0
- package/src/lib/runtime/ai-doctrine-validators.js +25 -0
- package/src/lib/runtime/ai-doctrine-validators.js.map +1 -1
- package/src/lib/runtime/ai-doctrine.js +4 -1
- package/src/lib/runtime/ai-doctrine.js.map +1 -1
- package/src/lib/server/ai-allotments.js +4 -2
- package/src/lib/server/ai-allotments.js.map +1 -1
- package/src/lib/server/ai-jobs-resume.js +32 -5
- package/src/lib/server/ai-jobs-resume.js.map +1 -1
- package/src/lib/site-import/fixtures/site-import-fidelity-replay.d.ts +36 -10
- package/src/lib/site-import/fixtures/site-import-fidelity-replay.js +48 -4
- package/src/lib/site-import/fixtures/site-import-fidelity-replay.js.map +1 -1
- package/src/lib/site-import/fixtures/site-look-slate.d.ts +27 -0
- package/src/lib/site-import/fixtures/site-look-slate.js +29 -0
- package/src/lib/site-import/fixtures/site-look-slate.js.map +1 -0
- package/src/lib/site-import/site-import-layout.d.ts +19 -5
- package/src/lib/site-import/site-import-layout.js +137 -16
- package/src/lib/site-import/site-import-layout.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/model/ai-site-import-view.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 * BRING MY SITE, AS THE CONSOLE SHOWS IT (AGL-3976).\n *\n * Pure: what the \"Create site\" choice card says before anyone clicks, and\n * what an import job's page shows in each of its states — the site read and\n * its waves planned, a wave running, a wave in for review, a wave held for a\n * proof or the day's limit, the import done. The components draw these; the\n * specs hold them.\n *=========================================*/\n\nimport { PLATFORM_BRAND_NAME } from '@aglyn/aglyn/app-utils/platform-brand'\nimport { aiCreditRangeText } from './ai-credit-estimate'\nimport type { AiJobItemLedger, AiJobSummary } from './ai-jobs.types'\nimport {\n AI_SITE_IMPORT_FRAME_SLOT,\n AI_SITE_IMPORT_LEFT_OUT_COPY,\n AI_SITE_IMPORT_LEFT_OUT_REASONS,\n AI_SITE_IMPORT_UNREAD_REASONS,\n aiSiteImportNextWave,\n aiSiteImportPagesText,\n aiSiteImportQuoteText,\n aiSiteImportReadStops,\n aiSiteImportReadVerdictMessage,\n aiSiteImportReadVerdictReason,\n aiSiteImportRemainingCreditRange,\n aiSiteImportReviewWave,\n aiSiteImportRunningWave,\n aiSiteImportWaveCreditRange,\n aiSiteImportWaveOwed,\n type AiSiteImportLeftOutReason,\n type AiSiteImportState,\n type AiSiteImportWave,\n} from './ai-site-import'\n\n/** A domain ownership claim, as the ownership door answers it. */\nexport interface AiSiteImportClaim {\n domain: string\n status: 'pending' | 'proven'\n current: boolean\n provenMethod: 'dns' | 'meta' | 'email' | null\n provenAt: number | null\n provenDetail: string | null\n lastChecks: Partial<Record<'dns' | 'meta' | 'email', 'proven' | 'not-yet' | 'unreachable'>>\n dns: { host: string; type: 'TXT'; value: string }\n meta: { name: string; content: string; tag: string }\n email: { domain: string; pendingAddress: string | null; expiresAt: number | null; attemptsLeft: number | null }\n}\n\n/** Whether \"Bring my site\" is offered here, and if not why. */\nexport type AiSiteImportAvailability =\n | { state: 'checking' }\n /** The release flag is off, or the doors cannot be reached: the card is not drawn. */\n | { state: 'hidden' }\n /** Something the workspace can change stands in the way: the card is drawn disabled, with the reason. */\n | { state: 'blocked'; reason: 'plan' | 'role'; message: string }\n | { state: 'ready'; claims: AiSiteImportClaim[] }\n\n/** What the card says to a plan that does not include it. */\nexport const AI_SITE_IMPORT_PLAN_COPY =\n 'Bring your current website in, every page and photo, on any paid plan. Upgrade to bring yours in.'\n\n/** What the card says to a member who cannot. */\nexport const AI_SITE_IMPORT_ROLE_COPY = 'Only the workspace owner or an admin can bring a site in.'\n\n/**\n * The jobs list's `siteImport` offer (AGL-3976), as the card's state: absent\n * is the flag off, and the card is not drawn; `plan` and `role` are drawn\n * disabled with the reason.\n */\nexport function aiSiteImportOfferOf(offer: unknown): AiSiteImportAvailability {\n if (offer === 'ready') return { state: 'ready', claims: [] }\n if (offer === 'plan') return { state: 'blocked', reason: 'plan', message: AI_SITE_IMPORT_PLAN_COPY }\n if (offer === 'role') return { state: 'blocked', reason: 'role', message: AI_SITE_IMPORT_ROLE_COPY }\n return { state: 'hidden' }\n}\n\n/** Where an import job's page is. */\nexport type AiSiteImportPhase =\n /** The site is being read. */\n | 'reading'\n /** Read and planned; the first wave waits to be started. */\n | 'ready'\n /** A wave was started and has not begun yet. */\n | 'starting'\n | 'running'\n /** A wave is in; the next waits to be started. */\n | 'review'\n /** Held for something the person does: verify again, wait for tomorrow, read again. */\n | 'held'\n /** Out of AI credits or at a cap: the meter's pause, carried on by Resume. */\n | 'paused'\n | 'done'\n | 'stopped'\n\nexport function aiSiteImportPhaseOf(job: Pick<AiJobSummary, 'status' | 'review' | 'siteImport'>): AiSiteImportPhase {\n const state = job.siteImport ?? null\n // A read that stopped at its home page is held, and its Check again reads again (AGL-4083).\n const stopped = aiSiteImportReadStops(state?.verdict)\n if (job.status === 'done') return 'done'\n if (job.status === 'failed' || job.status === 'canceled') return 'stopped'\n if (job.status === 'needs_input') return 'paused'\n if (job.status === 'needs_review') {\n if (job.review?.reason !== 'wave' || !state || stopped) return 'held'\n return aiSiteImportReviewWave(state) ? 'review' : 'ready'\n }\n if (!state || stopped) return 'reading'\n return aiSiteImportRunningWave(state) ? 'running' : 'starting'\n}\n\n/**\n * How a hold that is the site's to fix reads (AGL-4083): its heading, its\n * sentence and its button. A home page bot protection turned away, or one\n * that could not be read, is checked again for free; `null` for any other\n * hold, which keeps its own words.\n */\nexport function aiSiteImportHeldCopy(\n job: Pick<AiJobSummary, 'review' | 'siteImport'>,\n): { heading: string; message: string; action: string } | null {\n const state = job.siteImport ?? null\n const fromState = aiSiteImportReadStops(state?.verdict) ? aiSiteImportReadVerdictReason(state?.verdict) : null\n const reason = job.review?.reason === 'blocked' || job.review?.reason === 'unreadable' ? job.review.reason : fromState\n if (!reason) return null\n const message =\n (fromState && state ? aiSiteImportReadVerdictMessage(state.verdict, state.domain) : null) ?? job.review?.message ?? ''\n return {\n heading: reason === 'blocked' ? 'AglynBot was turned away' : 'Your home page could not be read',\n message,\n action: 'Check again',\n }\n}\n\n/**\n * Why an import that had started is waiting with no wave to review (AGL-4083):\n * the sentence its stop left, which says what is not in yet and what to start.\n * `null` for one that has not started, and one waiting for its review.\n */\nexport function aiSiteImportStoppedCopy(job: Pick<AiJobSummary, 'status' | 'review' | 'siteImport'>): string | null {\n const state = job.siteImport ?? null\n if (aiSiteImportPhaseOf(job) !== 'ready' || !state?.waves.some((wave) => wave.startedAt)) return null\n return job.review?.message || null\n}\n\nexport type AiSiteImportRowState = 'waiting' | 'active' | 'done' | 'failed' | 'skipped'\n\nexport interface AiSiteImportRowView {\n slot: string\n title: string\n /** Where it is on the old site. */\n from: string\n /** Where it is on the new one. */\n to: string\n state: AiSiteImportRowState\n /** Why it failed or was left out, or what the person should know. */\n note: string | null\n /** \"3 photos added, 1 already in your library\". */\n photos: string | null\n /** The draft the row wrote, by its output id. */\n outputId: string | null\n /** The page on the old site, to open beside the draft (AGL-4083). */\n oldPage: string\n /** \"1,204 of 1,310 words\", once the page is in and the step has counted them. */\n words: string | null\n /** \"Copied as it is\" or \"Arranged by Aglyn AI\", once the step has chosen. */\n build: string | null\n}\n\nfunction rowState(row: AiJobItemLedger | undefined, active: boolean): AiSiteImportRowState {\n if (!row) return 'waiting'\n if (row.status === 'succeeded' || row.status === 'degraded') return 'done'\n if (row.status === 'failed') return 'failed'\n if (row.status === 'skipped') return 'skipped'\n return active ? 'active' : 'waiting'\n}\n\n/**\n * \"3 photos added\", \"2 photos added, 1 already in your media library\"; with\n * photos that could not come in, against all it tried: \"3 of 5 photos: 2\n * added, 1 already in your media library, 2 could not be brought in\".\n */\nexport function aiSiteImportPhotosText(\n photos: { brought: number; reused: number; skipped?: number } | null | undefined,\n): string | null {\n if (!photos) return null\n const skipped = Math.max(0, photos.skipped ?? 0)\n const into = photos.brought + photos.reused\n if (into === 0 && skipped === 0) return null\n if (!skipped) {\n const added = photos.brought ? `${photos.brought} ${photos.brought === 1 ? 'photo' : 'photos'} added` : ''\n const reused = photos.reused ? `${photos.reused} already in your media library` : ''\n return [added, reused].filter(Boolean).join(', ')\n }\n const parts = [\n photos.brought ? `${photos.brought} added` : '',\n photos.reused ? `${photos.reused} already in your media library` : '',\n `${skipped} could not be brought in`,\n ].filter(Boolean)\n const tried = into + skipped\n return `${into} of ${tried} ${tried === 1 ? 'photo' : 'photos'}: ${parts.join(', ')}`\n}\n\nconst BUILD_COPY = { copied: 'Copied as it is', arranged: `Arranged by ${PLATFORM_BRAND_NAME} AI` } as const\n\n/** One wave's rows, the header and footer first where the wave builds them. */\nexport function aiSiteImportWaveRows(\n job: Pick<AiJobSummary, 'items' | 'siteImport' | 'status'>,\n wave: AiSiteImportWave,\n): AiSiteImportRowView[] {\n const state = job.siteImport as AiSiteImportState\n const items = new Map((job.items ?? []).map((row) => [row.slot, row]))\n const running = wave.status === 'running' && (job.status === 'running' || job.status === 'queued')\n let activeTaken = false\n const active = (row: AiJobItemLedger | undefined) => {\n if (!running || activeTaken || !row || (row.status !== 'pending' && row.status !== 'running')) return false\n activeTaken = true\n return true\n }\n const rows: AiSiteImportRowView[] = []\n if (wave.frame && state.frame) {\n const row = items.get(AI_SITE_IMPORT_FRAME_SLOT)\n rows.push({\n slot: AI_SITE_IMPORT_FRAME_SLOT,\n title: 'Header and footer',\n from: `Your menu on ${state.domain}`,\n to: 'Every page',\n state: rowState(row, active(row)),\n note: row?.failure?.message ?? row?.note ?? null,\n photos: null,\n outputId: row?.outputs[0] ?? null,\n oldPage: `https://${state.domain}/`,\n words: null,\n build: null,\n })\n }\n for (const slot of wave.slots) {\n const page = state.pages.find((entry) => entry.slot === slot)\n if (!page) continue\n const row = items.get(slot)\n rows.push({\n slot,\n title: page.title,\n from: page.path,\n to: page.slug === '/' ? '/' : `/${page.slug}`,\n state: rowState(row, active(row)),\n note: row?.failure?.message ?? row?.note ?? (page.refused ? AI_SITE_IMPORT_LEFT_OUT_COPY[page.refused] : null),\n photos: aiSiteImportPhotosText(page.photos),\n outputId: row?.outputs[0] ?? null,\n oldPage: page.url,\n // Beside the old page's own words, its main region's as the wave read them: its menu and footer are the site's (AGL-4084).\n words: page.brought ? `${page.brought.words.toLocaleString('en-US')} of ${(page.read?.words ?? page.words).toLocaleString('en-US')} words` : null,\n build: page.build ? BUILD_COPY[page.build] : null,\n })\n }\n return rows\n}\n\n/**\n * \"About 189 credits (up to 650)\" for the wave, as it stands; once the step\n * has chosen how its pages are built, it names them: \"…: 7 pages arranged by\n * Aglyn AI, 3 copied as they are\" (AGL-4083).\n */\nexport function aiSiteImportWaveQuote(job: Pick<AiJobSummary, 'items' | 'siteImport'>, wave: AiSiteImportWave): string {\n const state = job.siteImport as AiSiteImportState\n const range = aiSiteImportWaveCreditRange(state, wave, job.items ?? null)\n return aiSiteImportQuoteText(range, aiSiteImportWaveOwed(state, wave, job.items ?? null))\n}\n\n/** What a wave cost, its pages' credits less what was given back. */\nexport function aiSiteImportWaveSpent(job: Pick<AiJobSummary, 'items'>, wave: AiSiteImportWave): number {\n const slots = new Set([...wave.slots, ...(wave.frame ? [AI_SITE_IMPORT_FRAME_SLOT] : [])])\n return (job.items ?? [])\n .filter((row) => slots.has(row.slot))\n .reduce((total, row) => total + Math.max(0, (row.creditsSpent ?? 0) - (row.creditsRefunded ?? 0)), 0)\n}\n\n/** Pages the site has that AglynBot could not read: turned away, unanswered, too large or never reached. */\nexport function aiSiteImportUnreadCount(state: AiSiteImportState): number {\n return AI_SITE_IMPORT_UNREAD_REASONS.reduce((total, reason) => total + (state.leftOutCount[reason] ?? 0), 0)\n}\n\n/**\n * The read site in one sentence: \"Found 21 pages on harbor-dental.com: Main\n * pages (6) and Blog (14).\" — and how many more could not be read (AGL-4083).\n */\nexport function aiSiteImportFoundText(state: AiSiteImportState): string {\n const groups = state.groups.map((group) => `${group.label} (${group.pages})`)\n const listed =\n groups.length <= 1 ? groups.join('') : `${groups.slice(0, -1).join(', ')} and ${groups[groups.length - 1]}`\n const found = `Found ${aiSiteImportPagesText(state.found)} on ${state.domain}`\n const lead = listed ? `${found}: ${listed}.` : `${found}.`\n const unread = aiSiteImportUnreadCount(state)\n return unread ? `${lead} ${unread.toLocaleString('en-US')} more could not be read; see Not brought in.` : lead\n}\n\n/** Why the read stopped short, when it did and left pages unread (AGL-4083). */\nexport function aiSiteImportStopText(state: AiSiteImportState): string | null {\n const unreached = state.leftOutCount['not-reached'] ?? 0\n if (!unreached) return null\n const first = `Only the first ${aiSiteImportPagesText(state.found)}`\n const rest = 'the rest are listed under Not brought in as not reached.'\n switch (state.stoppedBy) {\n case 'time':\n return `${first} could be read in the time allowed; ${rest}`\n case 'total-bytes':\n return `${first} could be read before the read reached its size limit; ${rest}`\n default:\n return `${first} could be read this time; ${rest}`\n }\n}\n\n/** The read's warning when most of the site was turned away though its home page came in (AGL-4083). */\nexport function aiSiteImportVerdictNote(state: AiSiteImportState): string | null {\n return state.verdict?.kind === 'mostly-blocked' ? aiSiteImportReadVerdictMessage(state.verdict, state.domain) : null\n}\n\n/** The plan's page count against the site: \"Your plan includes 25 pages and this site has 0, so 20 are brought in.\" */\nexport function aiSiteImportPlanText(state: AiSiteImportState): string {\n const kept = state.pages.length\n const waves = state.waves.length\n const plan =\n state.pageLimit === null\n ? 'Your plan has no page limit'\n : `Your plan includes ${aiSiteImportPagesText(state.pageLimit)} and this site has ${state.existingPages}`\n const lead = `${plan}, so ${aiSiteImportPagesText(kept)} ${kept === 1 ? 'is' : 'are'} brought in, in ${waves === 1 ? 'one wave' : `${waves} waves`}.`\n const stop = aiSiteImportStopText(state)\n return stop ? `${lead} ${stop}` : lead\n}\n\n/** What was left out, by reason, most first. */\nexport function aiSiteImportLeftOutLines(state: AiSiteImportState): Array<{ reason: AiSiteImportLeftOutReason; count: number; text: string; paths: string[] }> {\n return AI_SITE_IMPORT_LEFT_OUT_REASONS.map((reason) => ({\n reason,\n count: state.leftOutCount[reason] ?? 0,\n text: AI_SITE_IMPORT_LEFT_OUT_COPY[reason],\n paths: state.leftOut.filter((entry) => entry.reason === reason).map((entry) => entry.path),\n }))\n .filter((line) => line.count > 0)\n .sort((a, b) => b.count - a.count)\n}\n\n/** The wave a page offers to start next, and its button's words. */\nexport function aiSiteImportStartAction(\n job: Pick<AiJobSummary, 'siteImport' | 'items'> & Partial<Pick<AiJobSummary, 'status'>>,\n): { wave: AiSiteImportWave; label: string; quote: string } | null {\n const state = job.siteImport ?? null\n // An import that stopped inside a wave waits on that wave, which starts again where it stopped (AGL-4083).\n const wave = (job.status === 'needs_review' ? aiSiteImportRunningWave(state) : null) ?? aiSiteImportNextWave(state)\n if (!state || !wave) return null\n return { wave, label: `Start ${wave.label}`, quote: aiSiteImportWaveQuote(job, wave) }\n}\n\n/**\n * \"Start every remaining wave\" (AGL-4083), off by default: offered beside the\n * next wave's button when more than one wave waits, quoted as all of them.\n */\nexport function aiSiteImportStartAllAction(\n job: Pick<AiJobSummary, 'siteImport' | 'items'>,\n): { label: string; quote: string; waves: number } | null {\n const state = job.siteImport ?? null\n if (!state || !aiSiteImportNextWave(state)) return null\n const waves = state.waves.filter((wave) => wave.status === 'waiting').length\n if (waves < 2) return null\n return {\n label: 'Start every remaining wave',\n quote: aiCreditRangeText(aiSiteImportRemainingCreditRange(state, job.items ?? null)),\n waves,\n }\n}\n"],"names":["PLATFORM_BRAND_NAME","aiCreditRangeText","AI_SITE_IMPORT_FRAME_SLOT","AI_SITE_IMPORT_LEFT_OUT_COPY","AI_SITE_IMPORT_LEFT_OUT_REASONS","AI_SITE_IMPORT_UNREAD_REASONS","aiSiteImportNextWave","aiSiteImportPagesText","aiSiteImportQuoteText","aiSiteImportReadStops","aiSiteImportReadVerdictMessage","aiSiteImportReadVerdictReason","aiSiteImportRemainingCreditRange","aiSiteImportReviewWave","aiSiteImportRunningWave","aiSiteImportWaveCreditRange","aiSiteImportWaveOwed","AI_SITE_IMPORT_PLAN_COPY","AI_SITE_IMPORT_ROLE_COPY","aiSiteImportOfferOf","offer","state","claims","reason","message","aiSiteImportPhaseOf","job","siteImport","stopped","verdict","status","review","aiSiteImportHeldCopy","fromState","domain","heading","action","aiSiteImportStoppedCopy","waves","some","wave","startedAt","rowState","row","active","aiSiteImportPhotosText","photos","skipped","Math","max","into","brought","reused","added","filter","Boolean","join","parts","tried","BUILD_COPY","copied","arranged","aiSiteImportWaveRows","items","Map","map","slot","running","activeTaken","rows","frame","get","push","title","from","to","note","failure","outputId","outputs","oldPage","words","build","slots","page","pages","find","entry","path","slug","refused","url","toLocaleString","read","aiSiteImportWaveQuote","range","aiSiteImportWaveSpent","Set","has","reduce","total","creditsSpent","creditsRefunded","aiSiteImportUnreadCount","leftOutCount","aiSiteImportFoundText","groups","group","label","listed","length","slice","found","lead","unread","aiSiteImportStopText","unreached","first","rest","stoppedBy","aiSiteImportVerdictNote","kind","aiSiteImportPlanText","kept","plan","pageLimit","existingPages","stop","aiSiteImportLeftOutLines","count","text","paths","leftOut","line","sort","a","b","aiSiteImportStartAction","quote","aiSiteImportStartAllAction"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;2CAQ2C,GAE3C,SAASA,mBAAmB,QAAQ,wCAAuC;AAC3E,SAASC,iBAAiB,QAAQ,0BAAsB;AAExD,SACEC,yBAAyB,EACzBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,6BAA6B,EAC7BC,oBAAoB,EACpBC,qBAAqB,EACrBC,qBAAqB,EACrBC,qBAAqB,EACrBC,8BAA8B,EAC9BC,6BAA6B,EAC7BC,gCAAgC,EAChCC,sBAAsB,EACtBC,uBAAuB,EACvBC,2BAA2B,EAC3BC,oBAAoB,QAIf,sBAAkB;AAyBzB,2DAA2D,GAC3D,OAAO,MAAMC,2BACX,oGAAmG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QACLsE,OAAO;QACP8B,OAAOzI,kBAAkBW,iCAAiCS,QAAOK,aAAAA,IAAIqC,KAAK,YAATrC,aAAa;QAC9EY;IACF;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../../libs/plugins/ai/src/lib/model/ai-site-import-view.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 * BRING MY SITE, AS THE CONSOLE SHOWS IT (AGL-3976).\n *\n * Pure: what the \"Create site\" choice card says before anyone clicks, and\n * what an import job's page shows in each of its states — the site read and\n * its waves planned, a wave running, a wave in for review, a wave held for a\n * proof or the day's limit, the import done. The components draw these; the\n * specs hold them.\n *=========================================*/\n\nimport { PLATFORM_BRAND_NAME } from '@aglyn/aglyn/app-utils/platform-brand'\nimport { aiCreditRangeText } from './ai-credit-estimate'\nimport type { AiJobItemLedger, AiJobSummary } from './ai-jobs.types'\nimport {\n AI_SITE_IMPORT_FRAME_SLOT,\n AI_SITE_IMPORT_LEFT_OUT_COPY,\n AI_SITE_IMPORT_LEFT_OUT_REASONS,\n AI_SITE_IMPORT_DEFAULT_CHOICE,\n AI_SITE_IMPORT_UNREAD_REASONS,\n aiSiteImportChoiceOf,\n aiSiteImportNextWave,\n aiSiteImportPagesText,\n aiSiteImportQuoteText,\n aiSiteImportReadStops,\n aiSiteImportReadVerdictMessage,\n aiSiteImportReadVerdictReason,\n aiSiteImportRemainingCreditRange,\n aiSiteImportReviewWave,\n aiSiteImportRunningWave,\n aiSiteImportWaveChoice,\n aiSiteImportWaveCreditRange,\n aiSiteImportWaveOwed,\n aiSiteImportWordingCredits,\n aiSiteImportWordingPages,\n type AiSiteImportChoice,\n type AiSiteImportFinish,\n type AiSiteImportLeftOutReason,\n type AiSiteImportPage,\n type AiSiteImportState,\n type AiSiteImportWave,\n} from './ai-site-import'\n\n/** A domain ownership claim, as the ownership door answers it. */\nexport interface AiSiteImportClaim {\n domain: string\n status: 'pending' | 'proven'\n current: boolean\n provenMethod: 'dns' | 'meta' | 'email' | null\n provenAt: number | null\n provenDetail: string | null\n lastChecks: Partial<Record<'dns' | 'meta' | 'email', 'proven' | 'not-yet' | 'unreachable'>>\n dns: { host: string; type: 'TXT'; value: string }\n meta: { name: string; content: string; tag: string }\n email: { domain: string; pendingAddress: string | null; expiresAt: number | null; attemptsLeft: number | null }\n}\n\n/** Whether \"Bring my site\" is offered here, and if not why. */\nexport type AiSiteImportAvailability =\n | { state: 'checking' }\n /** The release flag is off, or the doors cannot be reached: the card is not drawn. */\n | { state: 'hidden' }\n /** Something the workspace can change stands in the way: the card is drawn disabled, with the reason. */\n | { state: 'blocked'; reason: 'plan' | 'role'; message: string }\n | { state: 'ready'; claims: AiSiteImportClaim[] }\n\n/** What the card says to a plan that does not include it. */\nexport const AI_SITE_IMPORT_PLAN_COPY =\n 'Bring your current website in, every page and photo, on any paid plan. Upgrade to bring yours in.'\n\n/** What the card says to a member who cannot. */\nexport const AI_SITE_IMPORT_ROLE_COPY = 'Only the workspace owner or an admin can bring a site in.'\n\n/**\n * The jobs list's `siteImport` offer (AGL-3976), as the card's state: absent\n * is the flag off, and the card is not drawn; `plan` and `role` are drawn\n * disabled with the reason.\n */\nexport function aiSiteImportOfferOf(offer: unknown): AiSiteImportAvailability {\n if (offer === 'ready') return { state: 'ready', claims: [] }\n if (offer === 'plan') return { state: 'blocked', reason: 'plan', message: AI_SITE_IMPORT_PLAN_COPY }\n if (offer === 'role') return { state: 'blocked', reason: 'role', message: AI_SITE_IMPORT_ROLE_COPY }\n return { state: 'hidden' }\n}\n\n/** Where an import job's page is. */\nexport type AiSiteImportPhase =\n /** The site is being read. */\n | 'reading'\n /** Read and planned; the first wave waits to be started. */\n | 'ready'\n /** A wave was started and has not begun yet. */\n | 'starting'\n | 'running'\n /** A wave is in; the next waits to be started. */\n | 'review'\n /** Held for something the person does: verify again, wait for tomorrow, read again. */\n | 'held'\n /** Out of AI credits or at a cap: the meter's pause, carried on by Resume. */\n | 'paused'\n | 'done'\n | 'stopped'\n\nexport function aiSiteImportPhaseOf(job: Pick<AiJobSummary, 'status' | 'review' | 'siteImport'>): AiSiteImportPhase {\n const state = job.siteImport ?? null\n // A read that stopped at its home page is held, and its Check again reads again (AGL-4083).\n const stopped = aiSiteImportReadStops(state?.verdict)\n if (job.status === 'done') return 'done'\n if (job.status === 'failed' || job.status === 'canceled') return 'stopped'\n if (job.status === 'needs_input') return 'paused'\n if (job.status === 'needs_review') {\n if (job.review?.reason !== 'wave' || !state || stopped) return 'held'\n return aiSiteImportReviewWave(state) ? 'review' : 'ready'\n }\n if (!state || stopped) return 'reading'\n return aiSiteImportRunningWave(state) ? 'running' : 'starting'\n}\n\n/**\n * How a hold that is the site's to fix reads (AGL-4083): its heading, its\n * sentence and its button. A home page bot protection turned away, or one\n * that could not be read, is checked again for free; `null` for any other\n * hold, which keeps its own words.\n */\nexport function aiSiteImportHeldCopy(\n job: Pick<AiJobSummary, 'review' | 'siteImport'>,\n): { heading: string; message: string; action: string } | null {\n const state = job.siteImport ?? null\n const fromState = aiSiteImportReadStops(state?.verdict) ? aiSiteImportReadVerdictReason(state?.verdict) : null\n const reason = job.review?.reason === 'blocked' || job.review?.reason === 'unreadable' ? job.review.reason : fromState\n if (!reason) return null\n const message =\n (fromState && state ? aiSiteImportReadVerdictMessage(state.verdict, state.domain) : null) ?? job.review?.message ?? ''\n return {\n heading: reason === 'blocked' ? 'AglynBot was turned away' : 'Your home page could not be read',\n message,\n action: 'Check again',\n }\n}\n\n/**\n * Why an import that had started is waiting with no wave to review (AGL-4083):\n * the sentence its stop left, which says what is not in yet and what to start.\n * `null` for one that has not started, and one waiting for its review.\n */\nexport function aiSiteImportStoppedCopy(job: Pick<AiJobSummary, 'status' | 'review' | 'siteImport'>): string | null {\n const state = job.siteImport ?? null\n if (aiSiteImportPhaseOf(job) !== 'ready' || !state?.waves.some((wave) => wave.startedAt)) return null\n return job.review?.message || null\n}\n\nexport type AiSiteImportRowState = 'waiting' | 'active' | 'done' | 'failed' | 'skipped'\n\nexport interface AiSiteImportRowView {\n slot: string\n title: string\n /** Where it is on the old site. */\n from: string\n /** Where it is on the new one. */\n to: string\n state: AiSiteImportRowState\n /** Why it failed or was left out, or what the person should know. */\n note: string | null\n /** \"3 photos added, 1 already in your library\". */\n photos: string | null\n /** The draft the row wrote, by its output id. */\n outputId: string | null\n /** The page on the old site, to open beside the draft (AGL-4083). */\n oldPage: string\n /** \"1,204 of 1,310 words\", once the page is in and the step has counted them. */\n words: string | null\n /**\n * \"Copied as it is\" or \"Arranged by Aglyn AI\", once the step has chosen;\n * \"Arranged and reworded by Aglyn AI\" once its wave improved its words, and\n * \"Arranged by Aglyn AI · Words kept\" for a policy page on such a wave (AGL-4152).\n */\n build: string | null\n}\n\nfunction rowState(row: AiJobItemLedger | undefined, active: boolean): AiSiteImportRowState {\n if (!row) return 'waiting'\n if (row.status === 'succeeded' || row.status === 'degraded') return 'done'\n if (row.status === 'failed') return 'failed'\n if (row.status === 'skipped') return 'skipped'\n return active ? 'active' : 'waiting'\n}\n\n/**\n * \"3 photos added\", \"2 photos added, 1 already in your media library\"; with\n * photos that could not come in, against all it tried: \"3 of 5 photos: 2\n * added, 1 already in your media library, 2 could not be brought in\".\n */\nexport function aiSiteImportPhotosText(\n photos: { brought: number; reused: number; skipped?: number } | null | undefined,\n): string | null {\n if (!photos) return null\n const skipped = Math.max(0, photos.skipped ?? 0)\n const into = photos.brought + photos.reused\n if (into === 0 && skipped === 0) return null\n if (!skipped) {\n const added = photos.brought ? `${photos.brought} ${photos.brought === 1 ? 'photo' : 'photos'} added` : ''\n const reused = photos.reused ? `${photos.reused} already in your media library` : ''\n return [added, reused].filter(Boolean).join(', ')\n }\n const parts = [\n photos.brought ? `${photos.brought} added` : '',\n photos.reused ? `${photos.reused} already in your media library` : '',\n `${skipped} could not be brought in`,\n ].filter(Boolean)\n const tried = into + skipped\n return `${into} of ${tried} ${tried === 1 ? 'photo' : 'photos'}: ${parts.join(', ')}`\n}\n\nconst BUILD_COPY = {\n copied: 'Copied as it is',\n arranged: `Arranged by ${PLATFORM_BRAND_NAME} AI`,\n /** A main page whose wording was improved (AGL-4152). */\n reworded: `Arranged and reworded by ${PLATFORM_BRAND_NAME} AI`,\n /** A policy page on a wave that improved the wording of the rest: it keeps every word. */\n wordsKept: `Arranged by ${PLATFORM_BRAND_NAME} AI · Words kept`,\n} as const\n\n/** A page's build as its row says it, with whether its words were improved where its wave improved wording (AGL-4152). */\nfunction buildCopy(page: AiSiteImportPage, choice: AiSiteImportChoice): string | null {\n if (!page.build) return null\n if (page.build === 'arranged' && page.wording === 'improved') return BUILD_COPY.reworded\n if (page.build === 'arranged' && page.wording === 'kept' && choice.wording) return BUILD_COPY.wordsKept\n return BUILD_COPY[page.build]\n}\n\n/** What the row of a page whose words were improved says in place of its word count (AGL-4152). */\nexport const AI_SITE_IMPORT_REWORDED_WORDS = 'Every fact kept'\n\n/** One wave's rows, the header and footer first where the wave builds them. */\nexport function aiSiteImportWaveRows(\n job: Pick<AiJobSummary, 'items' | 'siteImport' | 'status'>,\n wave: AiSiteImportWave,\n): AiSiteImportRowView[] {\n const state = job.siteImport as AiSiteImportState\n const items = new Map((job.items ?? []).map((row) => [row.slot, row]))\n const running = wave.status === 'running' && (job.status === 'running' || job.status === 'queued')\n let activeTaken = false\n const active = (row: AiJobItemLedger | undefined) => {\n if (!running || activeTaken || !row || (row.status !== 'pending' && row.status !== 'running')) return false\n activeTaken = true\n return true\n }\n const rows: AiSiteImportRowView[] = []\n const choice = aiSiteImportWaveChoice(state, wave)\n if (wave.frame && state.frame) {\n const row = items.get(AI_SITE_IMPORT_FRAME_SLOT)\n rows.push({\n slot: AI_SITE_IMPORT_FRAME_SLOT,\n title: 'Header and footer',\n from: `Your menu on ${state.domain}`,\n to: 'Every page',\n state: rowState(row, active(row)),\n note: row?.failure?.message ?? row?.note ?? null,\n photos: null,\n outputId: row?.outputs[0] ?? null,\n oldPage: `https://${state.domain}/`,\n words: null,\n build: null,\n })\n }\n for (const slot of wave.slots) {\n const page = state.pages.find((entry) => entry.slot === slot)\n if (!page) continue\n const row = items.get(slot)\n rows.push({\n slot,\n title: page.title,\n from: page.path,\n to: page.slug === '/' ? '/' : `/${page.slug}`,\n state: rowState(row, active(row)),\n note: row?.failure?.message ?? row?.note ?? (page.refused ? AI_SITE_IMPORT_LEFT_OUT_COPY[page.refused] : null),\n photos: aiSiteImportPhotosText(page.photos),\n outputId: row?.outputs[0] ?? null,\n oldPage: page.url,\n // Beside the old page's own words, its main region's as the wave read them: its menu and footer are the site's (AGL-4084).\n // A page whose words were improved keeps its facts, not its count (AGL-4152).\n words: page.brought\n ? page.wording === 'improved'\n ? AI_SITE_IMPORT_REWORDED_WORDS\n : `${page.brought.words.toLocaleString('en-US')} of ${(page.read?.words ?? page.words).toLocaleString('en-US')} words`\n : null,\n build: buildCopy(page, choice),\n })\n }\n return rows\n}\n\n/**\n * \"About 189 credits (up to 650)\" for the wave, as it stands; once the step\n * has chosen how its pages are built, it names them: \"…: 7 pages arranged by\n * Aglyn AI, 3 copied as they are\" (AGL-4083).\n */\nexport function aiSiteImportWaveQuote(job: Pick<AiJobSummary, 'items' | 'siteImport'>, wave: AiSiteImportWave): string {\n const state = job.siteImport as AiSiteImportState\n const range = aiSiteImportWaveCreditRange(state, wave, job.items ?? null)\n return aiSiteImportQuoteText(range, aiSiteImportWaveOwed(state, wave, job.items ?? null))\n}\n\n/** What a wave cost, its pages' credits less what was given back. */\nexport function aiSiteImportWaveSpent(job: Pick<AiJobSummary, 'items'>, wave: AiSiteImportWave): number {\n const slots = new Set([...wave.slots, ...(wave.frame ? [AI_SITE_IMPORT_FRAME_SLOT] : [])])\n return (job.items ?? [])\n .filter((row) => slots.has(row.slot))\n .reduce((total, row) => total + Math.max(0, (row.creditsSpent ?? 0) - (row.creditsRefunded ?? 0)), 0)\n}\n\n/** Pages the site has that AglynBot could not read: turned away, unanswered, too large or never reached. */\nexport function aiSiteImportUnreadCount(state: AiSiteImportState): number {\n return AI_SITE_IMPORT_UNREAD_REASONS.reduce((total, reason) => total + (state.leftOutCount[reason] ?? 0), 0)\n}\n\n/**\n * The read site in one sentence: \"Found 21 pages on harbor-dental.com: Main\n * pages (6) and Blog (14).\" — and how many more could not be read (AGL-4083).\n */\nexport function aiSiteImportFoundText(state: AiSiteImportState): string {\n const groups = state.groups.map((group) => `${group.label} (${group.pages})`)\n const listed =\n groups.length <= 1 ? groups.join('') : `${groups.slice(0, -1).join(', ')} and ${groups[groups.length - 1]}`\n const found = `Found ${aiSiteImportPagesText(state.found)} on ${state.domain}`\n const lead = listed ? `${found}: ${listed}.` : `${found}.`\n const unread = aiSiteImportUnreadCount(state)\n return unread ? `${lead} ${unread.toLocaleString('en-US')} more could not be read; see Not brought in.` : lead\n}\n\n/** Why the read stopped short, when it did and left pages unread (AGL-4083). */\nexport function aiSiteImportStopText(state: AiSiteImportState): string | null {\n const unreached = state.leftOutCount['not-reached'] ?? 0\n if (!unreached) return null\n const first = `Only the first ${aiSiteImportPagesText(state.found)}`\n const rest = 'the rest are listed under Not brought in as not reached.'\n switch (state.stoppedBy) {\n case 'time':\n return `${first} could be read in the time allowed; ${rest}`\n case 'total-bytes':\n return `${first} could be read before the read reached its size limit; ${rest}`\n default:\n return `${first} could be read this time; ${rest}`\n }\n}\n\n/** The read's warning when most of the site was turned away though its home page came in (AGL-4083). */\nexport function aiSiteImportVerdictNote(state: AiSiteImportState): string | null {\n return state.verdict?.kind === 'mostly-blocked' ? aiSiteImportReadVerdictMessage(state.verdict, state.domain) : null\n}\n\n/** The plan's page count against the site: \"Your plan includes 25 pages and this site has 0, so 20 are brought in.\" */\nexport function aiSiteImportPlanText(state: AiSiteImportState): string {\n const kept = state.pages.length\n const waves = state.waves.length\n const plan =\n state.pageLimit === null\n ? 'Your plan has no page limit'\n : `Your plan includes ${aiSiteImportPagesText(state.pageLimit)} and this site has ${state.existingPages}`\n const lead = `${plan}, so ${aiSiteImportPagesText(kept)} ${kept === 1 ? 'is' : 'are'} brought in, in ${waves === 1 ? 'one wave' : `${waves} waves`}.`\n const stop = aiSiteImportStopText(state)\n return stop ? `${lead} ${stop}` : lead\n}\n\n/** What was left out, by reason, most first. */\nexport function aiSiteImportLeftOutLines(state: AiSiteImportState): Array<{ reason: AiSiteImportLeftOutReason; count: number; text: string; paths: string[] }> {\n return AI_SITE_IMPORT_LEFT_OUT_REASONS.map((reason) => ({\n reason,\n count: state.leftOutCount[reason] ?? 0,\n text: AI_SITE_IMPORT_LEFT_OUT_COPY[reason],\n paths: state.leftOut.filter((entry) => entry.reason === reason).map((entry) => entry.path),\n }))\n .filter((line) => line.count > 0)\n .sort((a, b) => b.count - a.count)\n}\n\n/** The wave a page offers to start next, and its button's words. */\nexport function aiSiteImportStartAction(\n job: Pick<AiJobSummary, 'siteImport' | 'items'> & Partial<Pick<AiJobSummary, 'status'>>,\n): { wave: AiSiteImportWave; label: string; quote: string } | null {\n const state = job.siteImport ?? null\n // An import that stopped inside a wave waits on that wave, which starts again where it stopped (AGL-4083).\n const wave = (job.status === 'needs_review' ? aiSiteImportRunningWave(state) : null) ?? aiSiteImportNextWave(state)\n if (!state || !wave) return null\n return { wave, label: `Start ${wave.label}`, quote: aiSiteImportWaveQuote(job, wave) }\n}\n\n/**\n * \"Start every remaining wave\" (AGL-4083), off by default: offered beside the\n * next wave's button when more than one wave waits, quoted as all of them.\n */\nexport function aiSiteImportStartAllAction(\n job: Pick<AiJobSummary, 'siteImport' | 'items'>,\n): { label: string; quote: string; waves: number } | null {\n const state = job.siteImport ?? null\n if (!state || !aiSiteImportNextWave(state)) return null\n const waves = state.waves.filter((wave) => wave.status === 'waiting').length\n if (waves < 2) return null\n return {\n label: 'Start every remaining wave',\n quote: aiCreditRangeText(aiSiteImportRemainingCreditRange(state, job.items ?? null)),\n waves,\n }\n}\n\n/*------------------------------------------\n * Keep my site, or Improve it (AGL-4152)\n *-----------------------------------------*/\n\n/** What Bring my site asks, and what each answer means, as the console draws it. */\nexport const AI_SITE_IMPORT_FINISH_COPY = {\n heading: 'How should your new site look?',\n keep: {\n label: 'Keep my site',\n description: `Your pages stay laid out as they are, in your site’s colors, buttons and fonts. ${PLATFORM_BRAND_NAME} tidies spacing, type and color so every page reads well. Every word stays as you wrote it.`,\n },\n improve: {\n label: 'Improve it',\n description: `${PLATFORM_BRAND_NAME} AI redesigns each page with your pictures, menus and forms, in a theme built around your brand.`,\n },\n wording: {\n label: 'Also improve my wording',\n description: `${PLATFORM_BRAND_NAME} AI rewrites the headings, paragraphs and buttons of your main pages so they read better. Every name, price, number, date, address, phone number and email stays exactly as you wrote it. Quotes, policies, tables and forms keep every word.`,\n },\n helper: 'You can change this before each wave.',\n /** The job page's line before it opens the choice: \"How your new site looks: Keep my site\". */\n current: 'How your new site looks',\n change: 'Change',\n} as const\n\n/** The choice in a few words: \"Keep my site\", \"Improve it\", or \"Improve it, and my wording\". */\nexport function aiSiteImportChoiceText(choice: AiSiteImportChoice): string {\n if (choice.finish === 'keep') return AI_SITE_IMPORT_FINISH_COPY.keep.label\n return choice.wording ? `${AI_SITE_IMPORT_FINISH_COPY.improve.label}, and my wording` : AI_SITE_IMPORT_FINISH_COPY.improve.label\n}\n\n/** How a wave was built, as its heading says it: \"Keep my site\", \"Improved\", or \"Improved, wording too\". */\nexport function aiSiteImportBuiltText(choice: AiSiteImportChoice): string {\n if (choice.finish === 'keep') return AI_SITE_IMPORT_FINISH_COPY.keep.label\n return choice.wording ? 'Improved, wording too' : 'Improved'\n}\n\n/**\n * A wave's heading (AGL-4152): once it has started, its name and how it was\n * built, \"Main pages · Keep my site\"; before, its name alone, since how it is\n * built is still the owner's to change.\n */\nexport function aiSiteImportWaveHeading(state: Pick<AiSiteImportState, 'finish' | 'wording'> | null | undefined, wave: AiSiteImportWave): string {\n if (!wave.startedAt) return wave.label\n return `${wave.label} · ${aiSiteImportBuiltText(aiSiteImportWaveChoice(state, wave))}`\n}\n\n/** What a running wave's page says it does with each page, the way the wave is built (AGL-4152). */\nexport function aiSiteImportRunningLede(choice: AiSiteImportChoice): string {\n const review = 'You review the wave when it is in.'\n if (choice.finish === 'keep') return `Each page keeps its layout and every word as you wrote it, in your site’s own look. ${review}`\n return choice.wording\n ? `${PLATFORM_BRAND_NAME} AI redesigns each page and improves its wording, keeping every name, price, number, date, address, phone number and email as you wrote it. ${review}`\n : `${PLATFORM_BRAND_NAME} AI redesigns each page with its own words, pictures, menus and forms. ${review}`\n}\n\n/**\n * What Also improve my wording adds (AGL-4152): for a wave, its pages'\n * rewrites, \"Adds about 162 AI credits to this wave.\"; before the site is\n * read, a main page's.\n */\nexport function aiSiteImportWordingCreditsText(\n scope: { job: Pick<AiJobSummary, 'items' | 'siteImport'>; wave: AiSiteImportWave } | null,\n): string {\n if (!scope?.job.siteImport) return `About ${aiSiteImportWordingCredits(1).likely.toLocaleString('en-US')} more AI credits for each main page.`\n const pages = aiSiteImportWordingPages(scope.job.siteImport, scope.wave, { finish: 'improve', wording: true }, scope.job.items ?? null)\n if (!pages) return 'This wave’s pages keep every word, so it adds no AI credits.'\n return `Adds about ${aiSiteImportWordingCredits(pages).likely.toLocaleString('en-US')} AI credits to this wave.`\n}\n\n/**\n * The choice as Bring my site draws it (AGL-4152): the finish, and where the\n * Also improve my wording switch sits, which counts only under Improve it, so\n * a person who picks Keep my site and then Improve it finds it on.\n */\nexport interface AiSiteImportFinishField {\n finish: AiSiteImportFinish\n wording: boolean\n}\n\n/** The field an import's page opens with: the import's choice, the switch on where it was never turned off under Improve it. */\nexport function aiSiteImportFinishFieldOf(state: Pick<AiSiteImportState, 'finish' | 'wording'> | null | undefined): AiSiteImportFinishField {\n const choice = aiSiteImportChoiceOf(state)\n return choice.finish === 'improve' ? choice : { finish: 'keep', wording: AI_SITE_IMPORT_DEFAULT_CHOICE.wording }\n}\n\n/** The choice a field asks for: its wording only under Improve it. */\nexport function aiSiteImportFieldChoice(field: AiSiteImportFinishField): AiSiteImportChoice {\n return { finish: field.finish, wording: field.finish === 'improve' && field.wording }\n}\n"],"names":["PLATFORM_BRAND_NAME","aiCreditRangeText","AI_SITE_IMPORT_FRAME_SLOT","AI_SITE_IMPORT_LEFT_OUT_COPY","AI_SITE_IMPORT_LEFT_OUT_REASONS","AI_SITE_IMPORT_DEFAULT_CHOICE","AI_SITE_IMPORT_UNREAD_REASONS","aiSiteImportChoiceOf","aiSiteImportNextWave","aiSiteImportPagesText","aiSiteImportQuoteText","aiSiteImportReadStops","aiSiteImportReadVerdictMessage","aiSiteImportReadVerdictReason","aiSiteImportRemainingCreditRange","aiSiteImportReviewWave","aiSiteImportRunningWave","aiSiteImportWaveChoice","aiSiteImportWaveCreditRange","aiSiteImportWaveOwed","aiSiteImportWordingCredits","aiSiteImportWordingPages","AI_SITE_IMPORT_PLAN_COPY","AI_SITE_IMPORT_ROLE_COPY","aiSiteImportOfferOf","offer","state","claims","reason","message","aiSiteImportPhaseOf","job","siteImport","stopped","verdict","status","review","aiSiteImportHeldCopy","fromState","domain","heading","action","aiSiteImportStoppedCopy","waves","some","wave","startedAt","rowState","row","active","aiSiteImportPhotosText","photos","skipped","Math","max","into","brought","reused","added","filter","Boolean","join","parts","tried","BUILD_COPY","copied","arranged","reworded","wordsKept","buildCopy","page","choice","build","wording","AI_SITE_IMPORT_REWORDED_WORDS","aiSiteImportWaveRows","items","Map","map","slot","running","activeTaken","rows","frame","get","push","title","from","to","note","failure","outputId","outputs","oldPage","words","slots","pages","find","entry","path","slug","refused","url","toLocaleString","read","aiSiteImportWaveQuote","range","aiSiteImportWaveSpent","Set","has","reduce","total","creditsSpent","creditsRefunded","aiSiteImportUnreadCount","leftOutCount","aiSiteImportFoundText","groups","group","label","listed","length","slice","found","lead","unread","aiSiteImportStopText","unreached","first","rest","stoppedBy","aiSiteImportVerdictNote","kind","aiSiteImportPlanText","kept","plan","pageLimit","existingPages","stop","aiSiteImportLeftOutLines","count","text","paths","leftOut","line","sort","a","b","aiSiteImportStartAction","quote","aiSiteImportStartAllAction","AI_SITE_IMPORT_FINISH_COPY","keep","description","improve","helper","current","change","aiSiteImportChoiceText","finish","aiSiteImportBuiltText","aiSiteImportWaveHeading","aiSiteImportRunningLede","aiSiteImportWordingCreditsText","scope","likely","aiSiteImportFinishFieldOf","aiSiteImportFieldChoice","field"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;;2CAQ2C,GAE3C,SAASA,mBAAmB,QAAQ,wCAAuC;AAC3E,SAASC,iBAAiB,QAAQ,0BAAsB;AAExD,SACEC,yBAAyB,EACzBC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,6BAA6B,EAC7BC,6BAA6B,EAC7BC,oBAAoB,EACpBC,oBAAoB,EACpBC,qBAAqB,EACrBC,qBAAqB,EACrBC,qBAAqB,EACrBC,8BAA8B,EAC9BC,6BAA6B,EAC7BC,gCAAgC,EAChCC,sBAAsB,EACtBC,uBAAuB,EACvBC,sBAAsB,EACtBC,2BAA2B,EAC3BC,oBAAoB,EACpBC,0BAA0B,EAC1BC,wBAAwB,QAOnB,sBAAkB;AAyBzB,2DAA2D,GAC3D,OAAO,MAAMC,2BACX,oGAAmG;AAErG,+CAA+C,GAC/C,OAAO,MAAMC,2BAA2B,4DAA2D;AAEnG;;;;CAIC,GACD,OAAO,SAASC,oBAAoBC,KAAc;IAChD,IAAIA,UAAU,SAAS,OAAO;QAAEC,OAAO;QAASC,QAAQ,EAAE;IAAC;IAC3D,IAAIF,UAAU,QAAQ,OAAO;QAAEC,OAAO;QAAWE,QAAQ;QAAQC,SAASP;IAAyB;IACnG,IAAIG,UAAU,QAAQ,OAAO;QAAEC,OAAO;QAAWE,QAAQ;QAAQC,SAASN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;AACjH;AAEA,oEAAoE,GACpE,OAAO,SAAS8F,wBAAwBC,KAA8B;IACpE,OAAO;QAAET,QAAQS,MAAMT,MAAM;QAAEtF,SAAS+F,MAAMT,MAAM,KAAK,aAAaS,MAAM/F,OAAO;IAAC;AACtF"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import type { SiteImportBlock, SiteImportForm, SiteImportVideo } from '../site-import/site-import-html';
|
|
18
18
|
import { type AiCreditRange } from './ai-credit-estimate';
|
|
19
|
-
import type { AiJobItemLedger } from './ai-jobs.types';
|
|
19
|
+
import type { AiJob, AiJobItemLedger } from './ai-jobs.types';
|
|
20
20
|
/** The job kind. */
|
|
21
21
|
export declare const AI_SITE_IMPORT_KIND: "import";
|
|
22
22
|
/** The input naming the proved domain the job brings in. */
|
|
@@ -363,9 +363,13 @@ export interface SiteImportLayoutSection {
|
|
|
363
363
|
* content. Absent where the source sets none.
|
|
364
364
|
*/
|
|
365
365
|
width?: number;
|
|
366
|
-
/**
|
|
366
|
+
/**
|
|
367
|
+
* Set on the section holding the page's first `<h1>`; `measure` the
|
|
368
|
+
* narrowest width in px the source holds its heading to (AGL-4152).
|
|
369
|
+
*/
|
|
367
370
|
hero?: {
|
|
368
371
|
picture: SiteImportHeroPicture | null;
|
|
372
|
+
measure?: number;
|
|
369
373
|
};
|
|
370
374
|
nodes: SiteImportLayoutNode[];
|
|
371
375
|
/** Every line of the section, in order. */
|
|
@@ -411,6 +415,10 @@ export interface SiteImportLookFacts {
|
|
|
411
415
|
link: string | null;
|
|
412
416
|
/** Its header bar's background. */
|
|
413
417
|
header: string | null;
|
|
418
|
+
/** The fill of its dark bands, the most used first (AGL-4152): the dark ground Keep my site keeps. Absent on a read made before. */
|
|
419
|
+
darkBackground?: string | null;
|
|
420
|
+
/** Whether its filled buttons are set in capitals (AGL-4152). Absent on a read made before. */
|
|
421
|
+
buttonCase?: 'upper' | 'none' | null;
|
|
414
422
|
/**
|
|
415
423
|
* The color most of its eyebrows are drawn in, where that is a color of its
|
|
416
424
|
* own: none of its text's, its buttons' or white (AGL-4138). The look pass
|
|
@@ -651,6 +659,31 @@ export interface AiSiteImportPageRead {
|
|
|
651
659
|
}
|
|
652
660
|
/** How a page is built from its old page, as the step chose: its words copied as they are, or arranged by Aglyn AI. */
|
|
653
661
|
export type AiSiteImportBuild = 'copied' | 'arranged';
|
|
662
|
+
/**
|
|
663
|
+
* How an import finishes the owner's site (AGL-4152): kept as it is with a
|
|
664
|
+
* light polish, or improved. Absent on an older import, which is `keep`.
|
|
665
|
+
*/
|
|
666
|
+
export type AiSiteImportFinish = 'keep' | 'improve';
|
|
667
|
+
/** The job input the finish is carried in from Bring my site. */
|
|
668
|
+
export declare const AI_SITE_IMPORT_FINISH_INPUT = "finish";
|
|
669
|
+
/** The job input carrying whether an improved site's wording is improved too (AGL-4152). */
|
|
670
|
+
export declare const AI_SITE_IMPORT_WORDING_INPUT = "wording";
|
|
671
|
+
/** Whether a page's words were kept as written or improved (AGL-4152). */
|
|
672
|
+
export type AiSiteImportWords = 'kept' | 'improved';
|
|
673
|
+
/** How the owner asked the site to be finished, as one choice: the finish, and under `improve` whether its wording is improved too (AGL-4152). */
|
|
674
|
+
export interface AiSiteImportChoice {
|
|
675
|
+
finish: AiSiteImportFinish;
|
|
676
|
+
/** Always `false` under `keep`: Keep my site never rewrites a word. */
|
|
677
|
+
wording: boolean;
|
|
678
|
+
}
|
|
679
|
+
/** What Bring my site preselects (AGL-4152): Improve it, with Also improve my wording on. */
|
|
680
|
+
export declare const AI_SITE_IMPORT_DEFAULT_CHOICE: Readonly<AiSiteImportChoice>;
|
|
681
|
+
/**
|
|
682
|
+
* The words a policy page's address or title carries (AGL-4152), each matched
|
|
683
|
+
* as whole words, its plural too: a main page that names one keeps every word
|
|
684
|
+
* even when its wave improves the wording of the rest.
|
|
685
|
+
*/
|
|
686
|
+
export declare const AI_SITE_IMPORT_LEGAL_SLUGS: readonly string[];
|
|
654
687
|
export interface AiSiteImportPage {
|
|
655
688
|
/** The item ledger slot: `p0`, `p1`, … */
|
|
656
689
|
slot: string;
|
|
@@ -675,6 +708,8 @@ export interface AiSiteImportPage {
|
|
|
675
708
|
brought?: {
|
|
676
709
|
words: number;
|
|
677
710
|
} | null;
|
|
711
|
+
/** Whether its words were kept or improved, stamped with its build at its wave's start (AGL-4152). */
|
|
712
|
+
wording?: AiSiteImportWords | null;
|
|
678
713
|
/** Filled once the page's photos are in the library. */
|
|
679
714
|
photos?: {
|
|
680
715
|
brought: number;
|
|
@@ -708,6 +743,10 @@ export interface AiSiteImportWave {
|
|
|
708
743
|
status: AiSiteImportWaveStatus;
|
|
709
744
|
startedAt: string | null;
|
|
710
745
|
finishedAt: string | null;
|
|
746
|
+
/** How the wave was built, stamped at its start (AGL-4152): the site's finish then. */
|
|
747
|
+
finish?: AiSiteImportFinish | null;
|
|
748
|
+
/** Whether its improved pages' wording was improved too, stamped at its start (AGL-4152). */
|
|
749
|
+
wording?: boolean | null;
|
|
711
750
|
}
|
|
712
751
|
export interface AiSiteImportState {
|
|
713
752
|
domain: string;
|
|
@@ -756,6 +795,10 @@ export interface AiSiteImportState {
|
|
|
756
795
|
home?: AiSiteImportHome | null;
|
|
757
796
|
/** The look pass, once it ran in the first wave (AGL-4084). */
|
|
758
797
|
look?: AiSiteImportLook | null;
|
|
798
|
+
/** How the owner asked the site to be finished (AGL-4152); absent reads as `keep`. Changeable before each wave. */
|
|
799
|
+
finish?: AiSiteImportFinish | null;
|
|
800
|
+
/** Under `improve`, whether the main pages' wording is improved too (AGL-4152): on unless the owner turns it off. */
|
|
801
|
+
wording?: boolean | null;
|
|
759
802
|
}
|
|
760
803
|
/**
|
|
761
804
|
* What the home page says of the site as a whole (AGL-4084), kept from the
|
|
@@ -1029,6 +1072,66 @@ export declare function aiSiteImportWaveClosed(state: AiSiteImportState, index:
|
|
|
1029
1072
|
export declare function aiSiteImportCanceled(state: AiSiteImportState, at: string): AiSiteImportState;
|
|
1030
1073
|
/** The state as the console reads it: every page's read text left off. */
|
|
1031
1074
|
export declare function aiSiteImportWire(state: AiSiteImportState | null | undefined): AiSiteImportState | null;
|
|
1075
|
+
/** A finish read defensively: only `improve` is improve, so an import that never said reads as `keep`. */
|
|
1076
|
+
export declare function aiSiteImportFinishOf(value: unknown): AiSiteImportFinish;
|
|
1077
|
+
/** Whether the wording is improved: only under `improve`, and on unless the owner switched it off. */
|
|
1078
|
+
export declare function aiSiteImportWordingOf(finish: AiSiteImportFinish, value: unknown): boolean;
|
|
1079
|
+
/** The choice an import holds now, read defensively: an older import with none is `keep`, never silently improved. */
|
|
1080
|
+
export declare function aiSiteImportChoiceOf(state: Pick<AiSiteImportState, 'finish' | 'wording'> | null | undefined): AiSiteImportChoice;
|
|
1081
|
+
/** The choice Bring my site carried in the job's inputs (`AI_SITE_IMPORT_FINISH_INPUT`, `AI_SITE_IMPORT_WORDING_INPUT`); none is `keep`. */
|
|
1082
|
+
export declare function aiSiteImportChoiceFromInputs(inputs: Readonly<Record<string, unknown>> | null | undefined): AiSiteImportChoice;
|
|
1083
|
+
/** Whether a page is a policy (`AI_SITE_IMPORT_LEGAL_SLUGS`) by its address on either site or its title (AGL-4152). */
|
|
1084
|
+
export declare function aiSiteImportPageIsLegal(page: Pick<AiSiteImportPage, 'slug' | 'title'> & Partial<Pick<AiSiteImportPage, 'path'>>): boolean;
|
|
1085
|
+
/**
|
|
1086
|
+
* Whether a page's words are improved under a choice (AGL-4152): only a main
|
|
1087
|
+
* page Aglyn AI arranges, under Improve it with its wording on, and never a
|
|
1088
|
+
* policy page. Every other page keeps every word as written.
|
|
1089
|
+
*/
|
|
1090
|
+
export declare function aiSiteImportPageWording(page: Pick<AiSiteImportPage, 'group' | 'words' | 'slug' | 'title' | 'build'> & Partial<Pick<AiSiteImportPage, 'path'>>, choice: AiSiteImportChoice): AiSiteImportWords;
|
|
1091
|
+
/**
|
|
1092
|
+
* How a wave is built (AGL-4152): as it was stamped when it started, which a
|
|
1093
|
+
* later change never redraws; a wave not yet started is the import's choice
|
|
1094
|
+
* now. A wave that started before the choice existed reads as `keep`.
|
|
1095
|
+
*/
|
|
1096
|
+
export declare function aiSiteImportWaveChoice(state: Pick<AiSiteImportState, 'finish' | 'wording'> | null | undefined, wave: AiSiteImportWave): AiSiteImportChoice;
|
|
1097
|
+
/**
|
|
1098
|
+
* A wave starting (AGL-4152): stamped with the import's choice now, and each
|
|
1099
|
+
* of its pages with whether its words are kept or improved. The step stamps a
|
|
1100
|
+
* wave once, when it starts, so a change made before a later wave reaches only
|
|
1101
|
+
* the waves that have not started.
|
|
1102
|
+
*/
|
|
1103
|
+
export declare function aiSiteImportWaveStamped(state: AiSiteImportState, index: number): AiSiteImportState;
|
|
1104
|
+
/**
|
|
1105
|
+
* The owner's change between waves (AGL-4152), as the resume door writes it
|
|
1106
|
+
* onto an import waiting for a wave: the finish, and the wording switch,
|
|
1107
|
+
* always off under `keep`. What is not given keeps the import's choice now.
|
|
1108
|
+
* `null` when the job is not an import waiting for a wave that has not started.
|
|
1109
|
+
*/
|
|
1110
|
+
export declare function aiSiteImportFinishUpdate(job: Pick<AiJob, 'kind' | 'status' | 'review' | 'siteImport'>, change: {
|
|
1111
|
+
finish?: AiSiteImportFinish | null;
|
|
1112
|
+
wording?: boolean | null;
|
|
1113
|
+
}): {
|
|
1114
|
+
'siteImport.finish': AiSiteImportFinish;
|
|
1115
|
+
'siteImport.wording': boolean;
|
|
1116
|
+
} | null;
|
|
1117
|
+
/**
|
|
1118
|
+
* A page whose rewrite was refused (AGL-4152): it keeps every word as
|
|
1119
|
+
* written, and its row reads as kept. Only a page stamped `improved` changes.
|
|
1120
|
+
*/
|
|
1121
|
+
export declare function aiSiteImportWordsKept(state: AiSiteImportState, slot: string): AiSiteImportState;
|
|
1122
|
+
/** The pages of a wave whose words a choice improves, of those it still owes (AGL-4152). */
|
|
1123
|
+
export declare function aiSiteImportWordingPages(state: AiSiteImportState, wave: AiSiteImportWave, choice: AiSiteImportChoice, items?: readonly AiJobItemLedger[] | null): number;
|
|
1124
|
+
/**
|
|
1125
|
+
* What improving this many pages' wording adds (AGL-4152): a reworded page
|
|
1126
|
+
* is quoted as an AI page (`AI_MEASURED_IMPORT_CREDITS.page`) in place of an
|
|
1127
|
+
* arranged one, its design answer and its wording together, so each adds the
|
|
1128
|
+
* difference between the two. Its ceiling, the page's two passes, does not
|
|
1129
|
+
* move, and no price is new.
|
|
1130
|
+
*/
|
|
1131
|
+
export declare function aiSiteImportWordingCredits(pages: number): {
|
|
1132
|
+
likely: number;
|
|
1133
|
+
p90: number;
|
|
1134
|
+
};
|
|
1032
1135
|
/**
|
|
1033
1136
|
* How a page is built (AGL-4083), decided by code: every page of a collection
|
|
1034
1137
|
* (a blog, the legal pages, news) is copied as it is; every main page is
|
|
@@ -1041,17 +1144,26 @@ export declare function aiSiteImportPageBuild(page: Pick<AiSiteImportPage, 'grou
|
|
|
1041
1144
|
* each page an AI page as measured, its ceiling its two passes, and the
|
|
1042
1145
|
* site's header and footer once when the wave builds them. Pages the step has
|
|
1043
1146
|
* chosen a build for (AGL-4083) are priced by it: `arranged` at the
|
|
1044
|
-
* arrangement answer and its listing, `copied` at the listing alone.
|
|
1147
|
+
* arrangement answer and its listing, `copied` at the listing alone. Of the
|
|
1148
|
+
* arranged, those `reworded` under Also improve my wording (AGL-4152) are
|
|
1149
|
+
* priced as an AI page, inside the same ceiling.
|
|
1045
1150
|
*/
|
|
1046
1151
|
export declare function aiSiteImportCreditRange(pages: number, options?: {
|
|
1047
1152
|
frame?: boolean;
|
|
1048
1153
|
arranged?: number;
|
|
1049
1154
|
copied?: number;
|
|
1155
|
+
reworded?: number;
|
|
1050
1156
|
}): AiCreditRange;
|
|
1051
|
-
/**
|
|
1157
|
+
/**
|
|
1158
|
+
* What a wave still owes, by how its pages are built, and whether its header
|
|
1159
|
+
* and footer are owed. `reworded` are those of `arranged` whose words the
|
|
1160
|
+
* wave improves (AGL-4152): as stamped once it has started, and as the
|
|
1161
|
+
* import's choice now would stamp them before.
|
|
1162
|
+
*/
|
|
1052
1163
|
export declare function aiSiteImportWaveOwed(state: AiSiteImportState, wave: AiSiteImportWave, items?: readonly AiJobItemLedger[] | null): {
|
|
1053
1164
|
pages: number;
|
|
1054
1165
|
arranged: number;
|
|
1166
|
+
reworded: number;
|
|
1055
1167
|
copied: number;
|
|
1056
1168
|
frame: boolean;
|
|
1057
1169
|
};
|
|
@@ -1059,8 +1171,12 @@ export declare function aiSiteImportWaveOwed(state: AiSiteImportState, wave: AiS
|
|
|
1059
1171
|
export declare function aiSiteImportWaveCreditRange(state: AiSiteImportState, wave: AiSiteImportWave, items?: readonly AiJobItemLedger[] | null): AiCreditRange;
|
|
1060
1172
|
/** Every wave still waiting, quoted at once: "Start every remaining wave" (AGL-4083). */
|
|
1061
1173
|
export declare function aiSiteImportRemainingCreditRange(state: AiSiteImportState, items?: readonly AiJobItemLedger[] | null): AiCreditRange;
|
|
1062
|
-
/**
|
|
1063
|
-
|
|
1174
|
+
/**
|
|
1175
|
+
* "About 95 credits (up to 600): 7 pages arranged by Aglyn AI, 3 copied as
|
|
1176
|
+
* they are"; the build is named once the step has chosen, and pages whose
|
|
1177
|
+
* words are improved too (AGL-4152) as "arranged and reworded by Aglyn AI".
|
|
1178
|
+
*/
|
|
1179
|
+
export declare function aiSiteImportQuoteText(range: AiCreditRange, owed: Pick<ReturnType<typeof aiSiteImportWaveOwed>, 'arranged' | 'copied'> & Partial<Pick<ReturnType<typeof aiSiteImportWaveOwed>, 'reworded'>>): string;
|
|
1064
1180
|
/** Why a page is not brought in, as a person reads it. */
|
|
1065
1181
|
export declare const AI_SITE_IMPORT_LEFT_OUT_COPY: Readonly<Record<AiSiteImportLeftOutReason, string>>;
|
|
1066
1182
|
/** "3 pages" / "1 page". */
|