@sakupa/mcp 0.7.4 → 0.7.6
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/dist/bin.js +15 -14
- package/dist/index.js +15 -14
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -128,7 +128,7 @@ var FORBIDDEN_PATH_SEGMENTS = [
|
|
|
128
128
|
var ALLOWED_HIDDEN_PATHS = [".well-known/"];
|
|
129
129
|
|
|
130
130
|
// ../core/dist/domain/version.js
|
|
131
|
-
var SAKUPA_MCP_VERSION = "0.7.
|
|
131
|
+
var SAKUPA_MCP_VERSION = "0.7.6";
|
|
132
132
|
|
|
133
133
|
// ../core/dist/domain/errors.js
|
|
134
134
|
var HTTP_STATUS = {
|
|
@@ -1299,7 +1299,8 @@ function toolError(e) {
|
|
|
1299
1299
|
([key, value]) => safeDetailKeys.has(key) && (typeof value === "string" || typeof value === "number" || typeof value === "boolean")
|
|
1300
1300
|
)
|
|
1301
1301
|
) : void 0;
|
|
1302
|
-
const
|
|
1302
|
+
const minimumVersion = rawDetails && typeof rawDetails["minimumVersion"] === "string" ? rawDetails["minimumVersion"] : void 0;
|
|
1303
|
+
const safeSummary = errorCode === "upgrade_required" ? `This Sakupa MCP client is v${MCP_VERSION}, older than the server's minimum supported version${minimumVersion !== void 0 ? ` (v${minimumVersion})` : ""}, so the server refused the call. To fix it: ask the user to fully restart their MCP client session \u2014 "npx -y @sakupa/mcp@latest" setups fetch the current version on restart (run "npx clear-npx-cache" first if the old version persists); global installs need "npm install -g @sakupa/mcp@latest". After the restart, retry this exact tool call.` : errorCode === "not_found" ? "The required local project binding or resource is unavailable; if this project has no .sakupa/site.json yet, run deploy_site first." : errorCode === "unauthorized" ? "The server rejected the site credential: the one in .sakupa/site.json no longer matches the server-side verifier. The site itself is intact on the server \u2014 only the local binding file is the problem. Repair the file (restore a backup or undo the local edit). Do NOT delete the .sakupa directory to work around this: the credential is unrecoverable by design, so abandoning it permanently orphans the existing site." : errorCode === "invalid_request" || errorCode === "validation_failed" ? "The request arguments or local project checks did not pass." : errorCode === "state_conflict" ? "The resource state has changed; re-query the current status before deciding the next step." : errorCode === "confirmation_required" ? "The site or billing state changed, so the previous confirmation is stale; run the preview again and confirm against the fresh snapshot." : errorCode === "payment_required" ? "This operation requires an active subscription; check billing_status first." : errorCode === "rate_limited" ? "The server rate limit was reached; retry after the returned wait time." : retryable ? "An upstream service is temporarily unavailable or busy; retry shortly." : "The operation failed; no server-internal details are exposed.";
|
|
1303
1304
|
const result = structuredToolResult({
|
|
1304
1305
|
schemaVersion: 1,
|
|
1305
1306
|
outcome: "failed",
|
|
@@ -1846,13 +1847,13 @@ Full status:`, res);
|
|
|
1846
1847
|
schemaVersion: 1,
|
|
1847
1848
|
outcome: "waiting_user",
|
|
1848
1849
|
resultCode: "site_billing_portal_ready",
|
|
1849
|
-
summary:
|
|
1850
|
+
summary: `Short-lived Stripe customer portal link created for this site: ${res2.portalUrl}. Any change still happens only on the Stripe-hosted page.`,
|
|
1850
1851
|
data: { scope: args.scope, portalUrl: res2.portalUrl },
|
|
1851
1852
|
userAction: {
|
|
1852
1853
|
type: "open_url",
|
|
1853
1854
|
provider: "stripe",
|
|
1854
1855
|
url: res2.portalUrl,
|
|
1855
|
-
expectedOutcome: "
|
|
1856
|
+
expectedOutcome: "The user manages payment methods, invoices, or cancels renewal on the Stripe-hosted page"
|
|
1856
1857
|
},
|
|
1857
1858
|
nextActions: [{ tool: "billing_status", allowed: true }]
|
|
1858
1859
|
});
|
|
@@ -1862,7 +1863,7 @@ Full status:`, res);
|
|
|
1862
1863
|
schemaVersion: 1,
|
|
1863
1864
|
outcome: "waiting_user",
|
|
1864
1865
|
resultCode: "public_billing_recovery_portal_ready",
|
|
1865
|
-
summary: `Stripe
|
|
1866
|
+
summary: `Stripe public email-OTP login page: ${res.portalUrl}. It uses a one-time passcode, does not recover the Sakupa key, and grants no site authority; when one email has several Customers, Stripe may open only the most recently created usable record.`,
|
|
1866
1867
|
data: {
|
|
1867
1868
|
scope: args.scope,
|
|
1868
1869
|
portalUrl: res.portalUrl,
|
|
@@ -1873,7 +1874,7 @@ Full status:`, res);
|
|
|
1873
1874
|
type: "open_url",
|
|
1874
1875
|
provider: "stripe",
|
|
1875
1876
|
url: res.portalUrl,
|
|
1876
|
-
expectedOutcome: "
|
|
1877
|
+
expectedOutcome: "The user verifies the billing email with Stripe, then reviews and cancels the subscription shown in the portal"
|
|
1877
1878
|
},
|
|
1878
1879
|
nextActions: []
|
|
1879
1880
|
});
|
|
@@ -1937,7 +1938,7 @@ After the DNS record resolves, re-run recover_domain_site with verificationId: "
|
|
|
1937
1938
|
schemaVersion: 1,
|
|
1938
1939
|
outcome: res2.status === "expired" ? "expired" : res2.readyToComplete ? "completed" : "pending_provider",
|
|
1939
1940
|
resultCode: res2.status === "expired" ? "domain_recovery_expired" : res2.readyToComplete ? "domain_recovery_ready" : "domain_recovery_pending_dns",
|
|
1940
|
-
summary: `DNS
|
|
1941
|
+
summary: `DNS recovery verification status: ${res2.status}`,
|
|
1941
1942
|
data: { recovery: res2 },
|
|
1942
1943
|
nextActions: [
|
|
1943
1944
|
{
|
|
@@ -2100,7 +2101,7 @@ function registerBillingTools(server, ctx) {
|
|
|
2100
2101
|
schemaVersion: 1,
|
|
2101
2102
|
outcome: "completed",
|
|
2102
2103
|
resultCode: "billing_catalog_returned",
|
|
2103
|
-
summary:
|
|
2104
|
+
summary: `Returned ${catalog.plans.length} monthly plans; the Stripe-hosted page is the final confirmation surface for payment and plan changes.`,
|
|
2104
2105
|
data: { catalog },
|
|
2105
2106
|
nextActions: [{ tool: "subscribe_site", allowed: true }]
|
|
2106
2107
|
});
|
|
@@ -2133,13 +2134,13 @@ function registerBillingTools(server, ctx) {
|
|
|
2133
2134
|
outcome: "waiting_user",
|
|
2134
2135
|
resultCode: "stripe_plan_change_confirmation_required",
|
|
2135
2136
|
operationId: args.operationId,
|
|
2136
|
-
summary:
|
|
2137
|
+
summary: `Stripe confirmation link created for ${result.currentPlan} -> ${result.targetPlan}; the subscription has NOT changed yet.`,
|
|
2137
2138
|
data: { result },
|
|
2138
2139
|
userAction: {
|
|
2139
2140
|
type: "open_url",
|
|
2140
2141
|
provider: "stripe",
|
|
2141
2142
|
url: result.portalUrl,
|
|
2142
|
-
expectedOutcome: "
|
|
2143
|
+
expectedOutcome: "After the user confirms on the Stripe-hosted page, the webhook updates the Sakupa subscription state"
|
|
2143
2144
|
},
|
|
2144
2145
|
nextActions: [{ tool: "billing_status", allowed: true }]
|
|
2145
2146
|
});
|
|
@@ -2204,7 +2205,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2204
2205
|
outcome: "waiting_user",
|
|
2205
2206
|
resultCode: "delete_site_confirmation_required",
|
|
2206
2207
|
operationId: args.operationId,
|
|
2207
|
-
summary: "
|
|
2208
|
+
summary: "Deletion consequences returned, bound to the current site and billing state; after confirmation the content and the permanent URL are unrecoverable.",
|
|
2208
2209
|
data: { preview },
|
|
2209
2210
|
nextActions: [
|
|
2210
2211
|
{ tool: "delete_site", allowed: true, reasonCode: "exact_confirmation_required" }
|
|
@@ -2222,7 +2223,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2222
2223
|
outcome: result.servingDeletionPending ? "pending_provider" : "completed",
|
|
2223
2224
|
resultCode: "site_deleted",
|
|
2224
2225
|
operationId: args.operationId,
|
|
2225
|
-
summary: "
|
|
2226
|
+
summary: "Site deleted; the local management credential file was removed.",
|
|
2226
2227
|
data: { result },
|
|
2227
2228
|
nextActions: []
|
|
2228
2229
|
});
|
|
@@ -2256,7 +2257,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2256
2257
|
outcome: "waiting_user",
|
|
2257
2258
|
resultCode: "unbind_domain_confirmation_required",
|
|
2258
2259
|
operationId: args.operationId,
|
|
2259
|
-
summary: "\
|
|
2260
|
+
summary: "Exact binding snapshot returned; unbinding removes ONLY the custom domain \u2014 the subscription, content, and permanent URL stay unchanged.",
|
|
2260
2261
|
data: { preview },
|
|
2261
2262
|
nextActions: [
|
|
2262
2263
|
{ tool: "unbind_domain", allowed: true, reasonCode: "exact_confirmation_required" }
|
|
@@ -2275,7 +2276,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2275
2276
|
outcome: result.servingDeletionPending ? "pending_provider" : "completed",
|
|
2276
2277
|
resultCode: "domain_unbound",
|
|
2277
2278
|
operationId: args.operationId,
|
|
2278
|
-
summary: "
|
|
2279
|
+
summary: "Custom domain unbound; the subscription, deployed content, and permanent Sakupa URL are unchanged.",
|
|
2279
2280
|
data: { result },
|
|
2280
2281
|
nextActions: [{ tool: "site_status", allowed: true }]
|
|
2281
2282
|
});
|
package/dist/index.js
CHANGED
|
@@ -123,7 +123,7 @@ var FORBIDDEN_PATH_SEGMENTS = [
|
|
|
123
123
|
var ALLOWED_HIDDEN_PATHS = [".well-known/"];
|
|
124
124
|
|
|
125
125
|
// ../core/dist/domain/version.js
|
|
126
|
-
var SAKUPA_MCP_VERSION = "0.7.
|
|
126
|
+
var SAKUPA_MCP_VERSION = "0.7.6";
|
|
127
127
|
|
|
128
128
|
// ../core/dist/domain/errors.js
|
|
129
129
|
var HTTP_STATUS = {
|
|
@@ -1357,7 +1357,8 @@ function toolError(e) {
|
|
|
1357
1357
|
([key, value]) => safeDetailKeys.has(key) && (typeof value === "string" || typeof value === "number" || typeof value === "boolean")
|
|
1358
1358
|
)
|
|
1359
1359
|
) : void 0;
|
|
1360
|
-
const
|
|
1360
|
+
const minimumVersion = rawDetails && typeof rawDetails["minimumVersion"] === "string" ? rawDetails["minimumVersion"] : void 0;
|
|
1361
|
+
const safeSummary = errorCode === "upgrade_required" ? `This Sakupa MCP client is v${MCP_VERSION}, older than the server's minimum supported version${minimumVersion !== void 0 ? ` (v${minimumVersion})` : ""}, so the server refused the call. To fix it: ask the user to fully restart their MCP client session \u2014 "npx -y @sakupa/mcp@latest" setups fetch the current version on restart (run "npx clear-npx-cache" first if the old version persists); global installs need "npm install -g @sakupa/mcp@latest". After the restart, retry this exact tool call.` : errorCode === "not_found" ? "The required local project binding or resource is unavailable; if this project has no .sakupa/site.json yet, run deploy_site first." : errorCode === "unauthorized" ? "The server rejected the site credential: the one in .sakupa/site.json no longer matches the server-side verifier. The site itself is intact on the server \u2014 only the local binding file is the problem. Repair the file (restore a backup or undo the local edit). Do NOT delete the .sakupa directory to work around this: the credential is unrecoverable by design, so abandoning it permanently orphans the existing site." : errorCode === "invalid_request" || errorCode === "validation_failed" ? "The request arguments or local project checks did not pass." : errorCode === "state_conflict" ? "The resource state has changed; re-query the current status before deciding the next step." : errorCode === "confirmation_required" ? "The site or billing state changed, so the previous confirmation is stale; run the preview again and confirm against the fresh snapshot." : errorCode === "payment_required" ? "This operation requires an active subscription; check billing_status first." : errorCode === "rate_limited" ? "The server rate limit was reached; retry after the returned wait time." : retryable ? "An upstream service is temporarily unavailable or busy; retry shortly." : "The operation failed; no server-internal details are exposed.";
|
|
1361
1362
|
const result = structuredToolResult({
|
|
1362
1363
|
schemaVersion: 1,
|
|
1363
1364
|
outcome: "failed",
|
|
@@ -1908,13 +1909,13 @@ Full status:`, res);
|
|
|
1908
1909
|
schemaVersion: 1,
|
|
1909
1910
|
outcome: "waiting_user",
|
|
1910
1911
|
resultCode: "site_billing_portal_ready",
|
|
1911
|
-
summary:
|
|
1912
|
+
summary: `Short-lived Stripe customer portal link created for this site: ${res2.portalUrl}. Any change still happens only on the Stripe-hosted page.`,
|
|
1912
1913
|
data: { scope: args.scope, portalUrl: res2.portalUrl },
|
|
1913
1914
|
userAction: {
|
|
1914
1915
|
type: "open_url",
|
|
1915
1916
|
provider: "stripe",
|
|
1916
1917
|
url: res2.portalUrl,
|
|
1917
|
-
expectedOutcome: "
|
|
1918
|
+
expectedOutcome: "The user manages payment methods, invoices, or cancels renewal on the Stripe-hosted page"
|
|
1918
1919
|
},
|
|
1919
1920
|
nextActions: [{ tool: "billing_status", allowed: true }]
|
|
1920
1921
|
});
|
|
@@ -1924,7 +1925,7 @@ Full status:`, res);
|
|
|
1924
1925
|
schemaVersion: 1,
|
|
1925
1926
|
outcome: "waiting_user",
|
|
1926
1927
|
resultCode: "public_billing_recovery_portal_ready",
|
|
1927
|
-
summary: `Stripe
|
|
1928
|
+
summary: `Stripe public email-OTP login page: ${res.portalUrl}. It uses a one-time passcode, does not recover the Sakupa key, and grants no site authority; when one email has several Customers, Stripe may open only the most recently created usable record.`,
|
|
1928
1929
|
data: {
|
|
1929
1930
|
scope: args.scope,
|
|
1930
1931
|
portalUrl: res.portalUrl,
|
|
@@ -1935,7 +1936,7 @@ Full status:`, res);
|
|
|
1935
1936
|
type: "open_url",
|
|
1936
1937
|
provider: "stripe",
|
|
1937
1938
|
url: res.portalUrl,
|
|
1938
|
-
expectedOutcome: "
|
|
1939
|
+
expectedOutcome: "The user verifies the billing email with Stripe, then reviews and cancels the subscription shown in the portal"
|
|
1939
1940
|
},
|
|
1940
1941
|
nextActions: []
|
|
1941
1942
|
});
|
|
@@ -1999,7 +2000,7 @@ After the DNS record resolves, re-run recover_domain_site with verificationId: "
|
|
|
1999
2000
|
schemaVersion: 1,
|
|
2000
2001
|
outcome: res2.status === "expired" ? "expired" : res2.readyToComplete ? "completed" : "pending_provider",
|
|
2001
2002
|
resultCode: res2.status === "expired" ? "domain_recovery_expired" : res2.readyToComplete ? "domain_recovery_ready" : "domain_recovery_pending_dns",
|
|
2002
|
-
summary: `DNS
|
|
2003
|
+
summary: `DNS recovery verification status: ${res2.status}`,
|
|
2003
2004
|
data: { recovery: res2 },
|
|
2004
2005
|
nextActions: [
|
|
2005
2006
|
{
|
|
@@ -2197,7 +2198,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2197
2198
|
outcome: "waiting_user",
|
|
2198
2199
|
resultCode: "delete_site_confirmation_required",
|
|
2199
2200
|
operationId: args.operationId,
|
|
2200
|
-
summary: "
|
|
2201
|
+
summary: "Deletion consequences returned, bound to the current site and billing state; after confirmation the content and the permanent URL are unrecoverable.",
|
|
2201
2202
|
data: { preview },
|
|
2202
2203
|
nextActions: [
|
|
2203
2204
|
{ tool: "delete_site", allowed: true, reasonCode: "exact_confirmation_required" }
|
|
@@ -2215,7 +2216,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2215
2216
|
outcome: result.servingDeletionPending ? "pending_provider" : "completed",
|
|
2216
2217
|
resultCode: "site_deleted",
|
|
2217
2218
|
operationId: args.operationId,
|
|
2218
|
-
summary: "
|
|
2219
|
+
summary: "Site deleted; the local management credential file was removed.",
|
|
2219
2220
|
data: { result },
|
|
2220
2221
|
nextActions: []
|
|
2221
2222
|
});
|
|
@@ -2249,7 +2250,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2249
2250
|
outcome: "waiting_user",
|
|
2250
2251
|
resultCode: "unbind_domain_confirmation_required",
|
|
2251
2252
|
operationId: args.operationId,
|
|
2252
|
-
summary: "\
|
|
2253
|
+
summary: "Exact binding snapshot returned; unbinding removes ONLY the custom domain \u2014 the subscription, content, and permanent URL stay unchanged.",
|
|
2253
2254
|
data: { preview },
|
|
2254
2255
|
nextActions: [
|
|
2255
2256
|
{ tool: "unbind_domain", allowed: true, reasonCode: "exact_confirmation_required" }
|
|
@@ -2268,7 +2269,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2268
2269
|
outcome: result.servingDeletionPending ? "pending_provider" : "completed",
|
|
2269
2270
|
resultCode: "domain_unbound",
|
|
2270
2271
|
operationId: args.operationId,
|
|
2271
|
-
summary: "
|
|
2272
|
+
summary: "Custom domain unbound; the subscription, deployed content, and permanent Sakupa URL are unchanged.",
|
|
2272
2273
|
data: { result },
|
|
2273
2274
|
nextActions: [{ tool: "site_status", allowed: true }]
|
|
2274
2275
|
});
|
|
@@ -2301,7 +2302,7 @@ function registerBillingTools(server, ctx) {
|
|
|
2301
2302
|
schemaVersion: 1,
|
|
2302
2303
|
outcome: "completed",
|
|
2303
2304
|
resultCode: "billing_catalog_returned",
|
|
2304
|
-
summary:
|
|
2305
|
+
summary: `Returned ${catalog.plans.length} monthly plans; the Stripe-hosted page is the final confirmation surface for payment and plan changes.`,
|
|
2305
2306
|
data: { catalog },
|
|
2306
2307
|
nextActions: [{ tool: "subscribe_site", allowed: true }]
|
|
2307
2308
|
});
|
|
@@ -2334,13 +2335,13 @@ function registerBillingTools(server, ctx) {
|
|
|
2334
2335
|
outcome: "waiting_user",
|
|
2335
2336
|
resultCode: "stripe_plan_change_confirmation_required",
|
|
2336
2337
|
operationId: args.operationId,
|
|
2337
|
-
summary:
|
|
2338
|
+
summary: `Stripe confirmation link created for ${result.currentPlan} -> ${result.targetPlan}; the subscription has NOT changed yet.`,
|
|
2338
2339
|
data: { result },
|
|
2339
2340
|
userAction: {
|
|
2340
2341
|
type: "open_url",
|
|
2341
2342
|
provider: "stripe",
|
|
2342
2343
|
url: result.portalUrl,
|
|
2343
|
-
expectedOutcome: "
|
|
2344
|
+
expectedOutcome: "After the user confirms on the Stripe-hosted page, the webhook updates the Sakupa subscription state"
|
|
2344
2345
|
},
|
|
2345
2346
|
nextActions: [{ tool: "billing_status", allowed: true }]
|
|
2346
2347
|
});
|