@prave/shared 1.4.7 → 1.4.9

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,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export declare const planSchema: z.ZodEnum<["free", "explorer", "creator"]>;
2
+ export declare const planSchema: z.ZodEnum<["free", "pro", "max"]>;
3
3
  export type Plan = z.infer<typeof planSchema>;
4
4
  export declare const subscriptionStatusSchema: z.ZodEnum<["active", "trialing", "past_due", "canceled", "incomplete", "incomplete_expired", "unpaid"]>;
5
5
  export type SubscriptionStatus = z.infer<typeof subscriptionStatusSchema>;
@@ -9,7 +9,7 @@ export type SubscriptionStatus = z.infer<typeof subscriptionStatusSchema>;
9
9
  * to talk to Stripe directly.
10
10
  */
11
11
  export declare const billingProfileSchema: z.ZodObject<{
12
- plan: z.ZodEnum<["free", "explorer", "creator"]>;
12
+ plan: z.ZodEnum<["free", "pro", "max"]>;
13
13
  stripe_customer_id: z.ZodNullable<z.ZodString>;
14
14
  stripe_subscription_id: z.ZodNullable<z.ZodString>;
15
15
  subscription_status: z.ZodNullable<z.ZodEnum<["active", "trialing", "past_due", "canceled", "incomplete", "incomplete_expired", "unpaid"]>>;
@@ -19,14 +19,14 @@ export declare const billingProfileSchema: z.ZodObject<{
19
19
  * "Renews on …" so the cancellation is unambiguously visible. */
20
20
  cancel_at_period_end: z.ZodNullable<z.ZodBoolean>;
21
21
  }, "strip", z.ZodTypeAny, {
22
- plan: "free" | "explorer" | "creator";
22
+ plan: "free" | "pro" | "max";
23
23
  stripe_customer_id: string | null;
24
24
  stripe_subscription_id: string | null;
25
25
  subscription_status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | null;
26
26
  current_period_end: string | null;
27
27
  cancel_at_period_end: boolean | null;
28
28
  }, {
29
- plan: "free" | "explorer" | "creator";
29
+ plan: "free" | "pro" | "max";
30
30
  stripe_customer_id: string | null;
31
31
  stripe_subscription_id: string | null;
32
32
  subscription_status: "active" | "trialing" | "past_due" | "canceled" | "incomplete" | "incomplete_expired" | "unpaid" | null;
@@ -37,13 +37,13 @@ export type BillingProfile = z.infer<typeof billingProfileSchema>;
37
37
  export declare const billingCadenceSchema: z.ZodEnum<["monthly", "yearly"]>;
38
38
  export type BillingCadence = z.infer<typeof billingCadenceSchema>;
39
39
  export declare const billingCheckoutInputSchema: z.ZodObject<{
40
- plan: z.ZodEnum<["explorer", "creator"]>;
40
+ plan: z.ZodEnum<["pro", "max"]>;
41
41
  cadence: z.ZodDefault<z.ZodEnum<["monthly", "yearly"]>>;
42
42
  }, "strip", z.ZodTypeAny, {
43
- plan: "explorer" | "creator";
43
+ plan: "pro" | "max";
44
44
  cadence: "monthly" | "yearly";
45
45
  }, {
46
- plan: "explorer" | "creator";
46
+ plan: "pro" | "max";
47
47
  cadence?: "monthly" | "yearly" | undefined;
48
48
  }>;
49
49
  export type BillingCheckoutInput = z.infer<typeof billingCheckoutInputSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"billing.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/billing.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,eAAO,MAAM,UAAU,4CAA0C,CAAA;AACjE,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAA;AAE7C,eAAO,MAAM,wBAAwB,yGAQnC,CAAA;AACF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAA;AAEzE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;;;;;IAM/B;;sEAEkE;;;;;;;;;;;;;;;;EAElE,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,eAAO,MAAM,oBAAoB,kCAAgC,CAAA;AACjE,MAAM,MA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AC,OAAO,0BAA0B,CAAC,CAAA;AAE7E,eAAO,MAAM,6BAA6B;;;;;;;;;EAGxC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEnF,eAAO,MAAM,2BAA2B;;;;;;EAEtC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA"}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- export const planSchema = z.enum(['free', 'explorer', 'creator']);
2
+ export const planSchema = z.enum(['free', 'pro', 'max']);
3
3
  export const subscriptionStatusSchema = z.enum([
4
4
  'active',
5
5
  'trialing',
@@ -27,7 +27,7 @@ export const billingProfileSchema = z.object({
27
27
  });
28
28
  export const billingCadenceSchema = z.enum(['monthly', 'yearly']);
29
29
  export const billingCheckoutInputSchema = z.object({
30
- plan: z.enum(['explorer', 'creator']),
30
+ plan: z.enum(['pro', 'max']),
31
31
  cadence: billingCadenceSchema.default('monthly'),
32
32
  });
33
33
  export const billingCheckoutResponseSchema = z.object({
@@ -2,7 +2,7 @@ export * from './categories.js';
2
2
  export * from './plan-limits.js';
3
3
  export * from './intelligence.js';
4
4
  export * from './referrals.js';
5
- export type UserPlan = 'free' | 'explorer' | 'creator';
5
+ export type UserPlan = 'free' | 'pro' | 'max';
6
6
  export type UserRole = 'user' | 'admin';
7
7
  export interface Profile {
8
8
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAE9B,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,SAAS,CAAA;AACtD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,CAA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ACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,aAAa,CAAA;IACtB,MAAM,EAAE,OAAO,4BAA4B,EAAE,KAAK,EAAE,CAAA;IACpD,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd"}
@@ -6,14 +6,13 @@ import { type AgentType } from './intelligence.js';
6
6
  *
7
7
  * Tier identity:
8
8
  * - `free` → public **Free** tier. Unlimited discovery + installs.
9
- * - `explorer` → marketed as **Pro** ($16/mo · $144/yr). Power-user toolkit.
10
- * - `creator` → marketed as **Max** ($39/mo · $360/yr). Bulk-dev + BYO-key.
9
+ * - `pro` → marketed as **Pro** ($7/mo · $59/yr). Daily-driver toolkit.
10
+ * - `max` → marketed as **Max** ($12/mo · $108/yr). Bulk-developer tier.
11
11
  *
12
- * The internal IDs stay `free | explorer | creator` because Stripe price
13
- * env vars, the `profiles.plan` enum and live customer rows already use
14
- * them renaming would break every existing reference. The user-visible
15
- * `label` field is the only thing that ever surfaces in UI copy, and
16
- * those map cleanly to Free / Pro / Max.
12
+ * Internal IDs match the marketing labels 1:1 (migration 052 renamed
13
+ * the legacy `explorer`/`creator` enum values). PLAN_LIMITS is still the
14
+ * single source of truth for what each ID unlocks; the `label` field
15
+ * provides the rendered display string ("Free" / "Pro" / "Max").
17
16
  */
18
17
  export interface PlanLimits {
19
18
  /** Display label used in pricing cards / Settings ("Free" / "Pro" / "Max"). */
@@ -73,12 +72,22 @@ export interface PlanLimits {
73
72
  */
74
73
  intelligence_indexed_max: number | null;
75
74
  /**
76
- * Monthly cap on Auto-Skill-from-Repo generations (server-side
77
- * Anthropic-API-backed). `null` = unlimited. Free: 3, Pro: 30,
78
- * Max: unlimited. Counter resets on month rollover via the
79
- * `tick_auto_skill_quota` RPC.
75
+ * Cap on Auto-Skill-from-Repo generations (server-side
76
+ * Anthropic-API-backed). `null` = unlimited.
77
+ *
78
+ * The cap is *monthly* when `auto_skill_resets_monthly` is true and
79
+ * *lifetime* otherwise. Pro/Max reset monthly; Free is a one-shot
80
+ * lifetime allowance (3 total, ever) so the upgrade gate fires the
81
+ * moment a user has tasted the feature.
80
82
  */
81
83
  auto_skill_monthly_limit: number | null;
84
+ /**
85
+ * Whether the Auto-Skill counter resets at the calendar-month
86
+ * boundary. Free = false (hard lifetime cap drives conversion);
87
+ * Pro = true (30/month rolling); Max = true but the cap is null so
88
+ * the reset is a no-op.
89
+ */
90
+ auto_skill_resets_monthly: boolean;
82
91
  /** "Apply all suggestions" batch run on the editor. */
83
92
  can_apply_all: boolean;
84
93
  /** Hook + scanner usage tracking. */
@@ -1 +1 @@
1
- {"version":3,"file":"plan-limits.d.ts","sourceRoot":"","sources":["../../src/types/plan-limits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAE/D;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,UAAU;IACzB,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAA;IACb,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAA;IACf,2EAA2E;IAC3E,iBAAiB,EAAE,MAAM,CAAA;IACzB,gEAAgE;IAChE,gBAAgB,EAAE,MAAM,CAAA;IACxB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,0DAA0D;IAC1D,SAAS,EAAE,OAAO,CAAA;IAGlB,+EAA+E;IAC/E,YAAY,EAAE,OAAO,CAAA;IACrB,8BAA8B;IAC9B,YAAY,EAAE,OAAO,CAAA;IACrB;;;;;;;;OAQG;IACH,mBAAmB,EAAE,OAAO,CAAA;IAG5B;;;OAGG;IACH,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,4BAA4B;IAC5B,YAAY,EAAE,OAAO,CAAA;IACrB,wDAAwD;IACxD,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AAED;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,KAAG,MAAiC,CAAA;AAExE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAI,MAAM,IAAI,EAAE,eAAe,MAAM,KAAG,MAAM,GAAG,IAI9E,CAAA"}
@@ -29,12 +29,10 @@ export const PLAN_LIMITS = {
29
29
  can_authoring_private: true,
30
30
  authoring_max_skills: 1,
31
31
  can_ai_description: false,
32
- // Free gets a single Tester run / month — one taste of the agent
33
- // sandbox so the upgrade prompt isn't an abstract "you've never
34
- // seen this" wall. 1 run = 5 credits = ~$0.02 LLM cost to us.
35
32
  can_intelligence: false,
36
33
  intelligence_indexed_max: 0,
37
34
  auto_skill_monthly_limit: 3,
35
+ auto_skill_resets_monthly: false,
38
36
  can_apply_all: false,
39
37
  can_usage_tracking: false,
40
38
  usage_history_days: 0,
@@ -47,16 +45,15 @@ export const PLAN_LIMITS = {
47
45
  has_early_access: false,
48
46
  multi_agent_targets: ['claude'],
49
47
  },
50
- // ── Pro (internally `explorer`) ───────────────────────────────────
51
- explorer: {
48
+ // ── Pro ────────────────────────────────────────────────────────────
49
+ pro: {
52
50
  label: 'Pro',
53
- tagline: 'See your library token cost. Find skills semantically. Test before deploy.',
54
- // Coffee-price tier (May 2026, bumped May 2026 from $5 → $7 to widen
55
- // the margin band against Anthropic API + Stripe fees). Margin math
56
- // at avg burn (70 credits): ~$0.18 API + Stripe (~2.5% blended +
57
- // $0.25 = $0.43) + infra $0.20 $0.81. Net margin per Pro/month:
58
- // ~$6.19 (88%). Yearly $59 nets ~$4.92/mo, same margin band.
59
- // 5K-user model: 25% conversion → $8.75K MRR from Pro alone.
51
+ tagline: 'See what your library costs. Find Skills semantically. Audit + author the way you work.',
52
+ // Coffee-price tier. Pro is the "everyday driver" semantic search,
53
+ // 25-Skill intelligence indexing, full editor + AI description, MCP
54
+ // server, cross-machine sync. The 50-Skill authoring cap and the
55
+ // 30/mo Auto-Skill quota create deliberate upgrade pressure to Max
56
+ // for power users without crippling typical workflows.
60
57
  price_usd_monthly: 7,
61
58
  price_usd_yearly: 59,
62
59
  rank: 1,
@@ -70,11 +67,15 @@ export const PLAN_LIMITS = {
70
67
  can_cross_machine_sync: true,
71
68
  can_authoring_public: true,
72
69
  can_authoring_private: true,
73
- authoring_max_skills: null,
70
+ // Pro caps total authored Skills at 50 — that covers ~90% of solo
71
+ // developer libraries by our usage data and leaves a clean upgrade
72
+ // story for bulk authors who hit the wall.
73
+ authoring_max_skills: 50,
74
74
  can_ai_description: true,
75
75
  can_intelligence: true,
76
76
  intelligence_indexed_max: 25,
77
77
  auto_skill_monthly_limit: 30,
78
+ auto_skill_resets_monthly: true,
78
79
  can_apply_all: false,
79
80
  can_usage_tracking: true,
80
81
  usage_history_days: 30,
@@ -87,14 +88,16 @@ export const PLAN_LIMITS = {
87
88
  has_early_access: false,
88
89
  multi_agent_targets: ALL_AGENTS,
89
90
  },
90
- // ── Max (internally `creator`) ────────────────────────────────────
91
- creator: {
91
+ // ── Max ────────────────────────────────────────────────────────────
92
+ max: {
92
93
  label: 'Max',
93
- tagline: 'Unlimited audit, no Tester cooldown, BYO-key, magic-link sharing.',
94
- // Power-user tier (May 2026). 300 credits avg burn ~210 = $0.55 API
95
- // + Stripe (~$0.55) + infra $0.30 = $1.40 cost. Net margin: ~$10.60/mo
96
- // (88%). Yearly $108 clears ~$100 net. 5K-user model: 5% conversion
97
- // $3K MRR from Max.
94
+ tagline: 'Unlimited library audit, Apply-All batch fixes, magic-link sharing, priority MCP.',
95
+ // Power-user / bulk-developer tier. Removes the Pro caps:
96
+ // - Authoring 50 unlimited
97
+ // - Intelligence 25 unlimited (+ Apply-All)
98
+ // - Auto-Skill 30/mo unlimited
99
+ // - Usage history 30 days → unlimited + CSV export
100
+ // - Adds magic-link sharing, priority MCP routing, priority support.
98
101
  price_usd_monthly: 12,
99
102
  price_usd_yearly: 108,
100
103
  rank: 2,
@@ -113,6 +116,7 @@ export const PLAN_LIMITS = {
113
116
  can_intelligence: true,
114
117
  intelligence_indexed_max: null,
115
118
  auto_skill_monthly_limit: null,
119
+ auto_skill_resets_monthly: true,
116
120
  can_apply_all: true,
117
121
  can_usage_tracking: true,
118
122
  usage_history_days: null,
@@ -128,8 +132,8 @@ export const PLAN_LIMITS = {
128
132
  };
129
133
  export const PLAN_RANK = {
130
134
  free: PLAN_LIMITS.free.rank,
131
- explorer: PLAN_LIMITS.explorer.rank,
132
- creator: PLAN_LIMITS.creator.rank,
135
+ pro: PLAN_LIMITS.pro.rank,
136
+ max: PLAN_LIMITS.max.rank,
133
137
  };
134
138
  /** True when `actual` includes everything `required` does. */
135
139
  export const planMeets = (actual, required) => PLAN_RANK[actual] >= PLAN_RANK[required];
@@ -141,7 +145,7 @@ export const planMeets = (actual, required) => PLAN_RANK[actual] >= PLAN_RANK[re
141
145
  * boolean features pass when `true`.
142
146
  */
143
147
  export const minPlanFor = (feature) => {
144
- const order = ['free', 'explorer', 'creator'];
148
+ const order = ['free', 'pro', 'max'];
145
149
  for (const plan of order) {
146
150
  const v = PLAN_LIMITS[plan][feature];
147
151
  if (typeof v === 'boolean' && v)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prave/shared",
3
- "version": "1.4.7",
3
+ "version": "1.4.9",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"