Using ChaosNexus Scripts
Plugin shape
Each live plugin is a folder under plugins/<name>/ with at least:
plugin.toml- name, version, dependencies, capability declarations- An entry
.rhaiscript that registers tools / logic
Example capability block:
name = "translation_test"
version = "1.0.0"
dependencies = []
[capabilities]
granted = []Host TOML remains authoritative for what Anvil actually allows; plugin manifests declare intent. See security model.
Shared libraries
Pure helpers live under lib/. Import them from a plugin:
import "lib/string_utils" as su;
su::join_nonempty(["a", "", "b"], "-");Rules of thumb:
- No
register_tool/ side effects at import time inlib/. - Prefer
private fnfor internals;exportfor shared constants. - Do not import another plugin's entry script; use Anvil cross-plugin APIs when needed.
plugin.tomldependenciescontrol startup order, not module imports.
Quarantine and approval
LLM-scaffolded plugins go to .pending/ and are not loaded until a human approves them in Forge. That path is part of the scripts root layout Anvil expects.
Bundled examples
The published Scripts tree ships a single example plugin: translation_test (hello-world / i18n demo). Add your own plugins under plugins/<name>/. Review capabilities before enabling on a sensitive host.
Dev-only canvas fixtures (for example terminal) live under the Forge monorepo prefix and are not part of this polyrepo or the Suite installer.
Visual sidecars
Forge may store canvas sidecars under plugins/<name>/.chaosnexus-forge/. They are editor metadata, not Anvil runtime requirements.