@prave/shared 1.0.6 → 1.0.8

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,8 +1,14 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
3
  * Credit-pack catalog. One-time purchases that top up
4
- * `profiles.tester_credits_balance`. Prices target a ≥40% gross margin
5
- * over Haiku 4.5 worst-case usage (~€0.015/credit).
4
+ * `profiles.tester_credits_balance`. Prices are denominated in USD now
5
+ * (the `price_eur` field name kept for column-rename safety — Stripe
6
+ * still treats it as the gross USD amount, see stripe-seed.ts).
7
+ *
8
+ * Margin: Haiku 4.5 worst-case = ~$0.013 per Tester run = ~$0.0026 per
9
+ * credit. We charge $0.10–$0.12 per credit on top-ups, ~40-45× markup,
10
+ * which keeps the per-credit price *higher* than any subscription
11
+ * average so power-users always come out ahead by upgrading.
6
12
  */
7
13
  export declare const CREDIT_PACK_IDS: readonly ["pack_25", "pack_100"];
8
14
  export declare const creditPackIdSchema: z.ZodEnum<["pack_25", "pack_100"]>;
@@ -10,18 +16,24 @@ export type CreditPackId = z.infer<typeof creditPackIdSchema>;
10
16
  export interface CreditPack {
11
17
  id: CreditPackId;
12
18
  credits: number;
13
- /** Gross price in EUR (VAT-inclusive — Stripe Tax computes the net split). */
19
+ /**
20
+ * Gross price in **USD** (VAT-inclusive — Stripe Tax computes the net
21
+ * split). The field name `price_eur` is preserved for column-rename
22
+ * safety; the Stripe seed and the UI both treat it as USD.
23
+ */
14
24
  price_eur: number;
15
25
  /** Best-for hint shown on the pack card. */
16
26
  blurb: string;
17
27
  }
18
28
  /**
19
- * Two top-up tiers — entry and refill. Per-credit price is intentionally
20
- * kept *higher* than every paid subscription so power users always come
21
- * out ahead by upgrading instead of hoarding packs. A single big pack
22
- * tier was tested and dropped: it created subscription cannibalisation
23
- * (Creator @ €0.040/credit vs a hypothetical 500-pack @ €0.038/credit)
24
- * and one-shot LTV with months of dormancy.
29
+ * Two top-up tiers — entry and refill. Per-credit price stays *higher*
30
+ * than the subscription effective rates so a heavy user always saves
31
+ * by upgrading instead of hoarding top-ups.
32
+ *
33
+ * Margin (per pack, full burn):
34
+ * pack_25 ($3): ~$0.07 API + ~$0.39 Stripe = $0.46 cost. Net ~$2.54 (85%).
35
+ * pack_100 ($10): ~$0.26 API + ~$0.59 Stripe = $0.85 cost. Net ~$9.15 (92%).
36
+ * Both safely positive even on worst-case burn.
25
37
  */
26
38
  export declare const CREDIT_PACKS: Record<CreditPackId, CreditPack>;
27
39
  export declare const creditCheckoutInputSchema: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"credits.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/credits.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;GAIG;AACH,eAAO,MAAM,eAAe,kCAAmC,CAAA;AAC/D,eAAO,MAAM,kBAAkB,oCAA0B,CAAA;AACzD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,YAAY,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAA;IACjB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,CAazD,CAAA;AAED,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E,eAAO,MAAM,mBAAmB;;;;IAI9B,gDAAgD;;IAEhD,uEAAuE;;IAEvE,oDAAoD;;;;;;;;;;;;;;;;EAEpD,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
1
+ {"version":3,"file":"credits.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/credits.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe,kCAAmC,CAAA;AAC/D,eAAO,MAAM,kBAAkB,oCAA0B,CAAA;AACzD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,YAAY,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB,4CAA4C;IAC5C,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,CAazD,CAAA;AAED,eAAO,MAAM,yBAAyB;;;;;;EAEpC,CAAA;AACF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAE3E,eAAO,MAAM,mBAAmB;;;;IAI9B,gDAAgD;;IAEhD,uEAAuE;;IAEvE,oDAAoD;;;;;;;;;;;;;;;;EAEpD,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA"}
@@ -1,30 +1,38 @@
1
1
  import { z } from 'zod';
2
2
  /**
3
3
  * Credit-pack catalog. One-time purchases that top up
4
- * `profiles.tester_credits_balance`. Prices target a ≥40% gross margin
5
- * over Haiku 4.5 worst-case usage (~€0.015/credit).
4
+ * `profiles.tester_credits_balance`. Prices are denominated in USD now
5
+ * (the `price_eur` field name kept for column-rename safety — Stripe
6
+ * still treats it as the gross USD amount, see stripe-seed.ts).
7
+ *
8
+ * Margin: Haiku 4.5 worst-case = ~$0.013 per Tester run = ~$0.0026 per
9
+ * credit. We charge $0.10–$0.12 per credit on top-ups, ~40-45× markup,
10
+ * which keeps the per-credit price *higher* than any subscription
11
+ * average so power-users always come out ahead by upgrading.
6
12
  */
7
13
  export const CREDIT_PACK_IDS = ['pack_25', 'pack_100'];
8
14
  export const creditPackIdSchema = z.enum(CREDIT_PACK_IDS);
9
15
  /**
10
- * Two top-up tiers — entry and refill. Per-credit price is intentionally
11
- * kept *higher* than every paid subscription so power users always come
12
- * out ahead by upgrading instead of hoarding packs. A single big pack
13
- * tier was tested and dropped: it created subscription cannibalisation
14
- * (Creator @ €0.040/credit vs a hypothetical 500-pack @ €0.038/credit)
15
- * and one-shot LTV with months of dormancy.
16
+ * Two top-up tiers — entry and refill. Per-credit price stays *higher*
17
+ * than the subscription effective rates so a heavy user always saves
18
+ * by upgrading instead of hoarding top-ups.
19
+ *
20
+ * Margin (per pack, full burn):
21
+ * pack_25 ($3): ~$0.07 API + ~$0.39 Stripe = $0.46 cost. Net ~$2.54 (85%).
22
+ * pack_100 ($10): ~$0.26 API + ~$0.59 Stripe = $0.85 cost. Net ~$9.15 (92%).
23
+ * Both safely positive even on worst-case burn.
16
24
  */
17
25
  export const CREDIT_PACKS = {
18
26
  pack_25: {
19
27
  id: 'pack_25',
20
28
  credits: 25,
21
- price_eur: 2,
29
+ price_eur: 3,
22
30
  blurb: 'Quick top-up when you hit the wall.',
23
31
  },
24
32
  pack_100: {
25
33
  id: 'pack_100',
26
34
  credits: 100,
27
- price_eur: 6,
35
+ price_eur: 10,
28
36
  blurb: 'Best value for active builders.',
29
37
  },
30
38
  };
@@ -121,21 +121,40 @@ export type RecordSkillUsageBatchInput = z.infer<typeof recordSkillUsageBatchSch
121
121
  * `skill_metadata`. The server resolves the slug → `skill_metadata_id`
122
122
  * itself, creating a minimal stub row when needed (self-healing).
123
123
  */
124
+ /**
125
+ * Bag of arbitrary hook telemetry. Anything Claude Code's PostToolUse
126
+ * payload tells us that we don't surface as a top-level field today —
127
+ * duration_ms, payload size, agent session id, future fields — gets
128
+ * stuffed in here so we can mine it later without another migration.
129
+ *
130
+ * Keys we already understand on the server side (no validation though,
131
+ * so the hook is forward-compatible with new shapes):
132
+ * duration_ms — number — tool execution latency reported by Claude
133
+ * payload_bytes — number — size of the stdin payload we received
134
+ * tool_name — string — should always be "Skill" but kept for safety
135
+ * agent_session — string — Claude Code session id when present
136
+ * prompt_chars — number — heuristic length of the user prompt
137
+ */
138
+ export declare const usageMetaSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
139
+ export type UsageMeta = z.infer<typeof usageMetaSchema>;
124
140
  export declare const recordSkillUsageBySlugSchema: z.ZodObject<{
125
141
  slug: z.ZodString;
126
142
  trigger_phrase: z.ZodOptional<z.ZodNullable<z.ZodString>>;
127
143
  triggered_at: z.ZodOptional<z.ZodString>;
128
144
  agent_type: z.ZodOptional<z.ZodEnum<["claude", "codex", "cursor", "gemini", "cline", "amp"]>>;
145
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
129
146
  }, "strip", z.ZodTypeAny, {
130
147
  slug: string;
131
148
  agent_type?: "claude" | "codex" | "cursor" | "gemini" | "cline" | "amp" | undefined;
132
149
  trigger_phrase?: string | null | undefined;
133
150
  triggered_at?: string | undefined;
151
+ meta?: Record<string, string | number | boolean | null> | undefined;
134
152
  }, {
135
153
  slug: string;
136
154
  agent_type?: "claude" | "codex" | "cursor" | "gemini" | "cline" | "amp" | undefined;
137
155
  trigger_phrase?: string | null | undefined;
138
156
  triggered_at?: string | undefined;
157
+ meta?: Record<string, string | number | boolean | null> | undefined;
139
158
  }>;
140
159
  export type RecordSkillUsageBySlugInput = z.infer<typeof recordSkillUsageBySlugSchema>;
141
160
  //# sourceMappingURL=intelligence.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"intelligence.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/intelligence.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvB,eAAO,MAAM,eAAe,oEAAsB,CAAA;AAElD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;EAKlC,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE,eAAO,MAAM,6BAA6B;;;;;;;;;EAGxC,CAAA;AACF,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAA;AAEnF,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAYpC,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAA;AAEhF,eAAO,MAAM,sBAAsB;;;;;;;;;EAGjC,CAAA;AACF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAE1E;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;EAWtC,CAAA;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAEpF;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;EASvC,CAAA;AACF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
1
+ {"version":3,"file":"intelligence.schema.d.ts","sourceRoot":"","sources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G,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA"}
@@ -53,6 +53,23 @@ export const recordSkillUsageBatchSchema = z.object({
53
53
  * `skill_metadata`. The server resolves the slug → `skill_metadata_id`
54
54
  * itself, creating a minimal stub row when needed (self-healing).
55
55
  */
56
+ /**
57
+ * Bag of arbitrary hook telemetry. Anything Claude Code's PostToolUse
58
+ * payload tells us that we don't surface as a top-level field today —
59
+ * duration_ms, payload size, agent session id, future fields — gets
60
+ * stuffed in here so we can mine it later without another migration.
61
+ *
62
+ * Keys we already understand on the server side (no validation though,
63
+ * so the hook is forward-compatible with new shapes):
64
+ * duration_ms — number — tool execution latency reported by Claude
65
+ * payload_bytes — number — size of the stdin payload we received
66
+ * tool_name — string — should always be "Skill" but kept for safety
67
+ * agent_session — string — Claude Code session id when present
68
+ * prompt_chars — number — heuristic length of the user prompt
69
+ */
70
+ export const usageMetaSchema = z
71
+ .record(z.string(), z.union([z.string(), z.number(), z.boolean(), z.null()]))
72
+ .optional();
56
73
  export const recordSkillUsageBySlugSchema = z.object({
57
74
  slug: z
58
75
  .string()
@@ -62,4 +79,5 @@ export const recordSkillUsageBySlugSchema = z.object({
62
79
  trigger_phrase: z.string().max(500).nullish(),
63
80
  triggered_at: z.string().datetime().optional(),
64
81
  agent_type: z.enum(['claude', 'codex', 'cursor', 'gemini', 'cline', 'amp']).optional(),
82
+ meta: usageMetaSchema,
65
83
  });
@@ -27,10 +27,20 @@ export interface PlanLimits {
27
27
  rank: number;
28
28
  /** Highlighted "most popular" pin in the pricing grid. */
29
29
  highlight: boolean;
30
- /** Browse + LLM-search the public registry. Always true. */
30
+ /** Browse the public registry (keyword + filter on /discover). Always true. */
31
31
  can_discover: boolean;
32
32
  /** Bookmarks. Always true. */
33
33
  can_bookmark: boolean;
34
+ /**
35
+ * Natural-language semantic search across the registry — `prave search "<query>"`,
36
+ * the smart-search input on /discover, and the LLM-aided ranking
37
+ * powering both. Pro+ only; Free is keyword-only.
38
+ * Why: semantic search burns provider tokens on every query and is the
39
+ * single most expensive read path on the platform; rank-ordered
40
+ * keyword search on Elasticsearch covers the casual-discovery case
41
+ * without the cost.
42
+ */
43
+ can_semantic_search: boolean;
34
44
  /**
35
45
  * Monthly install ceiling. `null` = unlimited.
36
46
  * Free: 5/mo, Pro+ unlimited. Counter resets on calendar month rollover.
@@ -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;AAExD;;;;;;;;;;;;;;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,4DAA4D;IAC5D,YAAY,EAAE,OAAO,CAAA;IACrB,8BAA8B;IAC9B,YAAY,EAAE,OAAO,CAAA;IAGrB;;;OAGG;IACH,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAA;IACpC,mEAAmE;IACnE,mBAAmB,EAAE,aAAa,CAAC,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAC,CAAA;IAC9F,4BAA4B;IAC5B,YAAY,EAAE,OAAO,CAAA;IACrB,wDAAwD;IACxD,cAAc,EAAE,OAAO,CAAA;IACvB,yCAAyC;IACzC,sBAAsB,EAAE,OAAO,CAAA;IAG/B,0CAA0C;IAC1C,oBAAoB,EAAE,OAAO,CAAA;IAC7B,0CAA0C;IAC1C,qBAAqB,EAAE,OAAO,CAAA;IAC9B;;OAEG;IACH,oBAA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SAAS,GAAI,QAAQ,IAAI,EAAE,UAAU,IAAI,KAAG,OACf,CAAA;AAE1C;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,UAAU,KAAG,IAAI,GAAG,IAU7D,CAAA;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"}
@@ -10,6 +10,7 @@ export const PLAN_LIMITS = {
10
10
  highlight: false,
11
11
  can_discover: true,
12
12
  can_bookmark: true,
13
+ can_semantic_search: false,
13
14
  // Installs are intentionally uncapped on Free — anything that lives on
14
15
  // public GitHub is npm-installable anyway, so a monthly cap would only
15
16
  // harm onboarding. The real value-add lives in Sync, Skill Intelligence
@@ -45,13 +46,19 @@ export const PLAN_LIMITS = {
45
46
  // ── Pro (internally `explorer`) ───────────────────────────────────
46
47
  explorer: {
47
48
  label: 'Pro',
48
- tagline: 'Multi-agent skill ops + Intelligence audit for power users.',
49
- price_usd_monthly: 16,
50
- price_usd_yearly: 144,
49
+ tagline: 'See your library token cost. Find skills semantically. Test before deploy.',
50
+ // Mid-aggressive pricing. Margin math at full credit usage:
51
+ // 100 credits = 20 Tester runs × ~$0.013 worst-case API cost ≈
52
+ // $0.26. Stripe 2.9%+30¢ on $12 ≈ $0.65. Total cost ≈ $0.91.
53
+ // Net margin per Pro user/month: ~$11.09 (92%). Yearly clears
54
+ // ~$101 net — same margin band.
55
+ price_usd_monthly: 12,
56
+ price_usd_yearly: 108,
51
57
  rank: 1,
52
58
  highlight: true,
53
59
  can_discover: true,
54
60
  can_bookmark: true,
61
+ can_semantic_search: true,
55
62
  install_monthly_limit: null,
56
63
  multi_agent_targets: ALL_AGENTS,
57
64
  can_cli_sync: true,
@@ -83,13 +90,16 @@ export const PLAN_LIMITS = {
83
90
  // ── Max (internally `creator`) ────────────────────────────────────
84
91
  creator: {
85
92
  label: 'Max',
86
- tagline: 'Bulk-dev tier with unlimited audit, BYO-key tester and magic-link sharing.',
87
- price_usd_monthly: 39,
88
- price_usd_yearly: 360,
93
+ tagline: 'Unlimited audit, no Tester cooldown, BYO-key, magic-link sharing.',
94
+ // 300 credits = 60 runs ≈ $0.78 API + ~$1.00 Stripe = $1.78 cost.
95
+ // Net margin: ~$22.22/mo (93%). Yearly clears ~$200 net.
96
+ price_usd_monthly: 24,
97
+ price_usd_yearly: 216,
89
98
  rank: 2,
90
99
  highlight: false,
91
100
  can_discover: true,
92
101
  can_bookmark: true,
102
+ can_semantic_search: true,
93
103
  install_monthly_limit: null,
94
104
  multi_agent_targets: ALL_AGENTS,
95
105
  can_cli_sync: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prave/shared",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"