Headless actions
Use a headless action when the entry program should run immediately for the clicked asset.
Every process launch uses the plugin folder as its working directory, closes stdin, selects the declared runtime, and receives a sanitized environment with Oruva's secrets and backend tokens removed. Success is exit code 0. A launch is refused unless the plugin is enabled, approved, and unchanged since approval: Oruva re-hashes the folder before running, so a plugin whose files changed shows Re-approval required instead of running.
An action without ui follows the original v1 contract:
- Manifest
argsare substituted and passed as a real argv array. - stdout and stderr are captured separately, up to 64 KiB each, and shown to the user. Keep the result concise.
- The timeout is 30 seconds; an overrun is killed and reported as a failure.
- Headless actions remain single-asset actions. A multi-selection does not become one batch invocation: the action runs once for the clicked asset.
A minimal Python entry that honors all of this:
"""Minimal Oruva Plugin API v1 example."""
from __future__ import annotations
import argparse
import json
from pathlib import Path
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--asset-path", required=True)
parser.add_argument("--asset-name", required=True)
parser.add_argument("--asset-id", required=True)
args = parser.parse_args()
source = Path(args.asset_path).resolve()
report = source.with_name(source.name + ".oruva-report.txt")
report.write_text(
json.dumps(
{"asset_id": args.asset_id, "asset_name": args.asset_name, "asset_path": str(source)},
indent=2,
),
encoding="utf-8",
)
print(f"Report written to {report}")
return 0
if __name__ == "__main__":
raise SystemExit(main())