Skip to content

HARP-REQUESTED-ACTIONS

Version: 0.2 Draft (Standards-Grade) Status: Draft Specification (Extension) Namespace: org.harp.requestedActions


This extension allows an enforcer to embed a set of requested UI actions within a HARP artifact. The approver application renders these actions as buttons (or equivalent controls) in place of the default Approve / Reject pair.

Every action maps to a strict HARP-CORE decision (approve or reject). Captions and styles are presentation hints only — they influence the UI but never change the underlying decision semantics.


Place org.harp.requestedActions inside the artifact plaintext’s extensions object.


{
"org.harp.requestedActions": {
"version": 1,
"actions": [
{ "id": "approve", "caption": "Approve", "style": "primary", "decision": "approve" },
{ "id": "reject", "caption": "Reject", "style": "danger", "decision": "reject" }
]
}
}
FieldTypeRequiredDescription
versionintegerYesExtension schema version. Must be 1.
actionsarrayYesOrdered list of action items.
actions[].idstringYesUnique identifier within this extension instance (case-insensitive).
actions[].captionstringYesHuman-readable button label. Non-empty, trimmed.
actions[].stylestringNoVisual hint: "primary", "secondary", "danger". Defaults to "secondary". Unknown values normalize to "secondary".
actions[].decisionstringYesHARP-CORE decision: "approve" or "reject".

  1. version MUST equal 1. Any other value → extension is ignored (fallback to defaults).
  2. actions array MUST contain 1–5 items.
  3. Action id values MUST be unique (case-insensitive comparison).
  4. caption MUST be a non-empty string after trimming whitespace.
  5. decision MUST be exactly "approve" or "reject" (case-sensitive).
  6. style is optional. Unknown values normalize to "secondary" — they MUST NOT cause validation failure.

If any validation rule fails, the entire extension MUST be ignored and the approver MUST fall back to the default Approve / Reject buttons.


If the extension is absent, invalid, or cannot be decrypted, approvers MUST show the default Approve / Reject pair.

Default actions:

[
{ "id": "approve", "caption": "Approve", "style": "primary", "decision": "approve" },
{ "id": "reject", "caption": "Reject", "style": "danger", "decision": "reject" }
]

The extensions object is part of the artifact plaintext. Under HARP canonicalization (JCS / RFC 8785 → SHA-256), the extension data is included in the artifact hash automatically.


Normative JSON Schema: harp-spec/extensions/harp-requested-actions.schema.json