@aglyn/plugins-ai 1.0.0-beta.262 → 1.0.0-beta.264

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 (64) hide show
  1. package/package.json +17 -17
  2. package/src/lib/insights/ai-figure-summaries.d.ts +1 -1
  3. package/src/lib/insights/ai-figure-summaries.js +55 -38
  4. package/src/lib/insights/ai-figure-summaries.js.map +1 -1
  5. package/src/lib/insights/ai-insight-digest.d.ts +2 -0
  6. package/src/lib/insights/ai-insight-digest.js +7 -4
  7. package/src/lib/insights/ai-insight-digest.js.map +1 -1
  8. package/src/lib/jobs/ai-job-insight-step.d.ts +1 -1
  9. package/src/lib/jobs/ai-job-insight-step.js +5 -3
  10. package/src/lib/jobs/ai-job-insight-step.js.map +1 -1
  11. package/src/lib/jobs/ai-job-page-language.d.ts +2 -0
  12. package/src/lib/jobs/ai-job-page-language.js +23 -2
  13. package/src/lib/jobs/ai-job-page-language.js.map +1 -1
  14. package/src/lib/jobs/ai-job-page-sections.js +8 -2
  15. package/src/lib/jobs/ai-job-page-sections.js.map +1 -1
  16. package/src/lib/jobs/ai-job-plan-step.d.ts +14 -1
  17. package/src/lib/jobs/ai-job-plan-step.js +44 -9
  18. package/src/lib/jobs/ai-job-plan-step.js.map +1 -1
  19. package/src/lib/jobs/ai-job-site-datasets.d.ts +11 -1
  20. package/src/lib/jobs/ai-job-site-datasets.js +32 -7
  21. package/src/lib/jobs/ai-job-site-datasets.js.map +1 -1
  22. package/src/lib/jobs/ai-jobs-notify.d.ts +8 -1
  23. package/src/lib/jobs/ai-jobs-notify.js +44 -2
  24. package/src/lib/jobs/ai-jobs-notify.js.map +1 -1
  25. package/src/lib/jobs/ai-layout-stock-photos.d.ts +91 -11
  26. package/src/lib/jobs/ai-layout-stock-photos.js +1046 -48
  27. package/src/lib/jobs/ai-layout-stock-photos.js.map +1 -1
  28. package/src/lib/jobs/fixtures/ai-stock-photo-juniper-records-recordings.d.ts +23 -0
  29. package/src/lib/jobs/fixtures/ai-stock-photo-juniper-records-recordings.js +163 -0
  30. package/src/lib/jobs/fixtures/ai-stock-photo-juniper-records-recordings.js.map +1 -0
  31. package/src/lib/jobs/fixtures/ai-stock-photo-learning-center-recordings.d.ts +23 -0
  32. package/src/lib/jobs/fixtures/ai-stock-photo-learning-center-recordings.js +53 -0
  33. package/src/lib/jobs/fixtures/ai-stock-photo-learning-center-recordings.js.map +1 -0
  34. package/src/lib/jobs/fixtures/ai-stock-photo-synchronicity-recordings.d.ts +21 -0
  35. package/src/lib/jobs/fixtures/ai-stock-photo-synchronicity-recordings.js +119 -0
  36. package/src/lib/jobs/fixtures/ai-stock-photo-synchronicity-recordings.js.map +1 -0
  37. package/src/lib/layout-language/ai-layout-compiler.js +24 -11
  38. package/src/lib/layout-language/ai-layout-compiler.js.map +1 -1
  39. package/src/lib/layout-language/ai-layout-listings.d.ts +7 -0
  40. package/src/lib/layout-language/ai-layout-listings.js +12 -0
  41. package/src/lib/layout-language/ai-layout-listings.js.map +1 -1
  42. package/src/lib/layout-language/ai-layout-pictures.d.ts +27 -8
  43. package/src/lib/layout-language/ai-layout-pictures.js +85 -4
  44. package/src/lib/layout-language/ai-layout-pictures.js.map +1 -1
  45. package/src/lib/layout-language/ai-layout-promised-copy.d.ts +54 -0
  46. package/src/lib/layout-language/ai-layout-promised-copy.js +104 -0
  47. package/src/lib/layout-language/ai-layout-promised-copy.js.map +1 -0
  48. package/src/lib/model/ai-insight.d.ts +9 -0
  49. package/src/lib/model/ai-insight.js +12 -0
  50. package/src/lib/model/ai-insight.js.map +1 -1
  51. package/src/lib/model/ai-job-notice.d.ts +7 -1
  52. package/src/lib/model/ai-job-notice.js +10 -9
  53. package/src/lib/model/ai-job-notice.js.map +1 -1
  54. package/src/lib/model/ai-plan-said-sections.d.ts +81 -0
  55. package/src/lib/model/ai-plan-said-sections.js +168 -0
  56. package/src/lib/model/ai-plan-said-sections.js.map +1 -0
  57. package/src/lib/model/ai-site-job.d.ts +8 -2
  58. package/src/lib/model/ai-site-job.js +7 -1
  59. package/src/lib/model/ai-site-job.js.map +1 -1
  60. package/src/lib/runtime/ai-doctrine-validators.d.ts +15 -1
  61. package/src/lib/runtime/ai-doctrine-validators.js +80 -1
  62. package/src/lib/runtime/ai-doctrine-validators.js.map +1 -1
  63. package/src/lib/runtime/ai-palette.generated.js +11 -3
  64. package/src/lib/runtime/ai-palette.generated.js.map +1 -1
@@ -130,6 +130,14 @@ import type { AiBuildPlan } from '../model/ai-build-plan';
130
130
  * ("wedding" of "a wedding and portrait photographer") is not the craft;
131
131
  * and a hero whose second tag names the world too leads one whose first
132
132
  * alone does.
133
+ * 9. **A world from the name** (the beta.261 Synchronicity Gym start,
134
+ * AGL-3856: its business type "a local service business" named no world,
135
+ * so its hero searched nothing and was left a black scrim, and its
136
+ * closing band's "Ready to train" took a subway train). A business type
137
+ * that names no world takes the craft its name, else its audience, names
138
+ * where this module lists it ("gym" of "Synchronicity Gym"); and a
139
+ * training word's other senses (a railway's train, an elevator's lift, a
140
+ * newspaper's press, a boat's row) never fill a gym's picture.
133
141
  *
134
142
  * A slot the library could not fill because it never answered — down, or
135
143
  * out of time before its first answer — or because the site's library
@@ -200,6 +208,8 @@ export interface AiStockSiteTerms {
200
208
  broad: string[];
201
209
  /** The searches for its maker at work, for a story of the craft (AGL-3660); empty for a craft not listed. */
202
210
  making: string[];
211
+ /** Whether a picture naming people at a moment is searched by its scene ({@link aiStockScene}, AGL-3856). */
212
+ scenes?: boolean;
203
213
  /** Every stem of the business type or brief: what lets a sensitive topic in ({@link SENSITIVE_TOPICS}). */
204
214
  named: string[];
205
215
  /** Rival crafts' words, each with the words that must then be named too ({@link CRAFT_KIN}). */
@@ -271,6 +281,14 @@ export interface AiStockSearch extends StockPhotoSearchRequest {
271
281
  first?: boolean;
272
282
  /** Phrases (as stems) of which one must be among the hit's first tags: a borrowed photo is OF the product's category (AGL-3660). */
273
283
  leadAny?: readonly string[];
284
+ /** Whether its hits must name its object, whatever the slot's role: a scene's people (AGL-3856). */
285
+ strict?: boolean;
286
+ /** Words its hits never carry, whatever the brief names: a bride in a family session ({@link aiStockScene}). */
287
+ refuse?: readonly string[];
288
+ /** Stems of which every hit names one, whatever else it names: a scene's people, never roses alone ({@link aiStockScene}). */
289
+ needs?: readonly string[];
290
+ /** Stems its own words name, which let a topic in as the brief's do: a family session's children ({@link aiStockScene}). */
291
+ allow?: readonly string[];
274
292
  /** Whether it fills a product: no room, no scene, no fragrance bottle ({@link PRODUCT_SCENES}, AGL-3660). */
275
293
  product?: boolean;
276
294
  /** Words its hits never carry unless the slot or the brief names them ({@link AiStockSiteTerms.shun}). */
@@ -291,6 +309,29 @@ export type AiStockSlotPart = 'collection' | 'story';
291
309
  * the craft, or of a thing made by hand, shows the maker at work.
292
310
  */
293
311
  export declare function aiStockSlotPart(slot: Pick<AiLayoutPictureSlot, 'role' | 'alt'>, sectionName: string): AiStockSlotPart | undefined;
312
+ /** What a picture of a moment shows ({@link aiStockScene}). */
313
+ export interface AiStockScene {
314
+ /** The searches that ask for it, the people and their setting first. */
315
+ queries: string[];
316
+ /** The words its photo is scored by: the people, and the setting. */
317
+ subject: string;
318
+ /** The thing a photo of it leads with, and its kin. */
319
+ object: string;
320
+ lead: string[];
321
+ /** Words of which a photo of it names one. */
322
+ people: string[];
323
+ shun: string[];
324
+ /** The stems of its words, which let in what they name: a family's children. */
325
+ named: string[];
326
+ }
327
+ /**
328
+ * The scene a picture's words name (AGL-3856): the people at a moment, and
329
+ * where — "Ridgetop Elopement" a couple in the mountains, "Mountain Wedding
330
+ * Day" a wedding couple in the mountains, "Family Session in the Fall" a
331
+ * family in autumn — read from every word, never only the first clause.
332
+ * `null` where it names no people.
333
+ */
334
+ export declare function aiStockScene(text: string): AiStockScene | null;
294
335
  /** What a product falls back to once its own searches find nothing ({@link aiStockProductSearches}). */
295
336
  export interface AiStockProductFallback {
296
337
  /** The site's broad searches ({@link AiStockSiteTerms.broad}): "handmade soap". */
@@ -346,7 +387,7 @@ export interface AiStockProductFallback {
346
387
  */
347
388
  export declare function aiStockProductSearches(slot: Pick<AiLayoutPictureSlot, 'aspect' | 'product'>, craft: string, domain?: readonly string[], fallback?: AiStockProductFallback): AiStockSearch[];
348
389
  /** The searches a slot tries, in order, most specific first, each distinct. */
349
- export declare function aiStockSearchesFor(slot: Pick<AiLayoutPictureSlot, 'role' | 'alt' | 'aspect'>, terms: Pick<AiStockSiteTerms, 'business' | 'craft' | 'domain' | 'broad'> & Partial<Pick<AiStockSiteTerms, 'making' | 'core'>>, subject: string, part?: AiStockSlotPart): AiStockSearch[];
390
+ export declare function aiStockSearchesFor(slot: Pick<AiLayoutPictureSlot, 'role' | 'alt' | 'aspect'>, terms: Pick<AiStockSiteTerms, 'business' | 'craft' | 'domain' | 'broad'> & Partial<Pick<AiStockSiteTerms, 'making' | 'core' | 'scenes'>>, subject: string, part?: AiStockSlotPart): AiStockSearch[];
350
391
  /** What a hit is judged by. */
351
392
  export interface AiStockJudgement {
352
393
  /** The words the picture is of; empty for a picture of the site's world. */
@@ -387,6 +428,10 @@ export interface AiStockJudgement {
387
428
  shun?: readonly string[];
388
429
  /** Words a hit's first tags never carry unless the subject or the brief names them ({@link AiStockSiteTerms.shunLead}). */
389
430
  shunLead?: readonly string[];
431
+ /** Words a hit never carries, whatever the brief names ({@link AiStockSearch.refuse}). */
432
+ refuse?: readonly string[];
433
+ /** Stems of which a hit names one ({@link AiStockSearch.needs}). */
434
+ needs?: readonly string[];
390
435
  }
391
436
  /**
392
437
  * Whether a hit carries a topic its site never named ({@link SENSITIVE_TOPICS}):
@@ -423,11 +468,14 @@ export declare function aiStockPlacedSrcs(nodes: NodesMap | null | undefined): s
423
468
  /** Forgets every job's placed photos; for specs. */
424
469
  export declare function aiStockForgetJobPhotos(): void;
425
470
  /**
426
- * A photo described from its own tags (AGL-3856): its first few that name a
427
- * thing, a phrase another one holds dropped ("wedding" beside "wedding
428
- * dress"), as an English phrase — "A wedding dress and a bride", "A hammer,
429
- * books and law" — never the comma-separated list the library keeps. `null`
430
- * where none names a thing.
471
+ * A photo described from its own tags (AGL-3856): a short English phrase of
472
+ * what its first tags show — one or two things, or a thing and where it is,
473
+ * one person at most — never the library's comma-separated list: "A train at
474
+ * a station", "A confident lawyer in court", "A portrait of a businessman",
475
+ * "A board and chalk". A tag of how it looks is said before the thing it
476
+ * qualifies; an idea ("law", "feedback") is left out; a word inside another
477
+ * ("law" of "lawyer", "man" of "businessman") gives way to it; a mass noun
478
+ * takes no article. `null` where no tag names a thing.
431
479
  */
432
480
  export declare function aiStockTagsAlt(tags: readonly string[], proper?: ReadonlySet<string>): string | null;
433
481
  /**
@@ -455,7 +503,8 @@ export declare function aiStockTagsAlt(tags: readonly string[], proper?: Readonl
455
503
  * description, and are never kept. Otherwise the photo is described by the
456
504
  * library's own words: its description where it writes one (a Pexels hit's
457
505
  * `alt`), else its first tags as an English phrase ({@link aiStockTagsAlt}),
458
- * never the library's tag list. The libraries write in English, and no model
506
+ * never the library's tag list, and where no tag names a thing, the slot's
507
+ * own subject: its words, else its section's name. The libraries write in English, and no model
459
508
  * translates them, so a site in another language takes the platform's own
460
509
  * words for an illustrative photo in its language (`aiLayoutLabel`), true of
461
510
  * any photo, as does a hit whose words name no thing.
@@ -491,6 +540,20 @@ export interface AiLayoutStockPhotoSourceInput {
491
540
  * gave no photo words, rather than its business type in its own language.
492
541
  */
493
542
  kindWords?: string;
543
+ /**
544
+ * The business's name, as the person typed it (AGL-3856): what an English
545
+ * site is searched by when its business type names no world ("a local
546
+ * service business") and its name names a craft this module lists
547
+ * ("Synchronicity Gym"). Never its world otherwise.
548
+ */
549
+ name?: string;
550
+ /** Who the site is for, as the person typed it: searched as the name is, after it (AGL-3856). */
551
+ audience?: string;
552
+ /**
553
+ * The id of the kind of site the person picked ("education"): what a site
554
+ * is searched by when nothing else names its world (AGL-3856).
555
+ */
556
+ kind?: string;
494
557
  /** The page's section names, by plan index. */
495
558
  sectionNames: readonly string[];
496
559
  /**
@@ -510,13 +573,14 @@ export interface AiLayoutStockPhotoDeps {
510
573
  budgetMs?: number;
511
574
  }
512
575
  /**
513
- * A job's language and English photo words (AGL-3760), and the English name
514
- * of its kind of site (AGL-3771), as a stock photo source takes them.
576
+ * A job's language and English photo words (AGL-3760), the English name of
577
+ * its kind of site (AGL-3771), and the business's name and audience as the
578
+ * person typed them (AGL-3856), as a stock photo source takes them.
515
579
  */
516
580
  export declare function aiStockPhotoWordsOf(job: {
517
581
  plan?: Pick<AiBuildPlan, 'language' | 'photoWords'> | null;
518
582
  inputs?: Readonly<Record<string, unknown>> | null;
519
- }): Pick<AiLayoutStockPhotoSourceInput, 'language' | 'photoWords' | 'kindWords'>;
583
+ }): Pick<AiLayoutStockPhotoSourceInput, 'language' | 'photoWords' | 'kindWords' | 'name' | 'audience' | 'kind'>;
520
584
  /**
521
585
  * The subject a plan's photo words lead with (AGL-3769): its first word that
522
586
  * is not filler, with the place or person words that follow it — "bakery" of
@@ -537,7 +601,23 @@ export declare function aiStockPhotoWordsSubject(photoWords: string): string;
537
601
  * every slot of every source — hero, background, gallery, card, product,
538
602
  * post — so no slot searches by words another slot is held against.
539
603
  */
540
- export declare function aiStockSourceTerms(input: Pick<AiLayoutStockPhotoSourceInput, 'business' | 'language' | 'photoWords' | 'kindWords'>): AiStockSiteTerms;
604
+ export declare function aiStockSourceTerms(input: Pick<AiLayoutStockPhotoSourceInput, 'business' | 'language' | 'photoWords' | 'kindWords' | 'name' | 'audience' | 'kind'>): AiStockSiteTerms;
605
+ /**
606
+ * Whether a business type is only an abbreviation the libraries do not know
607
+ * (AGL-3856): "LMS", "CRM", "B2B". Its letters are no world to search.
608
+ */
609
+ export declare function aiStockIsAbbreviation(businessType: string): boolean;
610
+ /** The kind of site a business's name or audience names ({@link NAMED_KINDS}), or empty. */
611
+ export declare function aiStockNamedKind(text: string): string;
612
+ /** What a kind of site's pictures are searched and judged by ({@link KIND_SUBJECTS}); `null` for a kind not listed. */
613
+ export declare function aiStockKindTerms(kind: string): AiStockSiteTerms | null;
614
+ /**
615
+ * The first word of a text that names a craft {@link CRAFT_KIN} lists, as
616
+ * its table writes it: "gym" of "Synchronicity Gym", "law" of "Hartwell
617
+ * Reyes Family Law". Empty where it names none, so a name that is only a
618
+ * name ("Hillside") never becomes a world.
619
+ */
620
+ export declare function aiStockListedCraft(text: string): string;
541
621
  /**
542
622
  * The source for one page, or `null` when this deployment has no stock
543
623
  * photo library or no media door, which leaves every slot to the starters.