Xema Shell API: schemas

The request and response bodies of the operations in this API.

ShellCommandDescriptorDto

PropertyTypeRequiredDescription
authorityEffectone of "none", "expanding"noWhether invoking the command grants, expands or reassigns authority. Joined monotonically with the shared classifier the capability router runs, so a declaration may raise it and can never switch the self-escalation guard off.
examplesarray of stringyesExample invocations.
namestringyesCommand name (the verb invoked as xema <name>).
outputSchemaobjectnoJSON Schema reference for the structured output, when declared. Carried verbatim from the kernel JsonSchemaRefStub ({ "$ref": string }); the public help endpoint never resolves it. Modelled as a free-form object because a literal $ref-keyed property collides with the JSON Reference keyword in the generated OpenAPI schema.
reachone of "owner", "integration", "platform"noHow far outside the invoking subject the command reaches, when it reaches further than the caller. Absent means owner. Joined monotonically with the platform derivation: it may raise, never lower.
relatedConceptsarray of stringyesRelated XemaObjectRef concept strings (e.g. xema://concept/biome).
requiredCapabilitiesarray of stringyesCapabilityRef strings the command requires (enforced by xema-capability-router, not here).
requiredZonesarray of stringnoEnvironment slugs the command may run against (e.g. project, sandbox).
requiresApprovalbooleanyesWhether invoking the command requires explicit human approval, projected verbatim onto its capability descriptor.
riskTierone of "low", "medium", "high", "critical"yesRisk tier of invoking the command, projected verbatim onto its capability descriptor. low is what admits a capability to the org-admin baseline bundle, so it is a declaration, never a default.
safeForAgentsbooleanyesWhether the command may be handed to an autonomous agent unattended. ADVISORY: nothing enforces it today — measured 2026-09-06, the identifier occurs in zero files under biomes/xema-capability-router, against a control of 11 files for requiresApproval, which the router does read. This description previously claimed the router enforced it.
sideEffectsstringyesWhat running the command changes — the sentence a caller reads before invoking. Projected verbatim onto the capability descriptor.
summarystringyesOne-line human summary of what the command does.
syntaxstringyesUsage syntax string (e.g. xema help [<command>]).

ShellHelpCommandResponseDto

PropertyTypeRequiredDescription
commandShellCommandDescriptorDtoyesThe matching command descriptor.

ShellHelpCommandResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataShellHelpCommandResponseDtoyes

ShellHelpListResponseDto

PropertyTypeRequiredDescription
commandsarray of ShellCommandDescriptorDtoyesEvery built-in Shell command descriptor, served verbatim from the registry.

ShellHelpListResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataShellHelpListResponseDtoyes

ShellParseResponseDto

PropertyTypeRequiredDescription
namestringyes
optionsobjectyes
positionalarray of stringyes
rawarray of stringyes

ShellParseResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataShellParseResponseDtoyes

ShellRunDenialDto

PropertyTypeRequiredDescription
capabilitystringyes
codestringyes
environmentstringyes
reasonsarray of ShellRunDenialReasonDtoyes
suggestionsarray of objectyes

ShellRunDenialReasonDto

PropertyTypeRequiredDescription
codestringyes
detailstringyes

ShellRunDiagnosticDto

PropertyTypeRequiredDescription
codestringyesStructured diagnostic code (closed per handler).
levelone of "info", "warn", "error"yes
messagestringyes

ShellRunRequestDto

PropertyTypeRequiredDescription
argvarray of stringyesStructured argv array. Never a raw string — no shell eval anywhere in the platform.
cwdstringnoXVFS path the command runs against — passed through to handlers that take a cwd.
outputModeone of "json", "human"yesClosed-set output mode. Agent invocations through the shell:run@1 capability force json.
stdinobjectnoOptional structured stdin for commands that take it.

ShellRunResponseDto

PropertyTypeRequiredDescription
auditIdstringyes
denialShellRunDenialDtono
diagnosticsarray of ShellRunDiagnosticDtono
exitCodenumberyesProcess-style exit code (0 = success).
resultobjectnoStructured handler output (shape varies per command).
statusone of "allowed", "denied"yes

ShellRunResponseDtoDataEnvelope

PropertyTypeRequiredDescription
dataShellRunResponseDtoyes

SpaceKind

Ownership tier (system | org | project | app | session | biome | user).

Type: one of "system", "org", "project", "app", "session", "biome", "user"

SpaceRefDto

PropertyTypeRequiredDescription
biomeIdstringno
orgIdstringno
projectIdstringno
tierSpaceKindyesOwnership tier (system | biome | org | project | user).
userIdstringno

XvfsResolvedDto

PropertyTypeRequiredDescription
kindstringyesObject kind: open, kebab-case, contributed by the biome that owns the noun.
payloadobjectyesKind-specific payload. Schema is supplied by the owning domain contract package.
refstringyesCanonical xema://... ref this path resolved to.
scopeSpaceRefDtoyes

XvfsResolvedDtoDataEnvelope

PropertyTypeRequiredDescription
dataXvfsResolvedDtoyes

XvfsWriteBodyDto

PropertyTypeRequiredDescription
payloadobjectyesKind-specific payload to write/upsert at the resolved object ref. Schema is owned by the object-registry-api for the resolved XemaObjectKind.

XvfsWriteResultDto

PropertyTypeRequiredDescription
createdbooleanyesWhether a new XemaObject was created (true) or an existing one was updated (false).
refstringyesCanonical xema://... ref that was written.

XvfsWriteResultDtoDataEnvelope

PropertyTypeRequiredDescription
dataXvfsWriteResultDtoyes