spl-pay-per-suite 1.1.3 → 1.1.5

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.
package/README.md CHANGED
@@ -7,8 +7,8 @@
7
7
  | Tier | Rule |
8
8
  |------|------|
9
9
  | **Free** | First **1 GiB per job** — $0 (showcase) |
10
- | **Usage** | Bytes over free: **~$0.015/GB** (0.8¢/GB after 50 GB over free) |
11
- | **Min paid** | $0.15 once over free |
10
+ | **Usage** | Bytes over free: **~ $0.03/GB** (2¢/GB after 50 GB over free) |
11
+ | **Min paid** | $2.00 once over free |
12
12
 
13
13
  **Try Gate is retired.** Evaluate on free suite — not a $9 chip-in.
14
14
 
@@ -33,7 +33,7 @@ computeQuote({ product: "auto", op: "compress", bytes: 100e6 });
33
33
  // → free: true, amount_cents: 0
34
34
 
35
35
  computeQuote({ product: "auto", op: "compress", bytes: 9e9 });
36
- // → free: false, ~$0.15 class
36
+ // → free: false, ~$2.00 class
37
37
  ```
38
38
 
39
39
  ## MCP
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spl-pay-per-suite",
3
- "version": "1.1.3",
3
+ "version": "1.1.5",
4
4
  "description": "SPL Pay Per Suite — freemium (free first 1 GB · then ~1.5¢/GB), Stripe + x402. Library, CLI, MCP. Try Gate retired.",
5
5
  "type": "module",
6
6
  "main": "src/index.mjs",
@@ -84,7 +84,7 @@
84
84
  "site": "https://www.slidphilabs.com",
85
85
  "llms_txt": "https://www.slidphilabs.com/llms.txt",
86
86
  "agents_json": "https://www.slidphilabs.com/agents.json",
87
- "one_liner": "Free first 1 GB suite · then ~1.5¢/GB (Try Gate retired). Compression+agent platform. GET https://www.slidphilabs.com/api/agent · x402 or free suite under 1 GB.",
87
+ "one_liner": "Free first 100 GB suite (equal free-tier $0) · then ~5c/GB under ~9c first paid egress. GET https://www.slidphilabs.com/api/agent. Try Gate retired.",
88
88
  "agent_platform": {
89
89
  "cuni": "https://cuni-studio.fly.dev/",
90
90
  "agent_rider": "https://agentrider.vercel.app/",
@@ -92,10 +92,13 @@
92
92
  },
93
93
  "suite": "https://www.slidphilabs.com/pps",
94
94
  "suite_pricing": {
95
- "free_cap_gb": 1,
96
- "usd_per_gb_after_free": 0.015,
95
+ "free_cap_gb": 100,
96
+ "min_paid_usd": 0.05,
97
+ "usd_per_gb_after_free": 0.05,
98
+ "usd_per_gb_bulk": 0.04,
99
+ "first_paid_egress_ref_usd": 0.09,
97
100
  "try_gate": "retired",
98
- "model": "freemium_suite_v2"
101
+ "model": "freemium_suite_v4_undercut"
99
102
  },
100
103
  "welcome": "https://www.slidphilabs.com/api/welcome",
101
104
  "platform_json": "https://www.slidphilabs.com/platform.json"
@@ -44,7 +44,7 @@ const TOOLS = [
44
44
  {
45
45
  name: "spl_pps_info",
46
46
  description:
47
- "SPL Pay Per Suite overview: freemium suite (free first 1 GB then ~1.5¢/GB), Stripe (humans) + x402 (agents), products, data classes, ops. Try Gate retired.",
47
+ "SPL Pay Per Suite overview: freemium suite (free first 1 GB then ~3¢/GB · min $2), Stripe (humans) + x402 (agents), products, data classes, ops. Try Gate retired.",
48
48
  inputSchema: { type: "object", properties: {} },
49
49
  },
50
50
  {
@@ -82,7 +82,7 @@ const TOOLS = [
82
82
  {
83
83
  name: "spl_pps_x402_requirements",
84
84
  description:
85
- "Probe POST /api/x402-suite. Free under 1 GB (no pay). Over free → 402 accepts[] for usage pricing (~1.5¢/GB).",
85
+ "Probe POST /api/x402-suite. Free under 1 GB (no pay). Over free → 402 accepts[] for usage pricing (~3¢/GB · min $2).",
86
86
  inputSchema: {
87
87
  type: "object",
88
88
  properties: {
@@ -117,7 +117,7 @@ const TOOLS = [
117
117
  {
118
118
  name: "spl_pps_quote",
119
119
  description:
120
- "Instant freemium quote: free first 1 GB ($0), then ~1.5¢/GB. Inputs: product, dataClass, op, bytes. Returns free flag + USD amount.",
120
+ "Instant freemium quote: free first 1 GB ($0), then ~3¢/GB · min $2. Inputs: product, dataClass, op, bytes. Returns free flag + USD amount.",
121
121
  inputSchema: {
122
122
  type: "object",
123
123
  properties: {
@@ -204,8 +204,8 @@ async function callTool(name, args = {}) {
204
204
  model: "freemium_suite_v2",
205
205
  free_cap_bytes: FREE_BYTES,
206
206
  free_cap_gb: 1,
207
- usd_per_gb_after_free: 0.015,
208
- usd_per_gb_bulk: 0.008,
207
+ usd_per_gb_after_free: 0.03,
208
+ usd_per_gb_bulk: 0.02,
209
209
  min_paid_cents: MIN_PAID_CENTS,
210
210
  try_gate: "retired",
211
211
  },
package/src/quote.mjs CHANGED
@@ -1,69 +1,42 @@
1
1
  /**
2
- * SPL Pay Per Suite — local quote engine (matches site freemium model).
3
- * Free first 1 GiB per job · then ~1.5¢/GB (0.8¢ after 50 GB over free).
4
- * Try Gate retired suite freemium is the evaluation path.
2
+ * SPL Pay Per Suite — local quote (matches site).
3
+ * Free first 100 GiB (equal when competitor free-tier size is $0).
4
+ * Over free: under first paid egress (~$0.09/GB) at ~5¢/GB.
5
5
  */
6
-
7
- export const FREE_BYTES = 1 * 1024 * 1024 * 1024; // 1 GiB free per job
8
- export const MAX_BYTES = 100 * 1024 * 1024 * 1024;
6
+ export const FREE_BYTES = 100 * 1024 * 1024 * 1024;
7
+ export const MAX_BYTES = 1024 * 1024 * 1024 * 1024;
9
8
  export const MAX_CENTS = 1_000_000;
10
- export const MIN_PAID_CENTS = 15; // $0.15 once over free
11
- /** @deprecated use MIN_PAID_CENTS — free tier can be $0 */
9
+ export const MIN_PAID_CENTS = 5;
12
10
  export const MIN_CENTS = 0;
13
11
 
14
- /** Product adder (cents) only when billable — not on free tier */
15
12
  export const PRODUCT_ADD_CENTS = {
16
- auto: 0,
17
- zrw: 0,
18
- "cddg-split": 50,
19
- blackjack: 0,
20
- "shard-zip": 0,
21
- "shard-tsdb": 0,
22
- "slid-phi": 0,
13
+ auto: 0, zrw: 0, "cddg-split": 25, blackjack: 0,
14
+ "shard-zip": 0, "shard-tsdb": 0, "slid-phi": 0,
23
15
  };
24
-
25
- /** Alias for MCP/tool listings */
26
16
  export const PRODUCT_BASE = PRODUCT_ADD_CENTS;
27
17
 
28
18
  export const DATA_MULT = {
29
- zeros: 0.9,
30
- ramp: 0.95,
31
- walk: 1.0,
32
- mixed_ints: 1.05,
33
- timeseries: 1.05,
34
- json_series: 1.0,
35
- binary: 1.1,
36
- unknown: 1.0,
19
+ zeros: 0.9, ramp: 0.95, walk: 1.0, mixed_ints: 1.05,
20
+ timeseries: 1.05, json_series: 1.0, binary: 1.1, unknown: 1.0,
37
21
  };
38
-
39
22
  export const OP_MULT = {
40
- compress: 1.0,
41
- decompress: 0.75,
42
- roundtrip: 1.15,
23
+ compress: 1.0, decompress: 0.75, roundtrip: 1.15,
43
24
  };
44
25
 
45
26
  export const STRIPE_PAYMENT_LINK =
46
27
  process.env.SPL_PPS_PAYMENT_LINK ||
47
28
  "https://buy.stripe.com/aFa00k4B70OYetL0O46wE0g";
48
-
49
29
  export const SITE_PPS = process.env.SPL_PPS_SITE || "https://www.slidphilabs.com/pps";
50
30
  export const API_BASE = process.env.SPL_PPS_API || "https://www.slidphilabs.com";
51
31
 
52
- /**
53
- * Usage fee on billable bytes after free cap (USD cents).
54
- * first 50 GiB over free: $0.015/GB · after: $0.008/GB
55
- */
56
32
  export function usageFeeCents(billableBytes) {
57
33
  const b = Math.max(0, Number(billableBytes) || 0);
58
34
  if (b <= 0) return 0;
59
35
  const gb = b / (1024 * 1024 * 1024);
60
- if (gb <= 50) return Math.round(gb * 1.5);
61
- return Math.round(50 * 1.5 + (gb - 50) * 0.8);
36
+ if (gb <= 100) return Math.round(gb * 5);
37
+ return Math.round(100 * 5 + (gb - 100) * 4);
62
38
  }
63
39
 
64
- /**
65
- * @param {{ product?: string, dataClass?: string, op?: string, bytes?: number }} opts
66
- */
67
40
  export function computeQuote({
68
41
  product = "auto",
69
42
  dataClass = "unknown",
@@ -74,101 +47,54 @@ export function computeQuote({
74
47
  const cls = DATA_MULT[dataClass] != null ? dataClass : "unknown";
75
48
  const operation = OP_MULT[op] != null ? op : "compress";
76
49
  const b = Math.max(0, Math.min(Number(bytes) || 0, MAX_BYTES));
77
-
78
50
  const free_bytes = FREE_BYTES;
79
51
  const billable = Math.max(0, b - free_bytes);
80
52
  const free = billable <= 0;
53
+ const rates = {
54
+ free_cap_gb: 100,
55
+ min_paid_usd: 0.05,
56
+ usd_per_gb_first_100: 0.05,
57
+ usd_per_gb_after_100: 0.04,
58
+ first_paid_egress_ref: 0.09,
59
+ };
81
60
 
82
61
  if (free) {
83
62
  return {
84
- ok: true,
85
- service: "SPL Pay Per Suite",
86
- currency: "usd",
87
- amount_cents: 0,
88
- amount_display: "0.00",
89
- free: true,
90
- tier: "free_showcase",
91
- message:
92
- "Free showcase — first 1 GB per job is $0. Feel the platform; pay only for usage above the cap.",
63
+ ok: true, service: "SPL Pay Per Suite", currency: "usd",
64
+ amount_cents: 0, amount_display: "0.00", free: true, tier: "free_match",
65
+ message: "Free through 100 GB (equal when competitor free-tier size is $0).",
93
66
  breakdown: {
94
- product: prod,
95
- product_add_cents: 0,
96
- product_base_cents: 0,
97
- free_bytes,
98
- free_gb: 1,
99
- billable_bytes: 0,
100
- usage_cents: 0,
101
- size_cents: 0,
102
- data_class: cls,
103
- data_multiplier: DATA_MULT[cls],
104
- op: operation,
105
- op_multiplier: OP_MULT[operation],
106
- bytes: b,
107
- mb: +(b / (1024 * 1024)).toFixed(4),
108
- gb: +(b / (1024 * 1024 * 1024)).toFixed(6),
109
- min_cents: 0,
110
- min_paid_cents: MIN_PAID_CENTS,
111
- max_cents: MAX_CENTS,
112
- rates: {
113
- free_cap_gb: 1,
114
- usd_per_gb_first_50: 0.015,
115
- usd_per_gb_after_50: 0.008,
116
- },
67
+ product: prod, product_add_cents: 0, product_base_cents: 0,
68
+ free_bytes, free_gb: 100, billable_bytes: 0, usage_cents: 0, size_cents: 0,
69
+ data_class: cls, data_multiplier: DATA_MULT[cls],
70
+ op: operation, op_multiplier: OP_MULT[operation],
71
+ bytes: b, mb: +(b/1024/1024).toFixed(4), gb: +(b/1024/1024/1024).toFixed(6),
72
+ min_cents: 0, min_paid_cents: MIN_PAID_CENTS, max_cents: MAX_CENTS, rates,
117
73
  },
118
- pay_url: STRIPE_PAYMENT_LINK,
119
- suite_url: SITE_PPS,
74
+ pay_url: STRIPE_PAYMENT_LINK, suite_url: SITE_PPS,
120
75
  };
121
76
  }
122
-
123
77
  const usage = usageFeeCents(billable);
124
78
  const add = PRODUCT_ADD_CENTS[prod] || 0;
125
79
  const raw = Math.round((usage + add) * DATA_MULT[cls] * OP_MULT[operation]);
126
80
  const cents = Math.min(MAX_CENTS, Math.max(MIN_PAID_CENTS, raw));
127
-
128
81
  return {
129
- ok: true,
130
- service: "SPL Pay Per Suite",
131
- currency: "usd",
132
- amount_cents: cents,
133
- amount_display: (cents / 100).toFixed(2),
134
- free: false,
135
- tier: "usage",
136
- message:
137
- "Usage pricing — first 1 GB free, then ~1.5¢/GB (0.8¢/GB after 50 GB over free). Far under typical cloud egress.",
82
+ ok: true, service: "SPL Pay Per Suite", currency: "usd",
83
+ amount_cents: cents, amount_display: (cents / 100).toFixed(2),
84
+ free: false, tier: "usage_undercut",
85
+ message: "Over free: ~5¢/GB (under first paid egress ~9¢/GB).",
138
86
  breakdown: {
139
- product: prod,
140
- product_add_cents: add,
141
- product_base_cents: add,
142
- free_bytes,
143
- free_gb: 1,
144
- billable_bytes: billable,
145
- usage_cents: usage,
146
- size_cents: usage,
147
- data_class: cls,
148
- data_multiplier: DATA_MULT[cls],
149
- op: operation,
150
- op_multiplier: OP_MULT[operation],
151
- bytes: b,
152
- mb: +(b / (1024 * 1024)).toFixed(4),
153
- gb: +(b / (1024 * 1024 * 1024)).toFixed(6),
154
- min_cents: MIN_PAID_CENTS,
155
- min_paid_cents: MIN_PAID_CENTS,
156
- max_cents: MAX_CENTS,
157
- rates: {
158
- free_cap_gb: 1,
159
- usd_per_gb_first_50: 0.015,
160
- usd_per_gb_after_50: 0.008,
161
- },
87
+ product: prod, product_add_cents: add, product_base_cents: add,
88
+ free_bytes, free_gb: 100, billable_bytes: billable, usage_cents: usage, size_cents: usage,
89
+ data_class: cls, data_multiplier: DATA_MULT[cls],
90
+ op: operation, op_multiplier: OP_MULT[operation],
91
+ bytes: b, mb: +(b/1024/1024).toFixed(4), gb: +(b/1024/1024/1024).toFixed(6),
92
+ min_cents: MIN_PAID_CENTS, min_paid_cents: MIN_PAID_CENTS, max_cents: MAX_CENTS, rates,
162
93
  },
163
- pay_url: STRIPE_PAYMENT_LINK,
164
- suite_url: SITE_PPS,
94
+ pay_url: STRIPE_PAYMENT_LINK, suite_url: SITE_PPS,
165
95
  };
166
96
  }
167
97
 
168
- /**
169
- * Lightweight data-class heuristic from a Buffer / Uint8Array sample.
170
- * Does not run proprietary codecs.
171
- */
172
98
  export function classifyBytes(buf) {
173
99
  if (!buf || !buf.length) return { dataClass: "unknown", tool: "auto", confidence: 0 };
174
100
  const u8 = buf instanceof Uint8Array ? buf : new Uint8Array(buf);