@sakupa/mcp 0.7.4 → 0.7.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/dist/bin.js +14 -14
- package/dist/index.js +14 -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.5";
|
|
132
132
|
|
|
133
133
|
// ../core/dist/domain/errors.js
|
|
134
134
|
var HTTP_STATUS = {
|
|
@@ -1299,7 +1299,7 @@ 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 safeSummary = errorCode === "not_found" ? "
|
|
1302
|
+
const safeSummary = 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
1303
|
const result = structuredToolResult({
|
|
1304
1304
|
schemaVersion: 1,
|
|
1305
1305
|
outcome: "failed",
|
|
@@ -1846,13 +1846,13 @@ Full status:`, res);
|
|
|
1846
1846
|
schemaVersion: 1,
|
|
1847
1847
|
outcome: "waiting_user",
|
|
1848
1848
|
resultCode: "site_billing_portal_ready",
|
|
1849
|
-
summary:
|
|
1849
|
+
summary: `Short-lived Stripe customer portal link created for this site: ${res2.portalUrl}. Any change still happens only on the Stripe-hosted page.`,
|
|
1850
1850
|
data: { scope: args.scope, portalUrl: res2.portalUrl },
|
|
1851
1851
|
userAction: {
|
|
1852
1852
|
type: "open_url",
|
|
1853
1853
|
provider: "stripe",
|
|
1854
1854
|
url: res2.portalUrl,
|
|
1855
|
-
expectedOutcome: "
|
|
1855
|
+
expectedOutcome: "The user manages payment methods, invoices, or cancels renewal on the Stripe-hosted page"
|
|
1856
1856
|
},
|
|
1857
1857
|
nextActions: [{ tool: "billing_status", allowed: true }]
|
|
1858
1858
|
});
|
|
@@ -1862,7 +1862,7 @@ Full status:`, res);
|
|
|
1862
1862
|
schemaVersion: 1,
|
|
1863
1863
|
outcome: "waiting_user",
|
|
1864
1864
|
resultCode: "public_billing_recovery_portal_ready",
|
|
1865
|
-
summary: `Stripe
|
|
1865
|
+
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
1866
|
data: {
|
|
1867
1867
|
scope: args.scope,
|
|
1868
1868
|
portalUrl: res.portalUrl,
|
|
@@ -1873,7 +1873,7 @@ Full status:`, res);
|
|
|
1873
1873
|
type: "open_url",
|
|
1874
1874
|
provider: "stripe",
|
|
1875
1875
|
url: res.portalUrl,
|
|
1876
|
-
expectedOutcome: "
|
|
1876
|
+
expectedOutcome: "The user verifies the billing email with Stripe, then reviews and cancels the subscription shown in the portal"
|
|
1877
1877
|
},
|
|
1878
1878
|
nextActions: []
|
|
1879
1879
|
});
|
|
@@ -1937,7 +1937,7 @@ After the DNS record resolves, re-run recover_domain_site with verificationId: "
|
|
|
1937
1937
|
schemaVersion: 1,
|
|
1938
1938
|
outcome: res2.status === "expired" ? "expired" : res2.readyToComplete ? "completed" : "pending_provider",
|
|
1939
1939
|
resultCode: res2.status === "expired" ? "domain_recovery_expired" : res2.readyToComplete ? "domain_recovery_ready" : "domain_recovery_pending_dns",
|
|
1940
|
-
summary: `DNS
|
|
1940
|
+
summary: `DNS recovery verification status: ${res2.status}`,
|
|
1941
1941
|
data: { recovery: res2 },
|
|
1942
1942
|
nextActions: [
|
|
1943
1943
|
{
|
|
@@ -2100,7 +2100,7 @@ function registerBillingTools(server, ctx) {
|
|
|
2100
2100
|
schemaVersion: 1,
|
|
2101
2101
|
outcome: "completed",
|
|
2102
2102
|
resultCode: "billing_catalog_returned",
|
|
2103
|
-
summary:
|
|
2103
|
+
summary: `Returned ${catalog.plans.length} monthly plans; the Stripe-hosted page is the final confirmation surface for payment and plan changes.`,
|
|
2104
2104
|
data: { catalog },
|
|
2105
2105
|
nextActions: [{ tool: "subscribe_site", allowed: true }]
|
|
2106
2106
|
});
|
|
@@ -2133,13 +2133,13 @@ function registerBillingTools(server, ctx) {
|
|
|
2133
2133
|
outcome: "waiting_user",
|
|
2134
2134
|
resultCode: "stripe_plan_change_confirmation_required",
|
|
2135
2135
|
operationId: args.operationId,
|
|
2136
|
-
summary:
|
|
2136
|
+
summary: `Stripe confirmation link created for ${result.currentPlan} -> ${result.targetPlan}; the subscription has NOT changed yet.`,
|
|
2137
2137
|
data: { result },
|
|
2138
2138
|
userAction: {
|
|
2139
2139
|
type: "open_url",
|
|
2140
2140
|
provider: "stripe",
|
|
2141
2141
|
url: result.portalUrl,
|
|
2142
|
-
expectedOutcome: "
|
|
2142
|
+
expectedOutcome: "After the user confirms on the Stripe-hosted page, the webhook updates the Sakupa subscription state"
|
|
2143
2143
|
},
|
|
2144
2144
|
nextActions: [{ tool: "billing_status", allowed: true }]
|
|
2145
2145
|
});
|
|
@@ -2204,7 +2204,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2204
2204
|
outcome: "waiting_user",
|
|
2205
2205
|
resultCode: "delete_site_confirmation_required",
|
|
2206
2206
|
operationId: args.operationId,
|
|
2207
|
-
summary: "
|
|
2207
|
+
summary: "Deletion consequences returned, bound to the current site and billing state; after confirmation the content and the permanent URL are unrecoverable.",
|
|
2208
2208
|
data: { preview },
|
|
2209
2209
|
nextActions: [
|
|
2210
2210
|
{ tool: "delete_site", allowed: true, reasonCode: "exact_confirmation_required" }
|
|
@@ -2222,7 +2222,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2222
2222
|
outcome: result.servingDeletionPending ? "pending_provider" : "completed",
|
|
2223
2223
|
resultCode: "site_deleted",
|
|
2224
2224
|
operationId: args.operationId,
|
|
2225
|
-
summary: "
|
|
2225
|
+
summary: "Site deleted; the local management credential file was removed.",
|
|
2226
2226
|
data: { result },
|
|
2227
2227
|
nextActions: []
|
|
2228
2228
|
});
|
|
@@ -2256,7 +2256,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2256
2256
|
outcome: "waiting_user",
|
|
2257
2257
|
resultCode: "unbind_domain_confirmation_required",
|
|
2258
2258
|
operationId: args.operationId,
|
|
2259
|
-
summary: "\
|
|
2259
|
+
summary: "Exact binding snapshot returned; unbinding removes ONLY the custom domain \u2014 the subscription, content, and permanent URL stay unchanged.",
|
|
2260
2260
|
data: { preview },
|
|
2261
2261
|
nextActions: [
|
|
2262
2262
|
{ tool: "unbind_domain", allowed: true, reasonCode: "exact_confirmation_required" }
|
|
@@ -2275,7 +2275,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2275
2275
|
outcome: result.servingDeletionPending ? "pending_provider" : "completed",
|
|
2276
2276
|
resultCode: "domain_unbound",
|
|
2277
2277
|
operationId: args.operationId,
|
|
2278
|
-
summary: "
|
|
2278
|
+
summary: "Custom domain unbound; the subscription, deployed content, and permanent Sakupa URL are unchanged.",
|
|
2279
2279
|
data: { result },
|
|
2280
2280
|
nextActions: [{ tool: "site_status", allowed: true }]
|
|
2281
2281
|
});
|
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.5";
|
|
127
127
|
|
|
128
128
|
// ../core/dist/domain/errors.js
|
|
129
129
|
var HTTP_STATUS = {
|
|
@@ -1357,7 +1357,7 @@ 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 safeSummary = errorCode === "not_found" ? "
|
|
1360
|
+
const safeSummary = 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
1361
|
const result = structuredToolResult({
|
|
1362
1362
|
schemaVersion: 1,
|
|
1363
1363
|
outcome: "failed",
|
|
@@ -1908,13 +1908,13 @@ Full status:`, res);
|
|
|
1908
1908
|
schemaVersion: 1,
|
|
1909
1909
|
outcome: "waiting_user",
|
|
1910
1910
|
resultCode: "site_billing_portal_ready",
|
|
1911
|
-
summary:
|
|
1911
|
+
summary: `Short-lived Stripe customer portal link created for this site: ${res2.portalUrl}. Any change still happens only on the Stripe-hosted page.`,
|
|
1912
1912
|
data: { scope: args.scope, portalUrl: res2.portalUrl },
|
|
1913
1913
|
userAction: {
|
|
1914
1914
|
type: "open_url",
|
|
1915
1915
|
provider: "stripe",
|
|
1916
1916
|
url: res2.portalUrl,
|
|
1917
|
-
expectedOutcome: "
|
|
1917
|
+
expectedOutcome: "The user manages payment methods, invoices, or cancels renewal on the Stripe-hosted page"
|
|
1918
1918
|
},
|
|
1919
1919
|
nextActions: [{ tool: "billing_status", allowed: true }]
|
|
1920
1920
|
});
|
|
@@ -1924,7 +1924,7 @@ Full status:`, res);
|
|
|
1924
1924
|
schemaVersion: 1,
|
|
1925
1925
|
outcome: "waiting_user",
|
|
1926
1926
|
resultCode: "public_billing_recovery_portal_ready",
|
|
1927
|
-
summary: `Stripe
|
|
1927
|
+
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
1928
|
data: {
|
|
1929
1929
|
scope: args.scope,
|
|
1930
1930
|
portalUrl: res.portalUrl,
|
|
@@ -1935,7 +1935,7 @@ Full status:`, res);
|
|
|
1935
1935
|
type: "open_url",
|
|
1936
1936
|
provider: "stripe",
|
|
1937
1937
|
url: res.portalUrl,
|
|
1938
|
-
expectedOutcome: "
|
|
1938
|
+
expectedOutcome: "The user verifies the billing email with Stripe, then reviews and cancels the subscription shown in the portal"
|
|
1939
1939
|
},
|
|
1940
1940
|
nextActions: []
|
|
1941
1941
|
});
|
|
@@ -1999,7 +1999,7 @@ After the DNS record resolves, re-run recover_domain_site with verificationId: "
|
|
|
1999
1999
|
schemaVersion: 1,
|
|
2000
2000
|
outcome: res2.status === "expired" ? "expired" : res2.readyToComplete ? "completed" : "pending_provider",
|
|
2001
2001
|
resultCode: res2.status === "expired" ? "domain_recovery_expired" : res2.readyToComplete ? "domain_recovery_ready" : "domain_recovery_pending_dns",
|
|
2002
|
-
summary: `DNS
|
|
2002
|
+
summary: `DNS recovery verification status: ${res2.status}`,
|
|
2003
2003
|
data: { recovery: res2 },
|
|
2004
2004
|
nextActions: [
|
|
2005
2005
|
{
|
|
@@ -2197,7 +2197,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2197
2197
|
outcome: "waiting_user",
|
|
2198
2198
|
resultCode: "delete_site_confirmation_required",
|
|
2199
2199
|
operationId: args.operationId,
|
|
2200
|
-
summary: "
|
|
2200
|
+
summary: "Deletion consequences returned, bound to the current site and billing state; after confirmation the content and the permanent URL are unrecoverable.",
|
|
2201
2201
|
data: { preview },
|
|
2202
2202
|
nextActions: [
|
|
2203
2203
|
{ tool: "delete_site", allowed: true, reasonCode: "exact_confirmation_required" }
|
|
@@ -2215,7 +2215,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2215
2215
|
outcome: result.servingDeletionPending ? "pending_provider" : "completed",
|
|
2216
2216
|
resultCode: "site_deleted",
|
|
2217
2217
|
operationId: args.operationId,
|
|
2218
|
-
summary: "
|
|
2218
|
+
summary: "Site deleted; the local management credential file was removed.",
|
|
2219
2219
|
data: { result },
|
|
2220
2220
|
nextActions: []
|
|
2221
2221
|
});
|
|
@@ -2249,7 +2249,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2249
2249
|
outcome: "waiting_user",
|
|
2250
2250
|
resultCode: "unbind_domain_confirmation_required",
|
|
2251
2251
|
operationId: args.operationId,
|
|
2252
|
-
summary: "\
|
|
2252
|
+
summary: "Exact binding snapshot returned; unbinding removes ONLY the custom domain \u2014 the subscription, content, and permanent URL stay unchanged.",
|
|
2253
2253
|
data: { preview },
|
|
2254
2254
|
nextActions: [
|
|
2255
2255
|
{ tool: "unbind_domain", allowed: true, reasonCode: "exact_confirmation_required" }
|
|
@@ -2268,7 +2268,7 @@ function registerLifecycleTools(server, ctx) {
|
|
|
2268
2268
|
outcome: result.servingDeletionPending ? "pending_provider" : "completed",
|
|
2269
2269
|
resultCode: "domain_unbound",
|
|
2270
2270
|
operationId: args.operationId,
|
|
2271
|
-
summary: "
|
|
2271
|
+
summary: "Custom domain unbound; the subscription, deployed content, and permanent Sakupa URL are unchanged.",
|
|
2272
2272
|
data: { result },
|
|
2273
2273
|
nextActions: [{ tool: "site_status", allowed: true }]
|
|
2274
2274
|
});
|
|
@@ -2301,7 +2301,7 @@ function registerBillingTools(server, ctx) {
|
|
|
2301
2301
|
schemaVersion: 1,
|
|
2302
2302
|
outcome: "completed",
|
|
2303
2303
|
resultCode: "billing_catalog_returned",
|
|
2304
|
-
summary:
|
|
2304
|
+
summary: `Returned ${catalog.plans.length} monthly plans; the Stripe-hosted page is the final confirmation surface for payment and plan changes.`,
|
|
2305
2305
|
data: { catalog },
|
|
2306
2306
|
nextActions: [{ tool: "subscribe_site", allowed: true }]
|
|
2307
2307
|
});
|
|
@@ -2334,13 +2334,13 @@ function registerBillingTools(server, ctx) {
|
|
|
2334
2334
|
outcome: "waiting_user",
|
|
2335
2335
|
resultCode: "stripe_plan_change_confirmation_required",
|
|
2336
2336
|
operationId: args.operationId,
|
|
2337
|
-
summary:
|
|
2337
|
+
summary: `Stripe confirmation link created for ${result.currentPlan} -> ${result.targetPlan}; the subscription has NOT changed yet.`,
|
|
2338
2338
|
data: { result },
|
|
2339
2339
|
userAction: {
|
|
2340
2340
|
type: "open_url",
|
|
2341
2341
|
provider: "stripe",
|
|
2342
2342
|
url: result.portalUrl,
|
|
2343
|
-
expectedOutcome: "
|
|
2343
|
+
expectedOutcome: "After the user confirms on the Stripe-hosted page, the webhook updates the Sakupa subscription state"
|
|
2344
2344
|
},
|
|
2345
2345
|
nextActions: [{ tool: "billing_status", allowed: true }]
|
|
2346
2346
|
});
|