Action Properties Reference¶
This document is auto-generated from internal/config/schema.json.
Properties are guaranteed to match the schema definition.
Artifact.capture¶
Capture file changes with enhanced metadata for LLM agents
| Property | Type | Required | Description |
|---|---|---|---|
capture_content |
boolean | No | Capture full file content before/after |
embed_plan |
boolean | No | Embed full plan in artifact for LLM context |
format |
string | No | Output format (allowed: json, markdown, both) |
include_checksums |
boolean | No | Include SHA256 checksums |
max_diff_size |
integer | No | Maximum diff size in bytes per file |
max_plan_steps |
integer | No | Don't embed plan if exceeds this many steps |
name |
string | Yes | Name of the artifact (used for output directory) |
output_dir |
string | No | Base directory for artifacts (default: './artifacts') |
steps |
array | Yes | Steps to execute while capturing changes |
Metadata:
- Category: system
Artifact.validate¶
Validate artifacts against constraints (change budgets)
| Property | Type | Required | Description |
|---|---|---|---|
allowed_paths |
array | No | Glob patterns for allowed file paths |
artifact_file |
string | Yes | Path to artifact metadata JSON file |
forbidden_paths |
array | No | Glob patterns for forbidden file paths |
max_file_size |
integer | No | Maximum file size in bytes after changes |
max_files |
integer | No | Maximum number of files allowed to change |
max_lines_changed |
integer | No | Maximum total lines changed |
require_tests |
boolean | No | Require test file changes when code files change |
Metadata:
- Category: system
Assert¶
Verify conditions without changing system state
| Property | Type | Required | Description |
|---|---|---|---|
command |
object | No | - |
file |
object | No | - |
file_sha256 |
object | No | - |
git_clean |
object | No | - |
git_diff |
object | No | - |
http |
object | No | - |
Metadata:
- Category: system
Cmd¶
Execute commands directly without shell interpolation
| Property | Type | Required | Description |
|---|---|---|---|
argv |
array | Yes | - |
capture |
boolean | No | - |
stdin |
string | No | - |
Metadata:
- Category: command
- Version: 1.0.0
Cmd_action¶
Execute commands directly without shell interpolation
| Property | Type | Required | Description |
|---|---|---|---|
argv |
array | Yes | - |
capture |
boolean | No | - |
stdin |
string | No | - |
Metadata:
- Category: command
- Version: 1.0.0
Container¶
Manage container lifecycle (running/stopped/absent) via podman or docker
| Property | Type | Required | Description |
|---|---|---|---|
command |
array | No | - |
env |
object | No | - |
extra |
array | No | - |
image |
string | No | - |
name |
string | Yes | - |
network |
string | No | - |
ports |
array | No | - |
recreate |
boolean | No | - |
restart |
string | No | - |
runtime |
string | No | - |
state |
string | No | - |
volumes |
array | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Container.image¶
Manage container images (pull/remove) via podman or docker
| Property | Type | Required | Description |
|---|---|---|---|
force_pull |
boolean | No | - |
name |
string | Yes | - |
runtime |
string | No | - |
state |
string | No | - |
Metadata:
- Category: system
- Version: 1.0.0
File.copy¶
Copy files with checksum verification and atomic writes
| Property | Type | Required | Description |
|---|---|---|---|
backup |
boolean | No | - |
checksum |
string | No | - |
dest |
string | Yes | - |
follow_symlinks |
boolean | No | - |
force |
boolean | No | - |
group |
string | No | - |
mode |
string | No | - |
owner |
string | No | - |
src |
string | Yes | - |
Metadata:
- Category: file
- Version: 1.0.0
File.download¶
Download files from URLs with checksum verification
| Property | Type | Required | Description |
|---|---|---|---|
backup |
boolean | No | - |
checksum |
string | No | - |
dest |
string | Yes | - |
force |
boolean | No | - |
headers |
object | No | - |
mode |
string | No | - |
timeout |
string | No | - |
url |
string | Yes | - |
Metadata:
- Category: network
- Version: 1.0.0
File.template¶
Render template files and write to destination
| Property | Type | Required | Description |
|---|---|---|---|
dest |
string | Yes | - |
mode |
string | No | - |
src |
string | Yes | - |
vars |
object | No | - |
Metadata:
- Category: file
- Version: 1.0.0
File.unarchive¶
Extract archive files (tar, tar.gz, zip) with path traversal protection
| Property | Type | Required | Description |
|---|---|---|---|
creates |
string | No | - |
dest |
string | Yes | - |
mode |
string | No | - |
src |
string | Yes | - |
strip_components |
integer | No | - |
Metadata:
- Category: file
- Version: 1.0.0
File.write¶
Manage files, directories, links, and permissions
| Property | Type | Required | Description |
|---|---|---|---|
backup |
boolean | No | - |
content |
string | No | - |
force |
boolean | No | - |
group |
string | No | File group (groupname or GID) |
mode |
string | No | File permissions (e.g., '0644', '0755') |
owner |
string | No | File owner (username or UID) |
path |
string | Yes | File, directory, or symlink path (required) |
recurse |
boolean | No | - |
src |
string | No | - |
state |
string | No | Desired file state (file/present: file exists, absent: removed, directory: dir exists, link: symlink, hardlink: hard link, touch: update timestamp, perms: change permissions only) (allowed: file, present, absent, directory, link, hardlink, touch, perms) |
Metadata:
- Category: file
- Version: 1.0.0
Git.checkout¶
Switch an existing git working tree to a specified ref
| Property | Type | Required | Description |
|---|---|---|---|
dest |
string | Yes | - |
force |
boolean | No | - |
ref |
string | Yes | - |
Metadata:
- Category: system
- Version: 1.0.0
Git.clone¶
Idempotently clone or update a git repository at a specific ref
| Property | Type | Required | Description |
|---|---|---|---|
credentials |
object | No | - |
depth |
integer | No | - |
dest |
string | Yes | - |
force |
boolean | No | - |
recurse_submodules |
boolean | No | - |
ref |
string | No | - |
repo |
string | Yes | - |
update |
boolean | No | - |
url |
string | No | - |
Metadata:
- Category: network
- Version: 1.0.0
Git.config¶
Idempotently manage git config keys at local, global, or system scope
| Property | Type | Required | Description |
|---|---|---|---|
dest |
string | No | - |
repo |
string | No | - |
scope |
string | Yes | - |
set |
object | No | - |
unset |
array | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Http.request¶
Issue an HTTP request; capture the response as a registered fact
| Property | Type | Required | Description |
|---|---|---|---|
auth |
object | No | - |
body |
string | No | - |
creates_when |
string | No | - |
expect_json_keys |
array | No | - |
expect_json_schema |
string | No | - |
expect_status |
array | No | - |
file |
string | No | - |
follow_redirects |
integer | No | - |
form |
object | No | - |
headers |
object | No | - |
idempotency_key |
string | No | - |
json |
any | No | - |
max_response_bytes |
integer | No | - |
method |
string | No | - |
probe |
object | No | - |
redact_body |
boolean | No | - |
retry_on |
array | No | - |
reverse |
object | No | - |
risk |
string | No | - |
save_to |
string | No | - |
skip_tls_verify |
boolean | No | - |
timeout |
string | No | - |
url |
string | Yes | - |
Metadata:
- Category: network
- Version: 1.0.0
Log¶
Display messages and structured data to the user
| Property | Type | Required | Description |
|---|---|---|---|
budget |
integer | No | Max bytes of rendered output; 0 disables truncation |
data |
any | No | Structured payload to render |
format |
string | No | Render format for Data (default: kv) (allowed: kv, json) |
msg |
string | No | Free-text message (supports templates) |
title |
string | No | Optional header above Data (kv mode only) |
Metadata:
- Category: output
- Version: 1.0.0
Observe.cpu¶
Single-shot read of CPU utilization + load averages
No properties defined in schema.
Observe.disk¶
Single-shot read of filesystem space / inode usage for a path
| Property | Type | Required | Description |
|---|---|---|---|
path |
string | No | - |
Metadata:
- Category: system
Observe.gpu¶
Single-shot read of GPU utilization + memory (NVIDIA/Apple)
| Property | Type | Required | Description |
|---|---|---|---|
index |
integer | No | - |
Metadata:
- Category: system
Observe.http¶
Single-shot HTTP GET; returns typed status, latency, headers, body sample
| Property | Type | Required | Description |
|---|---|---|---|
capture_headers |
array | No | - |
expect_status |
integer | No | - |
follow_redirects |
integer | No | - |
method |
string | No | - |
skip_tls_verify |
boolean | No | - |
timeout |
string | No | - |
url |
string | Yes | - |
Metadata:
- Category: network
Observe.logs¶
Single-shot read of a log source; returns per-pattern match counts + sample lines
| Property | Type | Required | Description |
|---|---|---|---|
container |
string | No | - |
journal_unit |
string | No | - |
max_bytes |
integer | No | - |
max_lines |
integer | No | - |
path |
string | No | - |
patterns |
array | Yes | - |
sample_lines |
integer | No | - |
since |
string | No | - |
Metadata:
- Category: system
Observe.memory¶
Single-shot read of memory + swap state (total/used/free/available)
No properties defined in schema.
Observe.port¶
Single-shot read of TCP/UDP port state (open? listener? pid?)
| Property | Type | Required | Description |
|---|---|---|---|
host |
string | No | - |
port |
integer | Yes | - |
protocol |
string | No | - |
timeout |
string | No | - |
Metadata:
- Category: network
Observe.process¶
Single-shot read of process state (running? pid? args?)
| Property | Type | Required | Description |
|---|---|---|---|
name |
string | No | - |
pattern |
string | No | - |
Metadata:
- Category: system
Observe.service¶
Single-shot read of service state (active? enabled?)
| Property | Type | Required | Description |
|---|---|---|---|
manager |
string | No | - |
name |
string | Yes | - |
Metadata:
- Category: system
Os.cron¶
Manage a cron job via /etc/cron.d/
| Property | Type | Required | Description |
|---|---|---|---|
command |
string | No | - |
day |
string | No | - |
env |
object | No | - |
hour |
string | No | - |
minute |
string | No | - |
month |
string | No | - |
name |
string | Yes | - |
schedule |
string | No | - |
state |
string | No | - (allowed: present, absent) |
user |
string | No | - |
weekday |
string | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Os.firewall¶
Manage host firewall rules (ufw backend)
| Property | Type | Required | Description |
|---|---|---|---|
backend |
string | No | - |
rule |
object | No | - |
rules |
array | No | - |
state |
string | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Os.group¶
Declaratively manage a Unix group
| Property | Type | Required | Description |
|---|---|---|---|
gid |
integer | No | - |
name |
string | Yes | - |
state |
string | No | - |
system |
boolean | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Os.mount¶
Manage an /etc/fstab entry and the matching live mount
| Property | Type | Required | Description |
|---|---|---|---|
backup |
boolean | No | - |
dest |
string | Yes | - |
dump |
integer | No | - |
fstype |
string | No | - |
options |
array | No | - |
pass |
integer | No | - |
src |
string | No | - |
state |
string | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Os.service¶
Manage services across platforms (systemd, launchd, Windows)
| Property | Type | Required | Description |
|---|---|---|---|
daemon_reload |
boolean | No | Run 'systemctl daemon-reload' after unit file changes (systemd only) |
dropin |
object | No | - |
enabled |
boolean | No | Enable service to start on boot (systemd: enable/disable, launchd: bootstrap/bootout) |
name |
string | Yes | Service name (systemd: nginx, launchd: com.example.app) |
state |
string | No | Desired service state (allowed: started, stopped, restarted, reloaded) |
unit |
object | No | - |
Metadata:
- Category: system
Os.ssh_key¶
Manage authorized_keys entries for a user (idempotent per-key)
| Property | Type | Required | Description |
|---|---|---|---|
exclusive |
boolean | No | - |
key |
string | No | - |
keys |
array | No | - |
options |
array | No | - |
path |
string | No | - |
state |
string | No | - |
user |
string | Yes | - |
Metadata:
- Category: system
- Version: 1.0.0
Os.sysctl¶
Manage a Linux kernel parameter (sysctl)
| Property | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | - |
persist |
boolean | No | - |
reload |
boolean | No | - |
state |
string | No | - (allowed: present, absent) |
value |
any | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Os.systemd¶
Manage a systemd unit file with daemon-reload, enable, start
| Property | Type | Required | Description |
|---|---|---|---|
enabled |
boolean | No | - |
install |
object | No | - |
name |
string | Yes | - |
path |
string | No | - |
reload_on_change |
boolean | No | - |
scope |
string | No | - (allowed: system, user) |
service |
object | No | - |
socket |
object | No | - |
started |
boolean | No | - |
state |
string | No | - |
timer |
object | No | - |
unit |
object | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Os.user¶
Declaratively manage a system user account
| Property | Type | Required | Description |
|---|---|---|---|
append_groups |
boolean | No | - |
comment |
string | No | - |
create_home |
boolean | No | - |
gid |
integer | No | - |
group |
string | No | - |
groups |
array | No | - |
home |
string | No | - |
name |
string | Yes | - |
remove_home |
boolean | No | - |
shell |
string | No | - |
state |
string | No | - |
system |
boolean | No | - |
uid |
integer | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Pkg¶
Manage system packages (install/remove/update)
| Property | Type | Required | Description |
|---|---|---|---|
cask |
boolean | No | - |
extra |
array | No | - |
manager |
string | No | Package manager (auto-detected if empty: apt, dnf, yum, pacman, zypper, apk, brew, port, choco, scoop) |
name |
string | No | Package name (single package) |
names |
array | No | Multiple packages to install/remove |
state |
string | No | Package state (present: installed, absent: removed, latest: install or upgrade) (allowed: present, absent, latest) |
update_cache |
boolean | No | Update package cache before operation (e.g., apt-get update) |
upgrade |
boolean | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Pkg.hold¶
Mark or unmark packages as held to prevent upgrade/removal (apt + dnf on linux, brew on darwin)
| Property | Type | Required | Description |
|---|---|---|---|
manager |
string | No | - |
name |
string | No | - |
names |
array | No | - |
state |
string | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Pkg.list¶
Return the installed packages and versions (read-only; apt + dnf + pacman on linux, brew on darwin)
| Property | Type | Required | Description |
|---|---|---|---|
manager |
string | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Pkg.repo¶
Manage a third-party package repository (apt, dnf/yum, brew taps)
| Property | Type | Required | Description |
|---|---|---|---|
apt |
object | No | - |
brew |
object | No | - |
dnf |
object | No | - |
name |
string | Yes | - |
state |
string | No | - |
Metadata:
- Category: system
- Version: 1.1.0
Pkg.upgrade¶
Upgrade named packages or all installed packages (apt + dnf + pacman on linux, brew on darwin)
| Property | Type | Required | Description |
|---|---|---|---|
autoremove |
boolean | No | - |
manager |
string | No | - |
names |
array | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Read.json¶
Read a JSON file and optionally extract a value by path
| Property | Type | Required | Description |
|---|---|---|---|
max_bytes |
integer | No | - |
path |
string | Yes | - |
query |
string | No | - |
redact |
array | No | - |
Metadata:
- Category: data
- Version: 1.0.0
Read.yaml¶
Read a YAML file and optionally extract a value by path
| Property | Type | Required | Description |
|---|---|---|---|
max_bytes |
integer | No | - |
path |
string | Yes | - |
query |
string | No | - |
redact |
array | No | - |
Metadata:
- Category: data
- Version: 1.0.0
Repo.patch¶
Apply multiple patches to multiple files atomically
| Property | Type | Required | Description |
|---|---|---|---|
backup |
boolean | No | - |
base_dir |
string | No | - |
dry_run |
boolean | No | - |
output_file |
string | No | - |
patchset |
string | No | - |
patchset_file |
string | No | - |
strict |
boolean | No | - |
Metadata:
- Category: file
- Version: 1.0.0
Repo.search¶
Search codebase for patterns and output results in JSON format
| Property | Type | Required | Description |
|---|---|---|---|
glob |
string | No | - |
ignore_dirs |
array | No | - |
max_results |
integer | No | - |
output_file |
string | No | - |
path |
string | No | - |
pattern |
string | Yes | - |
regex |
boolean | No | - |
Metadata:
- Category: file
- Version: 1.0.0
Repo.tree¶
Generate a JSON representation of directory structure
| Property | Type | Required | Description |
|---|---|---|---|
exclude_dirs |
array | No | - |
include_files |
boolean | No | - |
max_depth |
integer | No | - |
output_file |
string | No | - |
path |
string | No | - |
Metadata:
- Category: file
- Version: 1.0.0
RunConfig¶
Structured configuration with version, global variables, steps, and/or named tasks
| Property | Type | Required | Description |
|---|---|---|---|
modules |
object | No | Map of alias name → module reference (host/owner/repo[/subpath]@version). Consumed by use: |
steps |
array | No | Configuration steps to execute |
tasks |
object | No | Named tasks invoked via mooncake task <name>. Each task is a labeled group of steps with optional task-scoped vars. |
vars |
object | No | Global variables available to all steps |
version |
string | No | Configuration schema version (e.g., '1.0') |
Shell¶
Execute shell commands
| Property | Type | Required | Description |
|---|---|---|---|
capture |
boolean | No | Capture command output (default: true). When false, output is only streamed |
cmd |
string | No | Shell command to execute (required) |
creates |
string | No | - |
error_action |
string | No | Windows + PowerShell only — sets $ErrorActionPreference (Stop, Continue, SilentlyContinue, ...). Default: Stop. Ignored elsewhere. |
interpreter |
string | No | Shell interpreter binary (any executable on PATH). Default: bash on Unix, powershell on Windows. On Windows, 'cmd' dispatches with /c, others with -Command. |
run_as_admin |
boolean | No | Windows only — assert the mooncake process is elevated; fail the step if it isn't. Does not attempt UAC. Ignored on Unix. |
stdin |
string | No | Input to provide to the command via stdin |
unless |
string | No | - |
Metadata:
- Category: command
- Version: 1.0.0
Shell_action¶
Execute shell commands
| Property | Type | Required | Description |
|---|---|---|---|
capture |
boolean | No | Capture command output (default: true). When false, output is only streamed |
cmd |
string | No | Shell command to execute (required) |
creates |
string | No | - |
error_action |
string | No | Windows + PowerShell only — sets $ErrorActionPreference (Stop, Continue, SilentlyContinue, ...). Default: Stop. Ignored elsewhere. |
interpreter |
string | No | Shell interpreter binary (any executable on PATH). Default: bash on Unix, powershell on Windows. On Windows, 'cmd' dispatches with /c, others with -Command. |
run_as_admin |
boolean | No | Windows only — assert the mooncake process is elevated; fail the step if it isn't. Does not attempt UAC. Ignored on Unix. |
stdin |
string | No | Input to provide to the command via stdin |
unless |
string | No | - |
Metadata:
- Category: command
- Version: 1.0.0
Step¶
| Property | Type | Required | Description |
|---|---|---|---|
allow_irreversible |
boolean | No | Allow a transaction to include steps without Reverser support (spec-30) |
artifact.capture |
any | No | Capture file changes with enhanced metadata for LLM agents |
artifact.validate |
any | No | Validate artifacts against constraints (change budgets) |
as |
string | No | Variable name to store step execution outputs (universal) |
as_user |
string | No | Run as this user (empty = current user, 'root' = sudo to root, ' |
assert |
any | No | Verify conditions without changing system state |
catch |
array | No | Steps that run when any try child errors. Requires try: on the same step (spec-23 §2) |
changed_when |
string | No | Expression to override changed result |
cmd |
any | No | Execute commands directly without shell interpolation |
container |
any | No | Manage container lifecycle (running/stopped/absent) via podman or docker |
container.image |
any | No | Manage container images (pull/remove) via podman or docker |
continue_on_error |
boolean | No | Continue execution even if this step fails (universal) |
creates |
string | No | Skip step if this file path exists (universal alias of unless_exists) |
cwd |
string | No | Working directory for the step |
env |
object | No | Environment variables for the step |
failed_when |
string | No | Expression to override failure condition |
file.copy |
any | No | Copy files with checksum verification and atomic writes |
file.download |
any | No | Download files from URLs with checksum verification |
file.template |
any | No | Render template files and write to destination |
file.unarchive |
any | No | Extract archive files (tar, tar.gz, zip) with path traversal protection |
file.write |
any | No | Manage files, directories, links, and permissions |
finally |
array | No | Steps that always run after try (and catch, if it ran). Requires try: on the same step (spec-23 §2) |
for_each |
any | No | Iterate over items (universal). Accepts a template-variable string or an inline list. |
for_each_file |
string | No | Directory path for iterating over files (universal) |
git.checkout |
any | No | Switch an existing git working tree to a specified ref |
git.clone |
any | No | Idempotently clone or update a git repository at a specific ref |
git.config |
any | No | Idempotently manage git config keys at local, global, or system scope |
heal |
array | No | Remediation steps that run when an assert step fails. The assert is re-checked after heal; on success the failure is suppressed and the run-wide healed counter bumps (proposal-11). |
heal_parent |
string | No | (plan metadata) Parent assert step ID when expanded from a heal child (proposal-11) |
http.request |
any | No | Issue an HTTP request; capture the response as a registered fact |
import |
string | No | Path to YAML file with steps to import |
log |
any | No | Display messages and structured data to the user |
name |
string | No | Name of the step (universal) |
observe.cpu |
any | No | Single-shot read of CPU utilization + load averages |
observe.disk |
any | No | Single-shot read of filesystem space / inode usage for a path |
observe.gpu |
any | No | Single-shot read of GPU utilization + memory (NVIDIA/Apple) |
observe.http |
any | No | Single-shot HTTP GET; returns typed status, latency, headers, body sample |
observe.logs |
any | No | Single-shot read of a log source; returns per-pattern match counts + sample lines |
observe.memory |
any | No | Single-shot read of memory + swap state (total/used/free/available) |
observe.port |
any | No | Single-shot read of TCP/UDP port state (open? listener? pid?) |
observe.process |
any | No | Single-shot read of process state (running? pid? args?) |
observe.service |
any | No | Single-shot read of service state (active? enabled?) |
on_change |
array | No | Reactive triggers: child steps that run only if this step reports changed=true (spec-23) |
on_rollback |
array | No | Steps that run after a transaction's rollback finishes (spec-30) |
os.cron |
any | No | Manage a cron job via /etc/cron.d/ |
os.firewall |
any | No | Manage host firewall rules (ufw backend) |
os.group |
any | No | Declaratively manage a Unix group |
os.mount |
any | No | Manage an /etc/fstab entry and the matching live mount |
os.service |
any | No | Manage services across platforms (systemd, launchd, Windows) |
os.ssh_key |
any | No | Manage authorized_keys entries for a user (idempotent per-key) |
os.sysctl |
any | No | Manage a Linux kernel parameter (sysctl) |
os.systemd |
any | No | Manage a systemd unit file with daemon-reload, enable, start |
os.user |
any | No | Declaratively manage a system user account |
pkg |
any | No | Manage system packages (install/remove/update) |
pkg.hold |
any | No | Mark or unmark packages as held to prevent upgrade/removal (apt + dnf on linux, brew on darwin) |
pkg.list |
any | No | Return the installed packages and versions (read-only; apt + dnf + pacman on linux, brew on darwin) |
pkg.repo |
any | No | Manage a third-party package repository (apt, dnf/yum, brew taps) |
pkg.upgrade |
any | No | Upgrade named packages or all installed packages (apt + dnf + pacman on linux, brew on darwin) |
props |
object | No | Parameter values passed to the component invoked by use:. |
read.json |
any | No | Read a JSON file and optionally extract a value by path |
read.yaml |
any | No | Read a YAML file and optionally extract a value by path |
repo.patch |
any | No | Apply multiple patches to multiple files atomically |
repo.search |
any | No | Search codebase for patterns and output results in JSON format |
repo.tree |
any | No | Generate a JSON representation of directory structure |
retry |
object | No | Retry policy: |
shell |
any | No | Execute shell commands |
tags |
array | No | Tags for filtering step execution (universal) |
text.delete_range |
any | No | Delete text between start and end anchor patterns in files |
text.insert |
any | No | Insert text before or after anchor patterns in files |
text.line |
any | No | Ensure a line is present or absent in a file (lineinfile-equivalent) |
text.patch |
any | No | Apply unified diff patches to files |
text.patch.ini |
any | No | Apply structural section/key edits to an INI-style configuration file |
text.patch.json |
any | No | Apply structural set/delete/merge edits to a JSON file with order + indent preservation |
text.patch.yaml |
any | No | Apply structural set/delete/merge edits to a YAML file, preserving order and adjacent comments |
text.replace |
any | No | Replace text in files using literal or regex patterns |
timeout |
string | No | ⚠️ shell/cmd ONLY: Maximum execution time (e.g., '30s', '5m', '1h') |
tool |
any | No | Install a developer tool at a pinned version with lockfile-backed reproducibility |
transaction |
array | No | Sequence of steps that apply all-or-nothing; failure runs Reverse() on prior steps in LIFO order (spec-30) |
triggered_by |
string | No | (plan metadata) Parent step ID when expanded from an on_change child |
try |
array | No | Sequence of steps run with structured error recovery; on first failure runs catch (if set) then finally (spec-23 §2) |
try_parent |
string | No | (plan metadata) Parent compound step ID when expanded from a try/catch/finally branch |
try_role |
string | No | (plan metadata) Role of this step inside its parent compound: 'try', 'catch', or 'finally' |
txn_parent |
string | No | (plan metadata) Parent transaction step ID when expanded from a transaction child |
txn_role |
string | No | (plan metadata) Role of this step inside its parent transaction: 'body' or 'rollback' |
unless |
string | No | Skip step if this command succeeds (universal alias of unless_command) |
unless_command |
string | No | Skip step if this command succeeds (exit code 0). Useful for idempotency (universal) |
unless_exists |
string | No | Skip step if this file path exists. Useful for idempotency (universal) |
use |
any | No | Execute a preset by expanding it into steps |
vars |
any | No | Set variables for use in subsequent steps |
vars.load |
any | No | Load variables from YAML files |
wait.command |
any | No | Wait for a shell command to exit with the expected code |
wait.file |
any | No | Wait for a file or directory to exist (optionally containing a substring) |
wait.http |
any | No | Wait for an HTTP endpoint to return an accepted status |
wait.port |
any | No | Wait for a TCP port to accept connections |
when |
string | No | Conditional expression for step execution (universal) |
windows.firewall_rule |
any | No | Manage Windows Firewall inbound/outbound rules |
windows.hyperv_firewall_rule |
any | No | Manage Windows Hyper-V Firewall rules (WSL2 mirrored networking) |
windows.scheduled_task |
any | No | Manage Windows Task Scheduler entries |
Task¶
A named task invoked via mooncake task <name>. Runs through the same planner + executor as mooncake apply.
| Property | Type | Required | Description |
|---|---|---|---|
desc |
string | No | One-line description shown when listing tasks |
steps |
array | Yes | Ordered list of mooncake steps to run when this task is invoked |
vars |
object | No | Task-scoped variables. Override file-level vars; overridden by CLI --vars files. |
Text.delete_range¶
Delete text between start and end anchor patterns in files
| Property | Type | Required | Description |
|---|---|---|---|
backup |
boolean | No | - |
end_anchor |
string | Yes | - |
inclusive |
boolean | No | - |
path |
string | Yes | - |
regex |
boolean | No | - |
start_anchor |
string | Yes | - |
Metadata:
- Category: file
- Version: 1.0.0
Text.insert¶
Insert text before or after anchor patterns in files
| Property | Type | Required | Description |
|---|---|---|---|
allow_multiple |
boolean | No | - |
anchor |
string | Yes | - |
backup |
boolean | No | - |
content |
string | Yes | - |
path |
string | Yes | - |
position |
string | Yes | - |
regex |
boolean | No | - |
Metadata:
- Category: file
- Version: 1.0.0
Text.line¶
Ensure a line is present or absent in a file (lineinfile-equivalent)
| Property | Type | Required | Description |
|---|---|---|---|
backup |
boolean | No | - |
insert_after |
string | No | - |
insert_before |
string | No | - |
line |
string | No | - |
path |
string | Yes | - |
regexp |
string | No | - |
state |
string | No | - |
Metadata:
- Category: file
- Version: 1.0.0
Text.patch¶
Apply unified diff patches to files
| Property | Type | Required | Description |
|---|---|---|---|
backup |
boolean | No | - |
context_lines |
integer | No | - |
dry_run |
boolean | No | - |
patch |
string | No | - |
patch_file |
string | No | - |
path |
string | Yes | - |
strict |
boolean | No | - |
Metadata:
- Category: file
- Version: 1.0.0
Text.patch.ini¶
Apply structural section/key edits to an INI-style configuration file
| Property | Type | Required | Description |
|---|---|---|---|
backup |
boolean | No | - |
delete |
array | No | - |
path |
string | Yes | - |
set |
object | No | - |
Metadata:
- Category: file
- Version: 1.0.0
Text.patch.json¶
Apply structural set/delete/merge edits to a JSON file with order + indent preservation
| Property | Type | Required | Description |
|---|---|---|---|
backup |
boolean | No | - |
delete |
array | No | - |
merge |
object | No | - |
merge_strategy |
string | No | - |
path |
string | Yes | - |
set |
object | No | - |
Metadata:
- Category: file
- Version: 1.0.0
Text.patch.yaml¶
Apply structural set/delete/merge edits to a YAML file, preserving order and adjacent comments
| Property | Type | Required | Description |
|---|---|---|---|
backup |
boolean | No | - |
delete |
array | No | - |
merge |
object | No | - |
merge_strategy |
string | No | - |
path |
string | Yes | - |
set |
object | No | - |
Metadata:
- Category: file
- Version: 1.0.0
Text.replace¶
Replace text in files using literal or regex patterns
| Property | Type | Required | Description |
|---|---|---|---|
allow_no_match |
boolean | No | - |
backup |
boolean | No | - |
count |
integer | No | - |
flags |
object | No | - |
path |
string | Yes | - |
pattern |
string | Yes | - |
replace |
string | Yes | - |
Metadata:
- Category: file
- Version: 1.0.0
Tool¶
Install a developer tool at a pinned version with lockfile-backed reproducibility
| Property | Type | Required | Description |
|---|---|---|---|
asset |
string | No | - |
backend |
string | Yes | - |
bin |
string | No | - |
checksum |
string | No | - |
env |
object | No | - |
mise_tool |
string | No | - |
name |
string | Yes | - |
repo |
string | No | - |
strip_components |
integer | No | - |
tag |
string | No | - |
url |
string | No | - |
version |
string | Yes | - |
write_tool_versions |
boolean | No | - |
Metadata:
- Category: system
- Version: 0.1.0
Vars¶
Define or update variables
No properties defined in schema.
Wait.command¶
Wait for a shell command to exit with the expected code
| Property | Type | Required | Description |
|---|---|---|---|
cmd |
string | Yes | - |
expect_exit |
integer | No | - |
interval |
string | No | - |
poll_interval |
string | No | - |
timeout |
string | No | - |
Metadata:
- Category: command
Wait.file¶
Wait for a file or directory to exist (optionally containing a substring)
| Property | Type | Required | Description |
|---|---|---|---|
contains |
string | No | - |
interval |
string | No | - |
path |
string | Yes | - |
poll_interval |
string | No | - |
timeout |
string | No | - |
Metadata:
- Category: system
Wait.http¶
Wait for an HTTP endpoint to return an accepted status
| Property | Type | Required | Description |
|---|---|---|---|
body |
string | No | - |
body_contains |
string | No | - |
headers |
object | No | - |
interval |
string | No | - |
method |
string | No | - |
poll_interval |
string | No | - |
status |
array | No | - |
timeout |
string | No | - |
url |
string | Yes | - |
Metadata:
- Category: network
Wait.port¶
Wait for a TCP port to accept connections
| Property | Type | Required | Description |
|---|---|---|---|
host |
string | No | - |
interval |
string | No | - |
poll_interval |
string | No | - |
port |
integer | Yes | - |
timeout |
string | No | - |
Metadata:
- Category: network
Windows.firewall_rule¶
Manage Windows Firewall inbound/outbound rules
| Property | Type | Required | Description |
|---|---|---|---|
action |
string | No | - |
description |
string | No | - |
direction |
string | No | - |
enabled |
boolean | No | - |
local_port |
array | No | - |
name |
string | Yes | - |
profile |
array | No | - |
protocol |
string | No | - |
remote_port |
array | No | - |
state |
string | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Windows.hyperv_firewall_rule¶
Manage Windows Hyper-V Firewall rules (WSL2 mirrored networking)
| Property | Type | Required | Description |
|---|---|---|---|
action |
string | No | - |
description |
string | No | - |
direction |
string | No | - |
enabled |
boolean | No | - |
local_port |
array | No | - |
name |
string | Yes | - |
protocol |
string | No | - |
remote_port |
array | No | - |
state |
string | No | - |
vm_creator_id |
string | No | - |
Metadata:
- Category: system
- Version: 1.0.0
Windows.scheduled_task¶
Manage Windows Task Scheduler entries
| Property | Type | Required | Description |
|---|---|---|---|
actions |
array | Yes | - |
description |
string | No | - |
name |
string | Yes | - |
principal |
object | No | - |
settings |
object | No | - |
state |
string | No | - |
trigger |
object | No | - |
triggers |
array | No | - |
Metadata:
- Category: system
- Version: 1.0.0