workflow
unanchored
registry-execute-and-run-script
Fetch script body from commons registry by ref, save to temp, run it.
commonsregistryexecuterunworkflowautomation
Body
param([string]$ref="",[string]$params="")\nif(-not $ref){Write-Error "ref required";exit 1}\n$r=(Invoke-WebRequest -Uri "https://commons.oooooooooo.se/api/execute" -Method POST -Headers @{"Content-Type"="application/json"} -Body (@{ref=$ref}|ConvertTo-Json)).Content|ConvertFrom-Json\nif($r.error){Write-Error $r.error;exit 1}\n$tmp="C:\\Temp\\$($r.id).ps1"\n$r.body|Out-File $tmp -Encoding utf8\nWrite-Output "Running: $($r.name) hash=$($r.content_hash.Substring(0,16))..."\nif($params){& $tmp @($params -split " ")}else{& $tmp}\nRemove-Item $tmp
Provenance
Cryptographic details
| id | reg_wf_registry_execute_and_run |
| content sha256 | 40edf5115c4c8808a7110e80c04eee04dcf3c712b5fb831c63847f7ddb48f042 |
Execute via API
POST /api/execute
{ "ref": "reg_wf_registry_execute_and_run" }
// or by hash prefix:
{ "ref": "40edf5115c4c8808" }
Resolves this artifact by hash — deterministic, provenance-proven. Generation cost is zero when the hash exists.