HARP-REQUESTED-ACTIONS
Version: 0.2 Draft (Standards-Grade)
Status: Draft Specification (Extension)
Namespace: org.harp.requestedActions
Overview
Section titled “Overview”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.
Extension key
Section titled “Extension key”Place org.harp.requestedActions inside the artifact plaintext’s extensions object.
Normative model
Section titled “Normative model”{ "org.harp.requestedActions": { "version": 1, "actions": [ { "id": "approve", "caption": "Approve", "style": "primary", "decision": "approve" }, { "id": "reject", "caption": "Reject", "style": "danger", "decision": "reject" } ] }}Fields
Section titled “Fields”| Field | Type | Required | Description |
|---|---|---|---|
version | integer | Yes | Extension schema version. Must be 1. |
actions | array | Yes | Ordered list of action items. |
actions[].id | string | Yes | Unique identifier within this extension instance (case-insensitive). |
actions[].caption | string | Yes | Human-readable button label. Non-empty, trimmed. |
actions[].style | string | No | Visual hint: "primary", "secondary", "danger". Defaults to "secondary". Unknown values normalize to "secondary". |
actions[].decision | string | Yes | HARP-CORE decision: "approve" or "reject". |
Validation rules
Section titled “Validation rules”versionMUST equal1. Any other value → extension is ignored (fallback to defaults).actionsarray MUST contain 1–5 items.- Action
idvalues MUST be unique (case-insensitive comparison). captionMUST be a non-empty string after trimming whitespace.decisionMUST be exactly"approve"or"reject"(case-sensitive).styleis 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.
Fallback behavior
Section titled “Fallback behavior”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" }]Canonicalization & hash binding
Section titled “Canonicalization & hash binding”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.
Schema
Section titled “Schema”Normative JSON Schema: harp-spec/extensions/harp-requested-actions.schema.json