@aglyn/plugins-ai 1.0.0-beta.242 → 1.0.0-beta.244
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/jobs/ai-job-layout-language.js +11 -6
- package/src/lib/jobs/ai-job-layout-language.js.map +1 -1
- package/src/lib/jobs/ai-job-page-language.d.ts +3 -1
- package/src/lib/jobs/ai-job-page-language.js +17 -5
- package/src/lib/jobs/ai-job-page-language.js.map +1 -1
- package/src/lib/jobs/ai-job-page-step.js +11 -4
- package/src/lib/jobs/ai-job-page-step.js.map +1 -1
- package/src/lib/jobs/ai-job-site-step.js +22 -8
- package/src/lib/jobs/ai-job-site-step.js.map +1 -1
- package/src/lib/jobs/ai-layout-stock-photos.d.ts +52 -8
- package/src/lib/jobs/ai-layout-stock-photos.js +351 -72
- package/src/lib/jobs/ai-layout-stock-photos.js.map +1 -1
- package/src/lib/jobs/ai-site-publish.d.ts +14 -0
- package/src/lib/jobs/ai-site-publish.js +28 -3
- package/src/lib/jobs/ai-site-publish.js.map +1 -1
- package/src/lib/jobs/fixtures/ai-stock-photo-tidewater-recordings.d.ts +27 -0
- package/src/lib/jobs/fixtures/ai-stock-photo-tidewater-recordings.js +261 -0
- package/src/lib/jobs/fixtures/ai-stock-photo-tidewater-recordings.js.map +1 -0
- package/src/lib/layout-language/ai-layout-links.js +5 -2
- package/src/lib/layout-language/ai-layout-links.js.map +1 -1
- package/src/lib/runtime/ai-doctrine-validators.d.ts +42 -1
- package/src/lib/runtime/ai-doctrine-validators.js +98 -11
- package/src/lib/runtime/ai-doctrine-validators.js.map +1 -1
- package/src/lib/usage/ai-quota-checks.d.ts +13 -3
- package/src/lib/usage/ai-quota-checks.js +46 -8
- package/src/lib/usage/ai-quota-checks.js.map +1 -1
|
@@ -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.
|
|
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.
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
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
|
-
*
|
|
279
|
-
*
|
|
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}):
|