@pithy-sh/core 0.10.0 → 0.12.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/access/access.d.ts +172 -0
- package/dist/access/access.d.ts.map +1 -0
- package/dist/access/access.js +147 -0
- package/dist/access/acting.d.ts +49 -0
- package/dist/access/acting.d.ts.map +1 -0
- package/dist/access/acting.js +21 -0
- package/dist/access/policyCheck.d.ts +33 -0
- package/dist/access/policyCheck.d.ts.map +1 -0
- package/dist/access/policyCheck.js +48 -0
- package/dist/access/usage.d.ts +83 -0
- package/dist/access/usage.d.ts.map +1 -0
- package/dist/access/usage.js +104 -0
- package/dist/access/visibility.d.ts +66 -0
- package/dist/access/visibility.d.ts.map +1 -0
- package/dist/access/visibility.js +86 -0
- package/dist/audit/auditEvent.d.ts +5 -0
- package/dist/audit/auditEvent.d.ts.map +1 -1
- package/dist/audit/auditEvent.js +2 -0
- package/dist/audit/recorder.d.ts +10 -2
- package/dist/audit/recorder.d.ts.map +1 -1
- package/dist/capability/bindings.d.ts +47 -2
- package/dist/capability/bindings.d.ts.map +1 -1
- package/dist/capability/bindings.js +117 -7
- package/dist/capability/capability.d.ts +110 -28
- package/dist/capability/capability.d.ts.map +1 -1
- package/dist/capability/capability.js +2 -0
- package/dist/capability/manifest.d.ts +2 -1
- package/dist/capability/manifest.d.ts.map +1 -1
- package/dist/capability/manifest.js +1 -1
- package/dist/capability/purge.d.ts +80 -0
- package/dist/capability/purge.d.ts.map +1 -0
- package/dist/capability/purge.js +76 -0
- package/dist/capability/settings.d.ts +86 -2
- package/dist/capability/settings.d.ts.map +1 -1
- package/dist/capability/settings.js +80 -1
- package/dist/cli/commandCatalog.generated.d.ts +238 -24
- package/dist/cli/commandCatalog.generated.d.ts.map +1 -1
- package/dist/cli/commandCatalog.generated.js +251 -22
- package/dist/cli/commandFacts.d.ts +2 -1
- package/dist/cli/commandFacts.d.ts.map +1 -1
- package/dist/cli/commandFacts.js +2 -0
- package/dist/controlPlane/capability.d.ts.map +1 -1
- package/dist/controlPlane/capability.js +19 -2
- package/dist/controlPlane/context.d.ts +5 -0
- package/dist/controlPlane/context.d.ts.map +1 -1
- package/dist/controlPlane/context.js +3 -1
- package/dist/controlPlane/data/connection.d.ts +49 -12
- package/dist/controlPlane/data/connection.d.ts.map +1 -1
- package/dist/controlPlane/data/connection.js +56 -2
- package/dist/controlPlane/discovery/adminRoute.d.ts +29 -0
- package/dist/controlPlane/discovery/adminRoute.d.ts.map +1 -1
- package/dist/controlPlane/discovery/adminRoute.js +3 -0
- package/dist/controlPlane/error/errors.d.ts +4 -3
- package/dist/controlPlane/error/errors.d.ts.map +1 -1
- package/dist/controlPlane/http/cors.d.ts +4 -4
- package/dist/controlPlane/http/cors.js +4 -4
- package/dist/controlPlane/http/guard.d.ts +11 -0
- package/dist/controlPlane/http/guard.d.ts.map +1 -1
- package/dist/controlPlane/http/guard.js +17 -1
- package/dist/controlPlane/http/handlers.d.ts +139 -0
- package/dist/controlPlane/http/handlers.d.ts.map +1 -1
- package/dist/controlPlane/http/handlers.js +67 -4
- package/dist/controlPlane/http/readiness.d.ts +33 -0
- package/dist/controlPlane/http/readiness.d.ts.map +1 -0
- package/dist/controlPlane/http/readiness.js +39 -0
- package/dist/controlPlane/http/responses.d.ts +245 -0
- package/dist/controlPlane/http/responses.d.ts.map +1 -1
- package/dist/controlPlane/http/responses.js +101 -4
- package/dist/controlPlane/http/routes.d.ts +2 -0
- package/dist/controlPlane/http/routes.d.ts.map +1 -1
- package/dist/controlPlane/http/routes.js +31 -3
- package/dist/controlPlane/http/verify.d.ts.map +1 -1
- package/dist/controlPlane/http/verify.js +2 -1
- package/dist/controlPlane/migrationState/migrationState.d.ts +102 -0
- package/dist/controlPlane/migrationState/migrationState.d.ts.map +1 -0
- package/dist/controlPlane/migrationState/migrationState.js +142 -0
- package/dist/controlPlane/migrations/0003_connection_principal.d.ts +21 -0
- package/dist/controlPlane/migrations/0003_connection_principal.d.ts.map +1 -0
- package/dist/controlPlane/migrations/0003_connection_principal.js +33 -0
- package/dist/controlPlane/scope/scope.d.ts +23 -2
- package/dist/controlPlane/scope/scope.d.ts.map +1 -1
- package/dist/controlPlane/scope/scope.js +24 -3
- package/dist/createBackend.d.ts.map +1 -1
- package/dist/createBackend.js +9 -2
- package/dist/createEntrypoint.d.ts.map +1 -1
- package/dist/createEntrypoint.js +5 -3
- package/dist/crypto/envelope.d.ts +86 -0
- package/dist/crypto/envelope.d.ts.map +1 -0
- package/dist/crypto/envelope.js +129 -0
- package/dist/crypto/fieldKeys.d.ts +41 -0
- package/dist/crypto/fieldKeys.d.ts.map +1 -0
- package/dist/crypto/fieldKeys.js +56 -0
- package/dist/data/codecs.d.ts +23 -10
- package/dist/data/codecs.d.ts.map +1 -1
- package/dist/data/codecs.js +50 -36
- package/dist/entitlement/allowance.d.ts +25 -0
- package/dist/entitlement/allowance.d.ts.map +1 -0
- package/dist/entitlement/allowance.js +80 -0
- package/dist/entitlement/entitlement.d.ts +41 -0
- package/dist/entitlement/entitlement.d.ts.map +1 -1
- package/dist/entitlement/meter.d.ts +57 -0
- package/dist/entitlement/meter.d.ts.map +1 -0
- package/dist/entitlement/meter.js +13 -0
- package/dist/error/extend.d.ts +6 -5
- package/dist/error/extend.d.ts.map +1 -1
- package/dist/error/http.d.ts +168 -0
- package/dist/error/http.d.ts.map +1 -1
- package/dist/error/payload.d.ts +336 -0
- package/dist/error/payload.d.ts.map +1 -1
- package/dist/error/payload.js +116 -4
- package/dist/error/pithyError.d.ts +18 -7
- package/dist/error/pithyError.d.ts.map +1 -1
- package/dist/error/pithyError.js +6 -0
- package/dist/http/authContext.d.ts +7 -0
- package/dist/http/authContext.d.ts.map +1 -1
- package/dist/http/authContext.js +8 -1
- package/dist/http/scopeGates.d.ts +20 -0
- package/dist/http/scopeGates.d.ts.map +1 -0
- package/dist/http/scopeGates.js +36 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/logger/logger.d.ts +12 -5
- package/dist/logger/logger.d.ts.map +1 -1
- package/dist/logger/record.d.ts +98 -0
- package/dist/logger/record.d.ts.map +1 -1
- package/dist/migrations/capabilitySets.d.ts +23 -0
- package/dist/migrations/capabilitySets.d.ts.map +1 -0
- package/dist/migrations/capabilitySets.js +74 -0
- package/dist/migrations/registry.d.ts +26 -0
- package/dist/migrations/registry.d.ts.map +1 -1
- package/dist/migrations/registry.js +38 -7
- package/dist/migrations/state.d.ts +60 -0
- package/dist/migrations/state.d.ts.map +1 -0
- package/dist/migrations/state.js +46 -0
- package/dist/naming/feature.d.ts +27 -5
- package/dist/naming/feature.d.ts.map +1 -1
- package/dist/naming/feature.js +36 -6
- package/dist/naming/limits.d.ts +47 -3
- package/dist/naming/limits.d.ts.map +1 -1
- package/dist/naming/limits.js +47 -3
- package/dist/naming/provisionScope.d.ts +6 -0
- package/dist/naming/provisionScope.d.ts.map +1 -1
- package/dist/naming/provisionScope.js +8 -3
- package/dist/naming/resourceNames.d.ts +21 -2
- package/dist/naming/resourceNames.d.ts.map +1 -1
- package/dist/naming/resourceNames.js +21 -3
- package/dist/privacy/blindIndex.d.ts +27 -0
- package/dist/privacy/blindIndex.d.ts.map +1 -0
- package/dist/privacy/blindIndex.js +57 -0
- package/dist/privacy/classes.d.ts +142 -0
- package/dist/privacy/classes.d.ts.map +1 -0
- package/dist/privacy/classes.js +209 -0
- package/dist/privacy/classify.d.ts +336 -0
- package/dist/privacy/classify.d.ts.map +1 -0
- package/dist/privacy/classify.js +1024 -0
- package/dist/privacy/encrypted.d.ts +210 -0
- package/dist/privacy/encrypted.d.ts.map +1 -0
- package/dist/privacy/encrypted.js +350 -0
- package/dist/privacy/encryptedColumns.d.ts +64 -0
- package/dist/privacy/encryptedColumns.d.ts.map +1 -0
- package/dist/privacy/encryptedColumns.js +134 -0
- package/dist/privacy/fieldRotation.d.ts +34 -0
- package/dist/privacy/fieldRotation.d.ts.map +1 -0
- package/dist/privacy/fieldRotation.js +186 -0
- package/dist/privacy/inventory.d.ts +12 -0
- package/dist/privacy/inventory.d.ts.map +1 -0
- package/dist/privacy/inventory.js +154 -0
- package/dist/privacy/posture.d.ts +114 -0
- package/dist/privacy/posture.d.ts.map +1 -0
- package/dist/privacy/posture.js +136 -0
- package/dist/privacy/redact.d.ts +7 -0
- package/dist/privacy/redact.d.ts.map +1 -0
- package/dist/privacy/redact.js +404 -0
- package/dist/privacy/report.d.ts +58 -0
- package/dist/privacy/report.d.ts.map +1 -0
- package/dist/privacy/report.js +15 -0
- package/dist/privacy/retirement.d.ts +68 -0
- package/dist/privacy/retirement.d.ts.map +1 -0
- package/dist/privacy/retirement.js +72 -0
- package/dist/privacy/sealed.d.ts +87 -0
- package/dist/privacy/sealed.d.ts.map +1 -0
- package/dist/privacy/sealed.js +221 -0
- package/dist/privacy/types.d.ts +559 -0
- package/dist/privacy/types.d.ts.map +1 -0
- package/dist/privacy/types.js +2 -0
- package/dist/seed/writeD1.d.ts +7 -1
- package/dist/seed/writeD1.d.ts.map +1 -1
- package/dist/seed/writeD1.js +9 -3
- package/dist/seed/writeKv.d.ts +2 -0
- package/dist/seed/writeKv.d.ts.map +1 -1
- package/dist/seed/writeKv.js +6 -2
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +1 -1
- package/dist/worker/serviceLoopback.d.ts +36 -0
- package/dist/worker/serviceLoopback.d.ts.map +1 -0
- package/dist/worker/serviceLoopback.js +74 -0
- package/dist/workflow/faults.d.ts +12 -1
- package/dist/workflow/faults.d.ts.map +1 -1
- package/dist/workflow/faults.js +22 -15
- package/package.json +2 -2
- package/src/access/access.ts +298 -0
- package/src/access/acting.ts +59 -0
- package/src/access/policyCheck.ts +77 -0
- package/src/access/usage.ts +141 -0
- package/src/access/visibility.ts +109 -0
- package/src/audit/auditEvent.ts +4 -0
- package/src/audit/recorder.ts +10 -2
- package/src/capability/bindings.ts +159 -13
- package/src/capability/capability.ts +114 -29
- package/src/capability/purge.ts +124 -0
- package/src/capability/settings.ts +146 -2
- package/src/cli/commandCatalog.generated.ts +271 -22
- package/src/cli/commandFacts.ts +2 -0
- package/src/controlPlane/capability.ts +36 -1
- package/src/controlPlane/context.ts +4 -0
- package/src/controlPlane/data/connection.ts +90 -0
- package/src/controlPlane/discovery/adminRoute.ts +11 -0
- package/src/controlPlane/error/errors.ts +4 -3
- package/src/controlPlane/http/cors.ts +4 -4
- package/src/controlPlane/http/guard.ts +21 -0
- package/src/controlPlane/http/handlers.ts +98 -4
- package/src/controlPlane/http/readiness.ts +50 -0
- package/src/controlPlane/http/responses.ts +240 -2
- package/src/controlPlane/http/routes.ts +55 -1
- package/src/controlPlane/http/verify.ts +2 -0
- package/src/controlPlane/migrationState/migrationState.ts +200 -0
- package/src/controlPlane/migrations/0003_connection_principal.ts +37 -0
- package/src/controlPlane/scope/scope.ts +25 -2
- package/src/controlPlane/token/base64url.ts +1 -1
- package/src/createBackend.ts +28 -6
- package/src/createEntrypoint.ts +9 -3
- package/src/crypto/envelope.ts +196 -0
- package/src/crypto/fieldKeys.ts +76 -0
- package/src/data/codecs.ts +69 -37
- package/src/entitlement/allowance.ts +85 -0
- package/src/entitlement/entitlement.ts +38 -0
- package/src/entitlement/meter.ts +69 -0
- package/src/error/extend.ts +6 -5
- package/src/error/payload.ts +253 -4
- package/src/error/pithyError.ts +21 -7
- package/src/http/authContext.ts +13 -1
- package/src/http/scopeGates.ts +34 -0
- package/src/index.ts +2 -0
- package/src/logger/logger.ts +12 -5
- package/src/migrations/capabilitySets.ts +87 -0
- package/src/migrations/registry.ts +46 -2
- package/src/migrations/state.ts +94 -0
- package/src/naming/feature.ts +46 -7
- package/src/naming/limits.ts +35 -3
- package/src/naming/provisionScope.ts +19 -1
- package/src/naming/resourceNames.ts +52 -5
- package/src/privacy/blindIndex.ts +81 -0
- package/src/privacy/classes.ts +277 -0
- package/src/privacy/classify.ts +1447 -0
- package/src/privacy/encrypted.ts +513 -0
- package/src/privacy/encryptedColumns.ts +185 -0
- package/src/privacy/fieldRotation.ts +234 -0
- package/src/privacy/inventory.ts +147 -0
- package/src/privacy/posture.ts +205 -0
- package/src/privacy/redact.ts +423 -0
- package/src/privacy/report.ts +64 -0
- package/src/privacy/retirement.ts +102 -0
- package/src/privacy/sealed.ts +323 -0
- package/src/privacy/types.ts +804 -0
- package/src/seed/writeD1.ts +13 -4
- package/src/seed/writeKv.ts +6 -2
- package/src/version.generated.ts +1 -1
- package/src/worker/serviceLoopback.ts +105 -0
- package/src/workflow/faults.ts +51 -24
|
@@ -161,6 +161,41 @@ export const COMMANDS = {
|
|
|
161
161
|
},
|
|
162
162
|
"groups": []
|
|
163
163
|
},
|
|
164
|
+
"completion": {
|
|
165
|
+
"positionals": [
|
|
166
|
+
{
|
|
167
|
+
"name": "shell",
|
|
168
|
+
"required": false,
|
|
169
|
+
"variadic": false
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"flags": {
|
|
173
|
+
"--remove": {
|
|
174
|
+
"type": "boolean",
|
|
175
|
+
"required": false,
|
|
176
|
+
"repeatable": false
|
|
177
|
+
},
|
|
178
|
+
"--status": {
|
|
179
|
+
"type": "boolean",
|
|
180
|
+
"required": false,
|
|
181
|
+
"repeatable": false
|
|
182
|
+
},
|
|
183
|
+
"--json": {
|
|
184
|
+
"type": "boolean",
|
|
185
|
+
"required": false,
|
|
186
|
+
"repeatable": false
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"groups": [
|
|
190
|
+
{
|
|
191
|
+
"kind": "atMostOne",
|
|
192
|
+
"flags": [
|
|
193
|
+
"--remove",
|
|
194
|
+
"--status"
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
]
|
|
198
|
+
},
|
|
164
199
|
"contract": {
|
|
165
200
|
"positionals": [],
|
|
166
201
|
"flags": {
|
|
@@ -251,6 +286,16 @@ export const COMMANDS = {
|
|
|
251
286
|
"type": "string",
|
|
252
287
|
"required": false,
|
|
253
288
|
"repeatable": false
|
|
289
|
+
},
|
|
290
|
+
"--purpose": {
|
|
291
|
+
"type": "string",
|
|
292
|
+
"required": false,
|
|
293
|
+
"repeatable": false
|
|
294
|
+
},
|
|
295
|
+
"--kind": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"required": false,
|
|
298
|
+
"repeatable": false
|
|
254
299
|
}
|
|
255
300
|
},
|
|
256
301
|
"groups": [
|
|
@@ -278,13 +323,22 @@ export const COMMANDS = {
|
|
|
278
323
|
],
|
|
279
324
|
"any": false
|
|
280
325
|
},
|
|
326
|
+
{
|
|
327
|
+
"kind": "requires",
|
|
328
|
+
"flag": "--kind",
|
|
329
|
+
"needs": [
|
|
330
|
+
"--public-key"
|
|
331
|
+
],
|
|
332
|
+
"any": false
|
|
333
|
+
},
|
|
281
334
|
{
|
|
282
335
|
"kind": "requires",
|
|
283
336
|
"flag": "--update",
|
|
284
337
|
"needs": [
|
|
285
338
|
"--worker-url",
|
|
286
339
|
"--scope",
|
|
287
|
-
"--public-key"
|
|
340
|
+
"--public-key",
|
|
341
|
+
"--purpose"
|
|
288
342
|
],
|
|
289
343
|
"any": true
|
|
290
344
|
}
|
|
@@ -845,6 +899,10 @@ export const COMMANDS = {
|
|
|
845
899
|
"invite",
|
|
846
900
|
"testerNudge",
|
|
847
901
|
"passwordChanged",
|
|
902
|
+
"accountSuspended",
|
|
903
|
+
"accountReinstated",
|
|
904
|
+
"deletionScheduled",
|
|
905
|
+
"deletionComplete",
|
|
848
906
|
"operationalNotice",
|
|
849
907
|
"newsletter",
|
|
850
908
|
"leadCapture",
|
|
@@ -1042,11 +1100,6 @@ export const COMMANDS = {
|
|
|
1042
1100
|
"required": false,
|
|
1043
1101
|
"repeatable": false
|
|
1044
1102
|
},
|
|
1045
|
-
"--api-token": {
|
|
1046
|
-
"type": "string",
|
|
1047
|
-
"required": false,
|
|
1048
|
-
"repeatable": false
|
|
1049
|
-
},
|
|
1050
1103
|
"--r2-access-key-id": {
|
|
1051
1104
|
"type": "string",
|
|
1052
1105
|
"required": false,
|
|
@@ -1057,11 +1110,6 @@ export const COMMANDS = {
|
|
|
1057
1110
|
"required": false,
|
|
1058
1111
|
"repeatable": false
|
|
1059
1112
|
},
|
|
1060
|
-
"--r2-api-token": {
|
|
1061
|
-
"type": "string",
|
|
1062
|
-
"required": false,
|
|
1063
|
-
"repeatable": false
|
|
1064
|
-
},
|
|
1065
1113
|
"--json": {
|
|
1066
1114
|
"type": "boolean",
|
|
1067
1115
|
"required": false,
|
|
@@ -1186,6 +1234,33 @@ export const COMMANDS = {
|
|
|
1186
1234
|
},
|
|
1187
1235
|
"groups": []
|
|
1188
1236
|
},
|
|
1237
|
+
"privacy enable": {
|
|
1238
|
+
"positionals": [],
|
|
1239
|
+
"flags": {
|
|
1240
|
+
"--class": {
|
|
1241
|
+
"type": "string",
|
|
1242
|
+
"required": false,
|
|
1243
|
+
"repeatable": true
|
|
1244
|
+
},
|
|
1245
|
+
"--json": {
|
|
1246
|
+
"type": "boolean",
|
|
1247
|
+
"required": false,
|
|
1248
|
+
"repeatable": false
|
|
1249
|
+
}
|
|
1250
|
+
},
|
|
1251
|
+
"groups": []
|
|
1252
|
+
},
|
|
1253
|
+
"privacy scan": {
|
|
1254
|
+
"positionals": [],
|
|
1255
|
+
"flags": {
|
|
1256
|
+
"--json": {
|
|
1257
|
+
"type": "boolean",
|
|
1258
|
+
"required": false,
|
|
1259
|
+
"repeatable": false
|
|
1260
|
+
}
|
|
1261
|
+
},
|
|
1262
|
+
"groups": []
|
|
1263
|
+
},
|
|
1189
1264
|
"provision": {
|
|
1190
1265
|
"positionals": [],
|
|
1191
1266
|
"flags": {
|
|
@@ -1389,6 +1464,33 @@ export const COMMANDS = {
|
|
|
1389
1464
|
},
|
|
1390
1465
|
"groups": []
|
|
1391
1466
|
},
|
|
1467
|
+
"secrets retire-version": {
|
|
1468
|
+
"positionals": [
|
|
1469
|
+
{
|
|
1470
|
+
"name": "version",
|
|
1471
|
+
"required": true,
|
|
1472
|
+
"variadic": false
|
|
1473
|
+
}
|
|
1474
|
+
],
|
|
1475
|
+
"flags": {
|
|
1476
|
+
"--env": {
|
|
1477
|
+
"type": "string",
|
|
1478
|
+
"required": false,
|
|
1479
|
+
"repeatable": false
|
|
1480
|
+
},
|
|
1481
|
+
"--past-guard": {
|
|
1482
|
+
"type": "boolean",
|
|
1483
|
+
"required": false,
|
|
1484
|
+
"repeatable": false
|
|
1485
|
+
},
|
|
1486
|
+
"--json": {
|
|
1487
|
+
"type": "boolean",
|
|
1488
|
+
"required": false,
|
|
1489
|
+
"repeatable": false
|
|
1490
|
+
}
|
|
1491
|
+
},
|
|
1492
|
+
"groups": []
|
|
1493
|
+
},
|
|
1392
1494
|
"secrets rm": {
|
|
1393
1495
|
"positionals": [
|
|
1394
1496
|
{
|
|
@@ -1447,6 +1549,28 @@ export const COMMANDS = {
|
|
|
1447
1549
|
},
|
|
1448
1550
|
"groups": []
|
|
1449
1551
|
},
|
|
1552
|
+
"secrets tables": {
|
|
1553
|
+
"positionals": [],
|
|
1554
|
+
"flags": {
|
|
1555
|
+
"--env": {
|
|
1556
|
+
"type": "string",
|
|
1557
|
+
"required": false,
|
|
1558
|
+
"repeatable": false,
|
|
1559
|
+
"default": "dev"
|
|
1560
|
+
},
|
|
1561
|
+
"--worker": {
|
|
1562
|
+
"type": "string",
|
|
1563
|
+
"required": false,
|
|
1564
|
+
"repeatable": false
|
|
1565
|
+
},
|
|
1566
|
+
"--json": {
|
|
1567
|
+
"type": "boolean",
|
|
1568
|
+
"required": false,
|
|
1569
|
+
"repeatable": false
|
|
1570
|
+
}
|
|
1571
|
+
},
|
|
1572
|
+
"groups": []
|
|
1573
|
+
},
|
|
1450
1574
|
"secrets update": {
|
|
1451
1575
|
"positionals": [
|
|
1452
1576
|
{
|
|
@@ -1547,6 +1671,27 @@ export const COMMANDS = {
|
|
|
1547
1671
|
},
|
|
1548
1672
|
"groups": []
|
|
1549
1673
|
},
|
|
1674
|
+
"setup": {
|
|
1675
|
+
"positionals": [],
|
|
1676
|
+
"flags": {
|
|
1677
|
+
"--skip-install": {
|
|
1678
|
+
"type": "boolean",
|
|
1679
|
+
"required": false,
|
|
1680
|
+
"repeatable": false
|
|
1681
|
+
},
|
|
1682
|
+
"--dry-run": {
|
|
1683
|
+
"type": "boolean",
|
|
1684
|
+
"required": false,
|
|
1685
|
+
"repeatable": false
|
|
1686
|
+
},
|
|
1687
|
+
"--json": {
|
|
1688
|
+
"type": "boolean",
|
|
1689
|
+
"required": false,
|
|
1690
|
+
"repeatable": false
|
|
1691
|
+
}
|
|
1692
|
+
},
|
|
1693
|
+
"groups": []
|
|
1694
|
+
},
|
|
1550
1695
|
"storage deprovision": {
|
|
1551
1696
|
"positionals": [],
|
|
1552
1697
|
"flags": {
|
|
@@ -1586,11 +1731,6 @@ export const COMMANDS = {
|
|
|
1586
1731
|
"required": false,
|
|
1587
1732
|
"repeatable": false
|
|
1588
1733
|
},
|
|
1589
|
-
"--api-token": {
|
|
1590
|
-
"type": "string",
|
|
1591
|
-
"required": false,
|
|
1592
|
-
"repeatable": false
|
|
1593
|
-
},
|
|
1594
1734
|
"--r2-access-key-id": {
|
|
1595
1735
|
"type": "string",
|
|
1596
1736
|
"required": false,
|
|
@@ -1986,6 +2126,34 @@ export const COMMANDS = {
|
|
|
1986
2126
|
},
|
|
1987
2127
|
"groups": []
|
|
1988
2128
|
},
|
|
2129
|
+
"token forget": {
|
|
2130
|
+
"positionals": [
|
|
2131
|
+
{
|
|
2132
|
+
"name": "profile",
|
|
2133
|
+
"required": true,
|
|
2134
|
+
"variadic": false
|
|
2135
|
+
}
|
|
2136
|
+
],
|
|
2137
|
+
"flags": {
|
|
2138
|
+
"--env": {
|
|
2139
|
+
"type": "string",
|
|
2140
|
+
"required": false,
|
|
2141
|
+
"repeatable": false,
|
|
2142
|
+
"default": "dev"
|
|
2143
|
+
},
|
|
2144
|
+
"--force": {
|
|
2145
|
+
"type": "boolean",
|
|
2146
|
+
"required": false,
|
|
2147
|
+
"repeatable": false
|
|
2148
|
+
},
|
|
2149
|
+
"--json": {
|
|
2150
|
+
"type": "boolean",
|
|
2151
|
+
"required": false,
|
|
2152
|
+
"repeatable": false
|
|
2153
|
+
}
|
|
2154
|
+
},
|
|
2155
|
+
"groups": []
|
|
2156
|
+
},
|
|
1989
2157
|
"token list": {
|
|
1990
2158
|
"positionals": [],
|
|
1991
2159
|
"flags": {
|
|
@@ -2046,7 +2214,12 @@ export const COMMANDS = {
|
|
|
2046
2214
|
"vectorize:write",
|
|
2047
2215
|
"ai:read",
|
|
2048
2216
|
"zone:read",
|
|
2049
|
-
"routes:write"
|
|
2217
|
+
"routes:write",
|
|
2218
|
+
"analytics:read",
|
|
2219
|
+
"images:write",
|
|
2220
|
+
"stream:write",
|
|
2221
|
+
"queues:write",
|
|
2222
|
+
"artifacts:write"
|
|
2050
2223
|
]
|
|
2051
2224
|
},
|
|
2052
2225
|
"--json": {
|
|
@@ -2123,7 +2296,12 @@ export const COMMANDS = {
|
|
|
2123
2296
|
"vectorize:write",
|
|
2124
2297
|
"ai:read",
|
|
2125
2298
|
"zone:read",
|
|
2126
|
-
"routes:write"
|
|
2299
|
+
"routes:write",
|
|
2300
|
+
"analytics:read",
|
|
2301
|
+
"images:write",
|
|
2302
|
+
"stream:write",
|
|
2303
|
+
"queues:write",
|
|
2304
|
+
"artifacts:write"
|
|
2127
2305
|
]
|
|
2128
2306
|
},
|
|
2129
2307
|
"--keep-previous": {
|
|
@@ -2416,6 +2594,32 @@ export const COMMANDS = {
|
|
|
2416
2594
|
},
|
|
2417
2595
|
"groups": []
|
|
2418
2596
|
},
|
|
2597
|
+
"worker bind": {
|
|
2598
|
+
"positionals": [],
|
|
2599
|
+
"flags": {
|
|
2600
|
+
"--from": {
|
|
2601
|
+
"type": "string",
|
|
2602
|
+
"required": false,
|
|
2603
|
+
"repeatable": false
|
|
2604
|
+
},
|
|
2605
|
+
"--to": {
|
|
2606
|
+
"type": "string",
|
|
2607
|
+
"required": false,
|
|
2608
|
+
"repeatable": false
|
|
2609
|
+
},
|
|
2610
|
+
"--binding": {
|
|
2611
|
+
"type": "string",
|
|
2612
|
+
"required": false,
|
|
2613
|
+
"repeatable": false
|
|
2614
|
+
},
|
|
2615
|
+
"--json": {
|
|
2616
|
+
"type": "boolean",
|
|
2617
|
+
"required": false,
|
|
2618
|
+
"repeatable": false
|
|
2619
|
+
}
|
|
2620
|
+
},
|
|
2621
|
+
"groups": []
|
|
2622
|
+
},
|
|
2419
2623
|
"worker list": {
|
|
2420
2624
|
"positionals": [],
|
|
2421
2625
|
"flags": {
|
|
@@ -2447,17 +2651,27 @@ export const COMMANDS = {
|
|
|
2447
2651
|
"worker rename": {
|
|
2448
2652
|
"positionals": [
|
|
2449
2653
|
{
|
|
2450
|
-
"name": "
|
|
2451
|
-
"required":
|
|
2654
|
+
"name": "old",
|
|
2655
|
+
"required": false,
|
|
2452
2656
|
"variadic": false
|
|
2453
2657
|
},
|
|
2454
2658
|
{
|
|
2455
|
-
"name": "
|
|
2456
|
-
"required":
|
|
2659
|
+
"name": "new",
|
|
2660
|
+
"required": false,
|
|
2457
2661
|
"variadic": false
|
|
2458
2662
|
}
|
|
2459
2663
|
],
|
|
2460
2664
|
"flags": {
|
|
2665
|
+
"--from": {
|
|
2666
|
+
"type": "string",
|
|
2667
|
+
"required": false,
|
|
2668
|
+
"repeatable": false
|
|
2669
|
+
},
|
|
2670
|
+
"--to": {
|
|
2671
|
+
"type": "string",
|
|
2672
|
+
"required": false,
|
|
2673
|
+
"repeatable": false
|
|
2674
|
+
},
|
|
2461
2675
|
"--force": {
|
|
2462
2676
|
"type": "boolean",
|
|
2463
2677
|
"required": false,
|
|
@@ -2496,6 +2710,40 @@ export const COMMANDS = {
|
|
|
2496
2710
|
}
|
|
2497
2711
|
},
|
|
2498
2712
|
"groups": []
|
|
2713
|
+
},
|
|
2714
|
+
"worker unbind": {
|
|
2715
|
+
"positionals": [],
|
|
2716
|
+
"flags": {
|
|
2717
|
+
"--from": {
|
|
2718
|
+
"type": "string",
|
|
2719
|
+
"required": false,
|
|
2720
|
+
"repeatable": false
|
|
2721
|
+
},
|
|
2722
|
+
"--to": {
|
|
2723
|
+
"type": "string",
|
|
2724
|
+
"required": false,
|
|
2725
|
+
"repeatable": false
|
|
2726
|
+
},
|
|
2727
|
+
"--binding": {
|
|
2728
|
+
"type": "string",
|
|
2729
|
+
"required": false,
|
|
2730
|
+
"repeatable": false
|
|
2731
|
+
},
|
|
2732
|
+
"--json": {
|
|
2733
|
+
"type": "boolean",
|
|
2734
|
+
"required": false,
|
|
2735
|
+
"repeatable": false
|
|
2736
|
+
}
|
|
2737
|
+
},
|
|
2738
|
+
"groups": [
|
|
2739
|
+
{
|
|
2740
|
+
"kind": "exactlyOne",
|
|
2741
|
+
"flags": [
|
|
2742
|
+
"--to",
|
|
2743
|
+
"--binding"
|
|
2744
|
+
]
|
|
2745
|
+
}
|
|
2746
|
+
]
|
|
2499
2747
|
}
|
|
2500
2748
|
} as const;
|
|
2501
2749
|
|
|
@@ -2521,6 +2769,7 @@ export const GROUPS = [
|
|
|
2521
2769
|
"feature",
|
|
2522
2770
|
"media",
|
|
2523
2771
|
"payments",
|
|
2772
|
+
"privacy",
|
|
2524
2773
|
"secrets",
|
|
2525
2774
|
"storage",
|
|
2526
2775
|
"support",
|
package/src/cli/commandFacts.ts
CHANGED
|
@@ -62,6 +62,7 @@ export const WORKER_NARROWS = [
|
|
|
62
62
|
"env",
|
|
63
63
|
"init",
|
|
64
64
|
"migrate",
|
|
65
|
+
"secrets tables",
|
|
65
66
|
"seed",
|
|
66
67
|
"support deprovision",
|
|
67
68
|
"upgrade",
|
|
@@ -104,6 +105,7 @@ export const DESTRUCTIVE_COMMANDS = {
|
|
|
104
105
|
"media deprovision": "the media Worker, and with --storage its bucket",
|
|
105
106
|
remove: "a capability's wiring",
|
|
106
107
|
"secrets deprovision": "the secrets manager, and with --keys the store's keys",
|
|
108
|
+
"secrets retire-version": "a field-key version, and every ciphertext still sealed under it",
|
|
107
109
|
"secrets rm": "a stored secret",
|
|
108
110
|
"storage deprovision": "the storage Worker, and with --storage its bucket",
|
|
109
111
|
"support deprovision": "the support Workers, and with --storage its attachments",
|
|
@@ -7,17 +7,26 @@ import type { BindingSpecInput } from "../capability/bindings";
|
|
|
7
7
|
import { type Capability, defineCapability, type PithyHonoEnv } from "../capability/capability";
|
|
8
8
|
import type { DatabaseSpecMap } from "../data/databases";
|
|
9
9
|
import type { KvNamespaceSpecMap, KvRegistry } from "../kv/namespaces";
|
|
10
|
+
import { readRetirement } from "../privacy/fieldRotation";
|
|
11
|
+
import { lazyPrivacyInventory } from "../privacy/inventory";
|
|
10
12
|
import { PACKAGE_NAME, PACKAGE_VERSION } from "../version.generated";
|
|
11
13
|
import { ENVIRONMENT_VAR } from "../worker/identity";
|
|
12
14
|
import { ControlPlaneConfig, type ControlPlaneConfigInput } from "./config/config";
|
|
13
15
|
import { ControlPlaneConnection } from "./data/connection";
|
|
14
16
|
import { CONTROL_PLANE_CONNECTIONS_TABLE, type ControlPlaneDatabase, controlPlaneTables } from "./data/tables";
|
|
15
17
|
import type { CapabilityDeclaration } from "./discovery/adminRoute";
|
|
16
|
-
import { type CapabilityHealthSource, capabilityHealthSources } from "./discovery/health";
|
|
18
|
+
import { type CapabilityHealthSource, capabilityHealthSources, defineCapabilityHealth } from "./discovery/health";
|
|
17
19
|
import { createControlPlaneVerifier } from "./http/guard";
|
|
18
20
|
import { controlPlaneRouteDescriptors, registerControlPlaneRoutes } from "./http/routes";
|
|
21
|
+
import {
|
|
22
|
+
type ComposedMigrationDatabase,
|
|
23
|
+
composeMigrationDatabases,
|
|
24
|
+
MIGRATION_HEALTH_KEYS,
|
|
25
|
+
readMigrationHealth,
|
|
26
|
+
} from "./migrationState/migrationState";
|
|
19
27
|
import { controlplane_0001_init } from "./migrations/0001_init";
|
|
20
28
|
import { controlplane_0002_management_origin } from "./migrations/0002_management_origin";
|
|
29
|
+
import { controlplane_0003_connection_principal } from "./migrations/0003_connection_principal";
|
|
21
30
|
import { d1ReplayGuard } from "./replay/d1Guard";
|
|
22
31
|
import type { ReplayGuard } from "./replay/guard";
|
|
23
32
|
import {
|
|
@@ -79,6 +88,7 @@ export function controlplane(options: ControlPlaneOptions = {}): ControlPlaneCap
|
|
|
79
88
|
const migrations: Record<string, Migration> = {
|
|
80
89
|
"0001_init": controlplane_0001_init,
|
|
81
90
|
"0002_management_origin": controlplane_0002_management_origin,
|
|
91
|
+
"0003_connection_principal": controlplane_0003_connection_principal,
|
|
82
92
|
};
|
|
83
93
|
const requiredBindings: BindingSpecInput[] = [
|
|
84
94
|
// The app database — the connections table lives here, beside auth's and audit's. Not the secrets
|
|
@@ -132,6 +142,18 @@ export function controlplane(options: ControlPlaneOptions = {}): ControlPlaneCap
|
|
|
132
142
|
// assembly, because an adopter is never offered such a scope and the number could never be granted.
|
|
133
143
|
let health: ReadonlyMap<string, CapabilityHealthSource> = new Map();
|
|
134
144
|
|
|
145
|
+
// Every database this Worker binds and what this build declares for it (#729), composed by the same hook
|
|
146
|
+
// through `collectMigrationSets` — the function `pithy migrate` uses, so the route and `pithy doctor`
|
|
147
|
+
// compose the same way. The inputs differ on a D1 two Workers share: the CLI merges every co-bound
|
|
148
|
+
// Worker's sets and this Worker holds only its own, so `pending` and `undeclared` can differ there.
|
|
149
|
+
let migrationDatabases: readonly ComposedMigrationDatabase[] = [];
|
|
150
|
+
|
|
151
|
+
// Every capability this Worker composed, kept so the privacy inventory can walk their storage schemas
|
|
152
|
+
// (#132) — lazily, on the first control-plane read, and once for the isolate. Capturing the list costs
|
|
153
|
+
// nothing; walking it is deferred, so a Worker whose control plane is never called never walks.
|
|
154
|
+
let composedCapabilities: readonly Capability[] = [];
|
|
155
|
+
const privacy = lazyPrivacyInventory(() => composedCapabilities);
|
|
156
|
+
|
|
135
157
|
const capability = defineCapability({
|
|
136
158
|
name: "controlplane",
|
|
137
159
|
// `@pithy-sh/core`'s version, stamped by `scripts/stampVersions.ts` — a Worker cannot read its own
|
|
@@ -164,6 +186,14 @@ export function controlplane(options: ControlPlaneOptions = {}): ControlPlaneCap
|
|
|
164
186
|
// The seam describes itself too. Built from the same resolved `basePath` the routes mount on, so a
|
|
165
187
|
// moved mount point is reported rather than becoming a lie a client believes.
|
|
166
188
|
adminRoutes: controlPlaneRouteDescriptors(config.basePath),
|
|
189
|
+
// Two counts on the seam's own manifest entry, so a client sees *this environment is behind* on the read
|
|
190
|
+
// it already makes and calls the route only to see what. Behind `migrations:read`, which the route above
|
|
191
|
+
// requires — a connection without it gets no number rather than a zero. A database that cannot be read
|
|
192
|
+
// fails the producer, and the seam reports the summary unavailable rather than a partial total.
|
|
193
|
+
health: defineCapabilityHealth({
|
|
194
|
+
keys: MIGRATION_HEALTH_KEYS,
|
|
195
|
+
read: (c) => readMigrationHealth(c.env as Record<string, unknown>, migrationDatabases),
|
|
196
|
+
}),
|
|
167
197
|
compose: ({ capabilities }) => {
|
|
168
198
|
// Every capability, including those exposing nothing. A client rendering a capability it cannot
|
|
169
199
|
// act on is useful; a client that cannot tell "no admin surface" from "not installed" is not.
|
|
@@ -186,6 +216,8 @@ export function controlplane(options: ControlPlaneOptions = {}): ControlPlaneCap
|
|
|
186
216
|
config: { ...(cap.manifestConfig?.values ?? {}) },
|
|
187
217
|
}));
|
|
188
218
|
health = capabilityHealthSources(capabilities);
|
|
219
|
+
migrationDatabases = composeMigrationDatabases(capabilities);
|
|
220
|
+
composedCapabilities = [...capabilities];
|
|
189
221
|
},
|
|
190
222
|
middleware: [
|
|
191
223
|
(app) => {
|
|
@@ -228,6 +260,9 @@ export function controlplane(options: ControlPlaneOptions = {}): ControlPlaneCap
|
|
|
228
260
|
database,
|
|
229
261
|
composedCapabilities: () => composed,
|
|
230
262
|
composedHealth: () => health,
|
|
263
|
+
composedMigrations: () => migrationDatabases,
|
|
264
|
+
privacyInventory: privacy,
|
|
265
|
+
retirement: (env) => readRetirement(env, composedCapabilities),
|
|
231
266
|
now,
|
|
232
267
|
});
|
|
233
268
|
},
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
4
|
import { z } from "zod";
|
|
5
|
+
import { ControlPlaneActorKind } from "./data/connection";
|
|
5
6
|
import { ControlPlaneScope } from "./scope/scope";
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -56,6 +57,9 @@ export const ControlPlaneContext = z
|
|
|
56
57
|
tokenId: z
|
|
57
58
|
.string()
|
|
58
59
|
.describe("The token's `jti`, already claimed in the replay set. Recorded to tie one audit event to one call."),
|
|
60
|
+
actorKind: ControlPlaneActorKind.nullable().describe(
|
|
61
|
+
"What kind of client the connection is for — `agent`, `dashboard` or `script` — read from the adopter's own row, never from the token. The gate stamps it onto every control-plane audit row this call writes. Null for a connection registered before the kind was recorded (#721).",
|
|
62
|
+
),
|
|
59
63
|
})
|
|
60
64
|
.describe(
|
|
61
65
|
"The verified control-plane caller for one request. Never an AuthContext: a management client is not a user of the adopter's app.",
|
|
@@ -66,6 +66,81 @@ export const RegisteredKey = z
|
|
|
66
66
|
.describe("One registered public key with its validity window. Two live at once during a rotation overlap.");
|
|
67
67
|
export type RegisteredKey = z.output<typeof RegisteredKey>;
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* What kind of client a connection is for (#721): `agent`, `dashboard` or `script`.
|
|
71
|
+
*
|
|
72
|
+
* The audit trail's `actorType: "control-plane"` names all three identically, and the questions asked
|
|
73
|
+
* after an incident are exactly the ones that tell them apart — was it a person at the dashboard, a
|
|
74
|
+
* script somebody wrote, or an agent running unattended. So the kind is recorded on the connection when
|
|
75
|
+
* it is registered and stamped from there onto every row its calls write.
|
|
76
|
+
*
|
|
77
|
+
* It follows the path, never a guess: the device-code flow is a dashboard, always, and a key the
|
|
78
|
+
* operator registered themselves is whichever of the other two they say, out loud, with `--kind`.
|
|
79
|
+
*/
|
|
80
|
+
export const ControlPlaneActorKind = z
|
|
81
|
+
.enum(["agent", "dashboard", "script"])
|
|
82
|
+
.describe(
|
|
83
|
+
"What kind of client a connection is for: `agent` (an automated client acting on its own judgment, often unattended), `dashboard` (a management dashboard a person drives, registered through the device-code flow), or `script` (an operator's own automation, doing one fixed thing).",
|
|
84
|
+
);
|
|
85
|
+
export type ControlPlaneActorKind = z.output<typeof ControlPlaneActorKind>;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Who sanctioned a connection: the email address of the signed-in Cloudflare session that registered it.
|
|
89
|
+
*
|
|
90
|
+
* **A plain string, deliberately not a reference.** An adopter's `pithy_auth_users` are their customers,
|
|
91
|
+
* and the operator who registers a connection is their staff, so a join into the organization model would
|
|
92
|
+
* be empty for most of them. A string is readable by anybody, and matchable against a directory where the
|
|
93
|
+
* operator is in one.
|
|
94
|
+
*
|
|
95
|
+
* **Derived, never asserted.** No flag supplies it; the CLI reads it from `GET /user` under the session.
|
|
96
|
+
*/
|
|
97
|
+
export const ConnectionPrincipal = z
|
|
98
|
+
.email()
|
|
99
|
+
.max(254)
|
|
100
|
+
.describe(
|
|
101
|
+
"The email address of the person who sanctioned this connection, read from their signed-in Cloudflare session at registration. Never typed, so never asserted.",
|
|
102
|
+
);
|
|
103
|
+
export type ConnectionPrincipal = z.output<typeof ConnectionPrincipal>;
|
|
104
|
+
|
|
105
|
+
/** The longest purpose a connection may carry. One line on a review screen, with room to say what it does. */
|
|
106
|
+
export const MAX_CONNECTION_PURPOSE = 200;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Characters a purpose may not carry: every C0 and C1 control (so no terminal escape, no newline and no
|
|
110
|
+
* carriage return), the Unicode line and paragraph separators, every `Bidi_Control` character — the
|
|
111
|
+
* embeddings, overrides and isolates, and the LRM, RLM and ALM marks — that lets text render in a
|
|
112
|
+
* different order from the one it is stored in, and the invisible zero-width space, word joiner and
|
|
113
|
+
* byte-order mark that split a word without showing it. The zero-width joiner and non-joiner stay: Persian
|
|
114
|
+
* and the Indic scripts cannot be written without them.
|
|
115
|
+
*
|
|
116
|
+
* Each of those is a way for a sentence to look like something else once it reaches a renderer: a line
|
|
117
|
+
* in `pithy dashboard status` forged beneath the real one, a screen cleared, a scope name read backwards.
|
|
118
|
+
* Escaping them at every renderer is a promise each renderer has to keep. Refusing them at the boundary
|
|
119
|
+
* is one promise, kept here.
|
|
120
|
+
*/
|
|
121
|
+
const UNRENDERABLE = /[\p{Cc}\p{Bidi_Control}\u2028\u2029\u200B\u2060\uFEFF]/u;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* What a connection is for, in the words of whoever registered it (#721).
|
|
125
|
+
*
|
|
126
|
+
* **Required at registration, and refused when absent**, because a review listing credentials by key id
|
|
127
|
+
* cannot support the decision it exists for. **Untrusted input**: a customer writes it and something else
|
|
128
|
+
* renders it, so it is validated on the way in, and again on every read of the row.
|
|
129
|
+
*/
|
|
130
|
+
export const ConnectionPurpose = z
|
|
131
|
+
.string()
|
|
132
|
+
.trim()
|
|
133
|
+
.min(1, "Say what this client is for.")
|
|
134
|
+
.max(MAX_CONNECTION_PURPOSE, `A purpose is ${MAX_CONNECTION_PURPOSE} characters at most.`)
|
|
135
|
+
.refine(
|
|
136
|
+
(purpose) => !UNRENDERABLE.test(purpose),
|
|
137
|
+
"A purpose is one line of plain text: no control, bidi or invisible characters.",
|
|
138
|
+
)
|
|
139
|
+
.describe(
|
|
140
|
+
`What this connection's client is for, in the registering operator's words — one line of plain text, ${MAX_CONNECTION_PURPOSE} characters at most, with no control, bidi or invisible characters. Written by a customer and rendered elsewhere, so validated at the boundary.`,
|
|
141
|
+
);
|
|
142
|
+
export type ConnectionPurpose = z.output<typeof ConnectionPurpose>;
|
|
143
|
+
|
|
69
144
|
/**
|
|
70
145
|
* One management-client connection — the row in `pithy_controlplane_connections`.
|
|
71
146
|
*
|
|
@@ -112,6 +187,21 @@ export const ControlPlaneConnection = z
|
|
|
112
187
|
.describe(
|
|
113
188
|
"Where the management client that registered this connection answers — the origin the CLI calls for a verify, a rotation or a disconnect. Stored because it is not derivable: `issuer` is what that client *signs as*, and nothing says a dashboard's API answers at its own `iss`. Null for a connection registered before this column, which reads as the issuer rather than as the hosted dashboard — an older row is still a row about somebody's own deployment. Nothing on the Worker's side reads it; verification cares about `issuer` alone.",
|
|
114
189
|
),
|
|
190
|
+
authorizedBy: ConnectionPrincipal.nullable()
|
|
191
|
+
.default(null)
|
|
192
|
+
.describe(
|
|
193
|
+
"Who sanctioned this connection: the email of the signed-in Cloudflare session that registered it, never a flag. Null for a connection registered before principals were recorded (#721), which keeps working and reads as exactly that; registering again is the only way to set it.",
|
|
194
|
+
),
|
|
195
|
+
actorKind: ControlPlaneActorKind.nullable()
|
|
196
|
+
.default(null)
|
|
197
|
+
.describe(
|
|
198
|
+
"What kind of client this connection is for — `agent`, `dashboard` or `script` — stamped onto every audit row its calls write so the trail can tell them apart. Null for a connection registered before it was recorded.",
|
|
199
|
+
),
|
|
200
|
+
purpose: ConnectionPurpose.nullable()
|
|
201
|
+
.default(null)
|
|
202
|
+
.describe(
|
|
203
|
+
"What this connection's client is for, in the registering operator's words. Required at registration and editable with `pithy dashboard connect --update --purpose`; null only for a connection registered before it was recorded.",
|
|
204
|
+
),
|
|
115
205
|
scopes: sqliteJson(z.array(ControlPlaneScope)).describe(
|
|
116
206
|
"The operations this connection was granted, stored and enforced on the adopter's side. Enforced only by the caller, a scope would not be a limit at all.",
|
|
117
207
|
),
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: MIT
|
|
3
3
|
|
|
4
4
|
import { z } from "zod";
|
|
5
|
+
import { PrivacyPosture } from "../../privacy/posture";
|
|
5
6
|
import { ControlPlaneScope } from "../scope/scope";
|
|
6
7
|
import { ManifestConfigKey, ManifestConfigValues } from "./configuration";
|
|
7
8
|
import { CapabilityHealthReport, HealthSummary, HealthSummaryKey, healthReport, healthWire } from "./healthSummary";
|
|
@@ -246,6 +247,16 @@ export const ControlPlaneManifest = z
|
|
|
246
247
|
.describe(
|
|
247
248
|
"The Cloudflare version id of the build answering this call, from the `CF_VERSION_METADATA` binding, or null where the binding is absent. Opaque and per-deploy: it identifies which build is running, never which features it has. Null is honest — a Worker scaffolded before the binding was declared genuinely cannot say.",
|
|
248
249
|
),
|
|
250
|
+
versionCreatedAt: z.iso
|
|
251
|
+
.datetime()
|
|
252
|
+
.nullable()
|
|
253
|
+
.optional()
|
|
254
|
+
.describe(
|
|
255
|
+
"When the version answering this call was uploaded, ISO-8601, from the same `CF_VERSION_METADATA` binding as `version` — or null where the binding is absent. The id alone cannot tell a deploy from a rollback: a rollback reactivates an existing version, so the id returns to one already seen while this moves backwards. Relayed, never interpreted. Absent from a Worker older than #132.",
|
|
256
|
+
),
|
|
257
|
+
privacy: PrivacyPosture.optional().describe(
|
|
258
|
+
"What this project declares about privacy and what its running code holds: classes and counts, never field names (`GET /control-plane/privacy` has those, behind `privacy:read`). Present on every Worker from #132, `declared` explicitly empty when nothing was declared; absent from an older Worker.",
|
|
259
|
+
),
|
|
249
260
|
capabilities: z
|
|
250
261
|
.array(CapabilityDescriptor)
|
|
251
262
|
.describe(
|