You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/cli/src/output.ts
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -431,6 +431,8 @@ Options:
431
431
wp-codebox/preview-lease/v1 envelope for public/local URL, expiry, alignment, and handoff metadata.
432
432
--timeout <duration> Maximum live recipe-run duration before emitting a structured timeout failure. Defaults to 25m.
433
433
--policy <json|file> Runtime policy JSON or path to a JSON file. For recipe-run and recipe validate, this overrides the recipe-derived runtime policy and must include every command required by the recipe setup, probes, and workflow.
434
+
--approve-external-service-writes
435
+
Explicitly approve short-lived managed writes to declared external-service boundaries when policy.approvals is on-write.
434
436
--dry-run Validate recipe-run and emit a resolved JSON plan without booting Playground or writing temp workspaces.
issues.push({code: "runtime-policy-external-service-network-denied",path: "$.policy.network",message: "External MySQL runtime services require network access to their declared external-service hosts."})
543
+
}
544
+
if(policy.approvals!=="on-write"){
545
+
issues.push({code: "runtime-policy-external-service-approval-required",path: "$.policy.approvals",message: "External MySQL runtime services require approvals=on-write and explicit write approval at execution time."})
if(!/^[A-Za-z0-9][A-Za-z0-9_.-]*$/.test(service.id))addIssue("invalid-runtime-service-id",`${path}.id`,"Runtime service ids must be stable identifiers.")
744
765
if(ids.has(service.id))addIssue("duplicate-runtime-service-id",`${path}.id`,`Runtime service ids must be unique: ${service.id}`)
745
766
ids.add(service.id)
746
767
if(!["mysql","redis","smtp","http"].includes(service.kind))addIssue("unsupported-runtime-service-kind",`${path}.kind`,`Unsupported managed runtime service kind: ${service.kind}`)
768
+
if(service.configuration?.provider==="external"){
769
+
if(service.kind!=="mysql")addIssue("unsupported-runtime-service-provider",`${path}.configuration.provider`,"The external provider supports only MySQL-compatible services.")
if(!boundary)addIssue("missing-runtime-service-external-boundary",`${path}.configuration.externalService`,"External MySQL services must reference an inputs.externalServices boundary.")
772
+
else{
773
+
if((boundary.allowedHosts??[]).length===0)addIssue("missing-runtime-service-host-allowlist",`${path}.configuration.externalService`,"External MySQL service boundaries must explicitly allow at least one host.")
774
+
if(boundary.writes!=="allowed-with-approval")addIssue("runtime-service-writes-not-approved",`${path}.configuration.externalService`,"External MySQL service boundaries must declare writes=allowed-with-approval.")
if(name&&exposedEnvironment.has(name))addIssue("runtime-service-admin-env-exposed",`${path}.configuration.${field}`,`External service administration environment must remain host-only: ${name}`)
if(service.configuration[field]!==undefined)addIssue("unsupported-external-runtime-service-option",`${path}.configuration.${field}`,`External MySQL services do not support ${field}.`)
0 commit comments