@syntica/mcp 2.5.1 → 2.6.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
|
@@ -68038,6 +68038,8 @@ var UpstreamRequestError = class extends Error {
|
|
|
68038
68038
|
};
|
|
68039
68039
|
|
|
68040
68040
|
// libs/shared/src/types/connector.ts
|
|
68041
|
+
var CONNECTOR_GATEWAY_HOST = "connectors.internal";
|
|
68042
|
+
var CONNECTOR_GATEWAY_ORIGIN = `http://${CONNECTOR_GATEWAY_HOST}:9480`;
|
|
68041
68043
|
var CONNECTORS = [
|
|
68042
68044
|
{
|
|
68043
68045
|
id: "microsoft-365",
|
|
@@ -68068,6 +68070,7 @@ var CONNECTORS = [
|
|
|
68068
68070
|
},
|
|
68069
68071
|
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
68072
|
docsUrl: "https://learn.microsoft.com/graph/api/user-sendmail",
|
|
68073
|
+
hosts: ["graph.microsoft.com", "login.microsoftonline.com"],
|
|
68071
68074
|
attestation: {
|
|
68072
68075
|
label: "An ApplicationAccessPolicy limits this registration to the one mailbox",
|
|
68073
68076
|
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 +68104,20 @@ var CONNECTORS = [
|
|
|
68101
68104
|
MAIL_FROM: "Sender address. Must be one this mailbox may send as"
|
|
68102
68105
|
},
|
|
68103
68106
|
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"
|
|
68107
|
+
docsUrl: "https://nodemailer.com/smtp",
|
|
68108
|
+
hosts: [],
|
|
68109
|
+
// Granting SMTP is also its egress rule under enforce (#1474).
|
|
68110
|
+
tcp: [{ hostVar: "SMTP_HOST", portVar: "SMTP_PORT" }],
|
|
68111
|
+
// Gateway mode (#1583): the relay on the node logs in with the real account.
|
|
68112
|
+
gateway: {
|
|
68113
|
+
baseUrlVar: "SMTP_HOST",
|
|
68114
|
+
upstream: { fromVar: "SMTP_HOST" },
|
|
68115
|
+
credentialVars: ["SMTP_PASS"],
|
|
68116
|
+
auth: ["smtp"],
|
|
68117
|
+
basicUserVar: "SMTP_USER",
|
|
68118
|
+
credentialLocations: { headers: [], query: [], form: [] },
|
|
68119
|
+
smtp: { portVar: "SMTP_PORT", secureVar: "SMTP_SECURE" }
|
|
68120
|
+
}
|
|
68105
68121
|
},
|
|
68106
68122
|
{
|
|
68107
68123
|
id: "microsoft-entra-id",
|
|
@@ -68131,7 +68147,8 @@ var CONNECTORS = [
|
|
|
68131
68147
|
ENTRA_REDIRECT_URI: "Where Entra sends users back"
|
|
68132
68148
|
},
|
|
68133
68149
|
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/"
|
|
68150
|
+
docsUrl: "https://learn.microsoft.com/entra/identity-platform/",
|
|
68151
|
+
hosts: ["login.microsoftonline.com", "graph.microsoft.com"]
|
|
68135
68152
|
},
|
|
68136
68153
|
{
|
|
68137
68154
|
id: "sap-odata",
|
|
@@ -68162,7 +68179,16 @@ var CONNECTORS = [
|
|
|
68162
68179
|
},
|
|
68163
68180
|
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
68181
|
docsUrl: "https://help.sap.com/docs/SAP_NETWEAVER_750/68bf513362174d54b58cddec28794093/",
|
|
68165
|
-
|
|
68182
|
+
hosts: [],
|
|
68183
|
+
hostVars: ["SAP_ODATA_URL"],
|
|
68184
|
+
gateway: {
|
|
68185
|
+
baseUrlVar: "SAP_ODATA_URL",
|
|
68186
|
+
upstream: { fromVar: "SAP_ODATA_URL" },
|
|
68187
|
+
credentialVars: ["SAP_PASSWORD"],
|
|
68188
|
+
auth: ["basic"],
|
|
68189
|
+
basicUserVar: "SAP_USER",
|
|
68190
|
+
credentialLocations: { headers: ["authorization"], query: [], form: [] }
|
|
68191
|
+
}
|
|
68166
68192
|
},
|
|
68167
68193
|
{
|
|
68168
68194
|
id: "sharepoint",
|
|
@@ -68192,7 +68218,8 @@ var CONNECTORS = [
|
|
|
68192
68218
|
SHAREPOINT_SITE_ID: "The site to reach"
|
|
68193
68219
|
},
|
|
68194
68220
|
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"
|
|
68221
|
+
docsUrl: "https://learn.microsoft.com/graph/api/resources/sharepoint",
|
|
68222
|
+
hosts: ["graph.microsoft.com", "login.microsoftonline.com"]
|
|
68196
68223
|
},
|
|
68197
68224
|
{
|
|
68198
68225
|
id: "microsoft-teams",
|
|
@@ -68217,7 +68244,9 @@ var CONNECTORS = [
|
|
|
68217
68244
|
TEAMS_WEBHOOK_URL: "The channel webhook, hidden after saving"
|
|
68218
68245
|
},
|
|
68219
68246
|
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"
|
|
68247
|
+
docsUrl: "https://learn.microsoft.com/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook",
|
|
68248
|
+
hosts: [],
|
|
68249
|
+
hostVars: ["TEAMS_WEBHOOK_URL"]
|
|
68221
68250
|
},
|
|
68222
68251
|
{
|
|
68223
68252
|
id: "slack",
|
|
@@ -68246,7 +68275,8 @@ var CONNECTORS = [
|
|
|
68246
68275
|
SLACK_CHANNEL_ID: "The channel to post to"
|
|
68247
68276
|
},
|
|
68248
68277
|
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"
|
|
68278
|
+
docsUrl: "https://api.slack.com/docs",
|
|
68279
|
+
hosts: ["slack.com", "files.slack.com"]
|
|
68250
68280
|
},
|
|
68251
68281
|
{
|
|
68252
68282
|
id: "stripe",
|
|
@@ -68274,7 +68304,8 @@ var CONNECTORS = [
|
|
|
68274
68304
|
STRIPE_PUBLISHABLE_KEY: "Browser key, starts pk_"
|
|
68275
68305
|
},
|
|
68276
68306
|
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"
|
|
68307
|
+
docsUrl: "https://docs.stripe.com/api",
|
|
68308
|
+
hosts: ["api.stripe.com", "files.stripe.com"]
|
|
68278
68309
|
},
|
|
68279
68310
|
{
|
|
68280
68311
|
id: "supabase",
|
|
@@ -68304,6 +68335,8 @@ var CONNECTORS = [
|
|
|
68304
68335
|
},
|
|
68305
68336
|
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
68337
|
docsUrl: "https://supabase.com/docs/guides/api",
|
|
68338
|
+
hosts: [],
|
|
68339
|
+
hostVars: ["SUPABASE_URL"],
|
|
68307
68340
|
attestation: {
|
|
68308
68341
|
label: "Row Level Security is enabled on every table the anon key can reach",
|
|
68309
68342
|
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 +68366,15 @@ var CONNECTORS = [
|
|
|
68333
68366
|
},
|
|
68334
68367
|
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
68368
|
docsUrl: "https://ai.google.dev/gemini-api/docs",
|
|
68336
|
-
|
|
68369
|
+
hosts: ["generativelanguage.googleapis.com"],
|
|
68370
|
+
gateway: {
|
|
68371
|
+
baseUrlVar: "GOOGLE_GEMINI_BASE_URL",
|
|
68372
|
+
upstream: "https://generativelanguage.googleapis.com",
|
|
68373
|
+
credentialVars: ["GEMINI_API_KEY"],
|
|
68374
|
+
auth: ["x-goog-api-key"],
|
|
68375
|
+
ai: true,
|
|
68376
|
+
credentialLocations: { headers: ["x-goog-api-key", "authorization"], query: ["key"], form: [] }
|
|
68377
|
+
}
|
|
68337
68378
|
},
|
|
68338
68379
|
{
|
|
68339
68380
|
id: "openai",
|
|
@@ -68360,7 +68401,15 @@ var CONNECTORS = [
|
|
|
68360
68401
|
},
|
|
68361
68402
|
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
68403
|
docsUrl: "https://platform.openai.com/docs/api-reference",
|
|
68363
|
-
|
|
68404
|
+
hosts: ["api.openai.com"],
|
|
68405
|
+
gateway: {
|
|
68406
|
+
baseUrlVar: "OPENAI_BASE_URL",
|
|
68407
|
+
upstream: "https://api.openai.com/v1",
|
|
68408
|
+
credentialVars: ["OPENAI_API_KEY"],
|
|
68409
|
+
auth: ["bearer"],
|
|
68410
|
+
ai: true,
|
|
68411
|
+
credentialLocations: { headers: ["authorization"], query: [], form: [] }
|
|
68412
|
+
}
|
|
68364
68413
|
},
|
|
68365
68414
|
{
|
|
68366
68415
|
id: "anthropic",
|
|
@@ -68386,7 +68435,15 @@ var CONNECTORS = [
|
|
|
68386
68435
|
},
|
|
68387
68436
|
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
68437
|
docsUrl: "https://docs.claude.com/en/api/overview",
|
|
68389
|
-
|
|
68438
|
+
hosts: ["api.anthropic.com"],
|
|
68439
|
+
gateway: {
|
|
68440
|
+
baseUrlVar: "ANTHROPIC_BASE_URL",
|
|
68441
|
+
upstream: "https://api.anthropic.com",
|
|
68442
|
+
credentialVars: ["ANTHROPIC_API_KEY"],
|
|
68443
|
+
auth: ["x-api-key", "bearer"],
|
|
68444
|
+
ai: true,
|
|
68445
|
+
credentialLocations: { headers: ["x-api-key", "authorization"], query: [], form: [] }
|
|
68446
|
+
}
|
|
68390
68447
|
},
|
|
68391
68448
|
// Internal: an https echo server, to test the connector gateway end to end (#1469).
|
|
68392
68449
|
{
|
|
@@ -68403,7 +68460,15 @@ var CONNECTORS = [
|
|
|
68403
68460
|
varDescriptions: { ECHO_URL: "The echo server URL", ECHO_API_KEY: "Any key, echoed back" },
|
|
68404
68461
|
pitch: { title: "Echo", examples: "Internal test fixture.", effort: "Internal only." },
|
|
68405
68462
|
docsUrl: "https://syntica.io",
|
|
68406
|
-
|
|
68463
|
+
hosts: [],
|
|
68464
|
+
hostVars: ["ECHO_URL"],
|
|
68465
|
+
gateway: {
|
|
68466
|
+
baseUrlVar: "ECHO_URL",
|
|
68467
|
+
upstream: { fromVar: "ECHO_URL" },
|
|
68468
|
+
credentialVars: ["ECHO_API_KEY"],
|
|
68469
|
+
auth: ["bearer"],
|
|
68470
|
+
credentialLocations: { headers: ["authorization"], query: [], form: [] }
|
|
68471
|
+
},
|
|
68407
68472
|
hidden: true
|
|
68408
68473
|
}
|
|
68409
68474
|
];
|
|
@@ -68412,6 +68477,52 @@ function connector(id) {
|
|
|
68412
68477
|
return CONNECTORS.find((c) => c.id === id);
|
|
68413
68478
|
}
|
|
68414
68479
|
|
|
68480
|
+
// libs/shared/src/types/custom-integration.ts
|
|
68481
|
+
var CUSTOM_CONNECTOR_ID = "custom";
|
|
68482
|
+
function customVars(def) {
|
|
68483
|
+
return { url: `${def.varPrefix}_URL`, token: `${def.varPrefix}_TOKEN`, user: `${def.varPrefix}_USER` };
|
|
68484
|
+
}
|
|
68485
|
+
function customConnector(name, def) {
|
|
68486
|
+
const v2 = customVars(def);
|
|
68487
|
+
const cred = def.credential;
|
|
68488
|
+
const basic = cred?.shape === "basic";
|
|
68489
|
+
const header = cred?.shape === "header" ? (cred.header ?? "").toLowerCase() : void 0;
|
|
68490
|
+
return {
|
|
68491
|
+
id: CUSTOM_CONNECTOR_ID,
|
|
68492
|
+
name,
|
|
68493
|
+
category: "Custom",
|
|
68494
|
+
tone: "blue",
|
|
68495
|
+
blurb: "An integration your organisation defined.",
|
|
68496
|
+
long: "",
|
|
68497
|
+
tagline: "An integration your organisation defined.",
|
|
68498
|
+
points: [],
|
|
68499
|
+
vars: cred === null ? [] : basic ? [v2.user, v2.token] : [v2.token],
|
|
68500
|
+
varDescriptions: cred === null ? {} : { ...basic ? { [v2.user]: "User name" } : {}, [v2.token]: "Credential, hidden after saving" },
|
|
68501
|
+
steps: [],
|
|
68502
|
+
pitch: { title: name, examples: "", effort: "" },
|
|
68503
|
+
docsUrl: "",
|
|
68504
|
+
hosts: def.hosts,
|
|
68505
|
+
tcp: def.tcp.map((t) => ({ host: t.host, port: t.port })),
|
|
68506
|
+
...cred !== null && def.baseUrl !== null ? {
|
|
68507
|
+
gateway: {
|
|
68508
|
+
baseUrlVar: v2.url,
|
|
68509
|
+
upstream: def.baseUrl,
|
|
68510
|
+
credentialVars: [v2.token],
|
|
68511
|
+
auth: [cred.shape],
|
|
68512
|
+
...basic ? { basicUserVar: v2.user } : {},
|
|
68513
|
+
...header !== void 0 ? { header } : {},
|
|
68514
|
+
credentialLocations: { headers: [header ?? "authorization"], query: [], form: [] }
|
|
68515
|
+
}
|
|
68516
|
+
} : {}
|
|
68517
|
+
};
|
|
68518
|
+
}
|
|
68519
|
+
function connectorOf(c) {
|
|
68520
|
+
if (c.connectorId === CUSTOM_CONNECTOR_ID) {
|
|
68521
|
+
return c.custom === null || c.custom === void 0 ? void 0 : customConnector(c.name, c.custom);
|
|
68522
|
+
}
|
|
68523
|
+
return connector(c.connectorId);
|
|
68524
|
+
}
|
|
68525
|
+
|
|
68415
68526
|
// libs/shared/src/types/resource.ts
|
|
68416
68527
|
var MIN_BACKUP_RETENTION_DAYS = 1;
|
|
68417
68528
|
var MAX_BACKUP_RETENTION_DAYS = 35;
|
|
@@ -69482,6 +69593,33 @@ var AuthClient = class {
|
|
|
69482
69593
|
async revokeOrg(orgId, serviceKey) {
|
|
69483
69594
|
return this.postInternal("revoke-org", { orgId }, serviceKey);
|
|
69484
69595
|
}
|
|
69596
|
+
/** Email change step 1 (#1559): a code to the user's current address. */
|
|
69597
|
+
async sendCurrentEmailCode(userId, currentEmail, serviceKey) {
|
|
69598
|
+
return this.callInternal("email-change/start", { userId, email: currentEmail }, serviceKey);
|
|
69599
|
+
}
|
|
69600
|
+
/** Step 2: a code to the new address, refused unless the current-address code is right. */
|
|
69601
|
+
async sendEmailChangeCode(userId, email2, currentCode, serviceKey) {
|
|
69602
|
+
return this.callInternal("email-change/send", { userId, email: email2, currentCode }, serviceKey);
|
|
69603
|
+
}
|
|
69604
|
+
/** The address the user's code was sent to, when the code is right. Consumes the code. */
|
|
69605
|
+
async verifyEmailChangeCode(userId, code, serviceKey) {
|
|
69606
|
+
return this.callInternal("email-change/verify", { userId, code }, serviceKey);
|
|
69607
|
+
}
|
|
69608
|
+
/** Unlike postInternal, keeps the status and message so the caller can pass a 400 or 429 on. status 0: unreachable. */
|
|
69609
|
+
async callInternal(path, body, serviceKey) {
|
|
69610
|
+
try {
|
|
69611
|
+
const res = await fetch(`${this.baseUrl}/auth/${path}`, {
|
|
69612
|
+
method: "POST",
|
|
69613
|
+
headers: { "Content-Type": "application/json", "x-internal-secret": serviceKey },
|
|
69614
|
+
body: JSON.stringify(body)
|
|
69615
|
+
});
|
|
69616
|
+
const json = await res.json().catch(() => ({}));
|
|
69617
|
+
const message = Array.isArray(json.message) ? json.message.join(", ") : json.message;
|
|
69618
|
+
return { status: res.status, data: json.data ?? null, error: res.ok ? null : message ?? json.error ?? null };
|
|
69619
|
+
} catch {
|
|
69620
|
+
return { status: 0, data: null, error: null };
|
|
69621
|
+
}
|
|
69622
|
+
}
|
|
69485
69623
|
async postInternal(path, body, serviceKey) {
|
|
69486
69624
|
try {
|
|
69487
69625
|
const res = await fetch(`${this.baseUrl}/auth/${path}`, {
|
|
@@ -69838,6 +69976,27 @@ var DeployClient = class {
|
|
|
69838
69976
|
return { stopped: 0, failed: 0 };
|
|
69839
69977
|
}
|
|
69840
69978
|
}
|
|
69979
|
+
/**
|
|
69980
|
+
* Beta lapsed: stop the org's running nodes (EC2 stop, EBS kept). Throws on a
|
|
69981
|
+
* refusal or a transport error, unlike {@link suspendOrgInfra}: the caller
|
|
69982
|
+
* records the org as asleep only when this succeeds, and a swallowed refusal
|
|
69983
|
+
* once let a lapsed beta keep running while recorded asleep (#1067).
|
|
69984
|
+
*/
|
|
69985
|
+
async sleepBetaOrg(orgId) {
|
|
69986
|
+
const res = await fetch(`${this.baseUrl}/internal/beta/orgs/${encodeURIComponent(orgId)}/sleep`, {
|
|
69987
|
+
method: "POST",
|
|
69988
|
+
headers: this.internalHeaders,
|
|
69989
|
+
signal: AbortSignal.timeout(6e4)
|
|
69990
|
+
});
|
|
69991
|
+
if (!res.ok) {
|
|
69992
|
+
throw new Error(`deploy-service beta sleep(${orgId}) returned ${String(res.status)}`);
|
|
69993
|
+
}
|
|
69994
|
+
const json = await res.json();
|
|
69995
|
+
if (json.data === null) {
|
|
69996
|
+
throw new Error(`deploy-service beta sleep(${orgId}) returned no result`);
|
|
69997
|
+
}
|
|
69998
|
+
return json.data;
|
|
69999
|
+
}
|
|
69841
70000
|
/**
|
|
69842
70001
|
* GDPR person erasure: tombstone a deleted person's display name in build
|
|
69843
70002
|
* history (`Build.triggeredBy`) for the given apps. Best-effort / fail-soft —
|
|
@@ -72062,6 +72221,8 @@ async function handleOrgListCloudAccounts(args) {
|
|
|
72062
72221
|
namespace: a.namespace,
|
|
72063
72222
|
updateRequired: a.updateRequired,
|
|
72064
72223
|
placeable: a.placeable,
|
|
72224
|
+
egressIp: a.egressIp,
|
|
72225
|
+
fixedEgress: a.fixedEgress,
|
|
72065
72226
|
...updateFields(a),
|
|
72066
72227
|
...connectionFields(a)
|
|
72067
72228
|
}))
|
|
@@ -72726,7 +72887,7 @@ var tools6 = [
|
|
|
72726
72887
|
// apps/mcp-server/src/tools/connections.ts
|
|
72727
72888
|
var appDescribeConnectionsTool = {
|
|
72728
72889
|
name: "app_describe_connections",
|
|
72729
|
-
description:
|
|
72890
|
+
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. 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
72891
|
annotations: { readOnlyHint: true, destructiveHint: false },
|
|
72731
72892
|
inputSchema: {
|
|
72732
72893
|
type: "object",
|
|
@@ -72763,7 +72924,7 @@ async function handleAppDescribeConnections(args) {
|
|
|
72763
72924
|
}
|
|
72764
72925
|
}
|
|
72765
72926
|
function withBaseUrl(c) {
|
|
72766
|
-
const def = typeof c.connectorId === "string" ?
|
|
72927
|
+
const def = typeof c.connectorId === "string" ? connectorOf({ connectorId: c.connectorId, name: typeof c.name === "string" ? c.name : "", custom: c.custom ?? null }) : void 0;
|
|
72767
72928
|
if (def?.gateway === void 0 || def.vars.includes(def.gateway.baseUrlVar)) {
|
|
72768
72929
|
return c;
|
|
72769
72930
|
}
|
|
@@ -72780,7 +72941,7 @@ function withBaseUrl(c) {
|
|
|
72780
72941
|
}
|
|
72781
72942
|
var appRequestConnectionTool = {
|
|
72782
72943
|
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")
|
|
72944
|
+
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
72945
|
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
72785
72946
|
inputSchema: {
|
|
72786
72947
|
type: "object",
|
|
@@ -72794,7 +72955,7 @@ var appRequestConnectionTool = {
|
|
|
72794
72955
|
},
|
|
72795
72956
|
connectorId: {
|
|
72796
72957
|
type: "string",
|
|
72797
|
-
description: 'A connector id as returned by app_describe_connections, e.g. "smtp" or "stripe"'
|
|
72958
|
+
description: 'A connector id as returned by app_describe_connections, e.g. "smtp" or "stripe", or "custom"'
|
|
72798
72959
|
},
|
|
72799
72960
|
note: {
|
|
72800
72961
|
type: "string",
|
|
@@ -73862,13 +74023,37 @@ async function handleAppSetSleepWhenIdle(args) {
|
|
|
73862
74023
|
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
74024
|
return { content: [{ type: "text", text: text2 }] };
|
|
73864
74025
|
}
|
|
74026
|
+
var appMoveNetworkTool = {
|
|
74027
|
+
name: "app_move_network",
|
|
74028
|
+
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.",
|
|
74029
|
+
annotations: { readOnlyHint: false, destructiveHint: false },
|
|
74030
|
+
inputSchema: NODE_ACTION_SCHEMA
|
|
74031
|
+
};
|
|
74032
|
+
async function handleAppMoveNetwork(args) {
|
|
74033
|
+
const token = args["token"];
|
|
74034
|
+
if (!token) {
|
|
74035
|
+
return notAuthenticatedResult();
|
|
74036
|
+
}
|
|
74037
|
+
const environment = args["environment"];
|
|
74038
|
+
const client2 = new DeployClient(config2.services.deployServiceUrl, token);
|
|
74039
|
+
try {
|
|
74040
|
+
const build = await client2.trigger({ applicationId: args["applicationId"], environment, networkMove: true });
|
|
74041
|
+
return ok({ buildId: build.id, message: `Moving the ${environment} environment. Follow it with org_deploy_status.` });
|
|
74042
|
+
} catch (err) {
|
|
74043
|
+
if (err instanceof UpstreamRequestError) {
|
|
74044
|
+
return fail({ ...err.status !== void 0 ? { status: err.status } : {}, code: err.code, message: err.message });
|
|
74045
|
+
}
|
|
74046
|
+
throw err;
|
|
74047
|
+
}
|
|
74048
|
+
}
|
|
73865
74049
|
var tools14 = [
|
|
73866
74050
|
{ definition: appRestartInstanceTool, handle: handleAppRestartInstance },
|
|
73867
74051
|
{ definition: appStopInstanceTool, handle: handleAppStopInstance },
|
|
73868
74052
|
{ definition: appStartInstanceTool, handle: handleAppStartInstance },
|
|
73869
74053
|
{ definition: appReprovisionInstanceTool, handle: handleAppReprovisionInstance },
|
|
73870
74054
|
{ definition: appReplaceInstanceTool, handle: handleAppReplaceInstance },
|
|
73871
|
-
{ definition: appSetSleepWhenIdleTool, handle: handleAppSetSleepWhenIdle }
|
|
74055
|
+
{ definition: appSetSleepWhenIdleTool, handle: handleAppSetSleepWhenIdle },
|
|
74056
|
+
{ definition: appMoveNetworkTool, handle: handleAppMoveNetwork }
|
|
73872
74057
|
];
|
|
73873
74058
|
|
|
73874
74059
|
// 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.6.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.6.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Syntica",
|
|
7
7
|
"email": "support@syntica.io",
|
|
@@ -36,6 +36,9 @@ 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`.
|
|
41
44
|
|
|
@@ -118,6 +121,51 @@ can send as any mailbox in the tenant unless the organisation has added an
|
|
|
118
121
|
the code you are writing needs to act as anything other than the injected
|
|
119
122
|
identity, stop and raise it with the user rather than implementing it.
|
|
120
123
|
|
|
124
|
+
## Custom integrations — a system the catalogue does not have
|
|
125
|
+
|
|
126
|
+
An organisation can define its own connector for any HTTP API or TCP service the
|
|
127
|
+
catalogue lacks — a partner's REST API, a licence server, a database that lives
|
|
128
|
+
elsewhere. An admin creates it once under Connections ("Add a custom
|
|
129
|
+
integration"): the **hosts** the app may reach, optional plain **TCP targets**
|
|
130
|
+
(host and port), an optional **credential** in one of three shapes (`bearer`,
|
|
131
|
+
`basic`, or a named `header`), an optional **base URL**, and a **variable
|
|
132
|
+
prefix**. It is then granted per environment like any other connector.
|
|
133
|
+
|
|
134
|
+
`app_describe_connections` returns such a grant with `connectorId: "custom"`, its
|
|
135
|
+
name, and its definition under `custom` (`hosts`, `tcp`, `credential`, `baseUrl`,
|
|
136
|
+
`varPrefix`). The variables follow the prefix:
|
|
137
|
+
|
|
138
|
+
| Variable | When | Holds |
|
|
139
|
+
|---|---|---|
|
|
140
|
+
| `<PREFIX>_URL` | the integration has a base URL and a credential | the URL to call through (gateway mode, see below) |
|
|
141
|
+
| `<PREFIX>_TOKEN` | the integration has a credential | the bearer token, the password, or the header value |
|
|
142
|
+
| `<PREFIX>_USER` | credential shape `basic` only | the user name |
|
|
143
|
+
|
|
144
|
+
Send the credential the way the shape says: `bearer` → `Authorization: Bearer
|
|
145
|
+
<TOKEN>`; `basic` → HTTP basic auth with `<USER>` and `<TOKEN>`; `header` → the
|
|
146
|
+
named header (`custom.credential.header`) set to `<TOKEN>`. With a base URL **and**
|
|
147
|
+
a credential the integration runs in gateway mode exactly like an AI connector:
|
|
148
|
+
`<PREFIX>_TOKEN` is a placeholder and every call must go through `<PREFIX>_URL`,
|
|
149
|
+
where the platform's gateway inserts the real credential — a call straight to the
|
|
150
|
+
vendor host fails. Without a base URL (a TCP target, or an API whose credential
|
|
151
|
+
goes in the request body) the app gets the real credential and calls the host
|
|
152
|
+
directly.
|
|
153
|
+
|
|
154
|
+
`hosts` and `tcp` are not just information: under egress control the node only
|
|
155
|
+
lets the app reach the hosts a granted connection declares, and a TCP target only
|
|
156
|
+
on its port. If the system you are about to call is not in any grant's `hosts`,
|
|
157
|
+
the call is blocked, not merely unconfigured — the same symptom as SMTP without
|
|
158
|
+
its grant.
|
|
159
|
+
|
|
160
|
+
When no connector fits and no custom integration is granted, request one with
|
|
161
|
+
`app_request_connection` and `connectorId: "custom"`. The request carries only
|
|
162
|
+
your purpose line, and the admin defines the integration when approving, so put
|
|
163
|
+
what they need to know in that line: the host(s) and port(s), the credential
|
|
164
|
+
shape, and whether a base URL is wanted. For example: "Call the itsme partner API
|
|
165
|
+
at api.partner.example (HTTPS, bearer token, base URL https://api.partner.example/v2)
|
|
166
|
+
to fetch order status". Then write the code against `<PREFIX>_URL` /
|
|
167
|
+
`<PREFIX>_TOKEN` with the prefix the admin confirms.
|
|
168
|
+
|
|
121
169
|
## Step 4 — Fail loudly when the variables are absent
|
|
122
170
|
|
|
123
171
|
Check for them at startup and fail with a clear message:
|