OpenSite/Reference/Features/Command registry: Difference between revisions
BathAfrica (talk | contribs) Use BathAfrica sidebar contents without duplicate inline contents box |
BathAfrica (talk | contribs) Reorganize OpenSite reference with shared scope and related workflows |
||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{OpenSite scope}} | |||
{{BathAfrica Feature | {{BathAfrica Feature | ||
|id=commands.api | |id=commands.api | ||
|summary=Run a registered command with typed arguments, transaction rules and authorization shared across application hosts. | |summary=Run a registered command with typed arguments, transaction rules and authorization shared across application hosts. | ||
| Line 14: | Line 14: | ||
}} | }} | ||
== Try this workflow == | |||
[[OpenSite/Guides/Discover commands|Discover commands]] — a worked lesson with expected results. | |||
== Documentation basis == | == Documentation basis == | ||
| Line 24: | Line 27: | ||
[[OpenSite|OpenSite overview]] · [[OpenSite/Reference|Reference]] · [[OpenSite/Guides|Guides]] | [[OpenSite|OpenSite overview]] · [[OpenSite/Reference|Reference]] · [[OpenSite/Guides|Guides]] | ||
[[Category:OpenSite documentation]] | [[Category:OpenSite documentation]] | ||
<div class="os-page-nav">{{Docnav|OpenSite/Getting started|OpenSite/Guides|OpenSite/Guides|All guides}}</div> | |||
Revision as of 13:59, 29 October 2026
Run a registered command with typed arguments, transaction rules and authorization shared across application hosts.
- Stable identifier
commands.api
Status reported by source
Implemented in the reviewed development source. Historical test evidence is recorded by the repository; no test rerun or product release is claimed by this publication.
Units
Quantity arguments are canonical SI values plus the unit id supplied by the caller.
Behavior
The id is provider.name plus a version. Metadata can be registered without an executor. Execution validates arguments, rejects a stale document handle, and checks authorization again. A document edit begins one transaction and rolls it back when the edit is rejected. opensite-cli commands lists the registry.
Errors
unknown_command, command_conflict, command_unavailable, authorization_required, authorization_denied, stale_document, document_modified, cancelled, and command_failed. A rejected edit does not change the published revision.
Limitations
Jobs here do not launch an external solver. A file already replaced is not rolled back by a later failed command. The development allow-all policy is not entitlement enforcement. Direct document/settings methods do not automatically pass through registry authorization.
Available hosts
C++ application services, the CLI, embedded Python and desktop workflows. Plugin commands use the same registry.
Licensing and access
A command with a capability is checked inside execute. The development CLI installs an allow-all policy. The production Python host does not. Website login is not implemented.
Verification evidence
Repository evidence references (not rerun for this publication): CTest application.commands. ADR-0023. Local Windows results are in docs/verification/Phase-4-Acceptance.md.
Try this workflow
Discover commands — a worked lesson with expected results.
Documentation basis
Source-reviewed against development commit 77c3fee13944bcc4b5d487c77eb1f82fbe4c6ea7, branch feature/phase-13c-properties-python-expressions. This review inspected the implementation and repository evidence; it did not run the Windows application or repeat CTest.
src/application/command.cppsrc/application/builtins.cppsrc/application/workspace.cpp