spl-pay-per-suite 1.1.7 → 1.1.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.
- package/README.md +22 -23
- package/package.json +30 -27
- package/src/cli.mjs +2 -9
- package/src/index.mjs +4 -0
- package/src/mcp-server.mjs +44 -27
- package/src/quote.mjs +20 -16
package/README.md
CHANGED
|
@@ -1,32 +1,19 @@
|
|
|
1
1
|
# spl-pay-per-suite
|
|
2
2
|
|
|
3
|
-
**SPL Pay Per Suite** —
|
|
3
|
+
**SPL Pay Per Suite** — quote, checkout, and MCP helper for a hosted service. Stripe is available for humans; x402 is available for agents where offered. This package does not contain the private encoder.
|
|
4
4
|
|
|
5
5
|
## Pricing (canonical · matches live API)
|
|
6
6
|
|
|
7
7
|
| Tier | Rule |
|
|
8
8
|
|------|------|
|
|
9
|
-
| **
|
|
10
|
-
| **Usage** |
|
|
9
|
+
| **Unpaid boundary** | First **6.9 GB** within **3 hours** — $0 |
|
|
10
|
+
| **Usage** | Then about **$0.05 / GB**; bulk pricing may apply where offered |
|
|
11
11
|
| **Min paid** | **$0.05** once over free |
|
|
12
12
|
| **Ref** | Under typical first paid cloud egress (~$0.09/GB) |
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Canonical catalog: [GET /api/x402-products](https://www.slidphilabs.com/api/x402-products)
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
| SKU | USD |
|
|
19
|
-
|-----|----:|
|
|
20
|
-
| CDDG:Split | 199 |
|
|
21
|
-
| ZRW N00b / Pro / L33t | 79 / 249 / 699 |
|
|
22
|
-
| blackjack · shard-zip · shard-tsdb · slid-phi · support | 199 |
|
|
23
|
-
| consulting | 250 |
|
|
24
|
-
| sponsor / donate | 29 / 29.99 |
|
|
25
|
-
| GAO entry | 1 |
|
|
26
|
-
|
|
27
|
-
Canonical table: [`docs/NPM_PRICING.md`](../../docs/NPM_PRICING.md) · Catalog: [GET /api/x402-products](https://slidphilabs.fly.dev/api/x402-products)
|
|
28
|
-
|
|
29
|
-
Live suite: [slidphilabs.fly.dev/pps](https://slidphilabs.fly.dev/pps) · Discovery: [GET /api/agent](https://slidphilabs.fly.dev/api/agent)
|
|
16
|
+
Live Suite: [www.slidphilabs.com/pps](https://www.slidphilabs.com/pps) · Discovery: [GET /api/agent](https://www.slidphilabs.com/api/agent)
|
|
30
17
|
|
|
31
18
|
## Install
|
|
32
19
|
|
|
@@ -41,11 +28,11 @@ npx spl-pay-per-suite quote --bytes 500000000
|
|
|
41
28
|
```js
|
|
42
29
|
import { computeQuote } from "spl-pay-per-suite";
|
|
43
30
|
|
|
44
|
-
computeQuote({ product: "auto", op: "compress", bytes:
|
|
45
|
-
// →
|
|
31
|
+
computeQuote({ product: "auto", op: "compress", bytes: 1 * 1024 ** 3 });
|
|
32
|
+
// → unpaid (under 6.9 GB)
|
|
46
33
|
|
|
47
|
-
computeQuote({ product: "auto", op: "compress", bytes:
|
|
48
|
-
// →
|
|
34
|
+
computeQuote({ product: "auto", op: "compress", bytes: 7 * 1024 ** 3 });
|
|
35
|
+
// → over 6.9 GB unpaid cap; inspect the returned quote before checkout
|
|
49
36
|
```
|
|
50
37
|
|
|
51
38
|
## MCP
|
|
@@ -55,10 +42,22 @@ npx spl-pay-per-suite mcp
|
|
|
55
42
|
# or: node node_modules/spl-pay-per-suite/src/mcp-server.mjs
|
|
56
43
|
```
|
|
57
44
|
|
|
45
|
+
For the hosted public catalog server, configure your MCP client directly:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"mcpServers": {
|
|
50
|
+
"slid-phi-labs": {
|
|
51
|
+
"url": "https://www.slidphilabs.com/mcp"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
58
57
|
Tools: `spl_pps_info`, `spl_pps_quote`, `spl_pps_checkout`, `spl_pps_submit_job`, `spl_pps_classify`, `spl_pps_x402_*`.
|
|
59
58
|
|
|
60
59
|
`spl_pps_info` returns the same suite rates as the live quote engine (`SUITE_PRICING`).
|
|
61
60
|
|
|
62
61
|
## IP Guard
|
|
63
62
|
|
|
64
|
-
Quotes and commerce rails only — no private compression process or
|
|
63
|
+
Quotes and commerce rails only — no private compression process, issuer control, or production engine is included in this package.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spl-pay-per-suite",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "SPL Pay Per Suite
|
|
3
|
+
"version": "1.1.9",
|
|
4
|
+
"description": "SPL Pay Per Suite — unpaid cap 6.9 GB / 3 h, then ~5¢/GB (~4¢ bulk). Stripe + x402. MCP client. No encoder in this package.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.mjs",
|
|
7
7
|
"exports": {
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"bin": {
|
|
12
12
|
"spl-pps": "src/cli.mjs",
|
|
13
13
|
"spl-pay-per-suite": "src/cli.mjs",
|
|
14
|
-
"pay-per-suite": "src/cli.mjs"
|
|
14
|
+
"pay-per-suite": "src/cli.mjs",
|
|
15
|
+
"spl-mcp": "src/mcp-server.mjs"
|
|
15
16
|
},
|
|
16
17
|
"files": [
|
|
17
18
|
"src",
|
|
@@ -52,7 +53,7 @@
|
|
|
52
53
|
],
|
|
53
54
|
"author": "Slid Phi Labs",
|
|
54
55
|
"license": "SEE LICENSE IN LICENSE",
|
|
55
|
-
"homepage": "https://slidphilabs.
|
|
56
|
+
"homepage": "https://www.slidphilabs.com",
|
|
56
57
|
"repository": {
|
|
57
58
|
"type": "git",
|
|
58
59
|
"url": "git+https://github.com/ceedot-rock/SlidPhiLabs.git",
|
|
@@ -63,7 +64,7 @@
|
|
|
63
64
|
},
|
|
64
65
|
"funding": {
|
|
65
66
|
"type": "individual",
|
|
66
|
-
"url": "https://slidphilabs.
|
|
67
|
+
"url": "https://www.slidphilabs.com/pay"
|
|
67
68
|
},
|
|
68
69
|
"agentic": {
|
|
69
70
|
"modules": {
|
|
@@ -78,21 +79,22 @@
|
|
|
78
79
|
]
|
|
79
80
|
},
|
|
80
81
|
"commerce": "x402",
|
|
81
|
-
"discovery": "https://slidphilabs.
|
|
82
|
-
"catalog": "https://slidphilabs.
|
|
83
|
-
"web_codec": "https://slidphilabs.
|
|
84
|
-
"site": "https://slidphilabs.
|
|
85
|
-
"llms_txt": "https://slidphilabs.
|
|
86
|
-
"agents_json": "https://slidphilabs.
|
|
87
|
-
"one_liner": "
|
|
82
|
+
"discovery": "https://www.slidphilabs.com/api/agent",
|
|
83
|
+
"catalog": "https://www.slidphilabs.com/api/x402-products",
|
|
84
|
+
"web_codec": "https://www.slidphilabs.com/api/web-codec",
|
|
85
|
+
"site": "https://www.slidphilabs.com",
|
|
86
|
+
"llms_txt": "https://www.slidphilabs.com/llms.txt",
|
|
87
|
+
"agents_json": "https://www.slidphilabs.com/agents.json",
|
|
88
|
+
"one_liner": "Unpaid cap 6.9 GB / 3 h \u00b7 then ~5\u00a2/GB. Pay: https://www.slidphilabs.com/pay \u00b7 GET https://www.slidphilabs.com/api/agent",
|
|
88
89
|
"agent_platform": {
|
|
89
90
|
"cuni": "https://cuni-studio.fly.dev/",
|
|
90
|
-
"agent_rider": "https://agentrider.
|
|
91
|
+
"agent_rider": "https://agentrider.fly.dev/",
|
|
91
92
|
"quikgater": "https://github.com/ceedot-rock/quikgater"
|
|
92
93
|
},
|
|
93
|
-
"suite": "https://slidphilabs.
|
|
94
|
+
"suite": "https://www.slidphilabs.com/pps",
|
|
94
95
|
"suite_pricing": {
|
|
95
|
-
"free_cap_gb":
|
|
96
|
+
"free_cap_gb": 6.9,
|
|
97
|
+
"free_window_hours": 3,
|
|
96
98
|
"min_paid_usd": 0.05,
|
|
97
99
|
"usd_per_gb_after_free": 0.05,
|
|
98
100
|
"usd_per_gb_bulk": 0.04,
|
|
@@ -100,14 +102,14 @@
|
|
|
100
102
|
"try_gate": "retired",
|
|
101
103
|
"model": "freemium_suite_v4_undercut"
|
|
102
104
|
},
|
|
103
|
-
"welcome": "https://slidphilabs.
|
|
104
|
-
"platform_json": "https://slidphilabs.
|
|
105
|
-
"pay_ui": "https://slidphilabs.
|
|
105
|
+
"welcome": "https://www.slidphilabs.com/api/welcome",
|
|
106
|
+
"platform_json": "https://www.slidphilabs.com/platform.json",
|
|
107
|
+
"pay_ui": "https://www.slidphilabs.com/pay",
|
|
106
108
|
"team_mesh": "https://spl-team-mesh.fly.dev"
|
|
107
109
|
},
|
|
108
110
|
"x402": {
|
|
109
|
-
"discovery": "https://slidphilabs.
|
|
110
|
-
"catalog": "https://slidphilabs.
|
|
111
|
+
"discovery": "https://www.slidphilabs.com/api/agent",
|
|
112
|
+
"catalog": "https://www.slidphilabs.com/api/x402-products",
|
|
111
113
|
"networks": [
|
|
112
114
|
"solana-mainnet-beta",
|
|
113
115
|
"eip155:8453"
|
|
@@ -121,14 +123,15 @@
|
|
|
121
123
|
"sku": "suite",
|
|
122
124
|
"amount_usd": "metered",
|
|
123
125
|
"currency": "usd",
|
|
124
|
-
"buy": "https://slidphilabs.
|
|
125
|
-
"checkout": "https://slidphilabs.
|
|
126
|
-
"access": "https://slidphilabs.
|
|
127
|
-
"catalog": "https://slidphilabs.
|
|
128
|
-
"pay_ui": "https://slidphilabs.
|
|
129
|
-
"doc": "https://slidphilabs.
|
|
126
|
+
"buy": "https://www.slidphilabs.com/pps",
|
|
127
|
+
"checkout": "https://www.slidphilabs.com/api/checkout",
|
|
128
|
+
"access": "https://www.slidphilabs.com/access?product=suite",
|
|
129
|
+
"catalog": "https://www.slidphilabs.com/api/x402-products",
|
|
130
|
+
"pay_ui": "https://www.slidphilabs.com/pay",
|
|
131
|
+
"doc": "https://www.slidphilabs.com/pps",
|
|
130
132
|
"suite_pricing": {
|
|
131
|
-
"free_cap_gb":
|
|
133
|
+
"free_cap_gb": 6.9,
|
|
134
|
+
"free_window_hours": 3,
|
|
132
135
|
"usd_per_gb_after_free": 0.05,
|
|
133
136
|
"usd_per_gb_bulk": 0.04
|
|
134
137
|
}
|
package/src/cli.mjs
CHANGED
|
@@ -102,14 +102,7 @@ async function main() {
|
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
if (cmd === "mcp") {
|
|
106
|
-
console.log("Start MCP: node src/mcp-server.mjs");
|
|
107
|
-
console.log("Or: npm run mcp --prefix packages/spl-pay-per-suite");
|
|
108
|
-
console.log("Config: { \"command\": \"npx\", \"args\": [\"-y\", \"spl-pay-per-suite\", \"mcp-serve\"] }");
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
if (cmd === "mcp-serve") {
|
|
105
|
+
if (cmd === "mcp" || cmd === "mcp-serve") {
|
|
113
106
|
await import("./mcp-server.mjs");
|
|
114
107
|
return;
|
|
115
108
|
}
|
|
@@ -127,7 +120,7 @@ async function main() {
|
|
|
127
120
|
if (cmd === "buy" || cmd === "x402-buy") {
|
|
128
121
|
const sku = args.sku || args.product || args._[0];
|
|
129
122
|
if (!sku) {
|
|
130
|
-
console.error("--sku required (e.g.
|
|
123
|
+
console.error("--sku required (e.g. chamber-year, gc-year, lab-pass)");
|
|
131
124
|
process.exit(1);
|
|
132
125
|
}
|
|
133
126
|
const opts = {
|
package/src/index.mjs
CHANGED
|
@@ -14,6 +14,8 @@ import {
|
|
|
14
14
|
DATA_MULT,
|
|
15
15
|
OP_MULT,
|
|
16
16
|
FREE_BYTES,
|
|
17
|
+
FREE_GB,
|
|
18
|
+
FREE_WINDOW_HOURS,
|
|
17
19
|
MIN_PAID_CENTS,
|
|
18
20
|
MIN_CENTS,
|
|
19
21
|
MAX_CENTS,
|
|
@@ -33,6 +35,8 @@ export {
|
|
|
33
35
|
DATA_MULT,
|
|
34
36
|
OP_MULT,
|
|
35
37
|
FREE_BYTES,
|
|
38
|
+
FREE_GB,
|
|
39
|
+
FREE_WINDOW_HOURS,
|
|
36
40
|
MIN_PAID_CENTS,
|
|
37
41
|
MIN_CENTS,
|
|
38
42
|
MAX_CENTS,
|
package/src/mcp-server.mjs
CHANGED
|
@@ -42,27 +42,33 @@ import {
|
|
|
42
42
|
} from "./index.mjs";
|
|
43
43
|
|
|
44
44
|
const SUITE_LINE =
|
|
45
|
-
"
|
|
45
|
+
"Unpaid cap 6.9 GB / 3 h · then ~5¢/GB (4¢ bulk) · min $0.05. Try Gate retired.";
|
|
46
46
|
|
|
47
47
|
const TOOLS = [
|
|
48
|
+
{
|
|
49
|
+
name: "spl_lab_auth",
|
|
50
|
+
description:
|
|
51
|
+
"One lab account for every Slid Phi product. POST https://www.slidphilabs.com/api/auth {action:signup|login,email,password,name}. Then open CuNi, Rider, Chamber with the token. Humans: /signup /login /account.",
|
|
52
|
+
inputSchema: { type: "object", properties: {} },
|
|
53
|
+
},
|
|
48
54
|
{
|
|
49
55
|
name: "spl_pps_info",
|
|
50
56
|
description:
|
|
51
57
|
"SPL Pay Per Suite overview: " +
|
|
52
58
|
SUITE_LINE +
|
|
53
|
-
" Stripe (humans) + x402 (agents).
|
|
59
|
+
" Stripe (humans) + x402 (agents). Seats: Chamber $9/$99 · AWARE $9/$49/$490 · Rider $79/$790 · Lab Pass $668 · consulting $250.",
|
|
54
60
|
inputSchema: { type: "object", properties: {} },
|
|
55
61
|
},
|
|
56
62
|
{
|
|
57
63
|
name: "spl_pps_x402_info",
|
|
58
64
|
description:
|
|
59
|
-
"Agentic commerce discovery: standing product catalog + freemium suite jobs (free under
|
|
65
|
+
"Agentic commerce discovery: standing product catalog + freemium suite jobs (free under 6.9 GB / 3 h), headers, flow. Stripe remains for humans.",
|
|
60
66
|
inputSchema: { type: "object", properties: {} },
|
|
61
67
|
},
|
|
62
68
|
{
|
|
63
69
|
name: "spl_pps_x402_catalog",
|
|
64
70
|
description:
|
|
65
|
-
"List standing Slid Phi Labs
|
|
71
|
+
"List standing Slid Phi Labs seats agents can buy via x402 (Chamber, AWARE, Rider, Lab Pass, TruGame, consulting). Suite jobs are separate.",
|
|
66
72
|
inputSchema: { type: "object", properties: {} },
|
|
67
73
|
},
|
|
68
74
|
{
|
|
@@ -75,7 +81,7 @@ const TOOLS = [
|
|
|
75
81
|
sku: {
|
|
76
82
|
type: "string",
|
|
77
83
|
description:
|
|
78
|
-
"
|
|
84
|
+
"chamber-year($99) | gc-year($490) | rider-year($790) | lab-pass($668) | trugame-year($79) | consulting($250) | oss-support($199)",
|
|
79
85
|
},
|
|
80
86
|
email: { type: "string" },
|
|
81
87
|
note: { type: "string" },
|
|
@@ -88,7 +94,7 @@ const TOOLS = [
|
|
|
88
94
|
{
|
|
89
95
|
name: "spl_pps_x402_requirements",
|
|
90
96
|
description:
|
|
91
|
-
"Probe POST /api/x402-suite. Free under
|
|
97
|
+
"Probe POST /api/x402-suite. Free under 6.9 GB / 3 h (no pay). Over free → 402 accepts[] for usage (~5¢/GB then 4¢ · min $0.05).",
|
|
92
98
|
inputSchema: {
|
|
93
99
|
type: "object",
|
|
94
100
|
properties: {
|
|
@@ -97,7 +103,7 @@ const TOOLS = [
|
|
|
97
103
|
op: { type: "string" },
|
|
98
104
|
bytes: {
|
|
99
105
|
type: "number",
|
|
100
|
-
description: "Payload bytes (≤
|
|
106
|
+
description: "Payload bytes (≤6.9 GB unpaid cap; over cap requires payment)",
|
|
101
107
|
},
|
|
102
108
|
email: { type: "string" },
|
|
103
109
|
note: { type: "string" },
|
|
@@ -107,7 +113,7 @@ const TOOLS = [
|
|
|
107
113
|
{
|
|
108
114
|
name: "spl_pps_x402_submit",
|
|
109
115
|
description:
|
|
110
|
-
"Submit freemium suite job via x402. Under
|
|
116
|
+
"Submit freemium suite job via x402. Under 6.9 GB / 3 h free (no paymentHeader). Over free: pass paymentHeader after paying, or devBypass for staging.",
|
|
111
117
|
inputSchema: {
|
|
112
118
|
type: "object",
|
|
113
119
|
properties: {
|
|
@@ -120,7 +126,7 @@ const TOOLS = [
|
|
|
120
126
|
fileName: { type: "string" },
|
|
121
127
|
paymentHeader: {
|
|
122
128
|
type: "string",
|
|
123
|
-
description: "Base64 X-PAYMENT proof (only if over free
|
|
129
|
+
description: "Base64 X-PAYMENT proof (only if over free 6.9 GB / 3 h cap)",
|
|
124
130
|
},
|
|
125
131
|
devBypass: { type: "boolean", description: "Staging only if server allows" },
|
|
126
132
|
},
|
|
@@ -129,7 +135,7 @@ const TOOLS = [
|
|
|
129
135
|
{
|
|
130
136
|
name: "spl_pps_quote",
|
|
131
137
|
description:
|
|
132
|
-
"Instant freemium quote: free first
|
|
138
|
+
"Instant freemium quote: free first 6.9 GB / 3 h ($0), then ~5¢/GB (4¢ bulk) · min $0.05. Inputs: product, dataClass, op, bytes. Returns free flag + USD amount.",
|
|
133
139
|
inputSchema: {
|
|
134
140
|
type: "object",
|
|
135
141
|
properties: {
|
|
@@ -145,7 +151,7 @@ const TOOLS = [
|
|
|
145
151
|
op: { type: "string", description: "compress | decompress | roundtrip" },
|
|
146
152
|
bytes: {
|
|
147
153
|
type: "number",
|
|
148
|
-
description: "Payload size in bytes (≤
|
|
154
|
+
description: "Payload size in bytes (≤6.9 GB unpaid = $0)",
|
|
149
155
|
},
|
|
150
156
|
remote: { type: "boolean", description: "If true, use live site API" },
|
|
151
157
|
},
|
|
@@ -154,7 +160,7 @@ const TOOLS = [
|
|
|
154
160
|
{
|
|
155
161
|
name: "spl_pps_checkout",
|
|
156
162
|
description:
|
|
157
|
-
"Checkout for suite quote. Under
|
|
163
|
+
"Checkout for suite quote. Under 6.9 GB / 3 h returns free_showcase (no Stripe). Over free returns Stripe Checkout URL.",
|
|
158
164
|
inputSchema: {
|
|
159
165
|
type: "object",
|
|
160
166
|
properties: {
|
|
@@ -169,7 +175,7 @@ const TOOLS = [
|
|
|
169
175
|
{
|
|
170
176
|
name: "spl_pps_submit_job",
|
|
171
177
|
description:
|
|
172
|
-
"Submit a Pay Per Suite job (free under
|
|
178
|
+
"Submit a Pay Per Suite job (free under 6.9 GB / 3 h after free_showcase, or after paid). Lab runs best tool and emails results. Requires email.",
|
|
173
179
|
inputSchema: {
|
|
174
180
|
type: "object",
|
|
175
181
|
properties: {
|
|
@@ -214,25 +220,36 @@ function err(id, code, message) {
|
|
|
214
220
|
|
|
215
221
|
async function callTool(name, args = {}) {
|
|
216
222
|
switch (name) {
|
|
223
|
+
case "spl_lab_auth":
|
|
224
|
+
return {
|
|
225
|
+
signup: "https://www.slidphilabs.com/signup",
|
|
226
|
+
login: "https://www.slidphilabs.com/login",
|
|
227
|
+
account: "https://www.slidphilabs.com/account",
|
|
228
|
+
api: "POST https://www.slidphilabs.com/api/auth",
|
|
229
|
+
body: { action: "signup|login", email: "", password: "", name: "" },
|
|
230
|
+
lead_product: "cuni",
|
|
231
|
+
cash_product: "chamber",
|
|
232
|
+
};
|
|
217
233
|
case "spl_pps_info":
|
|
218
234
|
return {
|
|
219
235
|
service: SERVICE_NAME,
|
|
220
236
|
site: SITE_PPS,
|
|
221
237
|
pricing: { ...SUITE_PRICING, free_cap_bytes: FREE_BYTES, min_paid_cents: MIN_PAID_CENTS },
|
|
222
238
|
standing_skus_usd: {
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
"
|
|
227
|
-
|
|
228
|
-
"
|
|
229
|
-
"
|
|
230
|
-
"
|
|
231
|
-
"
|
|
239
|
+
"chamber-month": 9,
|
|
240
|
+
"chamber-year": 99,
|
|
241
|
+
"gc-day": 9,
|
|
242
|
+
"gc-month": 49,
|
|
243
|
+
"gc-year": 490,
|
|
244
|
+
"rider-month": 79,
|
|
245
|
+
"rider-year": 790,
|
|
246
|
+
"rider-ops-month": 29,
|
|
247
|
+
"rider-ops-year": 290,
|
|
248
|
+
"lab-pass": 668,
|
|
249
|
+
"trugame-month": 12,
|
|
250
|
+
"trugame-year": 79,
|
|
232
251
|
consulting: 250,
|
|
233
|
-
|
|
234
|
-
donate: 29.99,
|
|
235
|
-
"gao-entry": 1,
|
|
252
|
+
"oss-support": 199,
|
|
236
253
|
},
|
|
237
254
|
catalog: X402_PRODUCTS_URL,
|
|
238
255
|
pay_human: STRIPE_PAYMENT_LINK,
|
|
@@ -244,8 +261,8 @@ async function callTool(name, args = {}) {
|
|
|
244
261
|
ops: Object.keys(OP_MULT),
|
|
245
262
|
npm: "spl-pay-per-suite",
|
|
246
263
|
cli: "npx spl-pay-per-suite quote|pay|job|x402|catalog|buy",
|
|
247
|
-
discovery: "https://slidphilabs.
|
|
248
|
-
pay_ui: "https://slidphilabs.
|
|
264
|
+
discovery: "https://www.slidphilabs.com/api/agent",
|
|
265
|
+
pay_ui: "https://www.slidphilabs.com/pay",
|
|
249
266
|
canonical_doc: "docs/NPM_PRICING.md",
|
|
250
267
|
one_liner: SUITE_LINE,
|
|
251
268
|
};
|
package/src/quote.mjs
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* SPL Pay Per Suite — local quote (matches site).
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* SPL Pay Per Suite — local quote (matches site API suite-pricing.js).
|
|
3
|
+
* Unpaid cap: 6.9 GB and 3 hours. Then ~5¢/GB (4¢ bulk after 100 paid GB).
|
|
4
|
+
* Time window is enforced on the host; this quote is bytes-only.
|
|
5
5
|
*/
|
|
6
|
-
export const
|
|
6
|
+
export const FREE_GB = 6.9;
|
|
7
|
+
export const FREE_WINDOW_HOURS = 3;
|
|
8
|
+
export const FREE_BYTES = Math.round(FREE_GB * 1024 * 1024 * 1024);
|
|
7
9
|
export const MAX_BYTES = 1024 * 1024 * 1024 * 1024;
|
|
8
10
|
export const MAX_CENTS = 1_000_000;
|
|
9
11
|
export const MIN_PAID_CENTS = 5;
|
|
@@ -11,8 +13,9 @@ export const MIN_CENTS = 0;
|
|
|
11
13
|
|
|
12
14
|
/** Canonical suite rates — MCP, package.json, site, API must match */
|
|
13
15
|
export const SUITE_PRICING = {
|
|
14
|
-
model: "
|
|
15
|
-
free_cap_gb:
|
|
16
|
+
model: "unpaid_cap_6_9_3h",
|
|
17
|
+
free_cap_gb: FREE_GB,
|
|
18
|
+
free_window_hours: FREE_WINDOW_HOURS,
|
|
16
19
|
free_cap_bytes: FREE_BYTES,
|
|
17
20
|
usd_per_gb_after_free: 0.05,
|
|
18
21
|
usd_per_gb_first_100: 0.05,
|
|
@@ -22,7 +25,7 @@ export const SUITE_PRICING = {
|
|
|
22
25
|
first_paid_egress_ref_usd: 0.09,
|
|
23
26
|
try_gate: "retired",
|
|
24
27
|
human_one_liner:
|
|
25
|
-
"
|
|
28
|
+
"Unpaid cap 6.9 GB / 3 h · then ~5¢/GB (4¢ bulk) · min $0.05",
|
|
26
29
|
};
|
|
27
30
|
|
|
28
31
|
export const PRODUCT_ADD_CENTS = {
|
|
@@ -41,11 +44,11 @@ export const OP_MULT = {
|
|
|
41
44
|
|
|
42
45
|
export const STRIPE_PAYMENT_LINK =
|
|
43
46
|
process.env.SPL_PPS_PAYMENT_LINK ||
|
|
44
|
-
"https://
|
|
47
|
+
"https://www.slidphilabs.com/pps";
|
|
45
48
|
export const SITE_PPS =
|
|
46
|
-
process.env.SPL_PPS_SITE || "https://slidphilabs.
|
|
49
|
+
process.env.SPL_PPS_SITE || "https://www.slidphilabs.com/pps";
|
|
47
50
|
export const API_BASE =
|
|
48
|
-
process.env.SPL_PPS_API || "https://slidphilabs.
|
|
51
|
+
process.env.SPL_PPS_API || "https://www.slidphilabs.com";
|
|
49
52
|
|
|
50
53
|
export function usageFeeCents(billableBytes) {
|
|
51
54
|
const b = Math.max(0, Number(billableBytes) || 0);
|
|
@@ -69,7 +72,8 @@ export function computeQuote({
|
|
|
69
72
|
const billable = Math.max(0, b - free_bytes);
|
|
70
73
|
const free = billable <= 0;
|
|
71
74
|
const rates = {
|
|
72
|
-
free_cap_gb:
|
|
75
|
+
free_cap_gb: FREE_GB,
|
|
76
|
+
free_window_hours: FREE_WINDOW_HOURS,
|
|
73
77
|
min_paid_usd: 0.05,
|
|
74
78
|
usd_per_gb_first_100: 0.05,
|
|
75
79
|
usd_per_gb_after_100: 0.04,
|
|
@@ -79,11 +83,11 @@ export function computeQuote({
|
|
|
79
83
|
if (free) {
|
|
80
84
|
return {
|
|
81
85
|
ok: true, service: "SPL Pay Per Suite", currency: "usd",
|
|
82
|
-
amount_cents: 0, amount_display: "0.00", free: true, tier: "
|
|
83
|
-
message: "
|
|
86
|
+
amount_cents: 0, amount_display: "0.00", free: true, tier: "unpaid_cap",
|
|
87
|
+
message: "Unpaid cap 6.9 GB and 3 hours. Then ~5¢/GB.",
|
|
84
88
|
breakdown: {
|
|
85
89
|
product: prod, product_add_cents: 0, product_base_cents: 0,
|
|
86
|
-
free_bytes, free_gb:
|
|
90
|
+
free_bytes, free_gb: FREE_GB, billable_bytes: 0, usage_cents: 0, size_cents: 0,
|
|
87
91
|
data_class: cls, data_multiplier: DATA_MULT[cls],
|
|
88
92
|
op: operation, op_multiplier: OP_MULT[operation],
|
|
89
93
|
bytes: b, mb: +(b/1024/1024).toFixed(4), gb: +(b/1024/1024/1024).toFixed(6),
|
|
@@ -100,10 +104,10 @@ export function computeQuote({
|
|
|
100
104
|
ok: true, service: "SPL Pay Per Suite", currency: "usd",
|
|
101
105
|
amount_cents: cents, amount_display: (cents / 100).toFixed(2),
|
|
102
106
|
free: false, tier: "usage_undercut",
|
|
103
|
-
message: "Over
|
|
107
|
+
message: "Over 6.9 GB unpaid cap — ~5¢/GB (4¢ bulk).",
|
|
104
108
|
breakdown: {
|
|
105
109
|
product: prod, product_add_cents: add, product_base_cents: add,
|
|
106
|
-
free_bytes, free_gb:
|
|
110
|
+
free_bytes, free_gb: FREE_GB, billable_bytes: billable, usage_cents: usage, size_cents: usage,
|
|
107
111
|
data_class: cls, data_multiplier: DATA_MULT[cls],
|
|
108
112
|
op: operation, op_multiplier: OP_MULT[operation],
|
|
109
113
|
bytes: b, mb: +(b/1024/1024).toFixed(4), gb: +(b/1024/1024/1024).toFixed(6),
|