@syntica/mcp 2.2.1 → 2.2.2
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/index.js +59 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58037,7 +58037,11 @@ function orgIdOfToken(token) {
|
|
|
58037
58037
|
return null;
|
|
58038
58038
|
}
|
|
58039
58039
|
}
|
|
58040
|
-
|
|
58040
|
+
var ORG_SWITCHING_TOOLS = /* @__PURE__ */ new Set(["org_select"]);
|
|
58041
|
+
function orgScopeMismatch(toolName, args) {
|
|
58042
|
+
if (ORG_SWITCHING_TOOLS.has(toolName)) {
|
|
58043
|
+
return null;
|
|
58044
|
+
}
|
|
58041
58045
|
const token = args["token"];
|
|
58042
58046
|
const requestedOrgId = args["orgId"];
|
|
58043
58047
|
if (typeof token !== "string" || typeof requestedOrgId !== "string" || requestedOrgId === "") {
|
|
@@ -59090,6 +59094,24 @@ var ApplicationClient = class {
|
|
|
59090
59094
|
get internalHeaders() {
|
|
59091
59095
|
return this.internalKey ? { "x-internal-secret": this.internalKey } : {};
|
|
59092
59096
|
}
|
|
59097
|
+
/**
|
|
59098
|
+
* The machine sizes, so callers can say "Small" where a row says "t3.micro".
|
|
59099
|
+
*
|
|
59100
|
+
* A tier's `name` is its Stripe join key and appears in every limit and
|
|
59101
|
+
* count; `displayName` is the only form a customer should ever be shown.
|
|
59102
|
+
* Returns [] on failure — a caller that cannot get the friendly name should
|
|
59103
|
+
* fall back to the key, not fail.
|
|
59104
|
+
*/
|
|
59105
|
+
async listNodeTiers() {
|
|
59106
|
+
const res = await fetch(`${this.baseUrl}/node-tiers`, {
|
|
59107
|
+
headers: { ...this.authHeaders, ...this.internalHeaders }
|
|
59108
|
+
});
|
|
59109
|
+
if (!res.ok) {
|
|
59110
|
+
return [];
|
|
59111
|
+
}
|
|
59112
|
+
const json = await res.json();
|
|
59113
|
+
return json.data ?? [];
|
|
59114
|
+
}
|
|
59093
59115
|
async listApplications(orgId) {
|
|
59094
59116
|
const res = await fetch(`${this.baseUrl}/applications?orgId=${encodeURIComponent(orgId)}`, {
|
|
59095
59117
|
headers: this.authHeaders
|
|
@@ -59435,6 +59457,20 @@ var AccountClient = class {
|
|
|
59435
59457
|
(d) => d !== null
|
|
59436
59458
|
);
|
|
59437
59459
|
}
|
|
59460
|
+
/**
|
|
59461
|
+
* Re-confirms a billing lapse directly against Stripe/payment-method state,
|
|
59462
|
+
* bypassing every persisted status flag — for a destructive automated caller
|
|
59463
|
+
* (deploy-service's suspension-termination sweep, #666) that must not trust
|
|
59464
|
+
* a possibly-stale local status before destroying infrastructure. Returns
|
|
59465
|
+
* null on any request failure — callers must treat that the same as an
|
|
59466
|
+
* unconfirmed lapse (refuse to act), never as confirmation.
|
|
59467
|
+
*/
|
|
59468
|
+
getLiveBillingLapse(orgId) {
|
|
59469
|
+
return this.request(
|
|
59470
|
+
"GET",
|
|
59471
|
+
`/subscription/internal/live-billing-lapse/${encodeURIComponent(orgId)}`
|
|
59472
|
+
);
|
|
59473
|
+
}
|
|
59438
59474
|
/**
|
|
59439
59475
|
* GDPR org erasure. Cancels the subscription and anonymises the Stripe customer
|
|
59440
59476
|
* (name/email scrubbed) but **retains** the customer + its invoices (NL tax law,
|
|
@@ -59689,6 +59725,22 @@ var NOTIFICATION_TYPES = {
|
|
|
59689
59725
|
body: (x) => v(x, "summary"),
|
|
59690
59726
|
target: () => null
|
|
59691
59727
|
},
|
|
59728
|
+
// The welcome for an organisation an admin opened on somebody's behalf. Its
|
|
59729
|
+
// job is to be the mail that arrives before the person has any reason to
|
|
59730
|
+
// expect one: it has to say who made it, what it allows and when it ends,
|
|
59731
|
+
// because the recipient never filled in a signup form to learn any of that.
|
|
59732
|
+
"beta.granted": {
|
|
59733
|
+
key: "beta.granted",
|
|
59734
|
+
category: "billing",
|
|
59735
|
+
severity: "info",
|
|
59736
|
+
audience: "admins",
|
|
59737
|
+
inAppDefault: true,
|
|
59738
|
+
emailDefault: true,
|
|
59739
|
+
emailTemplateId: "beta-granted",
|
|
59740
|
+
title: (x) => `Your ${v(x, "orgName")} beta account is ready`,
|
|
59741
|
+
body: (x) => `A beta account has been set up for you on Syntica. It runs until ${v(x, "endsOn")} and can run ${v(x, "allowance")}. Sign in with this email address to get started.`,
|
|
59742
|
+
target: () => "/"
|
|
59743
|
+
},
|
|
59692
59744
|
// A demo that stops without warning reads as the platform breaking, and the
|
|
59693
59745
|
// person who could have renewed it hears about it from a colleague asking why
|
|
59694
59746
|
// the site is down.
|
|
@@ -59697,12 +59749,12 @@ var NOTIFICATION_TYPES = {
|
|
|
59697
59749
|
category: "billing",
|
|
59698
59750
|
severity: "warning",
|
|
59699
59751
|
audience: "admins",
|
|
59700
|
-
//
|
|
59701
|
-
//
|
|
59702
|
-
//
|
|
59752
|
+
// Email as well as in-app: the person who can renew a demo is often not
|
|
59753
|
+
// the person sitting in the console, and a warning nobody sees is the same
|
|
59754
|
+
// as no warning. The template ships in scripts/contentful/email-templates.json.
|
|
59703
59755
|
inAppDefault: true,
|
|
59704
|
-
emailDefault:
|
|
59705
|
-
emailTemplateId:
|
|
59756
|
+
emailDefault: true,
|
|
59757
|
+
emailTemplateId: "beta-ending",
|
|
59706
59758
|
title: (x) => `Your beta ends in ${v(x, "days")} days`,
|
|
59707
59759
|
body: (x) => `On ${v(x, "endsOn")} your applications stop and your data is kept for two months. Contact us to keep going.`,
|
|
59708
59760
|
target: () => "/settings/billing"
|
|
@@ -62705,7 +62757,7 @@ function createServer() {
|
|
|
62705
62757
|
hint: "Check the arguments against the tool schema and try again."
|
|
62706
62758
|
});
|
|
62707
62759
|
}
|
|
62708
|
-
const scopeMismatch = orgScopeMismatch(args);
|
|
62760
|
+
const scopeMismatch = orgScopeMismatch(name, args);
|
|
62709
62761
|
if (scopeMismatch) {
|
|
62710
62762
|
return fail({
|
|
62711
62763
|
code: "ORG_SCOPE_MISMATCH",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syntica/mcp",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "MCP server and skills for deploying applications on Syntica from your coding agent (Claude Code, Codex, Cursor, Windsurf, Gemini, Copilot CLI)",
|
|
5
5
|
"mcpName": "io.syntica/mcp",
|
|
6
6
|
"bin": {
|