@aglyn/aglyn 1.0.0-beta.227 → 1.0.0-beta.229

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.
@@ -23,34 +23,31 @@ import { declaredMeterReading, pluginCostAxes, pluginCostAxisFields } from "../p
23
23
  import { planQuotaOf, pluginPlanFeatureRow, pluginPlanQuotaRow, pluginPlanQuotas } from "../plugin-manager/plugin-plan-entitlements.js";
24
24
  /** Sentinel for quotas a plan does not cap; `checkQuota` always allows. */ export const UNLIMITED = Number.POSITIVE_INFINITY;
25
25
  /**
26
- * How many saved form definitions one site may hold, on every plan that can
27
- * build them at all.
28
- *
29
- * ⛔ **Not a tier lever, and must not become one.** The website-building field
30
- * does not meter form COUNT: Squarespace, HubSpot and Mailchimp publish no cap
31
- * whatsoever, Webflow abandoned the lever above its free tier, and of the two
32
- * that do meter it one is Wix (4/10/25/75) and the other is Jotform
33
- * (5/25/50/100), a form-first product where a form IS the billable unit. What
34
- * this platform meters on the forms axis is `formSubmissionsPerMonth`, which
35
- * is tiered, metered and part of a charged price.
36
- *
37
- * So this is an abuse ceiling wearing an entitlement's clothes. It rides
38
- * `formsPerHost` because that is where `checkQuota` can refuse a create inside
39
- * the counting transaction, not because the number is sold — and it resolves
40
- * to the same value on Starter through Enterprise. Only Free differs, and only
41
- * because the form entity rides `reusableComponents`, which Free lacks.
42
- *
43
- * The value clears every published competitor number by 5x and the largest
44
- * real catalog by far, and it stays STRICTLY below `FORMS_MAX_PER_HOST` — the
45
- * page size two listing reads use. The gap is deliberate: a catalog can sit
46
- * above this ceiling when a per-org override is withdrawn, and the two
47
- * numbers must stay tellable apart so a surface reading the window where it
48
- * means the ceiling is never accidentally right. `forms.spec.ts` pins both
49
- * halves.
50
- *
51
- * A per-org `entitlements.formsPerHost` override still resolves ahead of this,
52
- * so a contract can raise or lower it for one org without moving the ceiling
53
- * everyone else is measured against.
26
+ * How many saved form definitions one site may hold on the plans at the top
27
+ * of the ladder: Scale, Advanced, Agency and Enterprise.
28
+ *
29
+ * Since 2026-10-06 the saved-form catalog IS a tier lever (AGL-3597): Free 1,
30
+ * Starter 5, Pro 25, Business 100, and this ceiling above them. Before that
31
+ * date every paid plan carried this number and Free carried none, which made
32
+ * a Starter catalog of 500 forms a give-away no pricing page listed. The
33
+ * ladder sits close to the published form-count ladders in the field (Wix
34
+ * 4/10/25/75, Jotform 5/25/50/100), and the allowance is listed on the
35
+ * pricing pages as "Saved forms per site".
36
+ *
37
+ * A form is no longer gated by `reusableComponents`: a Free site can save its
38
+ * one form, and only components stay Starter-and-above. The count is refused
39
+ * at the CREATE and nowhere else, so a site already holding more than its new
40
+ * allowance keeps every form it has; it only cannot add another.
41
+ *
42
+ * The value stays STRICTLY below `FORMS_MAX_PER_HOST` — the page size two
43
+ * listing reads use. The gap is deliberate: a catalog can sit above this
44
+ * ceiling when a per-org override is withdrawn, and the two numbers must stay
45
+ * tellable apart so a surface reading the window where it means the ceiling
46
+ * is never accidentally right. `forms.spec.ts` pins both halves.
47
+ *
48
+ * A per-org `entitlements.formsPerHost` override still resolves ahead of the
49
+ * plan's number, so a contract can raise or lower it for one org without
50
+ * moving the allowance everyone else on the plan is measured against.
54
51
  */ export const FORMS_PER_HOST_CEILING = 500;
55
52
  /**
56
53
  * Is this quota value "no cap"? (AGL-2482; AGL-2223 is the same class.)
@@ -173,19 +170,17 @@ export const PLAN_ENTITLEMENTS = {
173
170
  maxManagersPerOrg: 1,
174
171
  maxMembersPerHost: 1,
175
172
  bandwidthGb: 2,
176
- // No saved-form CATALOG on Free: the form entity rides
177
- // `reusableComponents`, which is Starter-and-above, so
178
- // `/api/hosts/resources` refuses the create on the entitlement before it
179
- // ever reaches this number. Zero is what a Free site actually gets.
173
+ // One saved form per Free site (AGL-3597). The saved form does not ride
174
+ // `reusableComponents` — components stay Starter-and-above, a form does
175
+ // not — so `/api/hosts/resources` refuses a second form on this number,
176
+ // with the upgrade path, rather than refusing the first on a feature.
180
177
  //
181
- // It does NOT mean a Free site has no forms. A `Form` node placed on a
182
- // page needs no definition to collect, and the 20 submissions above are
183
- // the band those replies spend.
178
+ // A `Form` node placed on a page still needs no definition to collect,
179
+ // and the 20 submissions above are the band those replies spend.
184
180
  //
185
- // Every other plan carries `FORMS_PER_HOST_CEILING`. This is the one
186
- // number on the axis that differs, and it differs because the entitlement
187
- // gate above it says so, not because the catalog is sold by the tier.
188
- formsPerHost: 0,
181
+ // The ladder: Free 1, Starter 5, Pro 25, Business 100, and
182
+ // `FORMS_PER_HOST_CEILING` on Scale and above.
183
+ formsPerHost: 1,
189
184
  variablesPerHost: 3,
190
185
  functionsPerHost: 1,
191
186
  workflowsPerHost: 0,
@@ -296,7 +291,7 @@ export const PLAN_ENTITLEMENTS = {
296
291
  maxMembersPerHost: 10,
297
292
  // Sized by the same annual-price invariant as Pro's — see that band.
298
293
  bandwidthGb: 15,
299
- formsPerHost: FORMS_PER_HOST_CEILING,
294
+ formsPerHost: 5,
300
295
  variablesPerHost: 25,
301
296
  functionsPerHost: 10,
302
297
  workflowsPerHost: 3,
@@ -421,7 +416,7 @@ export const PLAN_ENTITLEMENTS = {
421
416
  // `meteredInfraPassThrough` is true here, so traffic past the band BILLS
422
417
  // at the page-view pass-through rather than being refused or absorbed.
423
418
  bandwidthGb: 25,
424
- formsPerHost: FORMS_PER_HOST_CEILING,
419
+ formsPerHost: 25,
425
420
  variablesPerHost: 100,
426
421
  functionsPerHost: 50,
427
422
  workflowsPerHost: 25,
@@ -513,7 +508,7 @@ export const PLAN_ENTITLEMENTS = {
513
508
  maxMembersPerHost: 100,
514
509
  // Sized by the same annual-price invariant as Pro's — see that band.
515
510
  bandwidthGb: 45,
516
- formsPerHost: FORMS_PER_HOST_CEILING,
511
+ formsPerHost: 100,
517
512
  variablesPerHost: 1000,
518
513
  functionsPerHost: 250,
519
514
  workflowsPerHost: 100,
@@ -823,8 +818,8 @@ export const PLAN_ENTITLEMENTS = {
823
818
  // ceiling still flags and pages staff at 3× the band, and does NOT degrade
824
819
  // the render on this plan — see `bandwidthCeilingDegradesRender`.
825
820
  //
826
- // `formsPerHost` is the same flat ceiling every plan carries; it bounds a
827
- // collection, not a tier, and the 2026-08-30 decision withdrew the ladder.
821
+ // `formsPerHost` is `FORMS_PER_HOST_CEILING`, the top of the saved-form
822
+ // ladder (AGL-3597), shared with Scale, Advanced and Agency.
828
823
  enterprise: {
829
824
  hostLimit: 200,
830
825
  screensPerHost: UNLIMITED,