Add archive helpers and harden task runtime

This commit is contained in:
udo
2026-05-21 00:00:23 +00:00
parent 9f7625c7fd
commit 02e153a6a7
71 changed files with 12817 additions and 305 deletions
+26
View File
@@ -0,0 +1,26 @@
CLI(Request& context)
{
context.header["Content-Type"] = "text/plain; charset=utf-8";
DTree input = cli_input(context);
String action = first(input["action"].to_string(), "ping");
if(action == "ping")
{
print("uce-unit-cli: ok\n");
print("script=", context.params["SCRIPT_FILENAME"], "\n");
return;
}
if(action == "echo")
{
print(input["message"].to_string(), "\n");
return;
}
context.set_status(400, "CLI Error");
print("unknown cli action: ", action, "\n");
}
RENDER(Request& context)
{
context.set_status(404, "Not Found");
context.header["Content-Type"] = "text/plain; charset=utf-8";
print("This unit is intended for local CLI socket invocation.\n");
}