@vectoriox/iox-ui 5.79.0 → 5.80.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.
@@ -6504,7 +6504,10 @@ declare function modelCanDo(model: Pick<AiModelEntry, 'capabilities'>, step: AiS
6504
6504
  declare enum AiRefusalCode {
6505
6505
  NotInPlan = "ai.notInPlan",
6506
6506
  OutOfCredits = "ai.outOfCredits",
6507
+ /** A step used more than twice its estimate (a loop), or the build its plan's `aiCreditsPerGeneration`. */
6507
6508
  CapReached = "ai.capReached",
6509
+ /** The build asked for `GENERATION_LIMITS.plans` plans already — build one, change it with a sentence, or start over. */
6510
+ PlansUsed = "ai.plansUsed",
6508
6511
  NotConnected = "ai.notConnected",
6509
6512
  KeyInvalid = "ai.keyInvalid",
6510
6513
  PlanUnknown = "ai.planUnknown"
@@ -6518,7 +6521,9 @@ declare enum AiNextKind {
6518
6521
  /** Open Settings ▸ AI. */
6519
6522
  Settings = "settings",
6520
6523
  /** Try again later, or with less. */
6521
- Retry = "retry"
6524
+ Retry = "retry",
6525
+ /** Keep the plan there is: build it, or change it with a sentence. */
6526
+ KeepPlan = "keepPlan"
6522
6527
  }
6523
6528
  declare const AI_REFUSAL_NEXT: Readonly<Record<AiRefusalCode, AiNextKind>>;
6524
6529
  interface AiRefusal {
@@ -6528,6 +6533,8 @@ interface AiRefusal {
6528
6533
  remaining?: number;
6529
6534
  /** What the refused call would have cost, about. */
6530
6535
  estimate?: number;
6536
+ /** `PlansUsed`: how many plans one build may ask for. */
6537
+ plans?: number;
6531
6538
  next: {
6532
6539
  kind: AiNextKind;
6533
6540
  href?: string;
@@ -2987,7 +2987,9 @@ interface AiGenerationView {
2987
2987
  siteBuildId?: string;
2988
2988
  models: Partial<Record<`${AiStep}`, string>>;
2989
2989
  estimate: number;
2990
- cap: number;
2990
+ /** The plan's `aiCreditsPerGeneration` for the whole build, or null when it sets none (a step's own ceiling is
2991
+ * twice that step's estimate — going back and planning again starts a new step). */
2992
+ cap: number | null;
2991
2993
  /** Derived from the ledger — the running credit total. */
2992
2994
  spent: number;
2993
2995
  error?: {
@@ -3009,12 +3011,14 @@ interface GenerationStartRequest {
3009
3011
  }>;
3010
3012
  addresses?: string[];
3011
3013
  }
3012
- /** The longest message, the most files and addresses a generation starts from (Start's limits). */
3014
+ /** The longest message, the most files and addresses a generation starts from (Start's limits), and how many plans
3015
+ * one build may ask for (a Design pick, a Try again or "Build with these" each asks one). */
3013
3016
  declare const GENERATION_LIMITS: {
3014
3017
  readonly promptChars: 4000;
3015
3018
  readonly files: 12;
3016
3019
  readonly addresses: 3;
3017
3020
  readonly sentenceChars: 500;
3021
+ readonly plans: 5;
3018
3022
  };
3019
3023
 
3020
3024
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vectoriox/iox-ui",
3
- "version": "5.79.0",
3
+ "version": "5.80.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=20.0.0",
6
6
  "@angular/core": ">=20.0.0",
@@ -177,7 +177,10 @@ export function modelCanDo(model: Pick<AiModelEntry, 'capabilities'>, step: AiSt
177
177
  export enum AiRefusalCode {
178
178
  NotInPlan = 'ai.notInPlan',
179
179
  OutOfCredits = 'ai.outOfCredits',
180
+ /** A step used more than twice its estimate (a loop), or the build its plan's `aiCreditsPerGeneration`. */
180
181
  CapReached = 'ai.capReached',
182
+ /** The build asked for `GENERATION_LIMITS.plans` plans already — build one, change it with a sentence, or start over. */
183
+ PlansUsed = 'ai.plansUsed',
181
184
  NotConnected = 'ai.notConnected',
182
185
  KeyInvalid = 'ai.keyInvalid',
183
186
  PlanUnknown = 'ai.planUnknown',
@@ -188,6 +191,7 @@ export const AI_REFUSAL_STATUS: Readonly<Record<AiRefusalCode, number>> = {
188
191
  [AiRefusalCode.NotInPlan]: 403,
189
192
  [AiRefusalCode.OutOfCredits]: 402,
190
193
  [AiRefusalCode.CapReached]: 402,
194
+ [AiRefusalCode.PlansUsed]: 409,
191
195
  [AiRefusalCode.NotConnected]: 409,
192
196
  [AiRefusalCode.KeyInvalid]: 409,
193
197
  [AiRefusalCode.PlanUnknown]: 503,
@@ -201,12 +205,15 @@ export enum AiNextKind {
201
205
  Settings = 'settings',
202
206
  /** Try again later, or with less. */
203
207
  Retry = 'retry',
208
+ /** Keep the plan there is: build it, or change it with a sentence. */
209
+ KeepPlan = 'keepPlan',
204
210
  }
205
211
 
206
212
  export const AI_REFUSAL_NEXT: Readonly<Record<AiRefusalCode, AiNextKind>> = {
207
213
  [AiRefusalCode.NotInPlan]: AiNextKind.Contact,
208
214
  [AiRefusalCode.OutOfCredits]: AiNextKind.Contact,
209
215
  [AiRefusalCode.CapReached]: AiNextKind.Retry,
216
+ [AiRefusalCode.PlansUsed]: AiNextKind.KeepPlan,
210
217
  [AiRefusalCode.NotConnected]: AiNextKind.Settings,
211
218
  [AiRefusalCode.KeyInvalid]: AiNextKind.Settings,
212
219
  [AiRefusalCode.PlanUnknown]: AiNextKind.Retry,
@@ -219,6 +226,8 @@ export interface AiRefusal {
219
226
  remaining?: number;
220
227
  /** What the refused call would have cost, about. */
221
228
  estimate?: number;
229
+ /** `PlansUsed`: how many plans one build may ask for. */
230
+ plans?: number;
222
231
  next: { kind: AiNextKind; href?: string };
223
232
  }
224
233
 
@@ -95,7 +95,9 @@ export interface AiGenerationView {
95
95
  siteBuildId?: string;
96
96
  models: Partial<Record<`${AiStep}`, string>>;
97
97
  estimate: number;
98
- cap: number;
98
+ /** The plan's `aiCreditsPerGeneration` for the whole build, or null when it sets none (a step's own ceiling is
99
+ * twice that step's estimate — going back and planning again starts a new step). */
100
+ cap: number | null;
99
101
  /** Derived from the ledger — the running credit total. */
100
102
  spent: number;
101
103
  error?: { code: string; detail: string; providerMessage?: string; issues?: Array<{ code: string; path: string }> };
@@ -108,10 +110,12 @@ export interface GenerationStartRequest {
108
110
  addresses?: string[];
109
111
  }
110
112
 
111
- /** The longest message, the most files and addresses a generation starts from (Start's limits). */
113
+ /** The longest message, the most files and addresses a generation starts from (Start's limits), and how many plans
114
+ * one build may ask for (a Design pick, a Try again or "Build with these" each asks one). */
112
115
  export const GENERATION_LIMITS = {
113
116
  promptChars: 4_000,
114
117
  files: 12,
115
118
  addresses: 3,
116
119
  sentenceChars: 500,
120
+ plans: 5,
117
121
  } as const;