diff options
Diffstat (limited to 'js/scripting-lang/scripting-harness/README.md')
-rw-r--r-- | js/scripting-lang/scripting-harness/README.md | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/js/scripting-lang/scripting-harness/README.md b/js/scripting-lang/scripting-harness/README.md new file mode 100644 index 0000000..0a11472 --- /dev/null +++ b/js/scripting-lang/scripting-harness/README.md @@ -0,0 +1,39 @@ +# Scripting Harness + +A TEA-inspired functional state management system for the scripting language. + +## Quick Start + +```javascript +import { FunctionalHarness } from './core/harness.js'; + +const script = ` +state : ..listen; +processed : when state is + { status: "active" } then { result: "active" } + _ then { result: "inactive" }; +..emit processed; +`; + +const harness = new FunctionalHarness(script); +const result = await harness.processState({ status: "active" }); +console.log(result.commands); // [{ type: 'emit', value: { result: 'active' } }] +``` + +## File Structure + +``` +scripting-harness/ +├── core/ +│ ├── harness.js # FunctionalHarness class +│ ├── history.js # StateHistory class +│ └── environment.js # ScriptEnvironment class +├── examples/ +│ ├── basic-usage.js # Basic usage example +│ └── simple-test.js # Simple test example +└── README.md # This file +``` + +## Documentation + +See the tutorials folder for comprehensive documentation and examples. \ No newline at end of file |