@syntica/mcp 2.5.1 → 2.7.0
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
CHANGED
|
@@ -68037,7 +68037,27 @@ var UpstreamRequestError = class extends Error {
|
|
|
68037
68037
|
}
|
|
68038
68038
|
};
|
|
68039
68039
|
|
|
68040
|
+
// libs/shared/src/types/connector-network.ts
|
|
68041
|
+
function proxyVars(c) {
|
|
68042
|
+
const g = c?.gateway;
|
|
68043
|
+
if (g === void 0 || g.smtp !== void 0 || g.auth.includes("smtp")) {
|
|
68044
|
+
return null;
|
|
68045
|
+
}
|
|
68046
|
+
const prefix = g.baseUrlVar.replace(/(_BASE)?_URL$/, "");
|
|
68047
|
+
return { user: `${prefix}_PROXY_USER`, password: `${prefix}_PROXY_PASSWORD` };
|
|
68048
|
+
}
|
|
68049
|
+
function directNetworkVars(c) {
|
|
68050
|
+
const vars = proxyVars(c);
|
|
68051
|
+
if (vars === null) {
|
|
68052
|
+
return null;
|
|
68053
|
+
}
|
|
68054
|
+
const prefix = vars.user.slice(0, -"_PROXY_USER".length);
|
|
68055
|
+
return { proxyUrl: `${prefix}_PROXY_URL`, caPem: `${prefix}_CA_PEM` };
|
|
68056
|
+
}
|
|
68057
|
+
|
|
68040
68058
|
// libs/shared/src/types/connector.ts
|
|
68059
|
+
var CONNECTOR_GATEWAY_HOST = "connectors.internal";
|
|
68060
|
+
var CONNECTOR_GATEWAY_ORIGIN = `http://${CONNECTOR_GATEWAY_HOST}:9480`;
|
|
68041
68061
|
var CONNECTORS = [
|
|
68042
68062
|
{
|
|
68043
68063
|
id: "microsoft-365",
|
|
@@ -68068,6 +68088,7 @@ var CONNECTORS = [
|
|
|
68068
68088
|
},
|
|
68069
68089
|
pitch: { title: "Let your apps send mail from your domain", examples: "Order confirmations, password resets, invoices. Sent from a mailbox your team already owns.", effort: "About 15 minutes. You need to be an Entra admin." },
|
|
68070
68090
|
docsUrl: "https://learn.microsoft.com/graph/api/user-sendmail",
|
|
68091
|
+
hosts: ["graph.microsoft.com", "login.microsoftonline.com"],
|
|
68071
68092
|
attestation: {
|
|
68072
68093
|
label: "An ApplicationAccessPolicy limits this registration to the one mailbox",
|
|
68073
68094
|
detail: "Without it, a registration holding Mail.Send can send as any mailbox in the tenant. The policy lives in your tenant, so the platform cannot create it or check that it exists."
|
|
@@ -68101,7 +68122,20 @@ var CONNECTORS = [
|
|
|
68101
68122
|
MAIL_FROM: "Sender address. Must be one this mailbox may send as"
|
|
68102
68123
|
},
|
|
68103
68124
|
pitch: { title: "Let your apps send mail", examples: "Order confirmations, password resets, contact forms. Through the mail account you already pay for.", effort: "About 5 minutes. You need the mailbox password." },
|
|
68104
|
-
docsUrl: "https://nodemailer.com/smtp"
|
|
68125
|
+
docsUrl: "https://nodemailer.com/smtp",
|
|
68126
|
+
hosts: [],
|
|
68127
|
+
// Granting SMTP is also its egress rule under enforce (#1474).
|
|
68128
|
+
tcp: [{ hostVar: "SMTP_HOST", portVar: "SMTP_PORT" }],
|
|
68129
|
+
// Gateway mode (#1583): the relay on the node logs in with the real account.
|
|
68130
|
+
gateway: {
|
|
68131
|
+
baseUrlVar: "SMTP_HOST",
|
|
68132
|
+
upstream: { fromVar: "SMTP_HOST" },
|
|
68133
|
+
credentialVars: ["SMTP_PASS"],
|
|
68134
|
+
auth: ["smtp"],
|
|
68135
|
+
basicUserVar: "SMTP_USER",
|
|
68136
|
+
credentialLocations: { headers: [], query: [], form: [] },
|
|
68137
|
+
smtp: { portVar: "SMTP_PORT", secureVar: "SMTP_SECURE" }
|
|
68138
|
+
}
|
|
68105
68139
|
},
|
|
68106
68140
|
{
|
|
68107
68141
|
id: "microsoft-entra-id",
|
|
@@ -68131,7 +68165,8 @@ var CONNECTORS = [
|
|
|
68131
68165
|
ENTRA_REDIRECT_URI: "Where Entra sends users back"
|
|
68132
68166
|
},
|
|
68133
68167
|
pitch: { title: "Let your users sign in with Microsoft", examples: "Work accounts, MFA and your password policy. Your app still needs an OIDC client to use them.", effort: "About 15 minutes. You need to be an Entra admin." },
|
|
68134
|
-
docsUrl: "https://learn.microsoft.com/entra/identity-platform/"
|
|
68168
|
+
docsUrl: "https://learn.microsoft.com/entra/identity-platform/",
|
|
68169
|
+
hosts: ["login.microsoftonline.com", "graph.microsoft.com"]
|
|
68135
68170
|
},
|
|
68136
68171
|
{
|
|
68137
68172
|
id: "sap-odata",
|
|
@@ -68139,11 +68174,12 @@ var CONNECTORS = [
|
|
|
68139
68174
|
category: "ERP",
|
|
68140
68175
|
tone: "blue",
|
|
68141
68176
|
blurb: "Read and write SAP business data over an OData service.",
|
|
68142
|
-
long: "Reads and writes business data in SAP through an OData service: sales orders, materials, business partners, whatever the endpoint exposes. This is the connector that turns a hosted app into something a functional consultant can actually deliver, because an application that cannot see the system of record is a demo. OData is self describing, so the service metadata tells you the real entity sets and field names rather than leaving you to guess them.
|
|
68177
|
+
long: "Reads and writes business data in SAP through an OData service: sales orders, materials, business partners, whatever the endpoint exposes. This is the connector that turns a hosted app into something a functional consultant can actually deliver, because an application that cannot see the system of record is a demo. OData is self describing, so the service metadata tells you the real entity sets and field names rather than leaving you to guess them. It reaches S/4HANA Cloud, Sales Cloud and Service Cloud over ordinary HTTPS, and a system behind your firewall too: in gateway mode a connection can go through your company proxy, use any HTTPS port and trust certificates from your own CA. Plain HTTP is not supported.",
|
|
68143
68178
|
vars: ["SAP_ODATA_URL", "SAP_CLIENT", "SAP_USER", "SAP_PASSWORD"],
|
|
68144
68179
|
steps: [
|
|
68145
68180
|
"Create a communication user restricted to the services you need.",
|
|
68146
|
-
"Expose the OData service and note its root URL.",
|
|
68181
|
+
"Expose the OData service and note its root URL and port.",
|
|
68182
|
+
"Behind a proxy? Add it, with its port, under Network.",
|
|
68147
68183
|
"Note the SAP client number, like 100.",
|
|
68148
68184
|
"Keep it read-only unless the app writes back."
|
|
68149
68185
|
],
|
|
@@ -68152,7 +68188,7 @@ var CONNECTORS = [
|
|
|
68152
68188
|
{ icon: "database", title: "The system of record", line: "Orders, materials, business partners" },
|
|
68153
68189
|
{ icon: "code", title: "Self-describing", line: "The metadata names every entity and field" },
|
|
68154
68190
|
{ icon: "shield", title: "A restricted user", line: "Only the services the app needs" },
|
|
68155
|
-
{ icon: "bolt", title: "
|
|
68191
|
+
{ icon: "bolt", title: "Behind your firewall too", line: "Through your proxy, in gateway mode" }
|
|
68156
68192
|
],
|
|
68157
68193
|
varDescriptions: {
|
|
68158
68194
|
SAP_ODATA_URL: "The service root URL",
|
|
@@ -68162,7 +68198,17 @@ var CONNECTORS = [
|
|
|
68162
68198
|
},
|
|
68163
68199
|
pitch: { title: "Let your apps work with SAP data", examples: "Sales orders, stock, customers. Read straight from the system your business runs on.", effort: "About 30 minutes. You need an SAP basis admin." },
|
|
68164
68200
|
docsUrl: "https://help.sap.com/docs/SAP_NETWEAVER_750/68bf513362174d54b58cddec28794093/",
|
|
68165
|
-
|
|
68201
|
+
hosts: [],
|
|
68202
|
+
hostVars: ["SAP_ODATA_URL"],
|
|
68203
|
+
gateway: {
|
|
68204
|
+
baseUrlVar: "SAP_ODATA_URL",
|
|
68205
|
+
upstream: { fromVar: "SAP_ODATA_URL" },
|
|
68206
|
+
credentialVars: ["SAP_PASSWORD"],
|
|
68207
|
+
auth: ["basic"],
|
|
68208
|
+
basicUserVar: "SAP_USER",
|
|
68209
|
+
probePath: "$metadata",
|
|
68210
|
+
credentialLocations: { headers: ["authorization"], query: [], form: [] }
|
|
68211
|
+
}
|
|
68166
68212
|
},
|
|
68167
68213
|
{
|
|
68168
68214
|
id: "sharepoint",
|
|
@@ -68192,7 +68238,8 @@ var CONNECTORS = [
|
|
|
68192
68238
|
SHAREPOINT_SITE_ID: "The site to reach"
|
|
68193
68239
|
},
|
|
68194
68240
|
pitch: { title: "Let your apps use your SharePoint files", examples: "Read templates, store generated documents, share them with the team. In the site you already use.", effort: "About 15 minutes. You need to be a SharePoint admin." },
|
|
68195
|
-
docsUrl: "https://learn.microsoft.com/graph/api/resources/sharepoint"
|
|
68241
|
+
docsUrl: "https://learn.microsoft.com/graph/api/resources/sharepoint",
|
|
68242
|
+
hosts: ["graph.microsoft.com", "login.microsoftonline.com"]
|
|
68196
68243
|
},
|
|
68197
68244
|
{
|
|
68198
68245
|
id: "microsoft-teams",
|
|
@@ -68217,7 +68264,9 @@ var CONNECTORS = [
|
|
|
68217
68264
|
TEAMS_WEBHOOK_URL: "The channel webhook, hidden after saving"
|
|
68218
68265
|
},
|
|
68219
68266
|
pitch: { title: "Let your apps post to Teams", examples: "Order alerts, sign-ups, daily summaries. Straight into the channel your team already reads.", effort: "About 5 minutes. You need to own the channel." },
|
|
68220
|
-
docsUrl: "https://learn.microsoft.com/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook"
|
|
68267
|
+
docsUrl: "https://learn.microsoft.com/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook",
|
|
68268
|
+
hosts: [],
|
|
68269
|
+
hostVars: ["TEAMS_WEBHOOK_URL"]
|
|
68221
68270
|
},
|
|
68222
68271
|
{
|
|
68223
68272
|
id: "slack",
|
|
@@ -68246,7 +68295,8 @@ var CONNECTORS = [
|
|
|
68246
68295
|
SLACK_CHANNEL_ID: "The channel to post to"
|
|
68247
68296
|
},
|
|
68248
68297
|
pitch: { title: "Let your apps post to Slack", examples: "Order alerts, sign-ups, daily summaries. Straight into the channel your team already reads.", effort: "About 5 minutes. You need to be a Slack admin." },
|
|
68249
|
-
docsUrl: "https://api.slack.com/docs"
|
|
68298
|
+
docsUrl: "https://api.slack.com/docs",
|
|
68299
|
+
hosts: ["slack.com", "files.slack.com"]
|
|
68250
68300
|
},
|
|
68251
68301
|
{
|
|
68252
68302
|
id: "stripe",
|
|
@@ -68274,7 +68324,8 @@ var CONNECTORS = [
|
|
|
68274
68324
|
STRIPE_PUBLISHABLE_KEY: "Browser key, starts pk_"
|
|
68275
68325
|
},
|
|
68276
68326
|
pitch: { title: "Let your apps take payments", examples: "Checkouts, subscriptions, invoices. Paid out to your own Stripe account.", effort: "About 10 minutes. You need a Stripe admin login." },
|
|
68277
|
-
docsUrl: "https://docs.stripe.com/api"
|
|
68327
|
+
docsUrl: "https://docs.stripe.com/api",
|
|
68328
|
+
hosts: ["api.stripe.com", "files.stripe.com"]
|
|
68278
68329
|
},
|
|
68279
68330
|
{
|
|
68280
68331
|
id: "supabase",
|
|
@@ -68304,6 +68355,8 @@ var CONNECTORS = [
|
|
|
68304
68355
|
},
|
|
68305
68356
|
pitch: { title: "Let your apps use Supabase", examples: "A database, logins and file storage. In a project your company owns.", effort: "About 5 minutes. You need to own the project." },
|
|
68306
68357
|
docsUrl: "https://supabase.com/docs/guides/api",
|
|
68358
|
+
hosts: [],
|
|
68359
|
+
hostVars: ["SUPABASE_URL"],
|
|
68307
68360
|
attestation: {
|
|
68308
68361
|
label: "Row Level Security is enabled on every table the anon key can reach",
|
|
68309
68362
|
detail: "The anon key is designed to be public, so it is only as safe as the policies behind it: without RLS, anyone holding it can read and write every exposed table through the auto-generated API. RLS lives in the customer's Supabase project, so the platform cannot enable it or check that it is on."
|
|
@@ -68333,7 +68386,15 @@ var CONNECTORS = [
|
|
|
68333
68386
|
},
|
|
68334
68387
|
pitch: { title: "Let your apps use Gemini", examples: "Summaries, extraction, chat. Billed to your own Google account.", effort: "About 5 minutes. You need a Google Cloud project." },
|
|
68335
68388
|
docsUrl: "https://ai.google.dev/gemini-api/docs",
|
|
68336
|
-
|
|
68389
|
+
hosts: ["generativelanguage.googleapis.com"],
|
|
68390
|
+
gateway: {
|
|
68391
|
+
baseUrlVar: "GOOGLE_GEMINI_BASE_URL",
|
|
68392
|
+
upstream: "https://generativelanguage.googleapis.com",
|
|
68393
|
+
credentialVars: ["GEMINI_API_KEY"],
|
|
68394
|
+
auth: ["x-goog-api-key"],
|
|
68395
|
+
ai: true,
|
|
68396
|
+
credentialLocations: { headers: ["x-goog-api-key", "authorization"], query: ["key"], form: [] }
|
|
68397
|
+
}
|
|
68337
68398
|
},
|
|
68338
68399
|
{
|
|
68339
68400
|
id: "openai",
|
|
@@ -68360,7 +68421,15 @@ var CONNECTORS = [
|
|
|
68360
68421
|
},
|
|
68361
68422
|
pitch: { title: "Let your apps use OpenAI", examples: "Summaries, extraction, chat. Billed to your own OpenAI account.", effort: "About 5 minutes. You need an OpenAI admin login." },
|
|
68362
68423
|
docsUrl: "https://platform.openai.com/docs/api-reference",
|
|
68363
|
-
|
|
68424
|
+
hosts: ["api.openai.com"],
|
|
68425
|
+
gateway: {
|
|
68426
|
+
baseUrlVar: "OPENAI_BASE_URL",
|
|
68427
|
+
upstream: "https://api.openai.com/v1",
|
|
68428
|
+
credentialVars: ["OPENAI_API_KEY"],
|
|
68429
|
+
auth: ["bearer"],
|
|
68430
|
+
ai: true,
|
|
68431
|
+
credentialLocations: { headers: ["authorization"], query: [], form: [] }
|
|
68432
|
+
}
|
|
68364
68433
|
},
|
|
68365
68434
|
{
|
|
68366
68435
|
id: "anthropic",
|
|
@@ -68386,7 +68455,15 @@ var CONNECTORS = [
|
|
|
68386
68455
|
},
|
|
68387
68456
|
pitch: { title: "Let your apps use Claude", examples: "Summaries, extraction, chat. Billed to your own Anthropic account.", effort: "About 5 minutes. You need an Anthropic admin login." },
|
|
68388
68457
|
docsUrl: "https://docs.claude.com/en/api/overview",
|
|
68389
|
-
|
|
68458
|
+
hosts: ["api.anthropic.com"],
|
|
68459
|
+
gateway: {
|
|
68460
|
+
baseUrlVar: "ANTHROPIC_BASE_URL",
|
|
68461
|
+
upstream: "https://api.anthropic.com",
|
|
68462
|
+
credentialVars: ["ANTHROPIC_API_KEY"],
|
|
68463
|
+
auth: ["x-api-key", "bearer"],
|
|
68464
|
+
ai: true,
|
|
68465
|
+
credentialLocations: { headers: ["x-api-key", "authorization"], query: [], form: [] }
|
|
68466
|
+
}
|
|
68390
68467
|
},
|
|
68391
68468
|
// Internal: an https echo server, to test the connector gateway end to end (#1469).
|
|
68392
68469
|
{
|
|
@@ -68403,7 +68480,15 @@ var CONNECTORS = [
|
|
|
68403
68480
|
varDescriptions: { ECHO_URL: "The echo server URL", ECHO_API_KEY: "Any key, echoed back" },
|
|
68404
68481
|
pitch: { title: "Echo", examples: "Internal test fixture.", effort: "Internal only." },
|
|
68405
68482
|
docsUrl: "https://syntica.io",
|
|
68406
|
-
|
|
68483
|
+
hosts: [],
|
|
68484
|
+
hostVars: ["ECHO_URL"],
|
|
68485
|
+
gateway: {
|
|
68486
|
+
baseUrlVar: "ECHO_URL",
|
|
68487
|
+
upstream: { fromVar: "ECHO_URL" },
|
|
68488
|
+
credentialVars: ["ECHO_API_KEY"],
|
|
68489
|
+
auth: ["bearer"],
|
|
68490
|
+
credentialLocations: { headers: ["authorization"], query: [], form: [] }
|
|
68491
|
+
},
|
|
68407
68492
|
hidden: true
|
|
68408
68493
|
}
|
|
68409
68494
|
];
|
|
@@ -68412,6 +68497,52 @@ function connector(id) {
|
|
|
68412
68497
|
return CONNECTORS.find((c) => c.id === id);
|
|
68413
68498
|
}
|
|
68414
68499
|
|
|
68500
|
+
// libs/shared/src/types/custom-integration.ts
|
|
68501
|
+
var CUSTOM_CONNECTOR_ID = "custom";
|
|
68502
|
+
function customVars(def) {
|
|
68503
|
+
return { url: `${def.varPrefix}_URL`, token: `${def.varPrefix}_TOKEN`, user: `${def.varPrefix}_USER` };
|
|
68504
|
+
}
|
|
68505
|
+
function customConnector(name, def) {
|
|
68506
|
+
const v2 = customVars(def);
|
|
68507
|
+
const cred = def.credential;
|
|
68508
|
+
const basic = cred?.shape === "basic";
|
|
68509
|
+
const header = cred?.shape === "header" ? (cred.header ?? "").toLowerCase() : void 0;
|
|
68510
|
+
return {
|
|
68511
|
+
id: CUSTOM_CONNECTOR_ID,
|
|
68512
|
+
name,
|
|
68513
|
+
category: "Custom",
|
|
68514
|
+
tone: "blue",
|
|
68515
|
+
blurb: "An integration your organisation defined.",
|
|
68516
|
+
long: "",
|
|
68517
|
+
tagline: "An integration your organisation defined.",
|
|
68518
|
+
points: [],
|
|
68519
|
+
vars: cred === null ? [] : basic ? [v2.user, v2.token] : [v2.token],
|
|
68520
|
+
varDescriptions: cred === null ? {} : { ...basic ? { [v2.user]: "User name" } : {}, [v2.token]: "Credential, hidden after saving" },
|
|
68521
|
+
steps: [],
|
|
68522
|
+
pitch: { title: name, examples: "", effort: "" },
|
|
68523
|
+
docsUrl: "",
|
|
68524
|
+
hosts: def.hosts,
|
|
68525
|
+
tcp: def.tcp.map((t) => ({ host: t.host, port: t.port })),
|
|
68526
|
+
...cred !== null && def.baseUrl !== null ? {
|
|
68527
|
+
gateway: {
|
|
68528
|
+
baseUrlVar: v2.url,
|
|
68529
|
+
upstream: def.baseUrl,
|
|
68530
|
+
credentialVars: [v2.token],
|
|
68531
|
+
auth: [cred.shape],
|
|
68532
|
+
...basic ? { basicUserVar: v2.user } : {},
|
|
68533
|
+
...header !== void 0 ? { header } : {},
|
|
68534
|
+
credentialLocations: { headers: [header ?? "authorization"], query: [], form: [] }
|
|
68535
|
+
}
|
|
68536
|
+
} : {}
|
|
68537
|
+
};
|
|
68538
|
+
}
|
|
68539
|
+
function connectorOf(c) {
|
|
68540
|
+
if (c.connectorId === CUSTOM_CONNECTOR_ID) {
|
|
68541
|
+
return c.custom === null || c.custom === void 0 ? void 0 : customConnector(c.name, c.custom);
|
|
68542
|
+
}
|
|
68543
|
+
return connector(c.connectorId);
|
|
68544
|
+
}
|
|
68545
|
+
|
|
68415
68546
|
// libs/shared/src/types/resource.ts
|
|
68416
68547
|
var MIN_BACKUP_RETENTION_DAYS = 1;
|
|
68417
68548
|
var MAX_BACKUP_RETENTION_DAYS = 35;
|
|
@@ -69482,6 +69613,33 @@ var AuthClient = class {
|
|
|
69482
69613
|
async revokeOrg(orgId, serviceKey) {
|
|
69483
69614
|
return this.postInternal("revoke-org", { orgId }, serviceKey);
|
|
69484
69615
|
}
|
|
69616
|
+
/** Email change step 1 (#1559): a code to the user's current address. */
|
|
69617
|
+
async sendCurrentEmailCode(userId, currentEmail, serviceKey) {
|
|
69618
|
+
return this.callInternal("email-change/start", { userId, email: currentEmail }, serviceKey);
|
|
69619
|
+
}
|
|
69620
|
+
/** Step 2: a code to the new address, refused unless the current-address code is right. */
|
|
69621
|
+
async sendEmailChangeCode(userId, email2, currentCode, serviceKey) {
|
|
69622
|
+
return this.callInternal("email-change/send", { userId, email: email2, currentCode }, serviceKey);
|
|
69623
|
+
}
|
|
69624
|
+
/** The address the user's code was sent to, when the code is right. Consumes the code. */
|
|
69625
|
+
async verifyEmailChangeCode(userId, code, serviceKey) {
|
|
69626
|
+
return this.callInternal("email-change/verify", { userId, code }, serviceKey);
|
|
69627
|
+
}
|
|
69628
|
+
/** Unlike postInternal, keeps the status and message so the caller can pass a 400 or 429 on. status 0: unreachable. */
|
|
69629
|
+
async callInternal(path, body, serviceKey) {
|
|
69630
|
+
try {
|
|
69631
|
+
const res = await fetch(`${this.baseUrl}/auth/${path}`, {
|
|
69632
|
+
method: "POST",
|
|
69633
|
+
headers: { "Content-Type": "application/json", "x-internal-secret": serviceKey },
|
|
69634
|
+
body: JSON.stringify(body)
|
|
69635
|
+
});
|
|
69636
|
+
const json = await res.json().catch(() => ({}));
|
|
69637
|
+
const message = Array.isArray(json.message) ? json.message.join(", ") : json.message;
|
|
69638
|
+
return { status: res.status, data: json.data ?? null, error: res.ok ? null : message ?? json.error ?? null };
|
|
69639
|
+
} catch {
|
|
69640
|
+
return { status: 0, data: null, error: null };
|
|
69641
|
+
}
|
|
69642
|
+
}
|
|
69485
69643
|
async postInternal(path, body, serviceKey) {
|
|
69486
69644
|
try {
|
|
69487
69645
|
const res = await fetch(`${this.baseUrl}/auth/${path}`, {
|
|
@@ -69838,6 +69996,27 @@ var DeployClient = class {
|
|
|
69838
69996
|
return { stopped: 0, failed: 0 };
|
|
69839
69997
|
}
|
|
69840
69998
|
}
|
|
69999
|
+
/**
|
|
70000
|
+
* Beta lapsed: stop the org's running nodes (EC2 stop, EBS kept). Throws on a
|
|
70001
|
+
* refusal or a transport error, unlike {@link suspendOrgInfra}: the caller
|
|
70002
|
+
* records the org as asleep only when this succeeds, and a swallowed refusal
|
|
70003
|
+
* once let a lapsed beta keep running while recorded asleep (#1067).
|
|
70004
|
+
*/
|
|
70005
|
+
async sleepBetaOrg(orgId) {
|
|
70006
|
+
const res = await fetch(`${this.baseUrl}/internal/beta/orgs/${encodeURIComponent(orgId)}/sleep`, {
|
|
70007
|
+
method: "POST",
|
|
70008
|
+
headers: this.internalHeaders,
|
|
70009
|
+
signal: AbortSignal.timeout(6e4)
|
|
70010
|
+
});
|
|
70011
|
+
if (!res.ok) {
|
|
70012
|
+
throw new Error(`deploy-service beta sleep(${orgId}) returned ${String(res.status)}`);
|
|
70013
|
+
}
|
|
70014
|
+
const json = await res.json();
|
|
70015
|
+
if (json.data === null) {
|
|
70016
|
+
throw new Error(`deploy-service beta sleep(${orgId}) returned no result`);
|
|
70017
|
+
}
|
|
70018
|
+
return json.data;
|
|
70019
|
+
}
|
|
69841
70020
|
/**
|
|
69842
70021
|
* GDPR person erasure: tombstone a deleted person's display name in build
|
|
69843
70022
|
* history (`Build.triggeredBy`) for the given apps. Best-effort / fail-soft —
|
|
@@ -72062,6 +72241,8 @@ async function handleOrgListCloudAccounts(args) {
|
|
|
72062
72241
|
namespace: a.namespace,
|
|
72063
72242
|
updateRequired: a.updateRequired,
|
|
72064
72243
|
placeable: a.placeable,
|
|
72244
|
+
egressIp: a.egressIp,
|
|
72245
|
+
fixedEgress: a.fixedEgress,
|
|
72065
72246
|
...updateFields(a),
|
|
72066
72247
|
...connectionFields(a)
|
|
72067
72248
|
}))
|
|
@@ -72726,7 +72907,7 @@ var tools6 = [
|
|
|
72726
72907
|
// apps/mcp-server/src/tools/connections.ts
|
|
72727
72908
|
var appDescribeConnectionsTool = {
|
|
72728
72909
|
name: "app_describe_connections",
|
|
72729
|
-
description:
|
|
72910
|
+
description: `Describe the platform connections granted to an application environment \u2014 mail, storage, databases, payments, AI and the rest of the connector catalogue. Returns each granted connection's connector, its name, and the environment variable NAMES the platform injects at deploy time. Never returns a credential. ALWAYS call this before writing or changing code that talks to an external system: write against the injected variables, never hardcode a credential or a vendor host (an AI SDK reads its base URL from OPENAI_BASE_URL, ANTHROPIC_BASE_URL or GOOGLE_GEMINI_BASE_URL), and never add a client library that contradicts the granted connector. If nothing is granted, say so and point the user at Connections rather than inventing a path of your own. A grant with connectorId "custom" is an integration the organisation defined itself: its custom object gives the hosts and TCP ports it may reach, its credential shape (bearer, basic or a named header) and its variable prefix, so the variables are <PREFIX>_URL, <PREFIX>_TOKEN and, for basic auth, <PREFIX>_USER. A connection with a network object reaches its system through a proxy or with its own CA, handled by the gateway: write no proxy or CA code for it. Where a connection carries baseUrl, call the vendor through baseUrl.variable, never through another URL variable: in gateway mode only that one reaches the gateway. Use the fallback only when the variable is unset.`,
|
|
72730
72911
|
annotations: { readOnlyHint: true, destructiveHint: false },
|
|
72731
72912
|
inputSchema: {
|
|
72732
72913
|
type: "object",
|
|
@@ -72756,14 +72937,35 @@ async function handleAppDescribeConnections(args) {
|
|
|
72756
72937
|
if (!res.ok) {
|
|
72757
72938
|
return { content: [{ type: "text", text: `Error: ${json.error ?? res.statusText}` }], isError: true };
|
|
72758
72939
|
}
|
|
72759
|
-
const connections = Array.isArray(json.data) ? json.data.map(withBaseUrl) : json.data;
|
|
72940
|
+
const connections = Array.isArray(json.data) ? json.data.map((c) => withNetwork(withBaseUrl(c))) : json.data;
|
|
72760
72941
|
return { content: [{ type: "text", text: JSON.stringify({ connections }, null, 2) }] };
|
|
72761
72942
|
} catch (err) {
|
|
72762
72943
|
return fromCatch(err);
|
|
72763
72944
|
}
|
|
72764
72945
|
}
|
|
72946
|
+
function withNetwork(c) {
|
|
72947
|
+
const { caPems, proxyUrl, ...all } = c;
|
|
72948
|
+
const def = typeof c.connectorId === "string" ? connectorOf({ connectorId: c.connectorId, name: typeof c.name === "string" ? c.name : "", custom: c.custom ?? null }) : void 0;
|
|
72949
|
+
const vars = proxyVars(def);
|
|
72950
|
+
const rest = vars !== null && Array.isArray(all.filledVars) ? { ...all, filledVars: all.filledVars.filter((v2) => v2 !== vars.user && v2 !== vars.password) } : all;
|
|
72951
|
+
const count = Array.isArray(caPems) ? caPems.length : 0;
|
|
72952
|
+
if ((proxyUrl ?? null) === null && count === 0) {
|
|
72953
|
+
return rest;
|
|
72954
|
+
}
|
|
72955
|
+
const names = directNetworkVars(def);
|
|
72956
|
+
const directVars = names === null ? [] : [...(proxyUrl ?? null) === null ? [] : [names.proxyUrl], ...count === 0 ? [] : [names.caPem]];
|
|
72957
|
+
return {
|
|
72958
|
+
...rest,
|
|
72959
|
+
network: {
|
|
72960
|
+
proxyUrl: proxyUrl ?? null,
|
|
72961
|
+
caCertificates: count,
|
|
72962
|
+
directModeVariables: directVars,
|
|
72963
|
+
note: "In gateway mode the gateway reaches the upstream through this proxy and trusts these CAs, and the app needs no proxy or CA settings of its own. In direct mode the app gets directModeVariables (prefixed like the others) and must use them itself: the proxy URL holds the proxy user and password, so never log it, and the CA variable holds PEM certificates to trust besides the public roots."
|
|
72964
|
+
}
|
|
72965
|
+
};
|
|
72966
|
+
}
|
|
72765
72967
|
function withBaseUrl(c) {
|
|
72766
|
-
const def = typeof c.connectorId === "string" ?
|
|
72968
|
+
const def = typeof c.connectorId === "string" ? connectorOf({ connectorId: c.connectorId, name: typeof c.name === "string" ? c.name : "", custom: c.custom ?? null }) : void 0;
|
|
72767
72969
|
if (def?.gateway === void 0 || def.vars.includes(def.gateway.baseUrlVar)) {
|
|
72768
72970
|
return c;
|
|
72769
72971
|
}
|
|
@@ -72780,7 +72982,7 @@ function withBaseUrl(c) {
|
|
|
72780
72982
|
}
|
|
72781
72983
|
var appRequestConnectionTool = {
|
|
72782
72984
|
name: "app_request_connection",
|
|
72783
|
-
description: 'Ask an organisation admin for a connection on one application environment. Use this when app_describe_connections returns nothing for the system you need \u2014 instead of asking the user for a credential or telling them to go and configure one. Names a connector from the catalogue (e.g. "smtp", "stripe", "slack")
|
|
72985
|
+
description: 'Ask an organisation admin for a connection on one application environment. Use this when app_describe_connections returns nothing for the system you need \u2014 instead of asking the user for a credential or telling them to go and configure one. Names a connector from the catalogue (e.g. "smtp", "stripe", "slack"), or "custom" for an API or TCP service outside the catalogue, with the exact hosts (and host:port for TCP) and what it is for in the note. The admin decides which of their connections satisfies it and is notified in the platform and by email. Repeating a request that is already pending returns the open one rather than queueing another, except for "custom", where each request stands alone. For "custom" the admin defines the integration when approving and sees only the purpose line, so put the host(s) and port(s), the credential shape (bearer, basic or which header) and whether a base URL is wanted in it.',
|
|
72784
72986
|
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
72785
72987
|
inputSchema: {
|
|
72786
72988
|
type: "object",
|
|
@@ -72794,7 +72996,7 @@ var appRequestConnectionTool = {
|
|
|
72794
72996
|
},
|
|
72795
72997
|
connectorId: {
|
|
72796
72998
|
type: "string",
|
|
72797
|
-
description: 'A connector id as returned by app_describe_connections, e.g. "smtp" or "stripe"'
|
|
72999
|
+
description: 'A connector id as returned by app_describe_connections, e.g. "smtp" or "stripe", or "custom"'
|
|
72798
73000
|
},
|
|
72799
73001
|
note: {
|
|
72800
73002
|
type: "string",
|
|
@@ -73862,13 +74064,37 @@ async function handleAppSetSleepWhenIdle(args) {
|
|
|
73862
74064
|
const text2 = minutes === 0 ? "Sleep when idle is off. The environment keeps running." : `Sleep when idle is on. The environment stops after ${String(minutes)} minutes without visitors and starts again on the next visit.`;
|
|
73863
74065
|
return { content: [{ type: "text", text: text2 }] };
|
|
73864
74066
|
}
|
|
74067
|
+
var appMoveNetworkTool = {
|
|
74068
|
+
name: "app_move_network",
|
|
74069
|
+
description: "Move an environment's machine into its cloud account's current outgoing network (the fixed address when it is on, an ephemeral one when it is off). Keeps the data volume and redeploys the current release. Takes the environment down for about as long as a first deploy.",
|
|
74070
|
+
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
74071
|
+
inputSchema: NODE_ACTION_SCHEMA
|
|
74072
|
+
};
|
|
74073
|
+
async function handleAppMoveNetwork(args) {
|
|
74074
|
+
const token = args["token"];
|
|
74075
|
+
if (!token) {
|
|
74076
|
+
return notAuthenticatedResult();
|
|
74077
|
+
}
|
|
74078
|
+
const environment = args["environment"];
|
|
74079
|
+
const client2 = new DeployClient(config2.services.deployServiceUrl, token);
|
|
74080
|
+
try {
|
|
74081
|
+
const build = await client2.trigger({ applicationId: args["applicationId"], environment, networkMove: true });
|
|
74082
|
+
return ok({ buildId: build.id, message: `Moving the ${environment} environment. Follow it with org_deploy_status.` });
|
|
74083
|
+
} catch (err) {
|
|
74084
|
+
if (err instanceof UpstreamRequestError) {
|
|
74085
|
+
return fail({ ...err.status !== void 0 ? { status: err.status } : {}, code: err.code, message: err.message });
|
|
74086
|
+
}
|
|
74087
|
+
throw err;
|
|
74088
|
+
}
|
|
74089
|
+
}
|
|
73865
74090
|
var tools14 = [
|
|
73866
74091
|
{ definition: appRestartInstanceTool, handle: handleAppRestartInstance },
|
|
73867
74092
|
{ definition: appStopInstanceTool, handle: handleAppStopInstance },
|
|
73868
74093
|
{ definition: appStartInstanceTool, handle: handleAppStartInstance },
|
|
73869
74094
|
{ definition: appReprovisionInstanceTool, handle: handleAppReprovisionInstance },
|
|
73870
74095
|
{ definition: appReplaceInstanceTool, handle: handleAppReplaceInstance },
|
|
73871
|
-
{ definition: appSetSleepWhenIdleTool, handle: handleAppSetSleepWhenIdle }
|
|
74096
|
+
{ definition: appSetSleepWhenIdleTool, handle: handleAppSetSleepWhenIdle },
|
|
74097
|
+
{ definition: appMoveNetworkTool, handle: handleAppMoveNetwork }
|
|
73872
74098
|
];
|
|
73873
74099
|
|
|
73874
74100
|
// apps/mcp-server/src/tools/node-tiers.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syntica/mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "MCP server and skills for deploying applications on Syntica from your coding agent (Claude Code, OpenCode, Codex CLI, Gemini CLI, Copilot CLI, Cursor)",
|
|
5
5
|
"mcpName": "io.syntica/mcp",
|
|
6
6
|
"bin": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "syntica",
|
|
3
3
|
"description": "Deploy, run and debug your applications on Syntica from your coding agent — real infrastructure, a live URL, no DevOps required.",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Syntica",
|
|
7
7
|
"email": "support@syntica.io",
|
|
@@ -36,8 +36,18 @@ returns.
|
|
|
36
36
|
|
|
37
37
|
A connection to an HTTP API, such as OpenAI or Anthropic, may also carry
|
|
38
38
|
`baseUrl`: the variable to call the vendor through, such as `OPENAI_BASE_URL`.
|
|
39
|
+
A grant with `connectorId: "custom"` is an integration the organisation defined
|
|
40
|
+
itself; its `custom` object says which hosts and ports it reaches and how it
|
|
41
|
+
authenticates (see "Custom integrations" below).
|
|
39
42
|
Its names are unprefixed like the others, so apply the grant's prefix to both
|
|
40
43
|
`baseUrl.variable` and `baseUrl.fallbackVariable`.
|
|
44
|
+
A connection with a `network` object reaches its system through a proxy, on another
|
|
45
|
+
port or with the organisation's own CA. In gateway mode the gateway handles all of
|
|
46
|
+
that: write no proxy or CA code for it, call `baseUrl.variable` as usual. In direct
|
|
47
|
+
mode the app gets `network.directModeVariables` (prefixed like the others) and must
|
|
48
|
+
use them itself: `<PREFIX>_PROXY_URL` is the proxy with its user and password in it,
|
|
49
|
+
so never log it, and `<PREFIX>_CA_PEM` holds PEM certificates to trust on top of the
|
|
50
|
+
public roots. Read both when set, so the same code works in either mode.
|
|
41
51
|
|
|
42
52
|
## Step 2 — If nothing is granted, stop and say so
|
|
43
53
|
|
|
@@ -118,6 +128,51 @@ can send as any mailbox in the tenant unless the organisation has added an
|
|
|
118
128
|
the code you are writing needs to act as anything other than the injected
|
|
119
129
|
identity, stop and raise it with the user rather than implementing it.
|
|
120
130
|
|
|
131
|
+
## Custom integrations — a system the catalogue does not have
|
|
132
|
+
|
|
133
|
+
An organisation can define its own connector for any HTTP API or TCP service the
|
|
134
|
+
catalogue lacks — a partner's REST API, a licence server, a database that lives
|
|
135
|
+
elsewhere. An admin creates it once under Connections ("Add a custom
|
|
136
|
+
integration"): the **hosts** the app may reach, optional plain **TCP targets**
|
|
137
|
+
(host and port), an optional **credential** in one of three shapes (`bearer`,
|
|
138
|
+
`basic`, or a named `header`), an optional **base URL**, and a **variable
|
|
139
|
+
prefix**. It is then granted per environment like any other connector.
|
|
140
|
+
|
|
141
|
+
`app_describe_connections` returns such a grant with `connectorId: "custom"`, its
|
|
142
|
+
name, and its definition under `custom` (`hosts`, `tcp`, `credential`, `baseUrl`,
|
|
143
|
+
`varPrefix`). The variables follow the prefix:
|
|
144
|
+
|
|
145
|
+
| Variable | When | Holds |
|
|
146
|
+
|---|---|---|
|
|
147
|
+
| `<PREFIX>_URL` | the integration has a base URL and a credential | the URL to call through (gateway mode, see below) |
|
|
148
|
+
| `<PREFIX>_TOKEN` | the integration has a credential | the bearer token, the password, or the header value |
|
|
149
|
+
| `<PREFIX>_USER` | credential shape `basic` only | the user name |
|
|
150
|
+
|
|
151
|
+
Send the credential the way the shape says: `bearer` → `Authorization: Bearer
|
|
152
|
+
<TOKEN>`; `basic` → HTTP basic auth with `<USER>` and `<TOKEN>`; `header` → the
|
|
153
|
+
named header (`custom.credential.header`) set to `<TOKEN>`. With a base URL **and**
|
|
154
|
+
a credential the integration runs in gateway mode exactly like an AI connector:
|
|
155
|
+
`<PREFIX>_TOKEN` is a placeholder and every call must go through `<PREFIX>_URL`,
|
|
156
|
+
where the platform's gateway inserts the real credential — a call straight to the
|
|
157
|
+
vendor host fails. Without a base URL (a TCP target, or an API whose credential
|
|
158
|
+
goes in the request body) the app gets the real credential and calls the host
|
|
159
|
+
directly.
|
|
160
|
+
|
|
161
|
+
`hosts` and `tcp` are not just information: under egress control the node only
|
|
162
|
+
lets the app reach the hosts a granted connection declares, and a TCP target only
|
|
163
|
+
on its port. If the system you are about to call is not in any grant's `hosts`,
|
|
164
|
+
the call is blocked, not merely unconfigured — the same symptom as SMTP without
|
|
165
|
+
its grant.
|
|
166
|
+
|
|
167
|
+
When no connector fits and no custom integration is granted, request one with
|
|
168
|
+
`app_request_connection` and `connectorId: "custom"`. The request carries only
|
|
169
|
+
your purpose line, and the admin defines the integration when approving, so put
|
|
170
|
+
what they need to know in that line: the host(s) and port(s), the credential
|
|
171
|
+
shape, and whether a base URL is wanted. For example: "Call the itsme partner API
|
|
172
|
+
at api.partner.example (HTTPS, bearer token, base URL https://api.partner.example/v2)
|
|
173
|
+
to fetch order status". Then write the code against `<PREFIX>_URL` /
|
|
174
|
+
`<PREFIX>_TOKEN` with the prefix the admin confirms.
|
|
175
|
+
|
|
121
176
|
## Step 4 — Fail loudly when the variables are absent
|
|
122
177
|
|
|
123
178
|
Check for them at startup and fail with a clear message:
|