@vectoriox/iox-ui 5.153.0 → 5.155.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.
@@ -1,4 +1,4 @@
1
- import { AiStep, JsonSchema, PlanWordContext, AdjustAxis, AdjustKind, SerializedNode, SectionInput, KeptReason, AiFeature, WordsArea, PictureReview, AiTokenPrice, AiModelEntry, ArtDirection, AiEntitlementsView, AiRefusal } from '@vectoriox/iox-ui/generation-core';
1
+ import { AiStep, JsonSchema, PlanWordContext, AdjustAxis, AdjustKind, SerializedNode, SectionInput, KeptReason, AiFeature, WordsArea, AiRefusal, PictureReview, AiTokenPrice, AiModelEntry, ArtDirection, AiEntitlementsView } from '@vectoriox/iox-ui/generation-core';
2
2
  import { DesignChoices, DesignMode } from '@vectoriox/iox-ui/design-core';
3
3
 
4
4
  /**
@@ -1537,7 +1537,13 @@ declare enum AssistRouteKey {
1537
1537
  /** S3: one photo up, through the normal upload path, marked as this flow's (Undo may remove it). */
1538
1538
  Photos = "photos",
1539
1539
  Run = "run",
1540
- Undo = "undo"
1540
+ Undo = "undo",
1541
+ /** S7 Files box ▸ Generate: the cost before the button (and why it may not run). */
1542
+ GenerateQuote = "generateQuote",
1543
+ /** S7: a press — candidates are made by a run. */
1544
+ Generate = "generate",
1545
+ /** S7: the asker's run, polled until every candidate has settled. */
1546
+ GenerateRun = "generateRun"
1541
1547
  }
1542
1548
  /** The path templates, `:param` filled by `assistPath` — neither side hand-types a URL. */
1543
1549
  declare const ASSIST_ROUTES: Readonly<Record<AssistRouteKey, string>>;
@@ -1620,11 +1626,18 @@ declare const languageName: (locale: string, uiLang: string) => string;
1620
1626
  * proof: what may be asked, how the asked words become the prompt, what it costs before the button, when it is refused
1621
1627
  * before any call, and what a made picture is afterwards.
1622
1628
  *
1623
- * It adds NO generator: a picture is made by the M7 pipeline (`AiStep.MakePictures`), looked at by the same review
1624
- * (`AiStep.CheckPictures`, `PictureReview`), under the same art-direction preamble (`artDirectionPreamble`). What differs
1629
+ * It adds NO generator: a picture is made by the M7 pipeline's own call and looked at by its own review
1630
+ * (`PictureReview`), under the same art-direction preamble (`artDirectionPreamble`). The two calls run as steps of
1631
+ * Assist's own (`GENERATE_STEPS` — `AiStep.AssistPicture` / `AssistPictureReview`, which `AI_STEP_RUNS_AS` the M7 steps'
1632
+ * models), so the Assist feature alone allows Generate and its ledger rows are Assist's. What differs
1625
1633
  * from a site build's pictures is the owner's part: THEY write the words, THEY choose how many, and every candidate made
1626
1634
  * is charged and KEPT — a review that says no marks the picture, it does not buy a second try (gateway rule 3, R-H12).
1627
1635
  */
1636
+ /** The two steps a press runs — Assist's own names for the M7 picture call and its review. */
1637
+ declare const GENERATE_STEPS: {
1638
+ readonly picture: AiStep.AssistPicture;
1639
+ readonly review: AiStep.AssistPictureReview;
1640
+ };
1628
1641
  declare enum GenerateKind {
1629
1642
  Photo = "photo",
1630
1643
  Video = "video"
@@ -1740,8 +1753,8 @@ interface GenerateModelChoice {
1740
1753
  */
1741
1754
  declare function generateModelChoices(models: ReadonlyArray<AiModelEntry>, review: AiTokenPrice): GenerateModelChoice[];
1742
1755
  /**
1743
- * The plan features Generate needs: the surface's own (AI Assist, A-D6) AND the one each step it runs belongs to
1744
- * (`AI_STEP_FEATURE` — the picture steps are the site generator's). A plan missing any is refused `NotInPlan`.
1756
+ * The plan features Generate needs — what its two steps belong to (`AI_STEP_FEATURE`): AI Assist, alone (Doron,
1757
+ * 2026-11-24; a studio needs no site generation to make a picture). A plan missing it is refused `NotInPlan`.
1745
1758
  */
1746
1759
  declare const GENERATE_FEATURES: ReadonlyArray<AiFeature>;
1747
1760
  /**
@@ -1806,6 +1819,50 @@ interface GenerateOutcome {
1806
1819
  readonly done: boolean;
1807
1820
  }
1808
1821
  declare function generateOutcome(candidates: ReadonlyArray<GenerateCandidate>): GenerateOutcome;
1822
+ /** Where a press stands. */
1823
+ declare enum GenerateRunStatus {
1824
+ Queued = "queued",
1825
+ Making = "making",
1826
+ /** Every candidate settled (made, flagged or failed). */
1827
+ Done = "done",
1828
+ /** The run itself could not go on (refused mid-way, or the server gave up) — what was made is still kept. */
1829
+ Failed = "failed"
1830
+ }
1831
+ declare const FINAL_GENERATE_STATUSES: ReadonlyArray<GenerateRunStatus>;
1832
+ /** `GET …/generate/quote?count=&model=` — the cost before the button, from the SERVER's prices and meter. */
1833
+ interface GenerateQuoteView {
1834
+ /** Null when no model can make a picture on this studio's key (then `refusal` or `models: []` says why). */
1835
+ readonly estimate: GenerateEstimate | null;
1836
+ /** The model a press would run on (the asked one, else the studio's default). */
1837
+ readonly model: string | null;
1838
+ readonly models: ReadonlyArray<GenerateModelChoice>;
1839
+ /** Why a press would be refused right now — the button is off and says this. Null = it may run. */
1840
+ readonly refusal: AiRefusal | null;
1841
+ /** Credits left this period; null on an own key. */
1842
+ readonly remaining: number | null;
1843
+ /** "Your look": the site's art direction in a few words, or null when the studio has no look to wear yet. */
1844
+ readonly look: string | null;
1845
+ }
1846
+ /** `POST …/generate` → 202. */
1847
+ interface GenerateAccepted {
1848
+ readonly runId: string;
1849
+ }
1850
+ /** `GET …/generate/:runId` — the asker's run. */
1851
+ interface GenerateRunView {
1852
+ readonly runId: string;
1853
+ readonly status: `${GenerateRunStatus}`;
1854
+ readonly prompt: string;
1855
+ readonly shape: string;
1856
+ readonly count: number;
1857
+ readonly look: boolean;
1858
+ readonly model: string;
1859
+ /** The cost shown and agreed to — the most the run may spend. */
1860
+ readonly shown: number;
1861
+ readonly candidates: ReadonlyArray<GenerateCandidate>;
1862
+ readonly outcome: GenerateOutcome;
1863
+ /** `Failed`: why, in a refusal code or a short reason — never a stack. */
1864
+ readonly error?: string;
1865
+ }
1809
1866
 
1810
- export { AI_DRAFT_SOURCE, AROUND_ITEMS_MAX, AROUND_TEXT_CHARS, ASK_SECTION_PATTERNS, ASK_STYLE_SETS, ASSIST_MODEL_AUTO, ASSIST_POLL_MS, ASSIST_ROUTES, AssistBriefError, AssistBudgetError, AssistFieldKind, AssistHandOff, AssistIssueCode, AssistMemoryOutcome, AssistPathError, AssistPermission, AssistRefusalCode, AssistRouteKey, AssistRunStatus, AssistScope, AssistStep, AssistSurface, AssistTurnStatus, BOOLEAN_FALSE, BOOLEAN_TRUE, CandidateFlag, CandidateState, CommitKind, EditFamily, FIELDS_PER_PART, FIELD_HANDLE_PREFIX, FOCUS_TEXT_CHARS, FieldsAnswerKey, GENERATE_COUNTS, GENERATE_COUNT_DEFAULT, GENERATE_FEATURES, GENERATE_KINDS, GENERATE_PROMPT_MAX, GENERATE_PROMPT_MIN, GENERATE_SHAPES, GENERATE_SHAPE_DEFAULT, GenerateIssueCode, GenerateKind, GenerateUnavailable, ItemSuggestionKind, LOCALE_NAME_LANGUAGES, LOOK_AXES, LOOK_AXIS_LABELS, LOOK_KEEP, LookAnswerKey, LookAxis, LookButtons, MAX_ASSIST_PHOTOS, MAX_ASSIST_PROPERTIES, MAX_ROUTE_PROPERTIES, MAX_SENTENCE_CHARS, MEMORY_TURNS, MODE_LABELS, NEW_TARGET, NONE_TEXT, NeverWriteReason, OWNER_FILL_MAX_CHARS, PAGE_WORD_SLOTS, PHOTOS_PER_READ, PHOTO_GROUP_HANDLE_PREFIX, PageChangeOp, PagePartKind, PageSuggestionKind, PhotoAnswerKey, PhotoGrouping, RouteAnswerKey, SECTION_START, SHORTEN_FROM_CHARS, SHORTEN_HEADING_FROM_CHARS, SHORTEN_TEXT_FROM_CHARS, SIBLING_HANDLE_PREFIX, SURFACES, SectionChangeKind, SectionsAnswerKey, StyleAnswerKey, SurfaceStatus, ValueSource, WORDS_PER_PART, WordsAnswerKey, adjustAxesOf, aiDraftStamp, applyFieldEdits, applyLookEdits, applyPageEdits, applySectionEdits, applyStyleEdits, applyWordEdits, askSectionPatternNames, askableStyles, assertAssistBudget, assistBudgetIssues, assistFactIssues, assistFields, assistPath, assistSession, assistSessionKey, builtSurfaces, candidateVerdict, clipText, commitOf, containsHtml, decodeFieldsAnswers, decodeLookAnswers, decodePhotoDraftAnswers, decodeSectionsAnswers, decodeStyleAnswers, decodeWordsAnswers, describeFromPage, draftFromPhotos, escapeText, estimateGenerate, fieldHandle, fieldsJsonSchema, fieldsNamedIn, generateModelChoices, generateOutcome, generatePicturePrompt, generateRefusal, generateRequestIssues, groupPhotos, isAiDraft, isEmptyFieldValue, isPlainRecord, isRunBusy, isSchemeEdit, isSectionEdit, isSessionOf, isSiteLookEdit, isSizeEdit, isStyleEdit, isTerminalTurn, isWritable, itemLocales, itemSuggestions, languageName, lookAxisValue, lookHex, lookJsonSchema, lookNames, memoryLine, namedLocale, ownerFillFields, ownerFillIssues, pageLooks, pageSuggestions, pageWriteLocale, paragraphsToRichText, photoDraftJsonSchema, photoGroupBrief, photoGroupHandle, photoReadCount, photoSlots, primaryLocale, promptAsksForWords, readFieldValue, readLocaleValues, readRoute, readableWords, resolveHandle, richTextParagraphs, routeJsonSchema, sectionLabel, sectionPatternOf, sectionsJsonSchema, serializedBaselineStyles, sessionMemory, shapeForSlot, styleJsonSchema, suggestPhotoType, summarizeItem, summarizeLook, summarizePage, summarizePhotos, surfacePermissions, surfaceSpec, surfaceUndoPermissions, takesPhotos, titleField, turnLocale, unknownHandles, validateRunRequest, validateTurnRequest, withOwnerFill, wordsJsonSchema };
1811
- export type { AiDraftStamp, AssistChange, AssistEdit, AssistField, AssistIssue, AssistMemoryLine, AssistModelChoice, AssistPhoto, AssistRoute, AssistRunRequest, AssistRunView, AssistSession, AssistTarget, AssistTurn, AssistTurnAccepted, AssistTurnProgress, AssistTurnRefusal, AssistTurnRequest, AssistWordContext, BaselineStyles, Brief, BriefRules, BriefValue, CandidateVerdict, ContentControllerDef, ContentPropertyDef, ContentRecord, ContentTypeSchema, DraftValue, FieldChange, FieldEdit, FieldEditContext, FieldEditsOutcome, FieldsSchemaExtra, FieldsSchemaOptions, FieldsSchemas, GenerateCandidate, GenerateEstimate, GenerateIssue, GenerateModelChoice, GenerateOutcome, GeneratePicturesRequest, GenerateSlot, HandleMap, HandleResolution, HandleTarget, ItemAround, ItemBrief, ItemBriefContext, ItemBriefField, ItemFocus, ItemSuggestion, ItemSummary, KeptDraft, LookEditsOutcome, LookMap, LookSchemas, LookSummary, LookTarget, NeverWrite, NodeStyleEdit, PageAround, PageBrief, PageBriefContext, PageChange, PageEdit, PageEditContext, PageEditsOutcome, PageFocus, PageLook, PagePart, PageSectionSummary, PageSuggestion, PhotoBriefField, PhotoDraft, PhotoDraftAnswer, PhotoDraftContext, PhotoDraftOutcome, PhotoGroup, PhotoSlots, PhotosAround, PhotosBrief, PhotosBriefContext, PhotosFocus, SchemeEdit, SectionAdd, SectionChange, SectionEdit, SectionEditContext, SectionEditsOutcome, SectionMap, SectionMove, SectionRemove, SectionSwap, SectionTarget, SiteLookChange, SiteLookEdit, SizeEdit, StyleChange, StyleEdit, StyleEditContext, StyleEditsOutcome, StyleSchemas, SummarizedItem, SummarizedPage, SummarizedPhotos, SurfaceSpec, WalkedLook, WordChange, WordEdit, WordEditContext, WordEditsOutcome, WordsSchemas, WrittenWords };
1867
+ export { AI_DRAFT_SOURCE, AROUND_ITEMS_MAX, AROUND_TEXT_CHARS, ASK_SECTION_PATTERNS, ASK_STYLE_SETS, ASSIST_MODEL_AUTO, ASSIST_POLL_MS, ASSIST_ROUTES, AssistBriefError, AssistBudgetError, AssistFieldKind, AssistHandOff, AssistIssueCode, AssistMemoryOutcome, AssistPathError, AssistPermission, AssistRefusalCode, AssistRouteKey, AssistRunStatus, AssistScope, AssistStep, AssistSurface, AssistTurnStatus, BOOLEAN_FALSE, BOOLEAN_TRUE, CandidateFlag, CandidateState, CommitKind, EditFamily, FIELDS_PER_PART, FIELD_HANDLE_PREFIX, FINAL_GENERATE_STATUSES, FOCUS_TEXT_CHARS, FieldsAnswerKey, GENERATE_COUNTS, GENERATE_COUNT_DEFAULT, GENERATE_FEATURES, GENERATE_KINDS, GENERATE_PROMPT_MAX, GENERATE_PROMPT_MIN, GENERATE_SHAPES, GENERATE_SHAPE_DEFAULT, GENERATE_STEPS, GenerateIssueCode, GenerateKind, GenerateRunStatus, GenerateUnavailable, ItemSuggestionKind, LOCALE_NAME_LANGUAGES, LOOK_AXES, LOOK_AXIS_LABELS, LOOK_KEEP, LookAnswerKey, LookAxis, LookButtons, MAX_ASSIST_PHOTOS, MAX_ASSIST_PROPERTIES, MAX_ROUTE_PROPERTIES, MAX_SENTENCE_CHARS, MEMORY_TURNS, MODE_LABELS, NEW_TARGET, NONE_TEXT, NeverWriteReason, OWNER_FILL_MAX_CHARS, PAGE_WORD_SLOTS, PHOTOS_PER_READ, PHOTO_GROUP_HANDLE_PREFIX, PageChangeOp, PagePartKind, PageSuggestionKind, PhotoAnswerKey, PhotoGrouping, RouteAnswerKey, SECTION_START, SHORTEN_FROM_CHARS, SHORTEN_HEADING_FROM_CHARS, SHORTEN_TEXT_FROM_CHARS, SIBLING_HANDLE_PREFIX, SURFACES, SectionChangeKind, SectionsAnswerKey, StyleAnswerKey, SurfaceStatus, ValueSource, WORDS_PER_PART, WordsAnswerKey, adjustAxesOf, aiDraftStamp, applyFieldEdits, applyLookEdits, applyPageEdits, applySectionEdits, applyStyleEdits, applyWordEdits, askSectionPatternNames, askableStyles, assertAssistBudget, assistBudgetIssues, assistFactIssues, assistFields, assistPath, assistSession, assistSessionKey, builtSurfaces, candidateVerdict, clipText, commitOf, containsHtml, decodeFieldsAnswers, decodeLookAnswers, decodePhotoDraftAnswers, decodeSectionsAnswers, decodeStyleAnswers, decodeWordsAnswers, describeFromPage, draftFromPhotos, escapeText, estimateGenerate, fieldHandle, fieldsJsonSchema, fieldsNamedIn, generateModelChoices, generateOutcome, generatePicturePrompt, generateRefusal, generateRequestIssues, groupPhotos, isAiDraft, isEmptyFieldValue, isPlainRecord, isRunBusy, isSchemeEdit, isSectionEdit, isSessionOf, isSiteLookEdit, isSizeEdit, isStyleEdit, isTerminalTurn, isWritable, itemLocales, itemSuggestions, languageName, lookAxisValue, lookHex, lookJsonSchema, lookNames, memoryLine, namedLocale, ownerFillFields, ownerFillIssues, pageLooks, pageSuggestions, pageWriteLocale, paragraphsToRichText, photoDraftJsonSchema, photoGroupBrief, photoGroupHandle, photoReadCount, photoSlots, primaryLocale, promptAsksForWords, readFieldValue, readLocaleValues, readRoute, readableWords, resolveHandle, richTextParagraphs, routeJsonSchema, sectionLabel, sectionPatternOf, sectionsJsonSchema, serializedBaselineStyles, sessionMemory, shapeForSlot, styleJsonSchema, suggestPhotoType, summarizeItem, summarizeLook, summarizePage, summarizePhotos, surfacePermissions, surfaceSpec, surfaceUndoPermissions, takesPhotos, titleField, turnLocale, unknownHandles, validateRunRequest, validateTurnRequest, withOwnerFill, wordsJsonSchema };
1868
+ export type { AiDraftStamp, AssistChange, AssistEdit, AssistField, AssistIssue, AssistMemoryLine, AssistModelChoice, AssistPhoto, AssistRoute, AssistRunRequest, AssistRunView, AssistSession, AssistTarget, AssistTurn, AssistTurnAccepted, AssistTurnProgress, AssistTurnRefusal, AssistTurnRequest, AssistWordContext, BaselineStyles, Brief, BriefRules, BriefValue, CandidateVerdict, ContentControllerDef, ContentPropertyDef, ContentRecord, ContentTypeSchema, DraftValue, FieldChange, FieldEdit, FieldEditContext, FieldEditsOutcome, FieldsSchemaExtra, FieldsSchemaOptions, FieldsSchemas, GenerateAccepted, GenerateCandidate, GenerateEstimate, GenerateIssue, GenerateModelChoice, GenerateOutcome, GeneratePicturesRequest, GenerateQuoteView, GenerateRunView, GenerateSlot, HandleMap, HandleResolution, HandleTarget, ItemAround, ItemBrief, ItemBriefContext, ItemBriefField, ItemFocus, ItemSuggestion, ItemSummary, KeptDraft, LookEditsOutcome, LookMap, LookSchemas, LookSummary, LookTarget, NeverWrite, NodeStyleEdit, PageAround, PageBrief, PageBriefContext, PageChange, PageEdit, PageEditContext, PageEditsOutcome, PageFocus, PageLook, PagePart, PageSectionSummary, PageSuggestion, PhotoBriefField, PhotoDraft, PhotoDraftAnswer, PhotoDraftContext, PhotoDraftOutcome, PhotoGroup, PhotoSlots, PhotosAround, PhotosBrief, PhotosBriefContext, PhotosFocus, SchemeEdit, SectionAdd, SectionChange, SectionEdit, SectionEditContext, SectionEditsOutcome, SectionMap, SectionMove, SectionRemove, SectionSwap, SectionTarget, SiteLookChange, SiteLookEdit, SizeEdit, StyleChange, StyleEdit, StyleEditContext, StyleEditsOutcome, StyleSchemas, SummarizedItem, SummarizedPage, SummarizedPhotos, SurfaceSpec, WalkedLook, WordChange, WordEdit, WordEditContext, WordEditsOutcome, WordsSchemas, WrittenWords };
@@ -1,4 +1,4 @@
1
- import { AiStep, STRICT_SCHEMA_BUDGET, strictSchemaComplexity, jsonText, jsonListOf, jsonOneOf, jsonClosedObject, jsonAnyOf, PlanWordIssueCode, factIssues, walkSerialized, AdjustKind, AdjustAxis, adjustStepOf, ADJUST_STEPS, NODE_BASELINES, adjustStyleProps, ADJUST_AXIS_LABELS, adjustStepLabel, patternById, carryInto, composeSection, PICTURE_ASPECTS, artDirectionPreamble, frameWords, emptyAreaPhrase, estimateStepCredits, creditsOfUsd, modelCanDo, AiFeature, AI_STEP_FEATURE, AiRefusalCode, aiRefusalNext, pictureReviewPasses } from '@vectoriox/iox-ui/generation-core';
1
+ import { AiStep, STRICT_SCHEMA_BUDGET, strictSchemaComplexity, jsonText, jsonListOf, jsonOneOf, jsonClosedObject, jsonAnyOf, PlanWordIssueCode, factIssues, walkSerialized, AdjustKind, AdjustAxis, adjustStepOf, ADJUST_STEPS, NODE_BASELINES, adjustStyleProps, ADJUST_AXIS_LABELS, adjustStepLabel, patternById, carryInto, composeSection, PICTURE_ASPECTS, artDirectionPreamble, frameWords, emptyAreaPhrase, estimateStepCredits, creditsOfUsd, aiModelStep, modelCanDo, AI_STEP_FEATURE, AiRefusalCode, aiRefusalNext, pictureReviewPasses } from '@vectoriox/iox-ui/generation-core';
2
2
  import { elementStylesFor, colorSchemeOf, ColorScheme, COLOR_SCHEME_TYPES, elementStyleById, COLOR_SCHEMES, NEW_NODE_STYLE_DEFAULTS, setColorScheme, switchElementStyle, flavorPackById, parseHexColor, resolveDesignChoices, SPEC_AXES, stylePresetOfChoices, BETWEEN_IDS, ANIMATE_IDS, SCROLL_IDS, COLUMN_IDS, TINT_IDS, STYLE_PRESETS, stylePresetById, presetChoices, designTokenRows, auditDesignContrast } from '@vectoriox/iox-ui/design-core';
3
3
 
4
4
  /**
@@ -2811,6 +2811,12 @@ var AssistRouteKey;
2811
2811
  AssistRouteKey["Photos"] = "photos";
2812
2812
  AssistRouteKey["Run"] = "run";
2813
2813
  AssistRouteKey["Undo"] = "undo";
2814
+ /** S7 Files box ▸ Generate: the cost before the button (and why it may not run). */
2815
+ AssistRouteKey["GenerateQuote"] = "generateQuote";
2816
+ /** S7: a press — candidates are made by a run. */
2817
+ AssistRouteKey["Generate"] = "generate";
2818
+ /** S7: the asker's run, polled until every candidate has settled. */
2819
+ AssistRouteKey["GenerateRun"] = "generateRun";
2814
2820
  })(AssistRouteKey || (AssistRouteKey = {}));
2815
2821
  /** The path templates, `:param` filled by `assistPath` — neither side hand-types a URL. */
2816
2822
  const ASSIST_ROUTES = {
@@ -2820,6 +2826,9 @@ const ASSIST_ROUTES = {
2820
2826
  [AssistRouteKey.Photos]: 'admin/api/org/:orgId/ai/assist/photos',
2821
2827
  [AssistRouteKey.Run]: 'admin/api/org/:orgId/ai/assist/turns/:turnId/run',
2822
2828
  [AssistRouteKey.Undo]: 'admin/api/org/:orgId/ai/assist/turns/:turnId/undo',
2829
+ [AssistRouteKey.GenerateQuote]: 'admin/api/org/:orgId/ai/assist/generate/quote',
2830
+ [AssistRouteKey.Generate]: 'admin/api/org/:orgId/ai/assist/generate',
2831
+ [AssistRouteKey.GenerateRun]: 'admin/api/org/:orgId/ai/assist/generate/:runId',
2823
2832
  };
2824
2833
  class AssistPathError extends Error {
2825
2834
  }
@@ -2972,11 +2981,15 @@ function validateTurnRequest(req) {
2972
2981
  * proof: what may be asked, how the asked words become the prompt, what it costs before the button, when it is refused
2973
2982
  * before any call, and what a made picture is afterwards.
2974
2983
  *
2975
- * It adds NO generator: a picture is made by the M7 pipeline (`AiStep.MakePictures`), looked at by the same review
2976
- * (`AiStep.CheckPictures`, `PictureReview`), under the same art-direction preamble (`artDirectionPreamble`). What differs
2984
+ * It adds NO generator: a picture is made by the M7 pipeline's own call and looked at by its own review
2985
+ * (`PictureReview`), under the same art-direction preamble (`artDirectionPreamble`). The two calls run as steps of
2986
+ * Assist's own (`GENERATE_STEPS` — `AiStep.AssistPicture` / `AssistPictureReview`, which `AI_STEP_RUNS_AS` the M7 steps'
2987
+ * models), so the Assist feature alone allows Generate and its ledger rows are Assist's. What differs
2977
2988
  * from a site build's pictures is the owner's part: THEY write the words, THEY choose how many, and every candidate made
2978
2989
  * is charged and KEPT — a review that says no marks the picture, it does not buy a second try (gateway rule 3, R-H12).
2979
2990
  */
2991
+ /** The two steps a press runs — Assist's own names for the M7 picture call and its review. */
2992
+ const GENERATE_STEPS = { picture: AiStep.AssistPicture, review: AiStep.AssistPictureReview };
2980
2993
  var GenerateKind;
2981
2994
  (function (GenerateKind) {
2982
2995
  GenerateKind["Photo"] = "photo";
@@ -3112,8 +3125,8 @@ function describeFromPage(context) {
3112
3125
  * is kept and marked, and the owner decides whether to press again.
3113
3126
  */
3114
3127
  function estimateGenerate(count, prices) {
3115
- const picture = estimateStepCredits(AiStep.MakePictures, prices.image);
3116
- const review = estimateStepCredits(AiStep.CheckPictures, prices.review);
3128
+ const picture = estimateStepCredits(GENERATE_STEPS.picture, prices.image);
3129
+ const review = estimateStepCredits(GENERATE_STEPS.review, prices.review);
3117
3130
  const n = Math.max(0, Math.floor(count));
3118
3131
  return { count: n, picture, review, each: creditsOfUsd((picture + review) / 100), total: creditsOfUsd((n * (picture + review)) / 100) };
3119
3132
  }
@@ -3122,17 +3135,17 @@ function estimateGenerate(count, prices) {
3122
3135
  * or one that cannot make a picture is never offered.
3123
3136
  */
3124
3137
  function generateModelChoices(models, review) {
3125
- const step = AiStep.MakePictures;
3138
+ const step = aiModelStep(GENERATE_STEPS.picture); // the vetted list names the step whose model this runs on
3126
3139
  return models
3127
3140
  .filter(m => !m.retired && m.steps.includes(step) && modelCanDo(m, step))
3128
3141
  .map(m => ({ id: m.id, label: m.label, recommended: !!m.recommendedFor?.includes(step), each: m.price ? estimateGenerate(1, { image: m.price, review }).each : null }))
3129
3142
  .sort((a, b) => Number(b.recommended) - Number(a.recommended));
3130
3143
  }
3131
3144
  /**
3132
- * The plan features Generate needs: the surface's own (AI Assist, A-D6) AND the one each step it runs belongs to
3133
- * (`AI_STEP_FEATURE` — the picture steps are the site generator's). A plan missing any is refused `NotInPlan`.
3145
+ * The plan features Generate needs — what its two steps belong to (`AI_STEP_FEATURE`): AI Assist, alone (Doron,
3146
+ * 2026-11-24; a studio needs no site generation to make a picture). A plan missing it is refused `NotInPlan`.
3134
3147
  */
3135
- const GENERATE_FEATURES = Array.from(new Set([AiFeature.Assist, AI_STEP_FEATURE[AiStep.MakePictures], AI_STEP_FEATURE[AiStep.CheckPictures]]));
3148
+ const GENERATE_FEATURES = Array.from(new Set(Object.values(GENERATE_STEPS).map(step => AI_STEP_FEATURE[step])));
3136
3149
  /**
3137
3150
  * May this press run? The answer BEFORE any provider call (R-H12): the plan is known, it includes what Generate needs,
3138
3151
  * and the credits left cover the cost shown. The Files box asks it to disable the button and say why; iox-cms asks it
@@ -3208,6 +3221,18 @@ function generateOutcome(candidates) {
3208
3221
  done: candidates.length > 0 && candidates.every(c => FINAL.includes(c.state)),
3209
3222
  };
3210
3223
  }
3224
+ // ── The wire: what the Files box asks and reads (the paths are `ASSIST_ROUTES` generateQuote · generate · generateRun) ──
3225
+ /** Where a press stands. */
3226
+ var GenerateRunStatus;
3227
+ (function (GenerateRunStatus) {
3228
+ GenerateRunStatus["Queued"] = "queued";
3229
+ GenerateRunStatus["Making"] = "making";
3230
+ /** Every candidate settled (made, flagged or failed). */
3231
+ GenerateRunStatus["Done"] = "done";
3232
+ /** The run itself could not go on (refused mid-way, or the server gave up) — what was made is still kept. */
3233
+ GenerateRunStatus["Failed"] = "failed";
3234
+ })(GenerateRunStatus || (GenerateRunStatus = {}));
3235
+ const FINAL_GENERATE_STATUSES = [GenerateRunStatus.Done, GenerateRunStatus.Failed];
3211
3236
 
3212
3237
  /**
3213
3238
  * @vectoriox/iox-ui/assist-core — the shared, FRAMEWORK-FREE vocabulary of AI Assist (iox-ai-guidance
@@ -3229,5 +3254,5 @@ function generateOutcome(candidates) {
3229
3254
  * Generated bundle index. Do not edit.
3230
3255
  */
3231
3256
 
3232
- export { AI_DRAFT_SOURCE, AROUND_ITEMS_MAX, AROUND_TEXT_CHARS, ASK_SECTION_PATTERNS, ASK_STYLE_SETS, ASSIST_MODEL_AUTO, ASSIST_POLL_MS, ASSIST_ROUTES, AssistBriefError, AssistBudgetError, AssistFieldKind, AssistHandOff, AssistIssueCode, AssistMemoryOutcome, AssistPathError, AssistPermission, AssistRefusalCode, AssistRouteKey, AssistRunStatus, AssistScope, AssistStep, AssistSurface, AssistTurnStatus, BOOLEAN_FALSE, BOOLEAN_TRUE, CandidateFlag, CandidateState, CommitKind, EditFamily, FIELDS_PER_PART, FIELD_HANDLE_PREFIX, FOCUS_TEXT_CHARS, FieldsAnswerKey, GENERATE_COUNTS, GENERATE_COUNT_DEFAULT, GENERATE_FEATURES, GENERATE_KINDS, GENERATE_PROMPT_MAX, GENERATE_PROMPT_MIN, GENERATE_SHAPES, GENERATE_SHAPE_DEFAULT, GenerateIssueCode, GenerateKind, GenerateUnavailable, ItemSuggestionKind, LOCALE_NAME_LANGUAGES, LOOK_AXES, LOOK_AXIS_LABELS, LOOK_KEEP, LookAnswerKey, LookAxis, LookButtons, MAX_ASSIST_PHOTOS, MAX_ASSIST_PROPERTIES, MAX_ROUTE_PROPERTIES, MAX_SENTENCE_CHARS, MEMORY_TURNS, MODE_LABELS, NEW_TARGET, NONE_TEXT, NeverWriteReason, OWNER_FILL_MAX_CHARS, PAGE_WORD_SLOTS, PHOTOS_PER_READ, PHOTO_GROUP_HANDLE_PREFIX, PageChangeOp, PagePartKind, PageSuggestionKind, PhotoAnswerKey, PhotoGrouping, RouteAnswerKey, SECTION_START, SHORTEN_FROM_CHARS, SHORTEN_HEADING_FROM_CHARS, SHORTEN_TEXT_FROM_CHARS, SIBLING_HANDLE_PREFIX, SURFACES, SectionChangeKind, SectionsAnswerKey, StyleAnswerKey, SurfaceStatus, ValueSource, WORDS_PER_PART, WordsAnswerKey, adjustAxesOf, aiDraftStamp, applyFieldEdits, applyLookEdits, applyPageEdits, applySectionEdits, applyStyleEdits, applyWordEdits, askSectionPatternNames, askableStyles, assertAssistBudget, assistBudgetIssues, assistFactIssues, assistFields, assistPath, assistSession, assistSessionKey, builtSurfaces, candidateVerdict, clipText, commitOf, containsHtml, decodeFieldsAnswers, decodeLookAnswers, decodePhotoDraftAnswers, decodeSectionsAnswers, decodeStyleAnswers, decodeWordsAnswers, describeFromPage, draftFromPhotos, escapeText, estimateGenerate, fieldHandle, fieldsJsonSchema, fieldsNamedIn, generateModelChoices, generateOutcome, generatePicturePrompt, generateRefusal, generateRequestIssues, groupPhotos, isAiDraft, isEmptyFieldValue, isPlainRecord, isRunBusy, isSchemeEdit, isSectionEdit, isSessionOf, isSiteLookEdit, isSizeEdit, isStyleEdit, isTerminalTurn, isWritable, itemLocales, itemSuggestions, languageName, lookAxisValue, lookHex, lookJsonSchema, lookNames, memoryLine, namedLocale, ownerFillFields, ownerFillIssues, pageLooks, pageSuggestions, pageWriteLocale, paragraphsToRichText, photoDraftJsonSchema, photoGroupBrief, photoGroupHandle, photoReadCount, photoSlots, primaryLocale, promptAsksForWords, readFieldValue, readLocaleValues, readRoute, readableWords, resolveHandle, richTextParagraphs, routeJsonSchema, sectionLabel, sectionPatternOf, sectionsJsonSchema, serializedBaselineStyles, sessionMemory, shapeForSlot, styleJsonSchema, suggestPhotoType, summarizeItem, summarizeLook, summarizePage, summarizePhotos, surfacePermissions, surfaceSpec, surfaceUndoPermissions, takesPhotos, titleField, turnLocale, unknownHandles, validateRunRequest, validateTurnRequest, withOwnerFill, wordsJsonSchema };
3257
+ export { AI_DRAFT_SOURCE, AROUND_ITEMS_MAX, AROUND_TEXT_CHARS, ASK_SECTION_PATTERNS, ASK_STYLE_SETS, ASSIST_MODEL_AUTO, ASSIST_POLL_MS, ASSIST_ROUTES, AssistBriefError, AssistBudgetError, AssistFieldKind, AssistHandOff, AssistIssueCode, AssistMemoryOutcome, AssistPathError, AssistPermission, AssistRefusalCode, AssistRouteKey, AssistRunStatus, AssistScope, AssistStep, AssistSurface, AssistTurnStatus, BOOLEAN_FALSE, BOOLEAN_TRUE, CandidateFlag, CandidateState, CommitKind, EditFamily, FIELDS_PER_PART, FIELD_HANDLE_PREFIX, FINAL_GENERATE_STATUSES, FOCUS_TEXT_CHARS, FieldsAnswerKey, GENERATE_COUNTS, GENERATE_COUNT_DEFAULT, GENERATE_FEATURES, GENERATE_KINDS, GENERATE_PROMPT_MAX, GENERATE_PROMPT_MIN, GENERATE_SHAPES, GENERATE_SHAPE_DEFAULT, GENERATE_STEPS, GenerateIssueCode, GenerateKind, GenerateRunStatus, GenerateUnavailable, ItemSuggestionKind, LOCALE_NAME_LANGUAGES, LOOK_AXES, LOOK_AXIS_LABELS, LOOK_KEEP, LookAnswerKey, LookAxis, LookButtons, MAX_ASSIST_PHOTOS, MAX_ASSIST_PROPERTIES, MAX_ROUTE_PROPERTIES, MAX_SENTENCE_CHARS, MEMORY_TURNS, MODE_LABELS, NEW_TARGET, NONE_TEXT, NeverWriteReason, OWNER_FILL_MAX_CHARS, PAGE_WORD_SLOTS, PHOTOS_PER_READ, PHOTO_GROUP_HANDLE_PREFIX, PageChangeOp, PagePartKind, PageSuggestionKind, PhotoAnswerKey, PhotoGrouping, RouteAnswerKey, SECTION_START, SHORTEN_FROM_CHARS, SHORTEN_HEADING_FROM_CHARS, SHORTEN_TEXT_FROM_CHARS, SIBLING_HANDLE_PREFIX, SURFACES, SectionChangeKind, SectionsAnswerKey, StyleAnswerKey, SurfaceStatus, ValueSource, WORDS_PER_PART, WordsAnswerKey, adjustAxesOf, aiDraftStamp, applyFieldEdits, applyLookEdits, applyPageEdits, applySectionEdits, applyStyleEdits, applyWordEdits, askSectionPatternNames, askableStyles, assertAssistBudget, assistBudgetIssues, assistFactIssues, assistFields, assistPath, assistSession, assistSessionKey, builtSurfaces, candidateVerdict, clipText, commitOf, containsHtml, decodeFieldsAnswers, decodeLookAnswers, decodePhotoDraftAnswers, decodeSectionsAnswers, decodeStyleAnswers, decodeWordsAnswers, describeFromPage, draftFromPhotos, escapeText, estimateGenerate, fieldHandle, fieldsJsonSchema, fieldsNamedIn, generateModelChoices, generateOutcome, generatePicturePrompt, generateRefusal, generateRequestIssues, groupPhotos, isAiDraft, isEmptyFieldValue, isPlainRecord, isRunBusy, isSchemeEdit, isSectionEdit, isSessionOf, isSiteLookEdit, isSizeEdit, isStyleEdit, isTerminalTurn, isWritable, itemLocales, itemSuggestions, languageName, lookAxisValue, lookHex, lookJsonSchema, lookNames, memoryLine, namedLocale, ownerFillFields, ownerFillIssues, pageLooks, pageSuggestions, pageWriteLocale, paragraphsToRichText, photoDraftJsonSchema, photoGroupBrief, photoGroupHandle, photoReadCount, photoSlots, primaryLocale, promptAsksForWords, readFieldValue, readLocaleValues, readRoute, readableWords, resolveHandle, richTextParagraphs, routeJsonSchema, sectionLabel, sectionPatternOf, sectionsJsonSchema, serializedBaselineStyles, sessionMemory, shapeForSlot, styleJsonSchema, suggestPhotoType, summarizeItem, summarizeLook, summarizePage, summarizePhotos, surfacePermissions, surfaceSpec, surfaceUndoPermissions, takesPhotos, titleField, turnLocale, unknownHandles, validateRunRequest, validateTurnRequest, withOwnerFill, wordsJsonSchema };
3233
3258
  //# sourceMappingURL=vectoriox-iox-ui-assist-core.mjs.map