woml-cli 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,88 @@
1
+ # Apache License
2
+
3
+ **Version 2.0, January 2004**
4
+ http://www.apache.org/licenses/
5
+
6
+ ## TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ ### 1. Definitions
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity granting the License.
13
+
14
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
15
+
16
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
17
+
18
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
19
+
20
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
21
+
22
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (which shall not include communications that are conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution").
23
+
24
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based upon (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this definition, a Derivative Work shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
25
+
26
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
27
+
28
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
29
+
30
+ ### 2. Grant of Copyright License
31
+
32
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to use, reproduce, modify, and distribute the Work and such Derivative Works in Source or Object form.
33
+
34
+ ### 3. Grant of Patent License
35
+
36
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
37
+
38
+ ### 4. Redistribution
39
+
40
+ You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
41
+
42
+ 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
43
+
44
+ 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
45
+
46
+ 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
47
+
48
+ 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
49
+
50
+ You may add Your own copyright notice to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
51
+
52
+ ### 5. Submission of Contributions
53
+
54
+ Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
55
+
56
+ ### 6. Trademarks
57
+
58
+ This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
59
+
60
+ ### 7. Disclaimer of Warranty
61
+
62
+ Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
63
+
64
+ ### 8. Limitation of Liability
65
+
66
+ In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
67
+
68
+ ### 9. Accepting Warranty or Additional Liability
69
+
70
+ When distributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
71
+
72
+ ---
73
+
74
+ ## Copyright Notice
75
+
76
+ Copyright 2025-2026 Mohamed Ali Ben Othmen
77
+
78
+ Licensed under the Apache License, Version 2.0 (the "License");
79
+ you may not use this file except in compliance with the License.
80
+ You may obtain a copy of the License at
81
+
82
+ http://www.apache.org/licenses/LICENSE-2.0
83
+
84
+ Unless required by applicable law or agreed to in writing, software
85
+ distributed under the License is distributed on an "AS IS" BASIS,
86
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
87
+ See the License for the specific language governing permissions and
88
+ limitations under the License.
package/NOTICE.md ADDED
@@ -0,0 +1,20 @@
1
+ # WOML
2
+
3
+ Copyright 2025-2026 Mohamed Ali Ben Othmen
4
+
5
+ This product includes software developed by Mohamed Ali Ben Othmen.
6
+
7
+ ## Project Information
8
+
9
+ - Project Name: WOML
10
+ - Description: Markup-first workflow automation language and durable runtime
11
+ - Repository: https://github.com/dali-benothmen/woml
12
+ - Author: Mohamed Ali Ben Othmen
13
+
14
+ ## Third-Party Dependencies
15
+
16
+ This distribution includes third-party JavaScript and Rust components under
17
+ their respective open-source licenses. The exact dependency graph is frozen by
18
+ `woml-cli/bun.lock`, `woml/bun.lock`, and `core/Cargo.lock`. The reviewed
19
+ license families and release disposition are recorded in
20
+ https://github.com/dali-benothmen/woml/blob/master/docs/release/v1.0.0-dependency-review.md.
package/README.md ADDED
@@ -0,0 +1,124 @@
1
+ # WOML
2
+
3
+ WOML is a markup-first language and durable runtime for workflow automation.
4
+ Define triggers, steps, control flow, approvals, lifecycle behavior, and runtime
5
+ policy in readable `.woml` files; write ordinary JavaScript inside `<script>`.
6
+
7
+ ## Install
8
+
9
+ WOML requires Bun 1.3.14 or later:
10
+
11
+ ```bash
12
+ bun add --global woml-cli
13
+ woml --version
14
+ ```
15
+
16
+ The one `woml` package contains the CLI and compiler and selects the native Rust
17
+ engine for the current supported platform. Users do not install a compiler or
18
+ native package separately.
19
+
20
+ ## Quick start
21
+
22
+ Save this as `hello.woml`:
23
+
24
+ ```xml
25
+ <woml>
26
+ <workflow
27
+ id="hello"
28
+ name="Hello WOML"
29
+ description="Build a greeting from two durable steps."
30
+ version="1.0.0"
31
+ >
32
+ <triggers>
33
+ <manual id="start" />
34
+ </triggers>
35
+
36
+ <steps>
37
+ <step id="prepare" name="Prepare greeting">
38
+ <script>
39
+ return { name: context.payload.name ?? "World" };
40
+ </script>
41
+ </step>
42
+
43
+ <step id="greet" name="Build message">
44
+ <script>
45
+ return { message: `Hello ${context.steps.prepare.name}` };
46
+ </script>
47
+ </step>
48
+ </steps>
49
+ </workflow>
50
+ </woml>
51
+ ```
52
+
53
+ Then run:
54
+
55
+ ```bash
56
+ woml check hello.woml
57
+ woml run hello.woml
58
+ ```
59
+
60
+ Press Enter to start a run. The automation remains active for the next trigger;
61
+ press Ctrl+C to stop it. `woml test hello.woml` is the one-shot form for tests
62
+ and CI.
63
+
64
+ ## Main commands
65
+
66
+ ```bash
67
+ woml --help
68
+ woml check <workflow-or-directory>...
69
+ woml run <workflow-or-directory>...
70
+ woml run workflows/ --background
71
+ woml inspect
72
+ woml list
73
+ woml get <run-id>
74
+ woml cancel <run-id>
75
+ woml <run-id-or-workflow-id> --logs
76
+ woml secrets set <NAME>
77
+ woml backup <directory>
78
+ woml prune --before 30d --dry-run
79
+ ```
80
+
81
+ `woml run` activates multiple files and directories atomically. This makes
82
+ call-only workflows available to `services.workflows.call()` and
83
+ `services.workflows.start()` in the same runtime. Webhook startup prints its URL
84
+ and a generated `curl`; manual triggers print the keyboard instruction.
85
+
86
+ ## Runtime bindings
87
+
88
+ Inside scripts:
89
+
90
+ - `context.payload` is input from the trigger or parent workflow;
91
+ - `context.steps.<id>` is a visible successful step/control-flow result;
92
+ - `services` exposes supervised capabilities and imported modules;
93
+ - `secrets.NAME` resolves only declared secrets; and
94
+ - `attempt` describes the current durable retry attempt.
95
+
96
+ Return JSON-compatible data for downstream steps. WOML records durable events
97
+ before advancing the compiled graph and fails closed rather than replaying an
98
+ ambiguous external effect.
99
+
100
+ ## Capabilities
101
+
102
+ WOML v1 includes manual and production triggers, retries, choices, switches,
103
+ parallel groups, forked branches, approvals, lifecycle hooks, runtime policies,
104
+ HTTP, SQL databases, storage, cache, events, durable state, local modules,
105
+ reusable steps/providers, communication adapters, workflow call/start, run
106
+ inspection, backup, recovery, and retention.
107
+
108
+ ## Documentation
109
+
110
+ - [Getting started](https://github.com/dali-benothmen/woml/blob/master/docs/getting-started.md)
111
+ - [Language reference](https://github.com/dali-benothmen/woml/blob/master/docs/language-reference.md)
112
+ - [CLI reference](https://github.com/dali-benothmen/woml/blob/master/docs/cli-reference.md)
113
+ - [Examples](https://github.com/dali-benothmen/woml/tree/master/examples)
114
+ - [Production deployment](https://github.com/dali-benothmen/woml/blob/master/docs/woml-production-deployment.md)
115
+ - [VS Code extension](https://github.com/dali-benothmen/woml/tree/master/woml-vscode)
116
+
117
+ For support, use
118
+ [GitHub Discussions](https://github.com/dali-benothmen/woml/discussions) or
119
+ open a reproducible [issue](https://github.com/dali-benothmen/woml/issues).
120
+ Report vulnerabilities privately according to the
121
+ [security policy](https://github.com/dali-benothmen/woml/blob/master/SECURITY.md).
122
+
123
+ WOML is licensed under the
124
+ [Apache License 2.0](https://github.com/dali-benothmen/woml/blob/master/LICENSE).