◈ PulseFlow Cloud / CLI Tools
Fictional command line · documentation fixture

Extensibility / protocol v1

Extend the output, not the trust boundary.

A plugin can summarize already-authorized results or adapt them to a team's workflow. It should not inherit every credential merely because the CLI launched it.

Discovery and registration

The imagined CLI discovers explicitly registered executables named pulseflow-<name>. Registration records an absolute path, version and expected checksum. It does not execute arbitrary programs found in the current working directory or install code based on command-name typos.

# Illustrative commands only.
pulseflow plugins list --json
pulseflow plugins inspect durations --json
pulseflow plugins run durations --input trace-summary.json --json

Installation must be a deliberate, reviewed action outside an untrusted project checkout. Verify the publisher and dependency chain, then pin the expected artifact. A checksum proves integrity relative to a known value; it does not establish that the publisher is trustworthy.

Versioned input

{
  "api_version": 1,
  "workspace_id": "ws_demo",
  "request_id": "req_demo_plugin_12",
  "data": {
    "traces": [
      {"id": "tr_demo_1", "duration_ms": 184, "status": "succeeded"},
      {"id": "tr_demo_2", "duration_ms": 620, "status": "failed"}
    ]
  }
}

Input arrives as one UTF-8 JSON object on stdin, capped at 1 MiB before parsing. A plugin must reject unsupported protocol versions, validate numeric fields and ignore compatible unknown fields. Raw authorization headers, tokens and unrestricted event payloads are excluded by default.

Versioned output

{
  "api_version": 1,
  "ok": true,
  "summary": {
    "trace_count": 2,
    "mean_duration_ms": 402,
    "failed_count": 1
  },
  "warnings": []
}

Return one result on stdout, human diagnostics on stderr and a nonzero exit code for failure. Avoid mixing progress bars with JSON. Enforce output-size limits so a broken plugin cannot fill memory or a CI artifact store.

Execution controls

ControlReference defaultWhy it matters
LaunchArgument array; no shell interpolationPrevents treating trace fields as shell syntax
EnvironmentExplicit allowlist; tokens omittedReduces accidental credential exposure
Deadline5 secondsBounds a stalled extension
Input / output1 MiB eachLimits memory and log growth
CancellationTerminate child on caller abortPrevents abandoned background work

Isolation is not automatic

A child process is not a security sandbox. A real untrusted plugin needs operating-system isolation, constrained filesystem access and explicit network policy. Merely omitting a token does not prevent it from reading other files available to the same user. Run only reviewed plugins on trusted hosts.

Author acceptance checklist

See command output conventions and CI restrictions before wiring an extension into a deployment gate.