@aglyn/plugins-ai 1.0.0-beta.242 → 1.0.0-beta.243

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-ai",
3
- "version": "1.0.0-beta.242",
3
+ "version": "1.0.0-beta.243",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,22 +25,22 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.0.0-beta.242",
29
- "@aglyn/shared-data-enums": "1.0.0-beta.242",
30
- "@aglyn/shared-data-mdi": "1.0.0-beta.242",
31
- "@aglyn/shared-data-types": "1.0.0-beta.242",
32
- "@aglyn/shared-ui-email-campaigns": "1.0.0-beta.242",
33
- "@aglyn/shared-ui-jsx": "1.0.0-beta.242",
34
- "@aglyn/shared-ui-snackstack": "1.0.0-beta.242",
35
- "@aglyn/shared-ui-theme": "1.0.0-beta.242",
36
- "@aglyn/shared-util-email": "1.0.0-beta.242",
37
- "@aglyn/shared-util-errors": "1.0.0-beta.242",
38
- "@aglyn/shared-util-http": "1.0.0-beta.242",
39
- "@aglyn/shared-util-timestamp": "1.0.0-beta.242",
40
- "@aglyn/shared-util-tools": "1.0.0-beta.242",
41
- "@aglyn/tenant-data-admin": "1.0.0-beta.242",
42
- "@aglyn/tenant-feature-instance": "1.0.0-beta.242",
43
- "@aglyn/tenant-runtime": "1.0.0-beta.242",
28
+ "@aglyn/aglyn": "1.0.0-beta.243",
29
+ "@aglyn/shared-data-enums": "1.0.0-beta.243",
30
+ "@aglyn/shared-data-mdi": "1.0.0-beta.243",
31
+ "@aglyn/shared-data-types": "1.0.0-beta.243",
32
+ "@aglyn/shared-ui-email-campaigns": "1.0.0-beta.243",
33
+ "@aglyn/shared-ui-jsx": "1.0.0-beta.243",
34
+ "@aglyn/shared-ui-snackstack": "1.0.0-beta.243",
35
+ "@aglyn/shared-ui-theme": "1.0.0-beta.243",
36
+ "@aglyn/shared-util-email": "1.0.0-beta.243",
37
+ "@aglyn/shared-util-errors": "1.0.0-beta.243",
38
+ "@aglyn/shared-util-http": "1.0.0-beta.243",
39
+ "@aglyn/shared-util-timestamp": "1.0.0-beta.243",
40
+ "@aglyn/shared-util-tools": "1.0.0-beta.243",
41
+ "@aglyn/tenant-data-admin": "1.0.0-beta.243",
42
+ "@aglyn/tenant-feature-instance": "1.0.0-beta.243",
43
+ "@aglyn/tenant-runtime": "1.0.0-beta.243",
44
44
  "@swc/helpers": "0.5.23"
45
45
  },
46
46
  "peerDependencies": {
@@ -106,6 +106,16 @@ import { type AiLayoutPictureSlot, type AiLayoutPictureSource } from '../layout-
106
106
  * searches, and then — a product or a hero only — reuses an on-topic photo
107
107
  * the job already shows rather than take a starter. Every slot of a
108
108
  * craft's site tries the craft's broad searches last.
109
+ * 7. **A product takes the surest photo, even a borrowed one** (the beta.242
110
+ * Tidewater Soap Works start: a sauna for "Bath Gift Set", colognes for
111
+ * "Natural Body Lotion", a bathroom shelf for "Soap Bar Trio" and a soap
112
+ * dispenser for its starter size, while the collection tiles beside them
113
+ * were good). A product's searches are ranked by how sure they are: its
114
+ * own photo (the head noun or its kin among the first tags), then a photo
115
+ * OF its category, new or one the job already shows, then a weak hit of
116
+ * its own. No product shows a room or a scene, a fragrance bottle, or what
117
+ * its kin shuns (a pump for a bar) unless it names it; "bath" in a bath
118
+ * gift set is what the set is for; a size is never the product.
109
119
  *
110
120
  * A slot nothing acceptable answered — the library down, refusing, or out
111
121
  * of time — is left `null` for the starter photos. A named object is never
@@ -185,6 +195,8 @@ export interface AiStockSiteTerms {
185
195
  * site names no craft.
186
196
  */
187
197
  core: string[];
198
+ /** Words no photo of the site's craft carries unless the slot or the brief names them ({@link CRAFT_KIN}). */
199
+ shun: string[];
188
200
  }
189
201
  /** The site's terms, read from its business type. */
190
202
  export declare function aiStockSiteTerms(businessType: string): AiStockSiteTerms;
@@ -229,6 +241,19 @@ export interface AiStockSearch extends StockPhotoSearchRequest {
229
241
  lead?: boolean;
230
242
  /** Whether the hit's first tags must name the site's world, where the object need not lead (AGL-3660). */
231
243
  leadWorld?: boolean;
244
+ /** 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). */
245
+ leadAny?: readonly string[];
246
+ /** Whether it fills a product: no room, no scene, no fragrance bottle ({@link PRODUCT_SCENES}, AGL-3660). */
247
+ product?: boolean;
248
+ /** Words its hits never carry unless the slot or the brief names them ({@link AiStockSiteTerms.shun}). */
249
+ shun?: readonly string[];
250
+ /**
251
+ * How sure a product's search is (AGL-3660). Absent: its own photo, the
252
+ * head noun among the first tags. `borrow`: a photo OF its category, which
253
+ * may repeat one the job already shows. `weak`: the head noun anywhere, or
254
+ * the category anywhere — taken only once nothing surer is left.
255
+ */
256
+ tier?: 'borrow' | 'weak';
232
257
  }
233
258
  /** A slot's part of a page, where it asks for more than its role: a collection tile or a story of the craft (AGL-3660). */
234
259
  export type AiStockSlotPart = 'collection' | 'story';
@@ -267,16 +292,29 @@ export interface AiStockProductFallback {
267
292
  * back to its own craft (AGL-3660). The Saltmarsh Soap Co start (2026-10-10)
268
293
  * found no hit naming "bar" or "box" among the first tags, and four of its
269
294
  * five products took the starter photos — a laptop and roses, a living room
270
- * of plants. So, in order:
295
+ * of plants. And the beta.242 Tidewater Soap Works start (2026-10-11) showed
296
+ * that the head noun anywhere is not enough: its own weak hits put a sauna
297
+ * under "Bath Gift Set", colognes under "Natural Body Lotion", a bathroom
298
+ * shelf under "Soap Bar Trio" and a soap dispenser under its starter size,
299
+ * while the collection tiles beside them, searched for the category, were
300
+ * good. So the searches are ranked by how sure they are ({@link AiStockSearch.tier}):
271
301
  *
272
- * 1. The same searches again, the head noun named anywhere among the tags
273
- * (no extra search: the page remembers its answers), and a gift's own
274
- * wrapper with the craft ("soap gift box").
275
- * 2. The site's broad searches ("handmade soap", "natural skincare"), any hit
276
- * naming the craft itself ({@link AiStockSiteTerms.core}).
302
+ * 1. Its own: the head noun (or its kin) among the first tags, as above.
303
+ * 2. `borrow`: a photo OF its category — the category alone, then the craft's
304
+ * broad searches ("handmade soap", "natural skincare"), one of the
305
+ * product's kin or the craft's own names among the first tags. A product
306
+ * may repeat one the job already shows, a collection tile's photo or
307
+ * another product's ({@link aiLayoutStockPhotoSource}): a borrowed
308
+ * on-topic photo beats a weak specific one.
309
+ * 3. `weak`: the same searches again, the head noun named anywhere among the
310
+ * tags (no extra search: the page remembers its answers), a gift's own
311
+ * wrapper with the craft ("soap gift box"), and the craft's broad searches,
312
+ * any hit naming the craft itself ({@link AiStockSiteTerms.core}).
277
313
  *
278
- * The source then reuses an on-topic photo another slot of the job already
279
- * shows before it gives up ({@link aiLayoutStockPhotoSource}).
314
+ * Every one of them turns down a room or a scene, a fragrance bottle, and
315
+ * what the product's kin shuns (a pump for a bar of soap), unless the
316
+ * product names it. A size never names the product: "Bath Gift Set Starter
317
+ * Size" is a bath gift set.
280
318
  */
281
319
  export declare function aiStockProductSearches(slot: Pick<AiLayoutPictureSlot, 'aspect' | 'product'>, craft: string, domain?: readonly string[], fallback?: AiStockProductFallback): AiStockSearch[];
282
320
  /** The searches a slot tries, in order, most specific first, each distinct. */
@@ -311,6 +349,12 @@ export interface AiStockJudgement {
311
349
  words: readonly string[];
312
350
  core: readonly string[];
313
351
  }>;
352
+ /** Phrases of which one must be among the hit's first tags ({@link AiStockSearch.leadAny}). */
353
+ leadAny?: readonly string[];
354
+ /** Whether it judges for a product: no room, no scene, no fragrance bottle (AGL-3660). */
355
+ product?: boolean;
356
+ /** Words a hit never carries unless the subject or the brief names them ({@link AiStockSiteTerms.shun}). */
357
+ shun?: readonly string[];
314
358
  }
315
359
  /**
316
360
  * Whether a hit carries a topic its site never named ({@link SENSITIVE_TOPICS}):