action is an AUP cross-device primitive, not a Web Device layout component and not a Web-only widget. It is one of the 18 names in AUP_PRIMITIVES and appears in every target's DeviceCaps.primitives map as native, webview, partial, or unsupported.
Contract
| Field | Value |
|---|---|
| Primitive name | action |
| Layer | AUP cross-device primitive (AUP_PRIMITIVES) |
| Public status | released |
| Document capability | native |
| Shared degradation chain | None (document reports native) |
| Author entry | AUP tree · Markdown ::action (often inside action-card) · DSL |
| Document renderer / notes | renderer/primitives/action.ts (safeHref); cards synthesize action nodes |
| Showcase evidence | form / portal pages; document cards path on markdown unit pages |
When to use
You need a labeled operation: navigation href, or (on interactive targets) events.click / exec.
When not to use
On public docs, use navigation-only actions. Do not promise AFS exec or destructive confirmations from a static document sample.
Sample contract
| Field | Value |
|---|---|
| Purpose | Navigation-only action on document |
| Boundaries | No exec, no AFS write, no session |
| Author entry | ::action{…} |
| Surface | Web Device document |
| Public status | released |
| Fallback / failure | Unsafe href schemes rejected; missing href → non-link span/button chrome |
| Verification | Routes below · arc --version = 2.0.0-beta.28 |
Document sample (navigation action)
This example places an ordinary navigation href with no event, exec, or data write.
Source:
::action{label="Open live example contract" href="/en/docs/aup/live-example-contract/" variant="primary"}Rendered:
Open live example contractNon-link label (no href)
Source:
::action{label="Label only — not a navigation target" variant="secondary"}Rendered:
Label only — not a navigation targetCard composition: action-card.
Failure and limits
| Situation | Expected result |
|---|---|
javascript: / data: href | Rejected by safeHref; not a clickable privileged link |
Missing href | Non-link presentation (span / button path without navigation) |
Expecting exec or AFS write | Out of contract on static document samples |
| Nested inside action-card | Still navigation-only unless a separate interactive runtime is proven |
Verification evidence
| Item | Value |
|---|---|
| Baseline | 2026-08-09 · arc --version → 2.0.0-beta.28 |
| Capability row | docs/aup/capability-matrix.md (internal, non-routed) · action |
| Implementation | content-reader.ts (generic ::action); renderer/primitives/action.ts (safeHref) |
| Public routes | /en/docs/aup/primitives/action/ · /zh/docs/aup/primitives/action/ |
| Local run | arc service start --blocklet blocklets/arcblock --port 4900 · click navigation action → ordinary navigation only |
| Accept | Primary action navigates; label-only action is not a privileged write; no exec |
Evidence anchors
| Item | Value |
|---|---|
| Registry | packages/aup/src/aup-types.ts · AUP_PRIMITIVES |
| Document caps | providers/runtime/web-device/src/device-caps.ts · DEVICE_CAPS_DOCUMENT |
| Degradation | packages/aup/src/degradation.ts · DEGRADATION_CHAINS |
| Internal matrix | docs/aup/capability-matrix.md (internal, non-routed) |
| Taxonomy hub | Primitive taxonomy and evidence |
| Sample contract rules | Live examples: scope and contract |