@syntica/mcp 2.3.1 → 2.4.1
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/README.md +1 -1
- package/dist/index.js +11335 -671
- package/package.json +1 -1
- package/skills/.claude-plugin/marketplace.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
- package/skills/README.md +4 -4
- package/skills/skills/debug/SKILL.md +23 -19
- package/skills/skills/deploy/SKILL.md +21 -28
- package/skills/skills/manage/SKILL.md +34 -31
- package/skills/skills/onboard/SKILL.md +36 -57
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syntica/mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
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": {
|
|
@@ -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.4.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Syntica",
|
|
7
7
|
"email": "support@syntica.io",
|
package/skills/README.md
CHANGED
|
@@ -86,14 +86,14 @@ Between deployments you can ask in plain language — "restart the api service",
|
|
|
86
86
|
|
|
87
87
|
## Where your session lives
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
State is split in two:
|
|
90
90
|
|
|
91
|
-
- `~/.syntica/credentials.json` (mode `0600`, outside any repository) — your session
|
|
91
|
+
- `~/.syntica/credentials.json` (mode `0600`, outside any repository) — your session. The Syntica MCP server stores it there and reads it on every call; Claude never reads, writes or passes it.
|
|
92
92
|
- `.syntica/config.json` in your project root (gitignored) — which application, environment and git remote this project uses. No secret is written here.
|
|
93
93
|
|
|
94
|
-
The token is kept out of the project directory on purpose: that directory is the one an agent reads on every invocation, so a token stored in it is one prompt-injected "read this file" away from being exfiltrated (#488). Running `/syntica:onboard` once on an older setup
|
|
94
|
+
The token is kept out of the project directory on purpose: that directory is the one an agent reads on every invocation, so a token stored in it is one prompt-injected "read this file" away from being exfiltrated (#488). Running `/syntica:onboard` once on an older setup removes a token an earlier version left in `.syntica/config.json` or `.vibetocloud.json`, and asks you to sign in again.
|
|
95
95
|
|
|
96
|
-
**
|
|
96
|
+
**Keep `.syntica/` out of git.** It holds no secret, but it identifies your org and application; `/syntica:onboard` adds it to `.gitignore` automatically — leave that in place and never commit it. Run `/syntica:onboard` again to re-authenticate or switch application.
|
|
97
97
|
|
|
98
98
|
## What Syntica runs
|
|
99
99
|
|
|
@@ -54,24 +54,33 @@ it in a minute.
|
|
|
54
54
|
|
|
55
55
|
---
|
|
56
56
|
|
|
57
|
-
## Step 1 — Load config
|
|
57
|
+
## Step 1 — Load config and sign in
|
|
58
58
|
|
|
59
|
-
Read
|
|
60
|
-
|
|
61
|
-
out of the project directory — see `/syntica:onboard` (#488).
|
|
59
|
+
Read `.syntica/config.json` (project state) by reading it. It holds no token — see
|
|
60
|
+
`/syntica:onboard` (#488).
|
|
62
61
|
|
|
63
|
-
If
|
|
64
|
-
|
|
65
|
-
`/syntica:onboard` once, which
|
|
62
|
+
If `.syntica/config.json` still has a `token` field, or a `.vibetocloud.json` file exists in the
|
|
63
|
+
project root, it is an older setup that left a session token in the repository: tell the user to
|
|
64
|
+
run `/syntica:onboard` once, which removes it. Do not use that token.
|
|
66
65
|
|
|
67
|
-
If
|
|
66
|
+
If `appId` or `orgId` is empty, stop and tell the user:
|
|
68
67
|
"Run `/syntica:onboard` first to set up your project."
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
**Sign in:** call `org_authenticate` (no arguments). It returns
|
|
70
|
+
`{ userId, orgId, userName, orgName, platformRole }` when you are signed in. The Syntica MCP
|
|
71
|
+
server holds the session itself and adds it to every call — never read or write its credentials
|
|
72
|
+
file, and never pass a `token` argument to any tool.
|
|
73
|
+
|
|
74
|
+
If it fails with a 401 ("not signed in", or an expired session), sign in again:
|
|
75
|
+
|
|
76
|
+
1. Ask the user for their email address and call `org_request_otp` with `{ "email": "<email>" }`.
|
|
77
|
+
2. Ask the user for the code from that email and call `org_verify_otp` with
|
|
78
|
+
`{ "email": "<email>", "code": "<code>" }`.
|
|
79
|
+
3. If it returns `pendingOrgSelection: true` with an `orgs` list, use the AskUserQuestion tool to
|
|
80
|
+
ask which organisation, then call `org_select` with `{ "orgId": "<chosen orgId>" }`.
|
|
81
|
+
|
|
82
|
+
Do not try to refresh the session by hand — refresh is automatic. Any later call that fails
|
|
83
|
+
with a 401 means the session has ended: run this sign-in again, then retry the call.
|
|
75
84
|
|
|
76
85
|
---
|
|
77
86
|
|
|
@@ -80,7 +89,6 @@ If it fails, tell the user: "Your session has expired. Run `/syntica:onboard` to
|
|
|
80
89
|
Call `app_services_list` with:
|
|
81
90
|
```json
|
|
82
91
|
{
|
|
83
|
-
"token": "<token>",
|
|
84
92
|
"applicationId": "<appId>",
|
|
85
93
|
"environment": "<environment>"
|
|
86
94
|
}
|
|
@@ -116,7 +124,6 @@ the state an application is in the morning after it broke.
|
|
|
116
124
|
|
|
117
125
|
```json
|
|
118
126
|
{
|
|
119
|
-
"token": "<token>",
|
|
120
127
|
"applicationId": "<appId>",
|
|
121
128
|
"environment": "<environment>",
|
|
122
129
|
"minutes": 60
|
|
@@ -132,7 +139,6 @@ happened. Say which you mean.
|
|
|
132
139
|
Then, to follow what is happening **now**, call `app_service_tail_logs` with:
|
|
133
140
|
```json
|
|
134
141
|
{
|
|
135
|
-
"token": "<token>",
|
|
136
142
|
"applicationId": "<appId>",
|
|
137
143
|
"environment": "<environment>",
|
|
138
144
|
"service": "<selected service name>"
|
|
@@ -168,7 +174,6 @@ If the user wants to inspect or modify data, identify the database service (e.g.
|
|
|
168
174
|
**Read (default):** call `app_db_query` with:
|
|
169
175
|
```json
|
|
170
176
|
{
|
|
171
|
-
"token": "<token>",
|
|
172
177
|
"applicationId": "<appId>",
|
|
173
178
|
"environment": "<environment>",
|
|
174
179
|
"service": "<db service name>",
|
|
@@ -190,7 +195,7 @@ confirmation. Then call `app_db_query` with the same shape plus `"allowWrite": t
|
|
|
190
195
|
|
|
191
196
|
**Audit:** every query is logged. Show recent history with `app_db_audit`:
|
|
192
197
|
```json
|
|
193
|
-
{ "
|
|
198
|
+
{ "applicationId": "<appId>", "environment": "<environment>" }
|
|
194
199
|
```
|
|
195
200
|
|
|
196
201
|
When done, proceed to Step 6.
|
|
@@ -204,7 +209,6 @@ Offer the following options:
|
|
|
204
209
|
1. **Restart this service** — call `app_service_restart` with:
|
|
205
210
|
```json
|
|
206
211
|
{
|
|
207
|
-
"token": "<token>",
|
|
208
212
|
"applicationId": "<appId>",
|
|
209
213
|
"environment": "<environment>",
|
|
210
214
|
"service": "<selected service name>"
|
|
@@ -9,38 +9,33 @@ Announce at start: "I'm using deploy to deploy your application."
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
## Step 1 — Load config
|
|
12
|
+
## Step 1 — Load config and sign in
|
|
13
13
|
|
|
14
|
-
Read
|
|
15
|
-
|
|
16
|
-
out of the project directory — see `/syntica:onboard` (#488).
|
|
14
|
+
Read `.syntica/config.json` (project state) by reading it. It holds no token — see
|
|
15
|
+
`/syntica:onboard` (#488).
|
|
17
16
|
|
|
18
|
-
If
|
|
19
|
-
|
|
20
|
-
`/syntica:onboard` once, which
|
|
17
|
+
If `.syntica/config.json` still has a `token` field, or a `.vibetocloud.json` file exists in the
|
|
18
|
+
project root, it is an older setup that left a session token in the repository: tell the user to
|
|
19
|
+
run `/syntica:onboard` once, which removes it. Do not use that token.
|
|
21
20
|
|
|
22
|
-
If
|
|
21
|
+
If `appId` or `orgId` is empty, stop and tell the user:
|
|
23
22
|
"Run `/syntica:onboard` first to set up your project."
|
|
24
23
|
|
|
25
|
-
**
|
|
24
|
+
**Sign in:** call `org_authenticate` (no arguments). It returns
|
|
25
|
+
`{ userId, orgId, userName, orgName, platformRole }` when you are signed in. The Syntica MCP
|
|
26
|
+
server holds the session itself and adds it to every call — never read or write its credentials
|
|
27
|
+
file, and never pass a `token` argument to any tool.
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
If it fails with a 401 ("not signed in", or an expired session), sign in again:
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
{ "token": "<new token>", "orgId": "<orgId>" }
|
|
35
|
-
JSON
|
|
36
|
-
)
|
|
37
|
-
```
|
|
38
|
-
If the write fails, warn the user and carry on with the new token in memory for this run.
|
|
39
|
-
3. If it fails: warn the user — "Could not refresh your session token. If API calls fail with an auth error, run `/syntica:onboard` to sign in again."
|
|
31
|
+
1. Ask the user for their email address and call `org_request_otp` with `{ "email": "<email>" }`.
|
|
32
|
+
2. Ask the user for the code from that email and call `org_verify_otp` with
|
|
33
|
+
`{ "email": "<email>", "code": "<code>" }`.
|
|
34
|
+
3. If it returns `pendingOrgSelection: true` with an `orgs` list, use the AskUserQuestion tool to
|
|
35
|
+
ask which organisation, then call `org_select` with `{ "orgId": "<chosen orgId>" }`.
|
|
40
36
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Do **not** call `org_authenticate` here. The token will be validated by the first real API call; if it is expired the call will return an error, at which point tell the user: "Your session has expired. Run `/syntica:onboard` to sign in again."
|
|
37
|
+
Do not try to refresh the session by hand — refresh is automatic. Any later call that fails
|
|
38
|
+
with a 401 means the session has ended: run this sign-in again, then retry the call.
|
|
44
39
|
|
|
45
40
|
---
|
|
46
41
|
|
|
@@ -74,7 +69,6 @@ If the push fails, report the error and stop — do not trigger a deploy with st
|
|
|
74
69
|
Call `org_deploy` with:
|
|
75
70
|
```json
|
|
76
71
|
{
|
|
77
|
-
"token": "<token>",
|
|
78
72
|
"applicationId": "<appId>",
|
|
79
73
|
"environment": "<environment>",
|
|
80
74
|
"branch": "<current branch>"
|
|
@@ -91,7 +85,7 @@ Tell the user: "Deployment started (build ID: <buildId>). Polling for status…"
|
|
|
91
85
|
|
|
92
86
|
Call `org_deploy_status` every 15 seconds with:
|
|
93
87
|
```json
|
|
94
|
-
{ "
|
|
88
|
+
{ "buildId": "<buildId>" }
|
|
95
89
|
```
|
|
96
90
|
|
|
97
91
|
The response `data.status` is one of: `pending` | `running` | `success` | `failed` | `cancelled`.
|
|
@@ -111,7 +105,6 @@ Continue polling until status is `success`, `failed`, or `cancelled`.
|
|
|
111
105
|
Call `app_services_list` with:
|
|
112
106
|
```json
|
|
113
107
|
{
|
|
114
|
-
"token": "<token>",
|
|
115
108
|
"applicationId": "<appId>",
|
|
116
109
|
"environment": "<environment>"
|
|
117
110
|
}
|
|
@@ -160,7 +153,7 @@ payload carries `environment` and a `tiers` array of the selectable tiers.
|
|
|
160
153
|
|
|
161
154
|
Do not guess a tier. Use the AskUserQuestion tool to have the user choose from
|
|
162
155
|
`tiers` (show `name`, and `instanceType`/`storageGb` where present), then call
|
|
163
|
-
`app_set_node_tier` with `{
|
|
156
|
+
`app_set_node_tier` with `{ applicationId, environment, nodeTierId }` and
|
|
164
157
|
retry the deploy once.
|
|
165
158
|
|
|
166
159
|
If `tiers` is empty, tell the user no tier is available for their plan and stop —
|
|
@@ -11,41 +11,44 @@ Maintenance operations on syntica. Today this covers **view billing**, **delete*
|
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
## Step 1 — Load config
|
|
14
|
+
## Step 1 — Load config and sign in
|
|
15
15
|
|
|
16
|
-
Read
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
Read `.syntica/config.json` (project state) if it exists. It holds no token — see
|
|
17
|
+
`/syntica:onboard` (#488). If it still has a `token` field, or a `.vibetocloud.json` file exists
|
|
18
|
+
in the project root, it is an older setup that left a session token in the repository: tell the
|
|
19
|
+
user to run `/syntica:onboard` once, which removes it. Do not use that token.
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
`
|
|
22
|
-
|
|
21
|
+
**Sign in:** call `org_authenticate` (no arguments). It returns
|
|
22
|
+
`{ userId, orgId, userName, orgName, platformRole }` when you are signed in. The Syntica MCP
|
|
23
|
+
server holds the session itself and adds it to every call — never read or write its credentials
|
|
24
|
+
file, and never pass a `token` argument to any tool.
|
|
23
25
|
|
|
24
|
-
If
|
|
25
|
-
"Run `/syntica:onboard` first to set up your project."
|
|
26
|
+
If it fails with a 401 ("not signed in", or an expired session), sign in again:
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
1. Ask the user for their email address and call `org_request_otp` with `{ "email": "<email>" }`.
|
|
29
|
+
2. Ask the user for the code from that email and call `org_verify_otp` with
|
|
30
|
+
`{ "email": "<email>", "code": "<code>" }`.
|
|
31
|
+
3. If it returns `pendingOrgSelection: true` with an `orgs` list, use the AskUserQuestion tool to
|
|
32
|
+
ask which organisation, then call `org_select` with `{ "orgId": "<chosen orgId>" }`.
|
|
33
|
+
|
|
34
|
+
Do not try to refresh the session by hand — refresh is automatic. Any later call that fails
|
|
35
|
+
with a 401 means the session has ended: run this sign-in again, then retry the call.
|
|
36
|
+
|
|
37
|
+
Use the `orgId` returned by `org_authenticate` (or `org_verify_otp` / `org_select`) for every
|
|
38
|
+
call below that takes one.
|
|
28
39
|
|
|
29
40
|
### If the user has more than one organisation
|
|
30
41
|
|
|
31
|
-
The
|
|
32
|
-
not switch — the
|
|
42
|
+
The session is scoped to **one** organisation. Passing a different `orgId` to a tool does
|
|
43
|
+
not switch — the session is what authorises, so the call is refused.
|
|
33
44
|
|
|
34
45
|
When the user mentions another organisation, asks what they have access to, or wants something
|
|
35
46
|
created somewhere other than the current org:
|
|
36
47
|
|
|
37
48
|
1. `org_list_orgs` — the organisations this user belongs to.
|
|
38
49
|
2. Ask which one they mean, unless they have already said.
|
|
39
|
-
3. `org_select` with that
|
|
40
|
-
|
|
41
|
-
them for the rest of the session:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
(umask 077 && cat > ~/.syntica/credentials.json <<'JSON'
|
|
45
|
-
{"token":"<new token>","userId":"<userId>","orgId":"<new orgId>"}
|
|
46
|
-
JSON
|
|
47
|
-
)
|
|
48
|
-
```
|
|
50
|
+
3. `org_select` with `{ "orgId": "<that orgId>" }` — the MCP switches the session to it. Use
|
|
51
|
+
that `orgId` for the rest of the session.
|
|
49
52
|
|
|
50
53
|
Tell the user which organisation you switched to. A switch is sticky: everything afterwards,
|
|
51
54
|
including anything `.syntica/config.json` refers to, belongs to the new org, so check the app
|
|
@@ -82,14 +85,14 @@ Read-only — this never changes anything.
|
|
|
82
85
|
|
|
83
86
|
Changing an environment's node tier changes the instance size **and the monthly cost**. This adjusts billing on an existing card (Pay-as-you-go) — no new card entry — so it's safe to do here with a cost confirmation. The free plan only has the free tier; bigger sizes need Pay-as-you-go.
|
|
84
87
|
|
|
85
|
-
1. **Identify** the app (call `app_list` with `{
|
|
88
|
+
1. **Identify** the app (call `app_list` with `{ orgId }` if unclear) and the environment (`dev`/`staging`/`production`).
|
|
86
89
|
|
|
87
|
-
2. **List tiers.** Call `app_list_node_tiers` with `{
|
|
90
|
+
2. **List tiers.** Call `app_list_node_tiers` with `{ orgId }`. It returns the available tiers (name, instance type, storage, price) and the org's plan key.
|
|
88
91
|
- If the plan is `free`: tell the user only the free tier is available and larger sizes require Pay-as-you-go — point them at **Enable an environment or change billing** — then stop.
|
|
89
92
|
|
|
90
93
|
3. **Confirm the cost.** Use the AskUserQuestion tool with options `["Yes — resize", "No — cancel"]` to ask: "Resize <app>/<env> to <tier> at €X/mo? This changes your bill." Show the chosen tier's monthly price. If the user cancels, stop.
|
|
91
94
|
|
|
92
|
-
4. **Set the tier.** Call `app_set_node_tier` with `{
|
|
95
|
+
4. **Set the tier.** Call `app_set_node_tier` with `{ applicationId, environment, nodeTierId }`.
|
|
93
96
|
|
|
94
97
|
5. **Explain when it takes effect.** The new size is applied to the instance on the **next deploy**. For an immediate change on a running instance, offer to: `app_stop_instance` → `app_reprovision_instance` (keeps the data volume) → `app_start_instance`, then redeploy — and warn this causes brief downtime.
|
|
95
98
|
|
|
@@ -113,7 +116,7 @@ Then tell them what to do there:
|
|
|
113
116
|
|
|
114
117
|
## Delete an application
|
|
115
118
|
|
|
116
|
-
1. **Identify the app.** If the target is not obvious, call `app_list` with `{
|
|
119
|
+
1. **Identify the app.** If the target is not obvious, call `app_list` with `{ orgId }` and use the AskUserQuestion tool to let the user pick which application to delete (show `name`). Never guess — deletion is destructive.
|
|
117
120
|
|
|
118
121
|
2. **Show the disclaimer** verbatim, filling in the app name:
|
|
119
122
|
|
|
@@ -125,7 +128,7 @@ Then tell them what to do there:
|
|
|
125
128
|
|
|
126
129
|
3. **Confirm.** Use the AskUserQuestion tool with options `["Yes — delete it", "No — cancel"]` to ask: "Delete application <name>? This can be undone within ~30 days." If the user cancels, stop and confirm nothing was changed.
|
|
127
130
|
|
|
128
|
-
4. **Delete.** Call `app_delete` with `{
|
|
131
|
+
4. **Delete.** Call `app_delete` with `{ applicationId }`.
|
|
129
132
|
|
|
130
133
|
5. **Report.** On success tell the user: "🗑️ **<name>** deleted. Restore it within ~30 days with `/syntica:manage` → Restore; after that it is permanently purged." If the call fails, show the error and stop.
|
|
131
134
|
|
|
@@ -133,13 +136,13 @@ Then tell them what to do there:
|
|
|
133
136
|
|
|
134
137
|
## Restore a deleted application
|
|
135
138
|
|
|
136
|
-
1. **List deleted apps.** Call `app_list_deleted` with `{
|
|
139
|
+
1. **List deleted apps.** Call `app_list_deleted` with `{ orgId }`. Each entry has `name`, `id`, `deletedAt`, and `approxDaysLeftToRestore`.
|
|
137
140
|
|
|
138
141
|
- If the list is empty, tell the user: "You have no deleted applications to restore." and stop.
|
|
139
142
|
|
|
140
143
|
2. **Pick one.** Use the AskUserQuestion tool to let the user choose which to restore, showing each `name` with its `approxDaysLeftToRestore` (e.g. "my-app — ~12 days left"). Warn on any with a low or zero count that they may already be past the window.
|
|
141
144
|
|
|
142
|
-
3. **Restore.** Call `app_restore` with `{
|
|
145
|
+
3. **Restore.** Call `app_restore` with `{ applicationId }` for the chosen app.
|
|
143
146
|
|
|
144
147
|
4. **Report.**
|
|
145
148
|
- On success: "♻️ **<name>** restored." (The repository and app are back; redeploy with `/syntica:deploy` if needed.)
|
|
@@ -150,7 +153,7 @@ Then tell them what to do there:
|
|
|
150
153
|
|
|
151
154
|
## Rename an application
|
|
152
155
|
|
|
153
|
-
1. **Identify the app.** If not obvious, call `app_list` with `{
|
|
156
|
+
1. **Identify the app.** If not obvious, call `app_list` with `{ orgId }` and let the user pick.
|
|
154
157
|
|
|
155
158
|
2. **Get the new name.** Ask the user for the new name if not already given. It must be lowercase letters, numbers and hyphens only, and unique in the org.
|
|
156
159
|
|
|
@@ -160,7 +163,7 @@ Then tell them what to do there:
|
|
|
160
163
|
|
|
161
164
|
4. **Confirm.** Use the AskUserQuestion tool with options `["Yes — rename it", "No — cancel"]` to ask: "Rename <old name> to <new name>? Existing clone remotes will break."
|
|
162
165
|
|
|
163
|
-
5. **Rename.** Call `app_rename` with `{
|
|
166
|
+
5. **Rename.** Call `app_rename` with `{ applicationId, name }`.
|
|
164
167
|
|
|
165
168
|
6. **Report.** On success show the new `cloneUrl` returned by the tool and tell the user to update any local remote:
|
|
166
169
|
```bash
|
|
@@ -15,44 +15,41 @@ The Syntica MCP server must be configured in your agent. If the MCP tools are no
|
|
|
15
15
|
|
|
16
16
|
## Step 1 — Check existing auth
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
The Syntica MCP server holds your session itself, in a file only it reads and writes. Never
|
|
19
|
+
read, write, move or print that file, and never pass a `token` argument to a tool — the MCP adds
|
|
20
|
+
the session to every call. Project state (which app, which environment, which remote) lives in
|
|
21
|
+
`.syntica/config.json` in the repo, and it never holds a token: the project directory is the one
|
|
22
|
+
an agent reads on every invocation, so a token sitting in it is one prompt-injected "read this
|
|
23
|
+
file" away from being exfiltrated (#488).
|
|
23
24
|
|
|
24
25
|
**Migrating from the old `.vibetocloud` path structure:** this skill used to read and write
|
|
25
|
-
|
|
26
|
-
does
|
|
27
|
-
```bash
|
|
28
|
-
mkdir -p ~/.syntica && chmod 700 ~/.syntica
|
|
29
|
-
mv ~/.vibetocloud/credentials.json ~/.syntica/credentials.json
|
|
30
|
-
```
|
|
31
|
-
Likewise, if `.syntica/config.json` does not exist but `.vibetocloud/config.json` does, move it
|
|
32
|
-
with the Bash tool (`mkdir -p .syntica && mv .vibetocloud/config.json .syntica/config.json`) and
|
|
26
|
+
`.vibetocloud/config.json`. If `.syntica/config.json` does not exist but `.vibetocloud/config.json`
|
|
27
|
+
does, move it with the Bash tool (`mkdir -p .syntica && mv .vibetocloud/config.json .syntica/config.json`) and
|
|
33
28
|
add `.syntica/` to `.gitignore` if it is not already covered. Leave `.vibetocloud/` itself alone
|
|
34
29
|
if anything else remains in it. Running this skill again later re-does this check, so a user who
|
|
35
|
-
still has an environment with the old path structure is caught the next time they onboard.
|
|
30
|
+
still has an environment with the old path structure is caught the next time they onboard. An
|
|
31
|
+
older session file outside the project needs no migration — the MCP picks it up on its own.
|
|
36
32
|
|
|
37
|
-
Read
|
|
38
|
-
|
|
33
|
+
Read `.syntica/config.json` if it exists — that is where `appId`, `environment` and `remote`
|
|
34
|
+
come from.
|
|
39
35
|
|
|
40
|
-
**
|
|
41
|
-
|
|
36
|
+
**Removing a token from the repository:** older versions of this skill and of the MCP tools
|
|
37
|
+
wrote the session token into the project. If either is present, remove it — do **not** copy the
|
|
38
|
+
token anywhere, the user signs in again below instead:
|
|
42
39
|
|
|
43
|
-
1.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
3.
|
|
47
|
-
|
|
48
|
-
ever pushed while the token was in it
|
|
40
|
+
1. If `.syntica/config.json` contains a `token` field, remove that field (keep every other field)
|
|
41
|
+
and write the file back.
|
|
42
|
+
2. If a `.vibetocloud.json` file exists in the project root, delete it.
|
|
43
|
+
3. Make sure `.gitignore` lists `.vibetocloud.json` (see below).
|
|
44
|
+
4. Tell the user: "Removed an old session token from the project directory — please sign in
|
|
45
|
+
again. If that repository was ever pushed while the token was in it, treat that token as
|
|
46
|
+
exposed."
|
|
49
47
|
|
|
50
|
-
Then:
|
|
48
|
+
Then call `org_authenticate` (no arguments):
|
|
51
49
|
|
|
52
|
-
- If
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- If no token is available: proceed to authenticate below.
|
|
50
|
+
- If it returns `{ userId, orgId, userName, orgName, platformRole }`: you are signed in — skip to
|
|
51
|
+
**Step 2**, using that `orgId` unless `.syntica/config.json` already names one.
|
|
52
|
+
- If it fails with a 401 ("not signed in", or an expired session): proceed to authenticate below.
|
|
56
53
|
|
|
57
54
|
**Authenticate:**
|
|
58
55
|
|
|
@@ -120,31 +117,17 @@ If the call fails, tell the user the error and stop.
|
|
|
120
117
|
|
|
121
118
|
**After successful verify (both flows):**
|
|
122
119
|
|
|
123
|
-
On success the response contains `{
|
|
124
|
-
|
|
125
|
-
**Write the credentials outside the project.** Use the Bash tool, not the Write tool — `umask 077`
|
|
126
|
-
creates the file already private, where writing it first and `chmod`-ing after leaves a window in
|
|
127
|
-
which it is world-readable:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
mkdir -p ~/.syntica && chmod 700 ~/.syntica
|
|
131
|
-
(umask 077 && cat > ~/.syntica/credentials.json <<'JSON'
|
|
132
|
-
{
|
|
133
|
-
"token": "<token from response>",
|
|
134
|
-
"orgId": "<orgId from response>"
|
|
135
|
-
}
|
|
136
|
-
JSON
|
|
137
|
-
)
|
|
138
|
-
```
|
|
120
|
+
On success the response contains `{ userId, orgId, userName, orgName }` — no token; the MCP has
|
|
121
|
+
stored the session itself.
|
|
139
122
|
|
|
140
|
-
If
|
|
141
|
-
|
|
142
|
-
|
|
123
|
+
If it instead returns `pendingOrgSelection: true` with an `orgs` list, the account belongs to more
|
|
124
|
+
than one organisation. Use the AskUserQuestion tool to ask which one (show each `name`), then
|
|
125
|
+
call `org_select` with `{ "orgId": "<chosen orgId>" }`. Use that `orgId` from here on.
|
|
143
126
|
|
|
144
127
|
Write `.syntica/config.json` using the Write tool — project state only, **no token**:
|
|
145
128
|
```json
|
|
146
129
|
{
|
|
147
|
-
"orgId": "<orgId from response>",
|
|
130
|
+
"orgId": "<orgId from the response, or the one chosen with org_select>",
|
|
148
131
|
"appId": "",
|
|
149
132
|
"environment": "",
|
|
150
133
|
"remote": ""
|
|
@@ -163,7 +146,7 @@ Tell the user: "Welcome, <userName>! You're signed in to org <orgName>."
|
|
|
163
146
|
|
|
164
147
|
Call `app_list` with:
|
|
165
148
|
```json
|
|
166
|
-
{ "
|
|
149
|
+
{ "orgId": "<orgId>" }
|
|
167
150
|
```
|
|
168
151
|
|
|
169
152
|
Build an options list from the response: one option per existing app (label = app name), plus a final option `"Create new app"`.
|
|
@@ -175,7 +158,7 @@ Use the AskUserQuestion tool with those options to ask:
|
|
|
175
158
|
|
|
176
159
|
**If "Create new app":** ask the user for a name (lowercase letters, numbers and hyphens only — suggest the current directory name lowercased with spaces replaced by hyphens). Call `app_create` with:
|
|
177
160
|
```json
|
|
178
|
-
{ "
|
|
161
|
+
{ "name": "<app name>", "orgId": "<orgId>" }
|
|
179
162
|
```
|
|
180
163
|
|
|
181
164
|
The response contains `{ id, name, gitUrl, ... }`. Save `id` as `appId` and `gitUrl` in `.syntica/config.json`.
|
|
@@ -231,12 +214,11 @@ This is a **paid** capability. If it is not on the org's subscription every call
|
|
|
231
214
|
|
|
232
215
|
A repository connection stores the credential for a **host**, and applications are then bound to a path on that host. Create the connection first; it is reusable for every repository on that host.
|
|
233
216
|
|
|
234
|
-
**1. Look for an existing connection.** Call `org_list_git_connections` with `{ "
|
|
217
|
+
**1. Look for an existing connection.** Call `org_list_git_connections` with `{ "orgId": "<orgId>" }`. Match one on the host of their `origin` URL.
|
|
235
218
|
|
|
236
219
|
**2. If none matches, create one.** Call `org_add_git_connection`:
|
|
237
220
|
```json
|
|
238
221
|
{
|
|
239
|
-
"token": "<token>",
|
|
240
222
|
"orgId": "<orgId>",
|
|
241
223
|
"url": "https://<host from their origin>",
|
|
242
224
|
"username": "<see below>",
|
|
@@ -252,7 +234,6 @@ Ask the user for a read-scoped token. The `username` is provider-specific and ge
|
|
|
252
234
|
**3. Bind the application.** Call `app_set_upstream`:
|
|
253
235
|
```json
|
|
254
236
|
{
|
|
255
|
-
"token": "<token>",
|
|
256
237
|
"applicationId": "<appId>",
|
|
257
238
|
"connectionId": "<id from step 1 or 2>",
|
|
258
239
|
"path": "<owner/repo within that host>",
|
|
@@ -379,7 +360,6 @@ If any variables remain unaccounted for, tell the user which ones, then use the
|
|
|
379
360
|
If Yes, collect the values one at a time as `NAME=value`. For each, ask whether it is sensitive, then call `app_create_config` with:
|
|
380
361
|
```json
|
|
381
362
|
{
|
|
382
|
-
"token": "<token>",
|
|
383
363
|
"applicationId": "<appId>",
|
|
384
364
|
"kind": "value",
|
|
385
365
|
"scope": "app_env",
|
|
@@ -522,7 +502,7 @@ If all checks pass with no issues, tell the user: "✅ Pre-flight check passed
|
|
|
522
502
|
An environment needs a node tier before it can be deployed. Ask; never pick one
|
|
523
503
|
silently — the tier decides what the customer is billed.
|
|
524
504
|
|
|
525
|
-
Call `app_list_node_tiers` with `{ "
|
|
505
|
+
Call `app_list_node_tiers` with `{ "orgId": "<orgId>" }`.
|
|
526
506
|
|
|
527
507
|
- If `mustAsk` is `false` (free plan), the free tier is the only option. Set it
|
|
528
508
|
without asking and tell the user which one you used.
|
|
@@ -535,7 +515,6 @@ Call `app_list_node_tiers` with `{ "token": "<token>", "orgId": "<orgId>" }`.
|
|
|
535
515
|
Then call `app_set_node_tier`:
|
|
536
516
|
```json
|
|
537
517
|
{
|
|
538
|
-
"token": "<token>",
|
|
539
518
|
"applicationId": "<appId>",
|
|
540
519
|
"environment": "<environment>",
|
|
541
520
|
"nodeTierId": "<id the user chose>"
|