passport-bridge 0.48.2 → 0.49.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/cliHookAfter.js +10 -1
- package/dist/cliHookDecide.d.ts +9 -3
- package/dist/cliHookDecide.js +182 -28
- package/dist/cliHookSessionState.d.ts +4 -1
- package/dist/cliHookSessionState.js +1 -1
- package/dist/connectorKit/callEffects.generated.d.ts +36 -0
- package/dist/connectorKit/callEffects.generated.js +73 -0
- package/dist/connectorKit/cli.generated.js +5 -2
- package/dist/connectorKit/engine.generated.d.ts +1 -1
- package/dist/connectorKit/engine.generated.js +32 -13
- package/dist/connectorKit/githubIds.generated.d.ts +1 -1
- package/dist/connectorKit/githubIds.generated.js +3 -2
- package/dist/connectorKit/manifest.generated.d.ts +34 -14
- package/dist/connectorKit/manifests/cloudflare.generated.d.ts +2 -0
- package/dist/connectorKit/manifests/cloudflare.generated.js +186 -0
- package/dist/connectorKit/manifests/cloudflareApi.generated.d.ts +4 -0
- package/dist/connectorKit/manifests/cloudflareApi.generated.js +207 -0
- package/dist/connectorKit/manifests/cloudflareCatalog.generated.d.ts +18 -0
- package/dist/connectorKit/manifests/cloudflareCatalog.generated.js +83 -0
- package/dist/connectorKit/manifests/cloudflareCli.generated.d.ts +2 -0
- package/dist/connectorKit/manifests/cloudflareCli.generated.js +441 -0
- package/dist/connectorKit/manifests/githubCapture.generated.js +19 -1
- package/dist/connectorKit/manifests/githubReads.generated.js +0 -3
- package/dist/connectorKit/manifests/kubernetes.generated.d.ts +76 -0
- package/dist/connectorKit/manifests/kubernetes.generated.js +210 -0
- package/dist/connectorKit/manifests/kubernetesArgs.generated.d.ts +21 -0
- package/dist/connectorKit/manifests/kubernetesArgs.generated.js +82 -0
- package/dist/connectorKit/manifests/kubernetesCli.generated.d.ts +30 -0
- package/dist/connectorKit/manifests/kubernetesCli.generated.js +530 -0
- package/dist/connectorKit/manifests/kubernetesEffects.generated.d.ts +15 -0
- package/dist/connectorKit/manifests/kubernetesEffects.generated.js +111 -0
- package/dist/connectorKit/manifests/kubernetesObjects.generated.d.ts +24 -0
- package/dist/connectorKit/manifests/kubernetesObjects.generated.js +154 -0
- package/dist/connectorKit/manifests/railwayHooks.generated.js +11 -5
- package/dist/connectorKit/manifests/sentry.generated.d.ts +6 -0
- package/dist/connectorKit/manifests/sentry.generated.js +27 -0
- package/dist/connectorKit/manifests/sentryApi.generated.d.ts +6 -0
- package/dist/connectorKit/manifests/sentryApi.generated.js +282 -0
- package/dist/connectorKit/manifests/sentryCapture.generated.d.ts +2 -0
- package/dist/connectorKit/manifests/sentryCapture.generated.js +165 -0
- package/dist/connectorKit/manifests/sentryCatalog.generated.d.ts +5 -0
- package/dist/connectorKit/manifests/sentryCatalog.generated.js +70 -0
- package/dist/connectorKit/manifests/sentryCli.generated.d.ts +2 -0
- package/dist/connectorKit/manifests/sentryCli.generated.js +230 -0
- package/dist/connectorKit/manifests/sentryIssues.generated.d.ts +20 -0
- package/dist/connectorKit/manifests/sentryIssues.generated.js +204 -0
- package/dist/connectorKit/manifests/supabase.generated.js +3 -2
- package/dist/connectorKit/manifests/supabaseApi.generated.js +52 -52
- package/dist/connectorKit/manifests/supabaseCapture.generated.js +22 -21
- package/dist/connectorKit/manifests/supabaseCatalog.generated.d.ts +2 -2
- package/dist/connectorKit/manifests/supabaseCatalog.generated.js +8 -7
- package/dist/connectorKit/manifests/supabaseCli.generated.js +32 -32
- package/dist/connectorKit/manifests/supabaseProbes.generated.js +29 -29
- package/dist/connectorKit/manifests/terraform.generated.d.ts +5 -0
- package/dist/connectorKit/manifests/terraform.generated.js +214 -0
- package/dist/connectorKit/manifests/terraformLink.generated.d.ts +30 -0
- package/dist/connectorKit/manifests/terraformLink.generated.js +73 -0
- package/dist/connectorKit/manifests/terraformPlan.generated.d.ts +48 -0
- package/dist/connectorKit/manifests/terraformPlan.generated.js +192 -0
- package/dist/connectorKit/params.generated.js +2 -0
- package/dist/connectorKit/shell.generated.d.ts +5 -1
- package/dist/connectorKit/shell.generated.js +121 -20
- package/dist/connectorKit/sources/cloudflare/api-operations.generated.d.ts +37 -0
- package/dist/connectorKit/sources/cloudflare/api-operations.generated.js +2 -0
- package/dist/connectorKit/sources/cloudflare/cli-flags.generated.d.ts +617 -0
- package/dist/connectorKit/sources/cloudflare/cli-flags.generated.js +2 -0
- package/dist/connectorKit/sources/cloudflare/mcp-tools.generated.d.ts +16 -0
- package/dist/connectorKit/sources/cloudflare/mcp-tools.generated.js +2 -0
- package/dist/connectorKit/sources/sentry/api-operations.generated.d.ts +121 -0
- package/dist/connectorKit/sources/sentry/api-operations.generated.js +2 -0
- package/dist/connectorKit/sources/sentry/cli-commands.generated.d.ts +530 -0
- package/dist/connectorKit/sources/sentry/cli-commands.generated.js +2 -0
- package/dist/connectorKit/sources/sentry/mcp-tools.generated.d.ts +32 -0
- package/dist/connectorKit/sources/sentry/mcp-tools.generated.js +2 -0
- package/dist/connectorKit/template.generated.d.ts +8 -4
- package/dist/connectorKit/template.generated.js +19 -6
- package/dist/controlPlane.generated.d.ts +11 -2
- package/dist/controlPlaneActions.generated.d.ts +52 -12
- package/dist/controlPlaneActions.generated.js +40 -11
- package/dist/controlPlaneCloudflare.d.ts +70 -0
- package/dist/controlPlaneCloudflare.js +188 -0
- package/dist/controlPlaneKubernetes.d.ts +72 -0
- package/dist/controlPlaneKubernetes.js +260 -0
- package/dist/controlPlaneModel.generated.d.ts +6 -0
- package/dist/controlPlaneNpm.generated.d.ts +83 -0
- package/dist/controlPlaneNpm.generated.js +307 -0
- package/dist/controlPlaneNpmCommands.generated.d.ts +35 -0
- package/dist/controlPlaneNpmCommands.generated.js +567 -0
- package/dist/controlPlaneNpmGuard.d.ts +44 -0
- package/dist/controlPlaneNpmGuard.js +210 -0
- package/dist/controlPlaneOffline.d.ts +1 -1
- package/dist/controlPlaneRailway.generated.js +2 -2
- package/dist/controlPlaneRailwayCli.generated.js +13 -2
- package/dist/controlPlaneRailwayModel.generated.d.ts +5 -0
- package/dist/controlPlaneRailwayModel.generated.js +15 -1
- package/dist/controlPlaneSentry.d.ts +68 -0
- package/dist/controlPlaneSentry.js +205 -0
- package/dist/controlPlaneTerraform.d.ts +86 -0
- package/dist/controlPlaneTerraform.js +273 -0
- package/dist/controlPlaneUnnamed.generated.d.ts +41 -2
- package/dist/controlPlaneUnnamed.generated.js +148 -2
- package/dist/cpCli.d.ts +1 -1
- package/dist/cpCli.js +1 -1
- package/dist/pluginPin.d.ts +1 -1
- package/dist/pluginPin.js +1 -1
- package/dist/terraformPlans.d.ts +45 -0
- package/dist/terraformPlans.js +96 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
// Generated by scripts/generate-control-plane-classifier.mjs. Do not edit.
|
|
2
|
+
import CLI from "../sources/cloudflare/cli-flags.generated.js";
|
|
3
|
+
/**
|
|
4
|
+
* Wrangler capture (2026-11-21), from Cloudflare's command reference (Wrangler 4.x, `sources/cloudflare/`).
|
|
5
|
+
*
|
|
6
|
+
* The target: a Worker is its script name (`--name`, else the folder's `wrangler.toml` / `wrangler.json` `name`);
|
|
7
|
+
* `--env <name>` deploys that Wrangler environment, a node of its own beneath the Worker whose name says whether it is
|
|
8
|
+
* production. `--config` and `--cwd` point at another folder's file, so the folder's link no longer applies.
|
|
9
|
+
*
|
|
10
|
+
* Wrangler 4 runs `kv key`, `kv bulk`, `r2 object`, `d1 execute` and `d1 migrations apply` against the local
|
|
11
|
+
* simulator unless `--remote` is given: those are reads until then (`localByDefault`). `--dry-run` and `--local`
|
|
12
|
+
* change nothing remote.
|
|
13
|
+
*/
|
|
14
|
+
const OTHER = "cloudflare.account.change";
|
|
15
|
+
/** A Worker command, twice: with `--env`, on that environment's node (its secret named within it); else on the
|
|
16
|
+
* Worker. */
|
|
17
|
+
function onWorker(rule) {
|
|
18
|
+
return [
|
|
19
|
+
{ ...rule, when: { ...rule.when, env: true }, on: "environment" },
|
|
20
|
+
{ ...rule, on: "worker" }
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
const workerRules = [
|
|
24
|
+
...onWorker({
|
|
25
|
+
match: "deploy",
|
|
26
|
+
args: ["entry"],
|
|
27
|
+
action: "cloudflare.worker.deploy",
|
|
28
|
+
summary: "Deploy Worker {script}"
|
|
29
|
+
}),
|
|
30
|
+
...onWorker({
|
|
31
|
+
match: "versions upload",
|
|
32
|
+
args: ["entry"],
|
|
33
|
+
action: OTHER,
|
|
34
|
+
summary: "Upload a version of Worker {script}"
|
|
35
|
+
}),
|
|
36
|
+
...onWorker({
|
|
37
|
+
match: "versions deploy",
|
|
38
|
+
args: ["...specs"],
|
|
39
|
+
action: "cloudflare.worker.deploy",
|
|
40
|
+
summary: "Deploy versions of Worker {script}"
|
|
41
|
+
}),
|
|
42
|
+
...onWorker({
|
|
43
|
+
match: "triggers deploy",
|
|
44
|
+
action: OTHER,
|
|
45
|
+
summary: "Change the cron triggers of Worker {script}"
|
|
46
|
+
}),
|
|
47
|
+
...onWorker({
|
|
48
|
+
match: "rollback",
|
|
49
|
+
args: ["version"],
|
|
50
|
+
action: "cloudflare.worker.rollback",
|
|
51
|
+
summary: "Roll back Worker {script}"
|
|
52
|
+
}),
|
|
53
|
+
...onWorker({
|
|
54
|
+
match: "delete",
|
|
55
|
+
args: ["entry"],
|
|
56
|
+
action: "cloudflare.worker.delete",
|
|
57
|
+
summary: "Delete Worker {script}"
|
|
58
|
+
}),
|
|
59
|
+
...onWorker({
|
|
60
|
+
match: "secret put",
|
|
61
|
+
args: ["secret"],
|
|
62
|
+
action: "cloudflare.worker.secret",
|
|
63
|
+
summary: "Set secret {secret} on Worker {script}",
|
|
64
|
+
target: { type: "secret", key: "{secret}" }
|
|
65
|
+
}),
|
|
66
|
+
...onWorker({
|
|
67
|
+
match: "versions secret put",
|
|
68
|
+
args: ["secret"],
|
|
69
|
+
action: "cloudflare.worker.secret",
|
|
70
|
+
summary: "Set secret {secret} on Worker {script}",
|
|
71
|
+
target: { type: "secret", key: "{secret}" }
|
|
72
|
+
}),
|
|
73
|
+
...onWorker({
|
|
74
|
+
match: "secret delete",
|
|
75
|
+
args: ["secret"],
|
|
76
|
+
action: "cloudflare.worker.secret",
|
|
77
|
+
summary: "Delete secret {secret} from Worker {script}",
|
|
78
|
+
target: { type: "secret", key: "{secret}" }
|
|
79
|
+
}),
|
|
80
|
+
...onWorker({
|
|
81
|
+
match: "versions secret delete",
|
|
82
|
+
args: ["secret"],
|
|
83
|
+
action: "cloudflare.worker.secret",
|
|
84
|
+
summary: "Delete secret {secret} from Worker {script}",
|
|
85
|
+
target: { type: "secret", key: "{secret}" }
|
|
86
|
+
}),
|
|
87
|
+
// A file of secrets: their names aren't read.
|
|
88
|
+
...onWorker({
|
|
89
|
+
match: "secret bulk",
|
|
90
|
+
args: ["file"],
|
|
91
|
+
action: "cloudflare.worker.secret",
|
|
92
|
+
summary: "Set secrets from a file on Worker {script}"
|
|
93
|
+
}),
|
|
94
|
+
...onWorker({
|
|
95
|
+
match: "versions secret bulk",
|
|
96
|
+
args: ["file"],
|
|
97
|
+
action: "cloudflare.worker.secret",
|
|
98
|
+
summary: "Set secrets from a file on Worker {script}"
|
|
99
|
+
})
|
|
100
|
+
];
|
|
101
|
+
const storageRules = [
|
|
102
|
+
// KV
|
|
103
|
+
{
|
|
104
|
+
match: "kv namespace create",
|
|
105
|
+
args: ["title"],
|
|
106
|
+
action: OTHER,
|
|
107
|
+
on: "platform",
|
|
108
|
+
summary: "Create KV namespace {title}"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
match: "kv namespace delete",
|
|
112
|
+
args: ["title"],
|
|
113
|
+
action: "cloudflare.kv.delete",
|
|
114
|
+
on: "kv_namespace",
|
|
115
|
+
summary: "Delete KV namespace {binding|namespace|title}"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
match: "kv namespace rename",
|
|
119
|
+
args: ["title"],
|
|
120
|
+
action: OTHER,
|
|
121
|
+
on: "kv_namespace",
|
|
122
|
+
summary: "Rename KV namespace {namespace|title}"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
match: "kv key put",
|
|
126
|
+
args: ["key", "value"],
|
|
127
|
+
localByDefault: true,
|
|
128
|
+
action: OTHER,
|
|
129
|
+
on: "kv_namespace",
|
|
130
|
+
summary: "Write a key to KV namespace {binding|namespace}"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
match: "kv key delete",
|
|
134
|
+
args: ["key"],
|
|
135
|
+
localByDefault: true,
|
|
136
|
+
action: "cloudflare.kv.delete",
|
|
137
|
+
on: "kv_namespace",
|
|
138
|
+
summary: "Delete a key from KV namespace {binding|namespace}"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
match: "kv bulk put",
|
|
142
|
+
args: ["file"],
|
|
143
|
+
localByDefault: true,
|
|
144
|
+
action: OTHER,
|
|
145
|
+
on: "kv_namespace",
|
|
146
|
+
summary: "Write keys from a file to KV namespace {binding|namespace}"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
match: "kv bulk delete",
|
|
150
|
+
args: ["file"],
|
|
151
|
+
localByDefault: true,
|
|
152
|
+
action: "cloudflare.kv.delete",
|
|
153
|
+
on: "kv_namespace",
|
|
154
|
+
summary: "Delete keys listed in a file from KV namespace {binding|namespace}"
|
|
155
|
+
},
|
|
156
|
+
// R2
|
|
157
|
+
{ match: "r2 bucket create", args: ["bucket"], action: OTHER, on: "bucket", summary: "Create R2 bucket {bucket}" },
|
|
158
|
+
{
|
|
159
|
+
match: "r2 bucket delete",
|
|
160
|
+
args: ["bucket"],
|
|
161
|
+
action: "cloudflare.r2.delete",
|
|
162
|
+
on: "bucket",
|
|
163
|
+
summary: "Delete R2 bucket {bucket}"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
match: "r2 bucket dev-url enable",
|
|
167
|
+
args: ["bucket"],
|
|
168
|
+
action: "cloudflare.r2.public",
|
|
169
|
+
on: "bucket",
|
|
170
|
+
summary: "Turn on the public r2.dev URL of bucket {bucket}"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
match: "r2 bucket dev-url disable",
|
|
174
|
+
args: ["bucket"],
|
|
175
|
+
action: OTHER,
|
|
176
|
+
on: "bucket",
|
|
177
|
+
summary: "Turn off the public r2.dev URL of bucket {bucket}"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
match: "r2 bucket domain add",
|
|
181
|
+
args: ["bucket"],
|
|
182
|
+
action: "cloudflare.r2.public",
|
|
183
|
+
on: "bucket",
|
|
184
|
+
summary: "Serve bucket {bucket} on a custom domain"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
match: "r2 bucket domain remove",
|
|
188
|
+
args: ["bucket"],
|
|
189
|
+
action: OTHER,
|
|
190
|
+
on: "bucket",
|
|
191
|
+
summary: "Remove a custom domain from bucket {bucket}"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
match: "r2 bucket cors set",
|
|
195
|
+
args: ["bucket"],
|
|
196
|
+
action: OTHER,
|
|
197
|
+
on: "bucket",
|
|
198
|
+
summary: "Change the CORS policy of bucket {bucket}"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
match: "r2 bucket cors delete",
|
|
202
|
+
args: ["bucket"],
|
|
203
|
+
action: OTHER,
|
|
204
|
+
on: "bucket",
|
|
205
|
+
summary: "Delete the CORS policy of bucket {bucket}"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
match: "r2 bucket lifecycle set",
|
|
209
|
+
args: ["bucket"],
|
|
210
|
+
action: OTHER,
|
|
211
|
+
on: "bucket",
|
|
212
|
+
summary: "Change the lifecycle rules of bucket {bucket}"
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
match: "r2 object put",
|
|
216
|
+
args: ["objectPath"],
|
|
217
|
+
localByDefault: true,
|
|
218
|
+
action: OTHER,
|
|
219
|
+
on: "bucket",
|
|
220
|
+
summary: "Upload an object to bucket {bucket}",
|
|
221
|
+
target: { type: "object", key: "{object}" }
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
match: "r2 object delete",
|
|
225
|
+
args: ["objectPath"],
|
|
226
|
+
localByDefault: true,
|
|
227
|
+
action: "cloudflare.r2.delete",
|
|
228
|
+
on: "bucket",
|
|
229
|
+
summary: "Delete an object from bucket {bucket}",
|
|
230
|
+
target: { type: "object", key: "{object}" }
|
|
231
|
+
},
|
|
232
|
+
// D1: inline SQL is read (on this computer it is opaque, so it may be destructive); a file's SQL isn't.
|
|
233
|
+
{
|
|
234
|
+
match: "d1 create",
|
|
235
|
+
args: ["database"],
|
|
236
|
+
action: OTHER,
|
|
237
|
+
on: "d1_database",
|
|
238
|
+
summary: "Create D1 database {database}"
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
match: "d1 delete",
|
|
242
|
+
args: ["database"],
|
|
243
|
+
action: "cloudflare.d1.delete",
|
|
244
|
+
on: "d1_database",
|
|
245
|
+
summary: "Delete D1 database {database}"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
match: "d1 execute",
|
|
249
|
+
args: ["database"],
|
|
250
|
+
localByDefault: true,
|
|
251
|
+
when: { query: true },
|
|
252
|
+
action: "sql:query",
|
|
253
|
+
on: "d1_database",
|
|
254
|
+
summary: "Run SQL on D1 database {database}"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
match: "d1 execute",
|
|
258
|
+
args: ["database"],
|
|
259
|
+
localByDefault: true,
|
|
260
|
+
when: { file: true },
|
|
261
|
+
action: "cloudflare.d1.write",
|
|
262
|
+
on: "d1_database",
|
|
263
|
+
summary: "Run a SQL file on D1 database {database}"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
match: "d1 migrations apply",
|
|
267
|
+
args: ["database"],
|
|
268
|
+
localByDefault: true,
|
|
269
|
+
action: "cloudflare.d1.write",
|
|
270
|
+
on: "d1_database",
|
|
271
|
+
summary: "Apply migrations to D1 database {database}"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
match: "d1 time-travel restore",
|
|
275
|
+
args: ["database"],
|
|
276
|
+
action: OTHER,
|
|
277
|
+
on: "d1_database",
|
|
278
|
+
summary: "Restore D1 database {database} to an earlier point"
|
|
279
|
+
},
|
|
280
|
+
// Queues
|
|
281
|
+
{ match: "queues create", args: ["queue"], action: OTHER, on: "queue", summary: "Create queue {queue}" },
|
|
282
|
+
{ match: "queues delete", args: ["queue"], action: OTHER, on: "queue", summary: "Delete queue {queue}" },
|
|
283
|
+
{ match: "queues update", args: ["queue"], action: OTHER, on: "queue", summary: "Change queue {queue}" },
|
|
284
|
+
{
|
|
285
|
+
match: "queues purge",
|
|
286
|
+
args: ["queue"],
|
|
287
|
+
action: OTHER,
|
|
288
|
+
on: "queue",
|
|
289
|
+
summary: "Purge every message in queue {queue}"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
match: "queues pause-delivery",
|
|
293
|
+
args: ["queue"],
|
|
294
|
+
action: OTHER,
|
|
295
|
+
on: "queue",
|
|
296
|
+
summary: "Pause delivery from queue {queue}"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
match: "queues resume-delivery",
|
|
300
|
+
args: ["queue"],
|
|
301
|
+
action: OTHER,
|
|
302
|
+
on: "queue",
|
|
303
|
+
summary: "Resume delivery from queue {queue}"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
match: "queues consumer add",
|
|
307
|
+
args: ["queue", "consumer"],
|
|
308
|
+
action: OTHER,
|
|
309
|
+
on: "queue",
|
|
310
|
+
summary: "Add consumer {consumer} to queue {queue}"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
match: "queues consumer remove",
|
|
314
|
+
args: ["queue", "consumer"],
|
|
315
|
+
action: OTHER,
|
|
316
|
+
on: "queue",
|
|
317
|
+
summary: "Remove consumer {consumer} from queue {queue}"
|
|
318
|
+
}
|
|
319
|
+
];
|
|
320
|
+
const pagesRules = [
|
|
321
|
+
{
|
|
322
|
+
match: "pages project create",
|
|
323
|
+
args: ["project"],
|
|
324
|
+
action: OTHER,
|
|
325
|
+
on: "pages_project",
|
|
326
|
+
summary: "Create Pages project {project}"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
match: "pages project delete",
|
|
330
|
+
args: ["project"],
|
|
331
|
+
action: "cloudflare.pages.delete",
|
|
332
|
+
on: "pages_project",
|
|
333
|
+
summary: "Delete Pages project {project}"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
match: "pages deploy",
|
|
337
|
+
args: ["directory"],
|
|
338
|
+
action: "cloudflare.pages.deploy",
|
|
339
|
+
on: "pages_project",
|
|
340
|
+
summary: "Deploy Pages project {project}"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
match: "pages secret put",
|
|
344
|
+
args: ["secret"],
|
|
345
|
+
action: OTHER,
|
|
346
|
+
on: "pages_project",
|
|
347
|
+
summary: "Set secret {secret} on Pages project {project}"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
match: "pages secret delete",
|
|
351
|
+
args: ["secret"],
|
|
352
|
+
action: OTHER,
|
|
353
|
+
on: "pages_project",
|
|
354
|
+
summary: "Delete secret {secret} from Pages project {project}"
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
match: "pages secret bulk",
|
|
358
|
+
args: ["file"],
|
|
359
|
+
action: OTHER,
|
|
360
|
+
on: "pages_project",
|
|
361
|
+
summary: "Set secrets from a file on Pages project {project}"
|
|
362
|
+
}
|
|
363
|
+
];
|
|
364
|
+
const R = "Lists or shows; changes nothing";
|
|
365
|
+
const LOCAL = "Runs on this computer only";
|
|
366
|
+
export const CLOUDFLARE_CLI = {
|
|
367
|
+
programs: ["wrangler"],
|
|
368
|
+
framework: "cobra",
|
|
369
|
+
aliases: CLI.aliases,
|
|
370
|
+
contextFlags: ["config", "cwd"],
|
|
371
|
+
// Documented by Cloudflare: the account a command acts on. Any other CLOUDFLARE_* or WRANGLER_* variable set on the
|
|
372
|
+
// line fails closed; credentials are never read.
|
|
373
|
+
env: { CLOUDFLARE_ACCOUNT_ID: "account" },
|
|
374
|
+
envPrefixes: ["CLOUDFLARE_", "CF_"],
|
|
375
|
+
envIgnore: [
|
|
376
|
+
"CLOUDFLARE_API_TOKEN",
|
|
377
|
+
"CLOUDFLARE_API_KEY",
|
|
378
|
+
"CLOUDFLARE_EMAIL",
|
|
379
|
+
"CF_API_TOKEN",
|
|
380
|
+
"CF_API_KEY",
|
|
381
|
+
"CF_EMAIL"
|
|
382
|
+
],
|
|
383
|
+
link: [
|
|
384
|
+
{ file: "wrangler.toml", format: "toml", fields: { name: "script", account_id: "account" } },
|
|
385
|
+
{ file: "wrangler.jsonc", format: "jsonc", fields: { name: "script", account_id: "account" } },
|
|
386
|
+
{ file: "wrangler.json", format: "json", fields: { name: "script", account_id: "account" } }
|
|
387
|
+
],
|
|
388
|
+
infoFlags: ["help", "version"],
|
|
389
|
+
usage: CLI.usage,
|
|
390
|
+
flags: { global: CLI.global, commands: CLI.commands },
|
|
391
|
+
remoteFlags: ["remote"],
|
|
392
|
+
localFlags: ["local", "dry-run"],
|
|
393
|
+
rules: [...workerRules, ...storageRules, ...pagesRules],
|
|
394
|
+
reads: {
|
|
395
|
+
"versions list": R,
|
|
396
|
+
"versions view": R,
|
|
397
|
+
"versions secret list": "Lists secret names; never their values",
|
|
398
|
+
"deployments list": R,
|
|
399
|
+
"deployments status": R,
|
|
400
|
+
"secret list": "Lists secret names; never their values",
|
|
401
|
+
tail: "Streams the Worker's logs; changes nothing",
|
|
402
|
+
dev: "A local or preview session; nothing is deployed",
|
|
403
|
+
whoami: R,
|
|
404
|
+
login: "Signs Wrangler in on this computer",
|
|
405
|
+
logout: "Signs Wrangler out on this computer",
|
|
406
|
+
types: LOCAL,
|
|
407
|
+
init: LOCAL,
|
|
408
|
+
docs: "Opens the docs",
|
|
409
|
+
"check startup": LOCAL,
|
|
410
|
+
build: LOCAL,
|
|
411
|
+
"kv namespace list": R,
|
|
412
|
+
"kv key get": R,
|
|
413
|
+
"kv key list": R,
|
|
414
|
+
"kv bulk get": R,
|
|
415
|
+
"r2 bucket list": R,
|
|
416
|
+
"r2 bucket info": R,
|
|
417
|
+
"r2 bucket dev-url get": R,
|
|
418
|
+
"r2 bucket domain list": R,
|
|
419
|
+
"r2 bucket cors list": R,
|
|
420
|
+
"r2 bucket lifecycle list": R,
|
|
421
|
+
"r2 object get": "Downloads an object to this computer",
|
|
422
|
+
"d1 list": R,
|
|
423
|
+
"d1 info": R,
|
|
424
|
+
"d1 export": "Downloads the database to a file on this computer",
|
|
425
|
+
"d1 migrations list": R,
|
|
426
|
+
"d1 migrations create": "Writes a migration file on this computer",
|
|
427
|
+
"d1 time-travel info": R,
|
|
428
|
+
"pages project list": R,
|
|
429
|
+
"pages deployment list": R,
|
|
430
|
+
"pages deployment tail": "Streams the deployment's logs; changes nothing",
|
|
431
|
+
"pages secret list": "Lists secret names; never their values",
|
|
432
|
+
"pages dev": LOCAL,
|
|
433
|
+
"pages functions build": LOCAL,
|
|
434
|
+
"queues list": R,
|
|
435
|
+
"queues info": R,
|
|
436
|
+
"vectorize list": R,
|
|
437
|
+
"hyperdrive list": R,
|
|
438
|
+
"workflows list": R,
|
|
439
|
+
"ai models": R
|
|
440
|
+
}
|
|
441
|
+
};
|
|
@@ -128,7 +128,25 @@ const MCP_RULES = [
|
|
|
128
128
|
},
|
|
129
129
|
...needs("add_collaborator", "login"),
|
|
130
130
|
// The login as given in the summary, lower case in the target (GitHub folds logins): the "collaborator" hook.
|
|
131
|
-
{ match: "add_collaborator", action: "github.repo.collaborator", hook: "collaborator" }
|
|
131
|
+
{ match: "add_collaborator", action: "github.repo.collaborator", hook: "collaborator" },
|
|
132
|
+
// Tools older servers had and today's split up (`issue_write`, `pull_request_review_write`): writes, named as
|
|
133
|
+
// today's are (2026-11-20; they were reads while issues and reviews weren't governed).
|
|
134
|
+
...needs("update_issue"),
|
|
135
|
+
{ match: "update_issue", action: "github.issue.edit", on: "repo", summary: "Edit an issue in {owner}/{repo}" },
|
|
136
|
+
...needs("create_pending_pull_request_review"),
|
|
137
|
+
{
|
|
138
|
+
match: "create_pending_pull_request_review",
|
|
139
|
+
action: "github.pulls.create_review",
|
|
140
|
+
on: "repo",
|
|
141
|
+
summary: "Start a pull request review in {owner}/{repo}"
|
|
142
|
+
},
|
|
143
|
+
...needs("create_and_submit_pull_request_review"),
|
|
144
|
+
{
|
|
145
|
+
match: "create_and_submit_pull_request_review",
|
|
146
|
+
action: "github.pulls.create_review",
|
|
147
|
+
on: "repo",
|
|
148
|
+
summary: "Review a pull request in {owner}/{repo}"
|
|
149
|
+
}
|
|
132
150
|
];
|
|
133
151
|
/** Write methods on a route, each to the same rule. */
|
|
134
152
|
const writes = (route, rule) => ["POST", "PUT", "PATCH", "DELETE"].map((method) => ({ match: `${method} ${route}`, ...rule }));
|
|
@@ -162,7 +162,6 @@ const MCP_HINT = [
|
|
|
162
162
|
];
|
|
163
163
|
const MCP_NOT_GOVERNED = [
|
|
164
164
|
"create_issue",
|
|
165
|
-
"update_issue",
|
|
166
165
|
"issue_write",
|
|
167
166
|
"add_issue_comment",
|
|
168
167
|
"sub_issue_write",
|
|
@@ -174,12 +173,10 @@ const MCP_NOT_GOVERNED = [
|
|
|
174
173
|
"update_pull_request",
|
|
175
174
|
"update_pull_request_branch",
|
|
176
175
|
"pull_request_review_write",
|
|
177
|
-
"create_pending_pull_request_review",
|
|
178
176
|
"add_comment_to_pending_review",
|
|
179
177
|
"add_reply_to_pull_request_comment",
|
|
180
178
|
"submit_pending_pull_request_review",
|
|
181
179
|
"delete_pending_pull_request_review",
|
|
182
|
-
"create_and_submit_pull_request_review",
|
|
183
180
|
"request_copilot_review",
|
|
184
181
|
"create_branch",
|
|
185
182
|
"create_repository",
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { DiscoveredNode, PlatformCatalog, ResourceTypeDef } from "../../controlPlane.generated.js";
|
|
2
|
+
/**
|
|
3
|
+
* Kubernetes (`kubectl` and `helm`), decided only through the CLI guard: Passport reads no cluster, so there is
|
|
4
|
+
* nothing to connect, and the guard decides every consequential command it sees. The tree is cluster › namespace ›
|
|
5
|
+
* kind/name, named from the kubeconfig context on the computer (its name only, never a credential) and the command's
|
|
6
|
+
* own words. Nodes are created the first time a decision lands on them.
|
|
7
|
+
*
|
|
8
|
+
* Production (docs/design/control-plane.md, "Production"): a context or kubeconfig cluster named prod or production,
|
|
9
|
+
* or a namespace named so, is production; a cluster that runs on the computer itself (minikube, kind, Docker Desktop)
|
|
10
|
+
* isn't (the app's rule); anything else is unknown, which counts as production.
|
|
11
|
+
*/
|
|
12
|
+
export declare const KUBERNETES = "kubernetes";
|
|
13
|
+
export declare const KUBERNETES_SERVICE = "kubernetes/clusters";
|
|
14
|
+
/** What a resource is, for its node type, its icon, and the action a change to it is. */
|
|
15
|
+
export type KubeCategory = "workload" | "pod" | "network" | "config" | "secret" | "storage" | "access" | "machine" | "namespace" | "object";
|
|
16
|
+
type KindDef = {
|
|
17
|
+
kind: string;
|
|
18
|
+
category: KubeCategory;
|
|
19
|
+
clusterScoped?: true;
|
|
20
|
+
};
|
|
21
|
+
/** A resource type as kubectl or a manifest names it ("deploy", "deployments.apps", "Deployment"); an unknown one
|
|
22
|
+
* (a custom resource) is an object of its own name, namespaced. Null when it isn't a type's shape. */
|
|
23
|
+
export declare function kubeKind(raw: string): KindDef | null;
|
|
24
|
+
/** Node types, by category; a cluster, a namespace, and a Helm release are their own. */
|
|
25
|
+
export declare const KUBERNETES_TYPES: readonly ResourceTypeDef[];
|
|
26
|
+
export declare const KUBERNETES_CATALOG: PlatformCatalog;
|
|
27
|
+
/** Where a command lands: the context it runs against (null when the guard can't tell), and its namespace (none for
|
|
28
|
+
* a cluster-wide command). */
|
|
29
|
+
export type KubePlace = {
|
|
30
|
+
context: KubeContextName | null;
|
|
31
|
+
namespace?: string;
|
|
32
|
+
};
|
|
33
|
+
/** A kubeconfig context as the guard reads it: its name, its cluster's name, and its default namespace. */
|
|
34
|
+
export type KubeContextName = {
|
|
35
|
+
name: string;
|
|
36
|
+
cluster?: string;
|
|
37
|
+
namespace?: string;
|
|
38
|
+
};
|
|
39
|
+
/** A node the guard names, with what it says about production (the server keeps it on the node it creates). */
|
|
40
|
+
export type KubeNode = DiscoveredNode & {
|
|
41
|
+
production?: boolean;
|
|
42
|
+
};
|
|
43
|
+
/** A name the guard may send: one line, bounded, no control characters. */
|
|
44
|
+
export declare const safeKubeName: (name: string | undefined) => name is string;
|
|
45
|
+
/** Production by name (`PRODUCTION_NAME`), else the app's rule for local clusters, else unknown. */
|
|
46
|
+
export declare function kubeProduction(context: KubeContextName | null, namespace?: string): boolean | undefined;
|
|
47
|
+
export declare const kubeIds: {
|
|
48
|
+
platform: string;
|
|
49
|
+
service: string;
|
|
50
|
+
cluster: (context: string) => string;
|
|
51
|
+
namespace: (context: string, namespace: string) => string;
|
|
52
|
+
object: (type: string, key: string) => string;
|
|
53
|
+
};
|
|
54
|
+
/** The node of a place: its namespace, else its cluster, else every cluster (the guard couldn't tell which). */
|
|
55
|
+
export declare function placeNode(place: KubePlace): {
|
|
56
|
+
nodeId: string;
|
|
57
|
+
nodes: KubeNode[];
|
|
58
|
+
};
|
|
59
|
+
/** A namespace's own node, when the command names one as its object (`delete namespace shop`). */
|
|
60
|
+
export declare function namespaceNode(context: KubeContextName | null, namespace: string): {
|
|
61
|
+
nodeId: string;
|
|
62
|
+
nodes: KubeNode[];
|
|
63
|
+
};
|
|
64
|
+
/** One named resource's node (`deployment/web` in shop), with the chain above it. A namespace is its own node; a
|
|
65
|
+
* cluster-scoped resource hangs off the cluster. Without a context: the place's node, nothing created. */
|
|
66
|
+
export declare function objectNode(place: KubePlace, kind: KindDef, name: string): {
|
|
67
|
+
nodeId: string;
|
|
68
|
+
nodes: KubeNode[];
|
|
69
|
+
label: string;
|
|
70
|
+
};
|
|
71
|
+
/** A Helm release's node. */
|
|
72
|
+
export declare function releaseNode(place: KubePlace, name: string): {
|
|
73
|
+
nodeId: string;
|
|
74
|
+
nodes: KubeNode[];
|
|
75
|
+
};
|
|
76
|
+
export {};
|