docs: document macros as first-class custom commands
Covers top-level .name invocation, the new description/isolated macro fields (with the non-isolation persistence, fail-fast, nested-macro, and .exit caveats), workspace .coyote/macros/ + --no-workspace-macros, enabled_macros scoping at global/role/agent/session levels, and .macro enable|disable across the README and every example config. graph.example.yaml gains a note that enabled_macros is ignored in graph configs. CHANGELOG intentionally untouched: it is generated by commitizen at release time from the conventional commit subjects. Implements plans/custom-commands-design.md §8.
This commit is contained in:
@@ -1,3 +1,13 @@
|
||||
description: Demonstrates every macro field # Optional; shown in `.list macros` and in `.<name>` tab-completion.
|
||||
isolated: true # Optional; 'true' by default. When true, steps run in a forked,
|
||||
# throwaway context: the exchange and any `.role`/`.model` switches
|
||||
# vanish when the macro ends. When false, steps run on the LIVE
|
||||
# session exactly as if you typed them: prompts are recorded, and
|
||||
# mutating steps (e.g. `.role`, `.model`) PERSIST after the macro
|
||||
# finishes -- by design. Steps are fail-fast in both modes: an error
|
||||
# aborts the remaining steps, but completed steps' effects remain.
|
||||
# A non-isolated macro step cannot invoke another macro, and a
|
||||
# `.exit` step never exits the REPL.
|
||||
variables: # A list of positional variables that the macro uses
|
||||
- name: positional_1 # The name of the positional variable.
|
||||
default: null # Since no default value is provided, this argument is required; 'null' by default
|
||||
|
||||
Reference in New Issue
Block a user