@syntica/mcp 2.7.0 → 2.9.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
@@ -68496,6 +68496,10 @@ var CONNECTOR_CATEGORIES = Array.from(new Set(CONNECTORS.filter((c) => c.hidden
68496
68496
  function connector(id) {
68497
68497
  return CONNECTORS.find((c) => c.id === id);
68498
68498
  }
68499
+ var DEFAULT_PROFILE = "default";
68500
+ function profileLabel(name, profile) {
68501
+ return profile === DEFAULT_PROFILE ? name : `${name} \xB7 ${profile}`;
68502
+ }
68499
68503
 
68500
68504
  // libs/shared/src/types/custom-integration.ts
68501
68505
  var CUSTOM_CONNECTOR_ID = "custom";
@@ -72907,7 +72911,7 @@ var tools6 = [
72907
72911
  // apps/mcp-server/src/tools/connections.ts
72908
72912
  var appDescribeConnectionsTool = {
72909
72913
  name: "app_describe_connections",
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.`,
72914
+ 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 ("Stripe \xB7 live" for a named profile, with the profile apart in profile), and the environment variable NAMES the platform injects at deploy time. Never returns a credential. Every profile of one integration injects the same variable names, so a different target per environment (sandbox in dev, live in production) is a profile an admin assigns, never a second integration or environment-specific variable names in the code. 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.`,
72911
72915
  annotations: { readOnlyHint: true, destructiveHint: false },
72912
72916
  inputSchema: {
72913
72917
  type: "object",
@@ -72937,7 +72941,7 @@ async function handleAppDescribeConnections(args) {
72937
72941
  if (!res.ok) {
72938
72942
  return { content: [{ type: "text", text: `Error: ${json.error ?? res.statusText}` }], isError: true };
72939
72943
  }
72940
- const connections = Array.isArray(json.data) ? json.data.map((c) => withNetwork(withBaseUrl(c))) : json.data;
72944
+ const connections = Array.isArray(json.data) ? json.data.map((c) => withLabel(withNetwork(withBaseUrl(c)))) : json.data;
72941
72945
  return { content: [{ type: "text", text: JSON.stringify({ connections }, null, 2) }] };
72942
72946
  } catch (err) {
72943
72947
  return fromCatch(err);
@@ -72964,6 +72968,9 @@ function withNetwork(c) {
72964
72968
  }
72965
72969
  };
72966
72970
  }
72971
+ function withLabel(c) {
72972
+ return typeof c["name"] === "string" && typeof c["profile"] === "string" ? { ...c, name: profileLabel(c["name"], c["profile"]) } : c;
72973
+ }
72967
72974
  function withBaseUrl(c) {
72968
72975
  const def = typeof c.connectorId === "string" ? connectorOf({ connectorId: c.connectorId, name: typeof c.name === "string" ? c.name : "", custom: c.custom ?? null }) : void 0;
72969
72976
  if (def?.gateway === void 0 || def.vars.includes(def.gateway.baseUrlVar)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syntica/mcp",
3
- "version": "2.7.0",
3
+ "version": "2.9.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": {
@@ -8,7 +8,7 @@
8
8
  {
9
9
  "name": "syntica",
10
10
  "description": "Deploy, run and debug your applications on Syntica from Claude Code — real infrastructure, a live URL, no DevOps required.",
11
- "version": "2.7.0",
11
+ "version": "2.9.0",
12
12
  "source": "./"
13
13
  }
14
14
  ]
@@ -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.7.0",
4
+ "version": "2.9.0",
5
5
  "author": {
6
6
  "name": "Syntica",
7
7
  "email": "support@syntica.io",
@@ -34,6 +34,17 @@ Note the names carefully. A grant may carry a **prefix**, so a second mailbox
34
34
  arrives as `SUPPORT_SMTP_HOST` rather than `SMTP_HOST`. Use exactly what the tool
35
35
  returns.
36
36
 
37
+ An integration can have several **profiles** ("sandbox", "live"), each with its
38
+ own URL, credentials, network settings and cloud account. `name` reads
39
+ "Stripe · live" for a named profile, with the profile apart in `profile`; a plain
40
+ name is the "default" profile. Every profile of one integration injects the
41
+ **same variable names**, so the code you write against dev's "sandbox" runs
42
+ unchanged in production once an admin assigns "live" there. Never derive
43
+ variable names from the environment (`TEST_DEV_URL`, `TEST_MAIN_URL`), and never
44
+ ask for a second integration to reach a different target per environment: that
45
+ is a profile an admin adds and assigns under Connections. Which profile an
46
+ environment holds is nothing the code reads or branches on.
47
+
37
48
  A connection to an HTTP API, such as OpenAI or Anthropic, may also carry
38
49
  `baseUrl`: the variable to call the vendor through, such as `OPENAI_BASE_URL`.
39
50
  A grant with `connectorId: "custom"` is an integration the organisation defined
@@ -63,6 +74,12 @@ platform and by email, and decides which of their connections satisfies it. Then
63
74
  write the code against the variable names the connector declares — they arrive at
64
75
  the next deploy once it is granted.
65
76
 
77
+ A system that **is** granted but points at the wrong target for this environment
78
+ (production still on a vendor's sandbox) is not a missing connection. It is a
79
+ profile change: an admin adds or switches the profile on this app environment
80
+ under Connections. Do not request a second connection for it, and do not change
81
+ the variable names in the code.
82
+
66
83
  Do **not** install a client library speculatively, invent variable names, or ask
67
84
  for credentials. A grant deliberately absent in `dev` usually means someone
68
85
  decided a preview must not touch the real system, so say what you are about to
@@ -173,6 +190,12 @@ at api.partner.example (HTTPS, bearer token, base URL https://api.partner.exampl
173
190
  to fetch order status". Then write the code against `<PREFIX>_URL` /
174
191
  `<PREFIX>_TOKEN` with the prefix the admin confirms.
175
192
 
193
+ When the organisation already has the integration and this environment only
194
+ needs another endpoint or credential of the same partner (their test system for
195
+ dev, the live one for production), say so in the purpose line: the admin then adds
196
+ a profile to the existing integration instead of a new one, and the prefix and
197
+ variable names stay the same.
198
+
176
199
  ## Step 4 — Fail loudly when the variables are absent
177
200
 
178
201
  Check for them at startup and fail with a clear message:
@@ -193,3 +216,74 @@ credential.
193
216
  There is no prescribed file. Follow the project's own conventions — `src/mail.ts`,
194
217
  `app/services/payments.py`, `internal/slack/`. The platform does not write files
195
218
  into the repository and never will.
219
+
220
+ ## Governed environments — what the compose may not do
221
+
222
+ An environment with a connection in **gateway mode**, or with egress control set to
223
+ **enforce**, is *governed*: the platform's gateway on the node holds the real
224
+ credential, so a container that could reach the host could read it. Before every
225
+ deploy of a governed environment the platform checks `docker-compose.yml` (as
226
+ `docker compose --profile '*' config` resolves it) against an allowlist and refuses
227
+ the deploy on the first violation. The refusal is one line in the deploy output,
228
+ `[vtc] governed environment: <service>: <field> ...`, nothing new is started, and the
229
+ previous version stays up. A new grant starts in gateway mode by default, so assume
230
+ any environment with connections is governed.
231
+
232
+ When you write or change a compose for such an app, hold to these. Anything the
233
+ check does not know is refused, so when in doubt, leave the key out.
234
+
235
+ - **Writable data belongs in named volumes**, never bind mounts. Every bind mount
236
+ must be `read_only` (`:ro`) and inside the repository. `./data/postgres:/var/lib/postgresql/data`
237
+ is refused; `./nginx.conf:/etc/nginx/nginx.conf:ro` is fine. Host paths such as
238
+ `/etc/localtime` or `/var/run/docker.sock` are refused even read-only.
239
+ - **No `privileged`, `cap_add`, `devices`, `runtime`, `cgroup_parent`, `isolation`,
240
+ `dns*`, `gpus`, `develop`, `post_start`/`pre_stop`.** Postgres, Redis and friends
241
+ run without `cap_add`.
242
+ - **`network_mode`** only `none` or `service:<svc>`; `host`, `bridge` and
243
+ `container:` are refused. `pid`/`ipc`/`uts`/`userns_mode: host` are refused.
244
+ - **`security_opt`** only `no-new-privileges`. **`logging.driver`** only
245
+ `json-file`, `local` or `none`.
246
+ - **`ports`** may not publish host port 9480 or 9587, or a range covering them.
247
+ - **No `include:`**, no `extends:` with `file:`, `env_file` only inside the repo and
248
+ without `$`.
249
+ - **Top-level `volumes`/`networks`**: no `external`, no `driver_opts`, no fixed
250
+ `name:` (leave it out), volume driver `local`, network driver `bridge`.
251
+ - **`build`**: `context`, `dockerfile`, `args`, `target`, `additional_contexts`,
252
+ `labels`, `pull`, `no_cache`, `shm_size`, `tags`; everything else (`cache_from`,
253
+ `secrets`, `ssh`, `platforms`, `network: host`) is refused. Contexts stay inside
254
+ the repository.
255
+ - Never name `connectors.internal` in `extra_hosts`, `links` or network aliases.
256
+ The platform adds that host itself.
257
+
258
+ ### Moving a bind-mounted data directory into a named volume
259
+
260
+ Changing `./data/pg:/var/lib/postgresql/data` to `pg:/var/lib/postgresql/data` is
261
+ the right fix, but compose would create `pg` empty and the app would start without
262
+ its data. Tell the platform where the data lives today with a label on the
263
+ top-level volume, using the path **relative to the repository root**:
264
+
265
+ ```yaml
266
+ services:
267
+ db:
268
+ image: postgres:16
269
+ volumes:
270
+ - pg:/var/lib/postgresql/data
271
+ volumes:
272
+ pg:
273
+ labels:
274
+ io.syntica.migrate-from: ./data/pg
275
+ ```
276
+
277
+ On the next deploy (or dev save) the platform stops the containers that still mount
278
+ `./data/pg`, creates the volume, copies the directory into it with ownership and
279
+ modes preserved, and starts the new version. The deploy output says
280
+ `[vtc] volume <project>_pg: copied from /opt/apps/<id>/data/pg`. Once the volume
281
+ exists the label does nothing (`already exists, not copied`), so it can stay in the
282
+ compose. A fresh environment that never had the directory logs `nothing to copy`.
283
+
284
+ Do this for every writable bind mount at once, one label per volume, each with its
285
+ own directory. Do not delete the old directory or its `.gitignore` entry until the
286
+ first deploy after the change has succeeded and the data is confirmed present: the
287
+ platform leaves the directory in place so a rollback to the previous commit still
288
+ runs. If the deploy output says `the data volumes could not be moved`, the copy
289
+ failed and the previous version was restored; the reason is on the line above it.
@@ -134,6 +134,7 @@ The `failureReason` for the "Deploying your application" step contains the `dock
134
134
  - **Image pull failure** (e.g. private registry, image not found): remind the user that syntica builds from source — the `image:` key must reference a public image or use `build: .` with a local Dockerfile.
135
135
  - **SSM agent never started** (`failureReason` contains "SSM agent never started"): tell the user "The deployment agent on your instance never started — this is a platform issue, not your code. Try re-deploying; if it persists, contact support."
136
136
  - **Build stalled** (`failureReason` contains "EC2 deploy stalled" and "no build output"): tell the user "The build ran but stalled — likely a slow package install or large layer download. Consider: (1) adding `node_modules` to `.dockerignore`; (2) ordering `COPY package.json` + `RUN npm install` before `COPY . .` in your Dockerfile to maximise layer cache hits."
137
+ - **Governed environment refusal** (`failureReason` contains `[vtc] governed environment:`): the environment has a connection in gateway mode (or enforces its egress), so the platform checked `docker-compose.yml` against its allowlist and refused it; nothing new was started and the previous version is still up. The line names the service and the field. Fix the compose by the rules in the connections skill ("Governed environments"). The common one, `volumes <path> must be read_only ... label it io.syntica.migrate-from: <path>`, is a bind-mounted data directory: replace it with a named volume and put that label on the volume so the platform copies the data on the next deploy. If the output instead says `the data volumes could not be moved`, the copy itself failed and the line above it says why.
137
138
  - **Health check failure** (failed step name contains "health" or "live"): the platform performs `GET /` on your app's public URL and expects HTTP 2xx or 3xx within 2 minutes. A 404 at the root path is treated as an application error — ensure your app serves a response at `/` in production mode. If `NODE_ENV=production` is not set, many frameworks disable their default routes. Suggest running the onboard skill (`/syntica:onboard` in Claude Code) to check and set `NODE_ENV`.
138
139
 
139
140
  After explaining the failure, offer the options `["Yes — help me fix it", "No — I'll investigate myself"]` (with AskUserQuestion in Claude Code) and ask: "Would you like me to help fix the issue now?"
@@ -269,6 +269,13 @@ Generate a `docker-compose.yml` appropriate for the detected type.
269
269
  > service published on 10000 or above cannot be reached and the deploy fails. Keep the
270
270
  > host side of every routed `ports:` entry under 10000 (the templates below already do).
271
271
 
272
+ > **Writable data goes in named volumes, never bind mounts.** Write a database or
273
+ > upload directory as `pgdata:/var/lib/postgresql/data` with a top-level `volumes:
274
+ > pgdata: {}` block, not as `./data/postgres:/var/lib/postgresql/data`. An environment
275
+ > with connections is *governed* and refuses every writable bind mount at deploy time
276
+ > (see the connections skill, "Governed environments"). A bind mount of a config file
277
+ > is fine when it is read-only (`./nginx.conf:/etc/nginx/nginx.conf:ro`).
278
+
272
279
  **Node.js template:**
273
280
  ```yaml
274
281
  services:
@@ -329,6 +336,35 @@ If Yes, add `env_file:\n - .env` under each service in `docker-compose.yml`.
329
336
 
330
337
  Also check `.gitignore` for a `.env` entry. If missing, append it — the `.env` file is generated at deploy time and must never be committed.
331
338
 
339
+ ### Check 0 — Writable bind mounts
340
+
341
+ Look at every `volumes:` entry of every service. A host-path mount that is not
342
+ read-only (`./data/postgres:/var/lib/postgresql/data`, `./uploads:/app/uploads`,
343
+ anything without `:ro`) will be refused the moment the environment gets a connection
344
+ in gateway mode, which new grants use by default. Tell the user which mounts you
345
+ found, offer the options `["Yes — move them to named volumes", "No — leave them"]`
346
+ (with AskUserQuestion in Claude Code) and ask: "Shall I move these to named volumes
347
+ now? The platform copies the existing data on the next deploy."
348
+
349
+ If Yes, for each such mount replace the host path with a volume name and add the
350
+ volume at the top level with a `io.syntica.migrate-from` label holding the old
351
+ path, so the data moves with it:
352
+
353
+ ```yaml
354
+ services:
355
+ db:
356
+ volumes:
357
+ - pgdata:/var/lib/postgresql/data
358
+ volumes:
359
+ pgdata:
360
+ labels:
361
+ io.syntica.migrate-from: ./data/postgres
362
+ ```
363
+
364
+ Leave the old directory in place. Mounts of a single config file get `:ro` instead.
365
+ Host paths outside the repository (`/etc/localtime`, `/var/run/docker.sock`) have no
366
+ governed equivalent: remove them and say why.
367
+
332
368
  ### Check 1 — Build method
333
369
 
334
370
  For each service, inspect the `image:` and `build:` keys.