passport-bridge 0.53.0 → 0.55.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/cliHookDecide.js +3 -1
- package/dist/cliHookParse.js +5 -1
- package/dist/connectorKit/cli.generated.d.ts +2 -0
- package/dist/connectorKit/cli.generated.js +80 -6
- package/dist/connectorKit/cliTree.generated.d.ts +92 -0
- package/dist/connectorKit/cliTree.generated.js +134 -0
- package/dist/connectorKit/engine.generated.js +27 -6
- package/dist/connectorKit/manifest.generated.d.ts +5 -0
- package/dist/connectorKit/manifests/railwayCapture.generated.d.ts +5 -0
- package/dist/connectorKit/manifests/railwayCapture.generated.js +50 -5
- package/dist/connectorKit/manifests/railwayCommands.generated.d.ts +17 -0
- package/dist/connectorKit/manifests/railwayCommands.generated.js +268 -0
- package/dist/connectorKit/manifests/supabase.generated.js +6 -1
- package/dist/connectorKit/manifests/supabaseCli.generated.d.ts +3 -1
- package/dist/connectorKit/manifests/supabaseCli.generated.js +91 -2
- package/dist/connectorKit/pgParser.d.ts +8 -6
- package/dist/connectorKit/pgParser.js +16 -9
- package/dist/connectorKit/sources/railway/cli-tree.generated.d.ts +139 -0
- package/dist/connectorKit/sources/railway/cli-tree.generated.js +2 -0
- package/dist/connectorKit/sources/supabase/cli-flags.generated.d.ts +479 -192
- package/dist/connectorKit/sources/supabase/cli-flags.generated.js +1 -1
- package/dist/connectorKit/surfaces.generated.d.ts +81 -0
- package/dist/connectorKit/surfaces.generated.js +122 -0
- package/dist/connectorKit/types.generated.d.ts +2 -0
- package/dist/controlPlaneSupabase.d.ts +9 -3
- package/dist/controlPlaneSupabase.js +18 -3
- package/dist/controlPlaneUnnamed.generated.d.ts +10 -1
- package/dist/controlPlaneUnnamed.generated.js +6 -0
- package/dist/pluginPin.d.ts +1 -1
- package/dist/pluginPin.js +1 -1
- package/dist/psqlSupabase.d.ts +14 -6
- package/dist/psqlSupabase.js +24 -7
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/npm-shrinkwrap.json +19 -3
- package/package.json +3 -2
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { BILLING, MAY_OUTAGE, OUTAGE, PUBLIC_DATA, RUN } from "../callEffects.generated.js";
|
|
2
|
+
/**
|
|
3
|
+
* What each Railway CLI command (5.70.0, `sources/railway/cli-tree.json`) does that no hand rule in
|
|
4
|
+
* `railwayCapture.ts` names (docs/design/zero-unknowns.md). Drafted from the tree's own summaries on 2026-11-28 and
|
|
5
|
+
* reviewed line by line; `cliTree.test.ts` fails on a pinned command with no entry. An `other` entry is the
|
|
6
|
+
* project's "Other change" with these effects (kind and impact follow them), so it is named, ruled and shown
|
|
7
|
+
* without a catalog action of its own; a command worth its own action moves to a hand rule.
|
|
8
|
+
*/
|
|
9
|
+
const SERVICE = { verb: "change", object: "service" };
|
|
10
|
+
const NEW_SERVICE = { verb: "create", object: "service" };
|
|
11
|
+
const GONE_SERVICE = { verb: "delete", object: "service" };
|
|
12
|
+
const DATA_CHANGE = { verb: "change", object: "data" };
|
|
13
|
+
const DATA_GONE = { verb: "delete", object: "data" };
|
|
14
|
+
const DATA_IN = { verb: "create", object: "data" };
|
|
15
|
+
const ACCESS_IN = { verb: "create", object: "access" };
|
|
16
|
+
const ACCESS_GONE = { verb: "delete", object: "access" };
|
|
17
|
+
const KEYS_READ = { verb: "read", object: "access" };
|
|
18
|
+
const RECORD_GONE = { verb: "delete", object: "record" };
|
|
19
|
+
const RECORD_CHANGE = { verb: "change", object: "record" };
|
|
20
|
+
const CODE_PUBLIC = { verb: "change", object: "code", audience: "public" };
|
|
21
|
+
const read = (why) => ({ read: why });
|
|
22
|
+
const local = (why) => ({ local: why });
|
|
23
|
+
const project = (summary, ...effects) => ({ other: summary, effects, on: "project" });
|
|
24
|
+
const service = (summary, ...effects) => ({ other: summary, effects, on: "service" });
|
|
25
|
+
const env = (summary, ...effects) => ({ other: summary, effects, on: "environment" });
|
|
26
|
+
/** Where an overlay command lands: the hook that places it, and the words its summary uses for that place. */
|
|
27
|
+
export const RAILWAY_OVERLAY_PLACES = {
|
|
28
|
+
project: { hook: "project", where: "{project}" },
|
|
29
|
+
environment: { hook: "project", where: "{project}" },
|
|
30
|
+
service: { hook: "service", where: "{where}" }
|
|
31
|
+
};
|
|
32
|
+
const SHOWS = "Shows or lists; changes nothing on Railway";
|
|
33
|
+
const THIS_COMPUTER = "changes this computer's setup, nothing on Railway";
|
|
34
|
+
/** A managed database's high-availability and point-in-time recovery commands (Postgres, MySQL, Redis). */
|
|
35
|
+
function database(engine) {
|
|
36
|
+
const name = { postgres: "Postgres", mysql: "MySQL", redis: "Redis" }[engine];
|
|
37
|
+
const ha = {
|
|
38
|
+
[`${engine} ha convert`]: service(`Convert {where} to a ${name} HA cluster`, SERVICE, MAY_OUTAGE),
|
|
39
|
+
[`${engine} ha revert`]: service(`Revert {where} from a ${name} HA cluster`, SERVICE, MAY_OUTAGE),
|
|
40
|
+
[`${engine} ha scale`]: service(`Scale the ${name} HA cluster of {where}`, SERVICE),
|
|
41
|
+
[`${engine} ha status`]: read(SHOWS),
|
|
42
|
+
[`${engine} ha switchover`]: service(`Promote a ${name} replica of {where} to primary`, OUTAGE),
|
|
43
|
+
[`${engine} history`]: read("Shows this computer's own log of database operations")
|
|
44
|
+
};
|
|
45
|
+
if (engine === "redis")
|
|
46
|
+
return ha;
|
|
47
|
+
return {
|
|
48
|
+
...ha,
|
|
49
|
+
[`${engine} pitr backup create`]: service(`Back up the ${name} database of {where}`, DATA_IN),
|
|
50
|
+
[`${engine} pitr backup delete`]: service(`Delete ${name} backups of {where}`, DATA_GONE),
|
|
51
|
+
[`${engine} pitr backup list`]: read(SHOWS),
|
|
52
|
+
[`${engine} pitr backup lock`]: service(`Keep a ${name} backup of {where} indefinitely`, DATA_CHANGE),
|
|
53
|
+
[`${engine} pitr backup restore`]: service(`Restore a ${name} backup into {where}`, DATA_CHANGE, MAY_OUTAGE),
|
|
54
|
+
[`${engine} pitr cancel`]: service(`Cancel a ${name} recovery workflow on {where}`, SERVICE),
|
|
55
|
+
[`${engine} pitr clear`]: service(`Clear a ${name} recovery workflow's progress on {where}`, SERVICE),
|
|
56
|
+
[`${engine} pitr disable`]: service(`Turn off point-in-time recovery for {where}`, {
|
|
57
|
+
...DATA_CHANGE,
|
|
58
|
+
disrupts: true
|
|
59
|
+
}),
|
|
60
|
+
[`${engine} pitr enable`]: service(`Turn on point-in-time recovery for {where}`, DATA_CHANGE),
|
|
61
|
+
[`${engine} pitr progress`]: read(SHOWS),
|
|
62
|
+
[`${engine} pitr restore`]: service(`Restore {where} to a point in time into a new service`, NEW_SERVICE, DATA_IN),
|
|
63
|
+
[`${engine} pitr schedule list`]: read(SHOWS),
|
|
64
|
+
[`${engine} pitr schedule set`]: service(`Change the ${name} backup schedule of {where}`, DATA_CHANGE),
|
|
65
|
+
[`${engine} pitr status`]: read(SHOWS)
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** Files on a service's or a volume's disk. */
|
|
69
|
+
function files(kind) {
|
|
70
|
+
const on = kind === "service" ? service : env;
|
|
71
|
+
const where = kind === "service" ? "{where}" : "a volume in {where}";
|
|
72
|
+
return {
|
|
73
|
+
[`${kind} files browse`]: read("Browses files interactively; changes nothing"),
|
|
74
|
+
[`${kind} files delete`]: on(`Delete a file on ${where}`, DATA_GONE),
|
|
75
|
+
[`${kind} files download`]: read("Downloads files to this computer"),
|
|
76
|
+
[`${kind} files list`]: read(SHOWS),
|
|
77
|
+
[`${kind} files rename`]: on(`Rename a file on ${where}`, DATA_CHANGE),
|
|
78
|
+
[`${kind} files upload`]: on(`Upload files to ${where}`, DATA_IN)
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export const RAILWAY_COMMANDS = {
|
|
82
|
+
// Railway's agent changes whatever it decides to: settings, and maybe a deploy.
|
|
83
|
+
agent: project("Ask Railway's agent to work on {where}", SERVICE, { ...RUN, possible: true }),
|
|
84
|
+
"api describe": read("Describes Railway's GraphQL schema"),
|
|
85
|
+
"api schema": read("Prints Railway's GraphQL schema"),
|
|
86
|
+
"api search": read("Searches Railway's GraphQL schema"),
|
|
87
|
+
"autoupdate disable": local(THIS_COMPUTER),
|
|
88
|
+
"autoupdate enable": local(THIS_COMPUTER),
|
|
89
|
+
"autoupdate skip": local(THIS_COMPUTER),
|
|
90
|
+
"autoupdate status": local(THIS_COMPUTER),
|
|
91
|
+
// Shows the bucket's S3 keys; with --reset it rolls them (every client using the old ones stops working).
|
|
92
|
+
"bucket credentials": env("Show or reset S3 credentials of a bucket in {where}", KEYS_READ, {
|
|
93
|
+
...ACCESS_GONE,
|
|
94
|
+
possible: true
|
|
95
|
+
}),
|
|
96
|
+
"bucket info": read(SHOWS),
|
|
97
|
+
"bucket rename": env("Rename a bucket in {where}", SERVICE),
|
|
98
|
+
// Cloud agents: VMs Railway runs and bills for.
|
|
99
|
+
ca: project("Open Railway's cloud agents for {where}", { ...NEW_SERVICE, possible: true }, { ...RUN, possible: true }),
|
|
100
|
+
"ca bootstrap default": env("Choose the default bootstrap for cloud agents in {where}", SERVICE),
|
|
101
|
+
"ca bootstrap list": read(SHOWS),
|
|
102
|
+
"ca bootstrap save": env("Save a cloud agent VM as a bootstrap in {where}", DATA_IN),
|
|
103
|
+
"ca create": env("Create a cloud agent VM in {where}", NEW_SERVICE, BILLING),
|
|
104
|
+
"ca delete": env("Delete a cloud agent and its disk in {where}", GONE_SERVICE, DATA_GONE),
|
|
105
|
+
"ca desktop": env("Connect a desktop coding app to a cloud agent in {where}", RUN),
|
|
106
|
+
"ca herdr agents": env("Connect, sleep, wake or delete a cloud agent in {where}", SERVICE, {
|
|
107
|
+
...GONE_SERVICE,
|
|
108
|
+
possible: true
|
|
109
|
+
}),
|
|
110
|
+
"ca herdr bootstrap": env("Prepare a cloud agent VM for herdr in {where}", SERVICE, RUN),
|
|
111
|
+
"ca herdr install": local("registers a plugin in a local app"),
|
|
112
|
+
"ca herdr new": env("Create a cloud agent in {where}", NEW_SERVICE, BILLING),
|
|
113
|
+
"ca herdr sync": local("reconciles a local app's saved machines"),
|
|
114
|
+
"ca herdr watch": read("Follows cloud agent state; changes nothing on Railway"),
|
|
115
|
+
"ca list": read(SHOWS),
|
|
116
|
+
"ca manage": project("Open the cloud agents manager for {where}", { ...SERVICE, possible: true }),
|
|
117
|
+
"ca setup": local("saves how cloud agents launch from this computer"),
|
|
118
|
+
"ca sleep": env("Put a cloud agent to sleep in {where}", OUTAGE),
|
|
119
|
+
"ca ssh": env("Open SSH into a cloud agent in {where}", RUN),
|
|
120
|
+
"ca start": env("Launch a coding agent on a cloud agent VM in {where}", RUN),
|
|
121
|
+
"ca wake": env("Wake a cloud agent in {where}", SERVICE),
|
|
122
|
+
"cdn disable": service("Turn off CDN caching for {where}", SERVICE),
|
|
123
|
+
"cdn enable": service("Turn on CDN caching for {where}", SERVICE),
|
|
124
|
+
"cdn purge": service("Purge the CDN cache of {where}", SERVICE),
|
|
125
|
+
"cdn status": read(SHOWS),
|
|
126
|
+
"cdn update": service("Change CDN caching settings of {where}", SERVICE),
|
|
127
|
+
check_updates: local(THIS_COMPUTER),
|
|
128
|
+
code: project("Launch a coding agent on a cloud agent VM for {where}", { ...NEW_SERVICE, possible: true }, RUN),
|
|
129
|
+
"code get-config": read("Shows connection details saved on this computer"),
|
|
130
|
+
// Config as code: plan and pull only read; init and migrate write local files; cutover and partials change Railway.
|
|
131
|
+
"config init": local("writes an authoring file in this repository"),
|
|
132
|
+
"config migrate": local("rewrites railway.json or railway.toml as an authoring file"),
|
|
133
|
+
"config migrate cutover": env("Switch services in {where} off Config as Code", SERVICE),
|
|
134
|
+
"config migrate status": read(SHOWS),
|
|
135
|
+
"config migrate undo": env("Restore Config as Code paths in {where}", SERVICE),
|
|
136
|
+
"config partials list": read(SHOWS),
|
|
137
|
+
"config partials release": env("Release resources from a config partial in {where}", SERVICE),
|
|
138
|
+
"config partials transfer": env("Transfer resources between config partials in {where}", SERVICE),
|
|
139
|
+
"config plan": read("Previews changes; applies nothing"),
|
|
140
|
+
"config pull": local("writes the linked project's configuration into the authoring file"),
|
|
141
|
+
"cron list": read(SHOWS),
|
|
142
|
+
"cron run": service("Run the cron service {where} now", RUN),
|
|
143
|
+
"deployment list": read(SHOWS),
|
|
144
|
+
// Local development: services in containers on this computer.
|
|
145
|
+
dev: local("runs Railway services on this computer"),
|
|
146
|
+
"dev clean": local("removes local containers and their data"),
|
|
147
|
+
"dev configure": local("configures local services"),
|
|
148
|
+
"dev down": local("stops local services"),
|
|
149
|
+
"dev up": local("starts local services"),
|
|
150
|
+
"domain certificate retry": service("Retry the certificate of a domain on {where}", RECORD_CHANGE),
|
|
151
|
+
"domain list": read(SHOWS),
|
|
152
|
+
"domain status": read(SHOWS),
|
|
153
|
+
"domain update": service("Change a domain of {where}", RECORD_CHANGE, PUBLIC_DATA),
|
|
154
|
+
"environment config": read(SHOWS),
|
|
155
|
+
"environment edit": env("Edit the configuration of {where}", SERVICE, { ...RUN, when: "later", possible: true }),
|
|
156
|
+
"environment list": read(SHOWS),
|
|
157
|
+
// Feature flags read by the project's own apps: a change can switch their behavior for every user.
|
|
158
|
+
"flag delete": project("Delete a feature flag in {where}", { ...RECORD_GONE, disrupts: true, possible: true }),
|
|
159
|
+
"flag list": read(SHOWS),
|
|
160
|
+
"flag set": project("Change a feature flag in {where}", RECORD_CHANGE),
|
|
161
|
+
"flag unset": project("Remove a feature flag rule in {where}", RECORD_CHANGE),
|
|
162
|
+
"functions delete": env("Delete a function in {where}", GONE_SERVICE),
|
|
163
|
+
"functions link": local("links a function to this folder"),
|
|
164
|
+
"functions list": read(SHOWS),
|
|
165
|
+
"functions new": env("Add a function in {where}", NEW_SERVICE, RUN),
|
|
166
|
+
"functions pull": local("pulls a function's code to this folder"),
|
|
167
|
+
"functions push": env("Deploy a function in {where}", SERVICE, RUN),
|
|
168
|
+
mcp: local("serves or installs Railway's MCP server for local AI tools"),
|
|
169
|
+
"mcp install": local("writes MCP config into local AI tools"),
|
|
170
|
+
"mcp local": local("serves an MCP server over stdio"),
|
|
171
|
+
"mcp proxy": local("proxies Railway's MCP server over stdio"),
|
|
172
|
+
metrics: read(SHOWS),
|
|
173
|
+
...database("mysql"),
|
|
174
|
+
"outbound-network ipv6 disable": service("Stage turning off outbound IPv6 for {where}", SERVICE),
|
|
175
|
+
"outbound-network ipv6 enable": service("Stage turning on outbound IPv6 for {where}", SERVICE),
|
|
176
|
+
"outbound-network ipv6 status": read(SHOWS),
|
|
177
|
+
"outbound-network static-ip disable": service("Turn off static outbound IPs for {where}", {
|
|
178
|
+
...SERVICE,
|
|
179
|
+
disrupts: true,
|
|
180
|
+
possible: true
|
|
181
|
+
}),
|
|
182
|
+
"outbound-network static-ip enable": service("Turn on static outbound IPs for {where}", SERVICE, BILLING),
|
|
183
|
+
"outbound-network static-ip status": read(SHOWS),
|
|
184
|
+
"outbound-network status": read(SHOWS),
|
|
185
|
+
...database("postgres"),
|
|
186
|
+
"postgres pgbouncer add": service("Add PgBouncer in front of {where}", NEW_SERVICE),
|
|
187
|
+
"postgres pgbouncer configure": service("Configure PgBouncer for {where}", SERVICE, MAY_OUTAGE),
|
|
188
|
+
"postgres pgbouncer remove": service("Remove PgBouncer from {where}", GONE_SERVICE, MAY_OUTAGE),
|
|
189
|
+
"postgres pgbouncer scale": service("Scale PgBouncer for {where}", SERVICE),
|
|
190
|
+
"postgres pgbouncer status": read(SHOWS),
|
|
191
|
+
"private-network status": read(SHOWS),
|
|
192
|
+
"private-network update": service("Rename the private network endpoint of {where}", {
|
|
193
|
+
...SERVICE,
|
|
194
|
+
disrupts: true,
|
|
195
|
+
possible: true
|
|
196
|
+
}),
|
|
197
|
+
...database("redis"),
|
|
198
|
+
// Sandboxes: short-lived VMs in an environment.
|
|
199
|
+
"sandbox checkpoint create": env("Save a sandbox checkpoint in {where}", DATA_IN),
|
|
200
|
+
"sandbox checkpoint delete": env("Delete a sandbox checkpoint in {where}", DATA_GONE),
|
|
201
|
+
"sandbox checkpoint list": read(SHOWS),
|
|
202
|
+
"sandbox checkpoint rename": env("Rename a sandbox checkpoint in {where}", DATA_CHANGE),
|
|
203
|
+
"sandbox create": env("Create a sandbox in {where}", NEW_SERVICE, BILLING),
|
|
204
|
+
"sandbox destroy": env("Destroy a sandbox in {where}", GONE_SERVICE, DATA_GONE),
|
|
205
|
+
"sandbox exec": env("Run a command in a sandbox in {where}", RUN),
|
|
206
|
+
"sandbox fork": env("Fork a sandbox in {where}", NEW_SERVICE, BILLING),
|
|
207
|
+
"sandbox forward": env("Forward ports into a sandbox in {where}", { verb: "read", object: "data" }),
|
|
208
|
+
"sandbox list": read(SHOWS),
|
|
209
|
+
"sandbox ssh": env("Open SSH into a sandbox in {where}", RUN),
|
|
210
|
+
"sandbox template build": env("Build a sandbox template in {where}", RUN),
|
|
211
|
+
"sandbox template list": read("Lists templates this computer built"),
|
|
212
|
+
"sandbox template status": read(SHOWS),
|
|
213
|
+
...files("service"),
|
|
214
|
+
"service source connect": service("Connect {where} to a repository or image", SERVICE, {
|
|
215
|
+
...RUN,
|
|
216
|
+
when: "later",
|
|
217
|
+
possible: true
|
|
218
|
+
}),
|
|
219
|
+
"service source disconnect": service("Disconnect {where} from its source", SERVICE),
|
|
220
|
+
"setup agent": local("installs Railway skills and an MCP server into local editors"),
|
|
221
|
+
skills: local("installs Railway skills into local AI tools"),
|
|
222
|
+
"skills install": local("installs Railway skills into local AI tools"),
|
|
223
|
+
"skills remove": local("removes Railway skills from local AI tools"),
|
|
224
|
+
"ssh config": local("edits this computer's SSH config"),
|
|
225
|
+
"ssh config remove": local("edits this computer's SSH config"),
|
|
226
|
+
"ssh keys": read(SHOWS),
|
|
227
|
+
"ssh keys add": project("Register an SSH key with Railway", ACCESS_IN),
|
|
228
|
+
"ssh keys github": project("Import SSH keys from GitHub into Railway", ACCESS_IN),
|
|
229
|
+
"ssh keys list": read(SHOWS),
|
|
230
|
+
"ssh keys remove": project("Remove an SSH key from Railway", ACCESS_GONE),
|
|
231
|
+
starship: local("prints a shell prompt segment"),
|
|
232
|
+
"tcp-proxy status": read(SHOWS),
|
|
233
|
+
"telemetry disable": local(THIS_COMPUTER),
|
|
234
|
+
"telemetry enable": local(THIS_COMPUTER),
|
|
235
|
+
"telemetry status": local(THIS_COMPUTER),
|
|
236
|
+
// Templates: publishing one shows the project's setup to everyone in the marketplace.
|
|
237
|
+
"templates create": project("Create a template from {where}", { verb: "create", object: "code" }),
|
|
238
|
+
"templates delete": project("Delete a template", { verb: "delete", object: "code" }),
|
|
239
|
+
"templates list": read(SHOWS),
|
|
240
|
+
"templates publish": project("Publish a template to Railway's marketplace", CODE_PUBLIC),
|
|
241
|
+
"templates search": read(SHOWS),
|
|
242
|
+
"templates unpublish": project("Unpublish a template from Railway's marketplace", { verb: "change", object: "code" }),
|
|
243
|
+
"trace disable": env("Turn off tracing in {where}", SERVICE),
|
|
244
|
+
"trace enable": env("Turn on tracing in {where}", SERVICE),
|
|
245
|
+
"trace get": read(SHOWS),
|
|
246
|
+
"trace list": read(SHOWS),
|
|
247
|
+
"trace status": read(SHOWS),
|
|
248
|
+
usage: read(SHOWS),
|
|
249
|
+
"usage limit remove": project("Remove usage limits", BILLING),
|
|
250
|
+
"usage limit set": project("Set usage limits", BILLING),
|
|
251
|
+
"usage limit status": read(SHOWS),
|
|
252
|
+
"usage limit update": project("Change usage limits", BILLING),
|
|
253
|
+
"usage projects": read(SHOWS),
|
|
254
|
+
// Edits every variable at once after a confirmed diff: a variables change, as `variables set`.
|
|
255
|
+
"variables edit": { rule: true },
|
|
256
|
+
"volume browse": read("Browses files interactively; changes nothing"),
|
|
257
|
+
...files("volume"),
|
|
258
|
+
"waf under-attack disable": service("Turn off Under Attack Mode for {where}", SERVICE),
|
|
259
|
+
"waf under-attack enable": service("Turn on Under Attack Mode for {where}", {
|
|
260
|
+
...SERVICE,
|
|
261
|
+
disrupts: true,
|
|
262
|
+
possible: true
|
|
263
|
+
}),
|
|
264
|
+
"waf under-attack status": read(SHOWS),
|
|
265
|
+
// Hand rules in `railwayCapture.ts` name these.
|
|
266
|
+
"domain delete": { rule: true },
|
|
267
|
+
"tcp-proxy delete": { rule: true }
|
|
268
|
+
};
|
|
@@ -27,7 +27,12 @@ export const SUPABASE = {
|
|
|
27
27
|
nodes: SUPABASE_NODES,
|
|
28
28
|
actions: SUPABASE_ACTIONS,
|
|
29
29
|
// Each route's and tool's declared inputs, from Supabase's OpenAPI document and MCP server source.
|
|
30
|
-
|
|
30
|
+
// An unknown flag on a known command keeps its class (docs/design/zero-unknowns.md, "Flags").
|
|
31
|
+
capture: {
|
|
32
|
+
...SUPABASE_CAPTURE,
|
|
33
|
+
cli: { ...SUPABASE_CAPTURE.cli, unknownFlags: "keep" },
|
|
34
|
+
inputs: inputsOf(API.items, MCP.items)
|
|
35
|
+
},
|
|
31
36
|
probes: SUPABASE_PROBES,
|
|
32
37
|
logs: SUPABASE_LOGS,
|
|
33
38
|
// Connect, inventory and the Tier 2 feed, run by the server's kit runtime.
|
|
@@ -2,7 +2,9 @@ import type { CliSpec } from "../manifest.generated.js";
|
|
|
2
2
|
/**
|
|
3
3
|
* Supabase CLI capture: model draft (2026-11-12), reviewed the same day, cut
|
|
4
4
|
* to the 9 governed actions on 2026-11-13 (round 3).
|
|
5
|
-
* Sources: cli-commands.json (CLI 3.
|
|
5
|
+
* Sources: cli-commands.json (CLI 3.4.0 since 2026-11-28: its whole --help tree, plus the unlisted commands,
|
|
6
|
+
* hidden flags and feature-switched `compute` and `stack` commands in its source), mcp-tools.json,
|
|
7
|
+
* api-operations.json.
|
|
6
8
|
* CLI 3.x targets the local stack for database commands unless --remote is
|
|
7
9
|
* given (db push, db dump, db query, db reset, migration *, test db), and the
|
|
8
10
|
* linked project for platform commands (branches, functions, secrets, config).
|
|
@@ -4,7 +4,9 @@ import { AFFECTS_FN_JWT_OFF } from "./supabaseCatalog.generated.js";
|
|
|
4
4
|
/**
|
|
5
5
|
* Supabase CLI capture: model draft (2026-11-12), reviewed the same day, cut
|
|
6
6
|
* to the 9 governed actions on 2026-11-13 (round 3).
|
|
7
|
-
* Sources: cli-commands.json (CLI 3.
|
|
7
|
+
* Sources: cli-commands.json (CLI 3.4.0 since 2026-11-28: its whole --help tree, plus the unlisted commands,
|
|
8
|
+
* hidden flags and feature-switched `compute` and `stack` commands in its source), mcp-tools.json,
|
|
9
|
+
* api-operations.json.
|
|
8
10
|
* CLI 3.x targets the local stack for database commands unless --remote is
|
|
9
11
|
* given (db push, db dump, db query, db reset, migration *, test db), and the
|
|
10
12
|
* linked project for platform commands (branches, functions, secrets, config).
|
|
@@ -22,6 +24,11 @@ export const SUPABASE_CLI = {
|
|
|
22
24
|
envIgnore: ["SUPABASE_ACCESS_TOKEN", "SUPABASE_DB_PASSWORD"],
|
|
23
25
|
link: { file: "supabase/.temp/project-ref", format: "text", param: "ref" },
|
|
24
26
|
linkCommands: ["link", "unlink"],
|
|
27
|
+
// 3.4.0: `migrations` is `migration`; `db test` is the unlisted spelling of `test db`; `compute deploy` is
|
|
28
|
+
// `compute push`.
|
|
29
|
+
aliases: { migrations: "migration", "db test": "test db", "compute deploy": "compute push" },
|
|
30
|
+
// --version is a value on `db reset` and `migration squash` (a string, never true there).
|
|
31
|
+
infoFlags: ["help", "version"],
|
|
25
32
|
// The vendor's "selectable" commands: --local still means the local stack there.
|
|
26
33
|
localCommands: Object.entries(CLI.labels)
|
|
27
34
|
.filter(([, label]) => label.target === "selectable")
|
|
@@ -68,6 +75,29 @@ export const SUPABASE_CLI = {
|
|
|
68
75
|
on: "branch",
|
|
69
76
|
summary: "Delete branch {branchName|branch}"
|
|
70
77
|
},
|
|
78
|
+
// 3.4.0 (unlisted): the same as the API's DELETE /v1/projects/{ref}/branches.
|
|
79
|
+
{
|
|
80
|
+
match: "branches disable",
|
|
81
|
+
action: "supabase.project.change",
|
|
82
|
+
on: "project",
|
|
83
|
+
summary: "Turn off branching and delete every branch of project {ref}"
|
|
84
|
+
},
|
|
85
|
+
// Prints the branch's connection strings, password included (none for the main branch): a read of keys,
|
|
86
|
+
// like the API's GET /v1/branches/{branch_id_or_ref}.
|
|
87
|
+
{
|
|
88
|
+
match: "branches get",
|
|
89
|
+
when: { branchRef: true },
|
|
90
|
+
args: ["branchRef"],
|
|
91
|
+
action: "supabase.unclassified",
|
|
92
|
+
on: "branch",
|
|
93
|
+
summary: "Read connection details of branch {branchName|branch}"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
match: "branches get",
|
|
97
|
+
action: "supabase.unclassified",
|
|
98
|
+
on: "project",
|
|
99
|
+
summary: "Read connection details of a branch of project {ref}"
|
|
100
|
+
},
|
|
71
101
|
{
|
|
72
102
|
match: "branches pause",
|
|
73
103
|
args: ["branchRef"],
|
|
@@ -89,6 +119,22 @@ export const SUPABASE_CLI = {
|
|
|
89
119
|
on: "branch",
|
|
90
120
|
summary: "Update branch {branchName|branch}"
|
|
91
121
|
},
|
|
122
|
+
// Compute (3.4.0, behind the CLI's compute feature switch): apps Supabase runs for the project.
|
|
123
|
+
{
|
|
124
|
+
match: "compute delete",
|
|
125
|
+
args: ["name"],
|
|
126
|
+
action: "supabase.project.change",
|
|
127
|
+
on: "project",
|
|
128
|
+
summary: "Delete compute {name} from project {ref}"
|
|
129
|
+
},
|
|
130
|
+
// No compute node: one Action for the computes it deploys, named or all (a template renders a list as its count).
|
|
131
|
+
{
|
|
132
|
+
match: "compute push",
|
|
133
|
+
args: ["...name"],
|
|
134
|
+
action: "supabase.project.change",
|
|
135
|
+
on: "project",
|
|
136
|
+
summary: "Deploy computes to project {ref}"
|
|
137
|
+
},
|
|
92
138
|
// Config
|
|
93
139
|
{
|
|
94
140
|
match: "config push",
|
|
@@ -111,6 +157,13 @@ export const SUPABASE_CLI = {
|
|
|
111
157
|
// Database
|
|
112
158
|
// Found by the vendor-labelled cases (round 2): `db pull` and `pull` upsert the remote migration
|
|
113
159
|
// history; `test db` enables and drops pgTAP and runs test SQL on the target.
|
|
160
|
+
// 3.4.0: --declarative only rewrites the local schema files; migration history is not updated.
|
|
161
|
+
{
|
|
162
|
+
match: "db pull",
|
|
163
|
+
when: { declarative: true },
|
|
164
|
+
action: "read",
|
|
165
|
+
because: "Replaces the local declarative schema files; changes nothing remote"
|
|
166
|
+
},
|
|
114
167
|
{
|
|
115
168
|
match: "db pull",
|
|
116
169
|
localByDefault: true,
|
|
@@ -499,17 +552,28 @@ export const SUPABASE_CLI = {
|
|
|
499
552
|
],
|
|
500
553
|
reads: {
|
|
501
554
|
"backups list": "Vendor: hosted target, no consent (a read)",
|
|
502
|
-
"branches get": "Vendor: hosted target, no consent (a read)",
|
|
503
555
|
"branches list": "Vendor: hosted target, no consent (a read)",
|
|
504
556
|
"completion bash": "Vendor marks no target: local development only",
|
|
505
557
|
"completion fish": "Vendor marks no target: local development only",
|
|
506
558
|
"completion powershell": "Vendor marks no target: local development only",
|
|
507
559
|
"completion zsh": "Vendor marks no target: local development only",
|
|
560
|
+
"compute list": "Compute (3.4.0, feature switch): lists computes, changes nothing",
|
|
561
|
+
"compute logs": "Compute (3.4.0, feature switch): reads a compute's logs",
|
|
562
|
+
"compute new": "Compute (3.4.0, feature switch): scaffolds a compute and records it in the local config file",
|
|
563
|
+
"compute status": "Compute (3.4.0, feature switch): reads a compute's status",
|
|
564
|
+
"config convert": "Local only (3.4.0 help): changes nothing remote (rewrites the local config file)",
|
|
508
565
|
"config diff": "Vendor: hosted target, no consent (a read)",
|
|
509
566
|
"config pull": "Vendor: hosted target, no consent (a read)",
|
|
567
|
+
"config validate": "Local only (3.4.0 help): changes nothing remote",
|
|
510
568
|
"db advisors": "Vendor: selectable target, no consent (a read)",
|
|
569
|
+
"db branch create": "Removed in CLI 3.x (unlisted): exits with a message and runs nothing",
|
|
570
|
+
"db branch delete": "Removed in CLI 3.x (unlisted): exits with a message and runs nothing",
|
|
571
|
+
"db branch list": "Removed in CLI 3.x (unlisted): exits with a message and runs nothing",
|
|
572
|
+
"db branch switch": "Removed in CLI 3.x (unlisted): exits with a message and runs nothing",
|
|
511
573
|
"db diff": "Vendor: selectable target, no consent (a read)",
|
|
512
574
|
"db lint": "Vendor: selectable target, no consent (a read)",
|
|
575
|
+
"db remote changes": "Removed in CLI 3.x (unlisted): exits with a message and runs nothing",
|
|
576
|
+
"db remote commit": "Removed in CLI 3.x (unlisted): exits with a message and runs nothing",
|
|
513
577
|
"db schema declarative generate": "Vendor: selectable target, no consent (a read)",
|
|
514
578
|
"db schema declarative sync": "Vendor marks no target: local development only",
|
|
515
579
|
"db start": "Vendor marks no target: local development only",
|
|
@@ -521,23 +585,36 @@ export const SUPABASE_CLI = {
|
|
|
521
585
|
"functions new": "Vendor marks no target: local development only",
|
|
522
586
|
"functions serve": "Vendor marks no target: local development only",
|
|
523
587
|
"gen bearer-jwt": "Vendor marks no target: local development only",
|
|
588
|
+
"gen keys": "Removed in CLI 3.x (unlisted): exits with a message and runs nothing",
|
|
524
589
|
"gen signing-key": "Vendor marks no target: local development only",
|
|
525
590
|
"gen types": "Vendor: selectable target, no consent (a read)",
|
|
526
591
|
init: "Vendor marks no target: local development only",
|
|
527
592
|
"inspect db bloat": "Vendor: selectable target, no consent (a read)",
|
|
528
593
|
"inspect db blocking": "Vendor: selectable target, no consent (a read)",
|
|
594
|
+
"inspect db cache-hit": "3.4.0 help: local or remote, reads only",
|
|
529
595
|
"inspect db calls": "Vendor: selectable target, no consent (a read)",
|
|
530
596
|
"inspect db collation-drift": "Vendor: selectable target, no consent (a read)",
|
|
531
597
|
"inspect db db-stats": "Vendor: selectable target, no consent (a read)",
|
|
598
|
+
"inspect db index-sizes": "3.4.0 help: local or remote, reads only",
|
|
532
599
|
"inspect db index-stats": "Vendor: selectable target, no consent (a read)",
|
|
600
|
+
"inspect db index-usage": "3.4.0 help: local or remote, reads only",
|
|
533
601
|
"inspect db locks": "Vendor: selectable target, no consent (a read)",
|
|
534
602
|
"inspect db long-running-queries": "Vendor: selectable target, no consent (a read)",
|
|
535
603
|
"inspect db outliers": "Vendor: selectable target, no consent (a read)",
|
|
536
604
|
"inspect db replication-slots": "Vendor: selectable target, no consent (a read)",
|
|
605
|
+
"inspect db role-configs": "3.4.0 help: local or remote, reads only",
|
|
606
|
+
"inspect db role-connections": "3.4.0 help: local or remote, reads only",
|
|
537
607
|
"inspect db role-stats": "Vendor: selectable target, no consent (a read)",
|
|
608
|
+
"inspect db seq-scans": "3.4.0 help: local or remote, reads only",
|
|
609
|
+
"inspect db table-index-sizes": "Removed in CLI 3.x (unlisted): exits with a message and runs nothing",
|
|
610
|
+
"inspect db table-record-counts": "3.4.0 help: local or remote, reads only",
|
|
611
|
+
"inspect db table-sizes": "3.4.0 help: local or remote, reads only",
|
|
538
612
|
"inspect db table-stats": "Vendor: selectable target, no consent (a read)",
|
|
539
613
|
"inspect db toast-sizes": "Vendor: selectable target, no consent (a read)",
|
|
614
|
+
"inspect db total-index-size": "Removed in CLI 3.x (unlisted): exits with a message and runs nothing",
|
|
615
|
+
"inspect db total-table-sizes": "Removed in CLI 3.x (unlisted): exits with a message and runs nothing",
|
|
540
616
|
"inspect db traffic-profile": "Vendor: selectable target, no consent (a read)",
|
|
617
|
+
"inspect db unused-indexes": "3.4.0 help: local or remote, reads only",
|
|
541
618
|
"inspect db vacuum-stats": "Vendor: selectable target, no consent (a read)",
|
|
542
619
|
"inspect db xid-age": "Vendor: selectable target, no consent (a read)",
|
|
543
620
|
"inspect report": "Vendor: selectable target, no consent (a read)",
|
|
@@ -547,6 +624,7 @@ export const SUPABASE_CLI = {
|
|
|
547
624
|
link: "Vendor: hosted target, no consent (a read)",
|
|
548
625
|
login: "Vendor: account target, no consent (a read)",
|
|
549
626
|
logout: "Vendor: account target, no consent (a read)",
|
|
627
|
+
logs: "3.4.0 help: browses local or hosted logs, custom log SQL included (--sql, --file); changes nothing",
|
|
550
628
|
"logs sources": "Vendor marks no target: local development only",
|
|
551
629
|
"migration fetch": "Vendor: selectable target, no consent (a read)",
|
|
552
630
|
"migration list": "Vendor: selectable target, no consent (a read)",
|
|
@@ -565,6 +643,17 @@ export const SUPABASE_CLI = {
|
|
|
565
643
|
"sso info": "Vendor: hosted target, no consent (a read)",
|
|
566
644
|
"sso list": "Vendor: hosted target, no consent (a read)",
|
|
567
645
|
"sso show": "Vendor: hosted target, no consent (a read)",
|
|
646
|
+
"stack destroy": "The Stack backend (3.4.0, feature switch): the local stack only",
|
|
647
|
+
"stack install": "The Stack backend (3.4.0, feature switch): the local stack only",
|
|
648
|
+
"stack list": "The Stack backend (3.4.0, feature switch): the local stack only",
|
|
649
|
+
"stack logs": "The Stack backend (3.4.0, feature switch): the local stack only",
|
|
650
|
+
"stack outdated": "The Stack backend (3.4.0, feature switch): the local stack only",
|
|
651
|
+
"stack prune": "The Stack backend (3.4.0, feature switch): the local stack only",
|
|
652
|
+
"stack restart": "The Stack backend (3.4.0, feature switch): the local stack only",
|
|
653
|
+
"stack start": "The Stack backend (3.4.0, feature switch): the local stack only",
|
|
654
|
+
"stack status": "The Stack backend (3.4.0, feature switch): the local stack only",
|
|
655
|
+
"stack stop": "The Stack backend (3.4.0, feature switch): the local stack only",
|
|
656
|
+
"stack update": "The Stack backend (3.4.0, feature switch): the local stack only",
|
|
568
657
|
start: "Vendor marks no target: local development only",
|
|
569
658
|
status: "Vendor marks no target: local development only",
|
|
570
659
|
stop: "Vendor marks no target: local development only",
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* (`scripts/generate-control-plane-classifier.mjs`)
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* libpg-query for the bridge's copy of the connector kit
|
|
3
|
+
* (`scripts/generate-control-plane-classifier.mjs`), imported only when
|
|
4
|
+
* `loadSqlParser()` runs (2026-11-28): the guard loads the PostgreSQL parser
|
|
5
|
+
* (WebAssembly, ~25 ms) only for a command that runs SQL, so every other
|
|
6
|
+
* command pays nothing. Until it loads, or if it can't, every SQL text is
|
|
7
|
+
* opaque, which the manifests map to the Unclassified action (fails closed).
|
|
8
|
+
* The gateway classifies SQL with the same parser and version.
|
|
7
9
|
*/
|
|
8
10
|
export declare function loadModule(): Promise<void>;
|
|
9
|
-
export declare function parseSync(
|
|
11
|
+
export declare function parseSync(sql: string): unknown;
|
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* (`scripts/generate-control-plane-classifier.mjs`)
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
2
|
+
* libpg-query for the bridge's copy of the connector kit
|
|
3
|
+
* (`scripts/generate-control-plane-classifier.mjs`), imported only when
|
|
4
|
+
* `loadSqlParser()` runs (2026-11-28): the guard loads the PostgreSQL parser
|
|
5
|
+
* (WebAssembly, ~25 ms) only for a command that runs SQL, so every other
|
|
6
|
+
* command pays nothing. Until it loads, or if it can't, every SQL text is
|
|
7
|
+
* opaque, which the manifests map to the Unclassified action (fails closed).
|
|
8
|
+
* The gateway classifies SQL with the same parser and version.
|
|
7
9
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
let parser;
|
|
11
|
+
export async function loadModule() {
|
|
12
|
+
const loaded = await import("libpg-query");
|
|
13
|
+
await loaded.loadModule();
|
|
14
|
+
parser = loaded;
|
|
10
15
|
}
|
|
11
|
-
export function parseSync(
|
|
12
|
-
|
|
16
|
+
export function parseSync(sql) {
|
|
17
|
+
if (!parser)
|
|
18
|
+
throw new Error("The SQL parser isn't loaded.");
|
|
19
|
+
return parser.parseSync(sql);
|
|
13
20
|
}
|