@yagr/agent 0.1.0 → 0.2.6
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 +21 -201
- package/README.md +49 -32
- package/dist/cli.js +78 -0
- package/dist/cli.js.map +1 -1
- package/dist/config/load-n8n-engine-config.d.ts +3 -3
- package/dist/config/load-n8n-engine-config.d.ts.map +1 -1
- package/dist/config/load-n8n-engine-config.js +3 -3
- package/dist/config/load-n8n-engine-config.js.map +1 -1
- package/dist/config/local-state.d.ts +20 -0
- package/dist/config/local-state.d.ts.map +1 -0
- package/dist/config/local-state.js +81 -0
- package/dist/config/local-state.js.map +1 -0
- package/dist/config/n8n-config-service.d.ts +27 -0
- package/dist/config/n8n-config-service.d.ts.map +1 -0
- package/dist/config/n8n-config-service.js +146 -0
- package/dist/config/n8n-config-service.js.map +1 -0
- package/dist/config/yagr-config-service.d.ts +2 -0
- package/dist/config/yagr-config-service.d.ts.map +1 -1
- package/dist/config/yagr-config-service.js +29 -4
- package/dist/config/yagr-config-service.js.map +1 -1
- package/dist/config/yagr-home.d.ts +15 -0
- package/dist/config/yagr-home.d.ts.map +1 -1
- package/dist/config/yagr-home.js +44 -4
- package/dist/config/yagr-home.js.map +1 -1
- package/dist/gateway/webui.d.ts.map +1 -1
- package/dist/gateway/webui.js +35 -21
- package/dist/gateway/webui.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/prompt/build-system-prompt.d.ts.map +1 -1
- package/dist/prompt/build-system-prompt.js +7 -2
- package/dist/prompt/build-system-prompt.js.map +1 -1
- package/dist/runtime/completion-gate.d.ts.map +1 -1
- package/dist/runtime/completion-gate.js +3 -2
- package/dist/runtime/completion-gate.js.map +1 -1
- package/dist/runtime/outcome.d.ts.map +1 -1
- package/dist/runtime/outcome.js +3 -0
- package/dist/runtime/outcome.js.map +1 -1
- package/dist/runtime/policy-hooks.d.ts +2 -0
- package/dist/runtime/policy-hooks.d.ts.map +1 -1
- package/dist/runtime/policy-hooks.js +34 -0
- package/dist/runtime/policy-hooks.js.map +1 -1
- package/dist/runtime/run-engine.d.ts +3 -0
- package/dist/runtime/run-engine.d.ts.map +1 -1
- package/dist/runtime/run-engine.js +190 -85
- package/dist/runtime/run-engine.js.map +1 -1
- package/dist/setup.d.ts +5 -3
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +16 -17
- package/dist/setup.js.map +1 -1
- package/dist/tools/build-tools.d.ts +57 -28
- package/dist/tools/build-tools.d.ts.map +1 -1
- package/dist/tools/build-tools.js +2 -0
- package/dist/tools/build-tools.js.map +1 -1
- package/dist/tools/deploy.d.ts +19 -19
- package/dist/tools/generate-workflow.d.ts +8 -8
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/manage-workflow.d.ts +3 -3
- package/dist/tools/n8nac.d.ts +14 -12
- package/dist/tools/n8nac.d.ts.map +1 -1
- package/dist/tools/n8nac.js +24 -1
- package/dist/tools/n8nac.js.map +1 -1
- package/dist/tools/observer.d.ts +8 -0
- package/dist/tools/observer.d.ts.map +1 -1
- package/dist/tools/observer.js.map +1 -1
- package/dist/tools/present-workflow-result.d.ts +35 -0
- package/dist/tools/present-workflow-result.d.ts.map +1 -0
- package/dist/tools/present-workflow-result.js +112 -0
- package/dist/tools/present-workflow-result.js.map +1 -0
- package/dist/tools/request-required-action.d.ts +3 -3
- package/dist/tools/validate.d.ts +19 -19
- package/dist/types.d.ts +8 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/webui/app.js +391 -50
- package/dist/webui/app.js.map +3 -3
- package/dist/webui/styles.css +577 -102
- package/dist/webui/styles.css.map +2 -2
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,201 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Do not include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright 2026 Etienne Lescot
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Etienne Lescot
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -17,34 +17,21 @@
|
|
|
17
17
|
</tr>
|
|
18
18
|
</table>
|
|
19
19
|
|
|
20
|
-
[](https://
|
|
20
|
+
[](https://github.com/EtienneLescot/yagr/actions/workflows/ci.yml)
|
|
21
|
+
[](https://yagr.dev/docs/)
|
|
22
|
+
[](https://yagr.dev/)
|
|
23
23
|
[](https://n8n.io/)
|
|
24
|
-
[](https://opensource.org/licenses/MIT)
|
|
25
25
|
|
|
26
26
|
<br>
|
|
27
27
|
|
|
28
28
|
**Yagr is designed to sit above execution orchestrators.** Today it runs on top of n8n through the n8n-as-code stack. Tomorrow it can target a native Yagr runtime or other orchestrators without changing the product story.
|
|
29
29
|
|
|
30
|
-
[**Read Yagr docs**](https://
|
|
30
|
+
[**Read Yagr docs**](https://yagr.dev/docs/) · [**Open n8n-as-code**](https://n8nascode.dev/n8n-as-code/) · [**Workflow GitOps docs**](https://n8nascode.dev/docs/)
|
|
31
31
|
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
> <table>
|
|
36
|
-
> <tr>
|
|
37
|
-
> <td width="108" align="center">
|
|
38
|
-
> <img src="res/logo.png" alt="n8n-as-code logo" width="84">
|
|
39
|
-
> </td>
|
|
40
|
-
> <td>
|
|
41
|
-
> <strong>Yagr is built on top of n8n-as-code today.</strong><br>
|
|
42
|
-
> The repository now opens on Yagr first, but the underlying n8n-as-code technology, workflow GitOps model, schema grounding, and editor tooling remain first-class and continue to power the current runtime.<br><br>
|
|
43
|
-
> <a href="products/n8n-as-code/README.md">Read the n8n-as-code README</a>
|
|
44
|
-
> </td>
|
|
45
|
-
> </tr>
|
|
46
|
-
> </table>
|
|
47
|
-
|
|
48
35
|
|
|
49
36
|
## Quick Start
|
|
50
37
|
|
|
@@ -53,7 +40,7 @@ If you want to see Yagr working before reading the full product story, start her
|
|
|
53
40
|
### 1. Install Yagr globally
|
|
54
41
|
|
|
55
42
|
```bash
|
|
56
|
-
npm install -g yagr@latest
|
|
43
|
+
npm install -g @yagr/agent@latest
|
|
57
44
|
```
|
|
58
45
|
|
|
59
46
|
### 2. Run onboarding once
|
|
@@ -84,22 +71,37 @@ yagr gateway status
|
|
|
84
71
|
yagr telegram onboarding
|
|
85
72
|
```
|
|
86
73
|
|
|
87
|
-
|
|
74
|
+
### Inspect Or Reset Local State
|
|
88
75
|
|
|
89
76
|
```bash
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
npm run yagr:start
|
|
77
|
+
yagr paths
|
|
78
|
+
yagr reset --dry-run
|
|
79
|
+
yagr reset --scope full --yes
|
|
94
80
|
```
|
|
95
81
|
|
|
96
|
-
|
|
82
|
+
To remove the global CLI package itself:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm uninstall -g @yagr/agent
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
> <table>
|
|
89
|
+
> <tr>
|
|
90
|
+
> <td width="108" align="center">
|
|
91
|
+
> <img src="res/logo.png" alt="n8n-as-code logo" width="84">
|
|
92
|
+
> </td>
|
|
93
|
+
> <td>
|
|
94
|
+
> <strong>Yagr is built on top of n8n-as-code</strong><br>
|
|
95
|
+
> Yagr rely on the underlying n8n-as-code technology, workflow GitOps model, schema grounding, and editor tooling<br><br>
|
|
96
|
+
> <a href="https://github.com/EtienneLescot/n8n-as-code">Open the n8n-as-code repository</a>
|
|
97
|
+
> </td>
|
|
98
|
+
> </tr>
|
|
99
|
+
> </table>
|
|
97
100
|
|
|
98
101
|
Read next if you want more than the fast path:
|
|
99
102
|
|
|
100
|
-
- [Yagr getting started](https://
|
|
101
|
-
- [Yagr command reference](https://
|
|
102
|
-
- [n8n-as-code product page](https://n8nascode.dev/n8n-as-code/)
|
|
103
|
+
- [Yagr getting started](https://yagr.dev/docs/getting-started/)
|
|
104
|
+
- [Yagr command reference](https://yagr.dev/docs/reference/commands/)
|
|
103
105
|
|
|
104
106
|
---
|
|
105
107
|
|
|
@@ -242,16 +244,31 @@ Yagr stores that state in its own home so the product does not depend on whateve
|
|
|
242
244
|
|
|
243
245
|
| Product | Role | Where to go |
|
|
244
246
|
|---|---|---|
|
|
245
|
-
| **Yagr** | Autonomous automation agent | [Yagr docs](https://
|
|
247
|
+
| **Yagr** | Autonomous automation agent | [Yagr docs](https://yagr.dev/) |
|
|
246
248
|
| **n8n-as-code** | Workflow GitOps, AI skill, schema grounding, VS Code extension, TypeScript workflows | [n8n-as-code page](https://n8nascode.dev/n8n-as-code/) |
|
|
247
249
|
|
|
248
250
|
The previous root README for `n8n-as-code` is preserved as a dedicated product README in [products/n8n-as-code/README.md](products/n8n-as-code/README.md).
|
|
249
251
|
|
|
250
252
|
---
|
|
251
253
|
|
|
254
|
+
## Contributing And Development
|
|
255
|
+
|
|
256
|
+
If you are contributing from this repository instead of installing the published package globally, use the repo-scoped development flow:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
npm install
|
|
260
|
+
npm run build
|
|
261
|
+
npm run yagr:onboard
|
|
262
|
+
npm run yagr:start
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
These development scripts intentionally target `.yagr-test-workspace` so local work does not pollute your real `~/.yagr` home.
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
252
269
|
## Read Next
|
|
253
270
|
|
|
254
|
-
- [Yagr overview](https://
|
|
255
|
-
- [Yagr getting started](https://
|
|
256
|
-
- [n8n-as-code
|
|
271
|
+
- [Yagr overview](https://yagr.dev/)
|
|
272
|
+
- [Yagr getting started](https://yagr.dev/docs/getting-started/)
|
|
273
|
+
- [n8n-as-code repo](https://n8nascode.dev/n8n-as-code/)
|
|
257
274
|
- [n8n-as-code documentation](https://n8nascode.dev/docs/)
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import './config/init-yagr-home.js';
|
|
3
|
+
import os from 'node:os';
|
|
3
4
|
import { createN8nEngineFromWorkspace } from './config/load-n8n-engine-config.js';
|
|
5
|
+
import { buildYagrCleanupPlan, resetYagrLocalState } from './config/local-state.js';
|
|
4
6
|
import { YagrConfigService } from './config/yagr-config-service.js';
|
|
5
7
|
import { getGatewaySupervisorStatus, runGatewaySupervisor, runGatewaySurfaces } from './gateway/manager.js';
|
|
6
8
|
import { getTelegramGatewayStatus, resetTelegramGateway, runTelegramGateway, showTelegramOnboarding, setupTelegramGateway, } from './gateway/telegram.js';
|
|
@@ -20,6 +22,8 @@ function parseArgs(argv) {
|
|
|
20
22
|
interactive: false,
|
|
21
23
|
showThinking: true,
|
|
22
24
|
showExecution: true,
|
|
25
|
+
yes: false,
|
|
26
|
+
dryRun: false,
|
|
23
27
|
};
|
|
24
28
|
let startIndex = 0;
|
|
25
29
|
if (argv[0] === 'config' && argv[1] === 'show') {
|
|
@@ -30,6 +34,18 @@ function parseArgs(argv) {
|
|
|
30
34
|
parsed.command = 'config-reset';
|
|
31
35
|
return parsed;
|
|
32
36
|
}
|
|
37
|
+
if (argv[0] === 'paths') {
|
|
38
|
+
parsed.command = 'paths';
|
|
39
|
+
return parsed;
|
|
40
|
+
}
|
|
41
|
+
if (argv[0] === 'reset') {
|
|
42
|
+
parsed.command = 'reset';
|
|
43
|
+
startIndex = 1;
|
|
44
|
+
}
|
|
45
|
+
if (argv[0] === 'uninstall') {
|
|
46
|
+
parsed.command = 'uninstall';
|
|
47
|
+
startIndex = 1;
|
|
48
|
+
}
|
|
33
49
|
if (argv[0] === 'setup' || argv[0] === 'onboard') {
|
|
34
50
|
parsed.command = 'setup';
|
|
35
51
|
startIndex = 1;
|
|
@@ -116,6 +132,23 @@ function parseArgs(argv) {
|
|
|
116
132
|
parsed.showExecution = false;
|
|
117
133
|
continue;
|
|
118
134
|
}
|
|
135
|
+
if (arg === '--yes') {
|
|
136
|
+
parsed.yes = true;
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
if (arg === '--dry-run') {
|
|
140
|
+
parsed.dryRun = true;
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
if (arg === '--scope') {
|
|
144
|
+
const value = argv[index + 1];
|
|
145
|
+
if (value === 'config' || value === 'config+creds' || value === 'full') {
|
|
146
|
+
parsed.resetScope = value;
|
|
147
|
+
index += 1;
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
throw new Error('Invalid value for --scope. Use one of: config, config+creds, full.');
|
|
151
|
+
}
|
|
119
152
|
if (!parsed.prompt) {
|
|
120
153
|
parsed.prompt = arg;
|
|
121
154
|
continue;
|
|
@@ -179,6 +212,51 @@ async function main() {
|
|
|
179
212
|
const args = parseArgs(process.argv.slice(2));
|
|
180
213
|
const configService = new YagrConfigService();
|
|
181
214
|
if (args.command) {
|
|
215
|
+
if (args.command === 'paths') {
|
|
216
|
+
const cleanupPlan = buildYagrCleanupPlan('full');
|
|
217
|
+
const payload = {
|
|
218
|
+
launchDir: cleanupPlan.paths.launchDir,
|
|
219
|
+
homeDir: cleanupPlan.paths.homeDir,
|
|
220
|
+
os: process.platform,
|
|
221
|
+
files: {
|
|
222
|
+
yagrConfig: cleanupPlan.paths.yagrConfigPath,
|
|
223
|
+
yagrCredentials: cleanupPlan.paths.yagrCredentialsPath,
|
|
224
|
+
n8nConfig: cleanupPlan.paths.n8nConfigPath,
|
|
225
|
+
n8nCredentials: cleanupPlan.paths.n8nCredentialsPath,
|
|
226
|
+
},
|
|
227
|
+
legacy: {
|
|
228
|
+
yagrCredentials: cleanupPlan.paths.legacyYagrCredentialsPath,
|
|
229
|
+
n8nCredentials: cleanupPlan.paths.legacyN8nCredentialsPath,
|
|
230
|
+
},
|
|
231
|
+
workspace: {
|
|
232
|
+
managed: cleanupPlan.workspacePaths,
|
|
233
|
+
preservedExternal: cleanupPlan.preservedWorkspacePaths,
|
|
234
|
+
},
|
|
235
|
+
};
|
|
236
|
+
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
if (args.command === 'reset' || args.command === 'uninstall') {
|
|
240
|
+
const scope = args.command === 'uninstall' ? 'full' : (args.resetScope ?? 'config+creds');
|
|
241
|
+
if (!args.dryRun && !args.yes) {
|
|
242
|
+
throw new Error('Refusing to remove local state without --yes. Use --dry-run to preview the cleanup plan.');
|
|
243
|
+
}
|
|
244
|
+
const result = await resetYagrLocalState(scope, { dryRun: args.dryRun });
|
|
245
|
+
const payload = {
|
|
246
|
+
scope,
|
|
247
|
+
dryRun: args.dryRun,
|
|
248
|
+
deletePaths: result.plan.deletePaths,
|
|
249
|
+
preservedWorkspacePaths: result.plan.preservedWorkspacePaths,
|
|
250
|
+
};
|
|
251
|
+
process.stdout.write(`${JSON.stringify(payload, null, 2)}\n`);
|
|
252
|
+
if (args.command === 'uninstall') {
|
|
253
|
+
const packageManagerHint = os.platform() === 'win32'
|
|
254
|
+
? 'npm uninstall -g @yagr/agent'
|
|
255
|
+
: 'npm uninstall -g @yagr/agent';
|
|
256
|
+
process.stdout.write(`CLI package remains installed. Remove it separately with: ${packageManagerHint}\n`);
|
|
257
|
+
}
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
182
260
|
if (args.command === 'config-show') {
|
|
183
261
|
const localConfig = configService.getLocalConfig();
|
|
184
262
|
const setupStatus = getYagrSetupStatus(configService);
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC5G,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAA0B,MAAM,2BAA2B,CAAC;AAEzF,MAAM,eAAe,GAAwB;IAC3C,WAAW;IACX,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,SAAS;IACT,YAAY;CACb,CAAC;AAcF,SAAS,SAAS,CAAC,IAAc;IAC/B,MAAM,MAAM,GAAe;QACzB,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,IAAI;QAClB,aAAa,EAAE,IAAI;KACpB,CAAC;IAEF,IAAI,UAAU,GAAG,CAAC,CAAC;IAEnB,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,C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C;IACvE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mBAAmB,OAAO,IAAI,CAAC,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ConfigService } from 'n8nac';
|
|
2
1
|
import type { N8nEngineConfig } from '../types.js';
|
|
3
2
|
import { N8nEngine } from '../engine/n8n-engine.js';
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
3
|
+
import { YagrN8nConfigService } from './n8n-config-service.js';
|
|
4
|
+
export declare function loadN8nEngineConfig(configService?: YagrN8nConfigService): Promise<N8nEngineConfig>;
|
|
5
|
+
export declare function createN8nEngineFromWorkspace(configService?: YagrN8nConfigService): Promise<N8nEngine>;
|
|
6
6
|
//# sourceMappingURL=load-n8n-engine-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-n8n-engine-config.d.ts","sourceRoot":"","sources":["../../src/config/load-n8n-engine-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"load-n8n-engine-config.d.ts","sourceRoot":"","sources":["../../src/config/load-n8n-engine-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAQ/D,wBAAsB,mBAAmB,CAAC,aAAa,uBAA6B,GAAG,OAAO,CAAC,eAAe,CAAC,CAmC9G;AAED,wBAAsB,4BAA4B,CAChD,aAAa,uBAA6B,GACzC,OAAO,CAAC,SAAS,CAAC,CAGpB"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ConfigService } from 'n8nac';
|
|
2
1
|
import { N8nEngine } from '../engine/n8n-engine.js';
|
|
2
|
+
import { YagrN8nConfigService } from './n8n-config-service.js';
|
|
3
3
|
function missingFieldError(field) {
|
|
4
4
|
return new Error(`Missing required n8n workspace configuration field: ${field}. Initialize the workspace before starting Yagr.`);
|
|
5
5
|
}
|
|
6
|
-
export async function loadN8nEngineConfig(configService = new
|
|
6
|
+
export async function loadN8nEngineConfig(configService = new YagrN8nConfigService()) {
|
|
7
7
|
const localConfig = configService.getLocalConfig();
|
|
8
8
|
if (!localConfig.host) {
|
|
9
9
|
throw missingFieldError('host');
|
|
@@ -32,7 +32,7 @@ export async function loadN8nEngineConfig(configService = new ConfigService()) {
|
|
|
32
32
|
instanceIdentifier,
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
export async function createN8nEngineFromWorkspace(configService = new
|
|
35
|
+
export async function createN8nEngineFromWorkspace(configService = new YagrN8nConfigService()) {
|
|
36
36
|
const config = await loadN8nEngineConfig(configService);
|
|
37
37
|
return new N8nEngine(config);
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-n8n-engine-config.js","sourceRoot":"","sources":["../../src/config/load-n8n-engine-config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"load-n8n-engine-config.js","sourceRoot":"","sources":["../../src/config/load-n8n-engine-config.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,SAAS,iBAAiB,CAAC,KAAa;IACtC,OAAO,IAAI,KAAK,CACd,uDAAuD,KAAK,kDAAkD,CAC/G,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,aAAa,GAAG,IAAI,oBAAoB,EAAE;IAClF,MAAM,WAAW,GAAG,aAAa,CAAC,cAAc,EAAE,CAAC;IAEnD,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;QACtB,MAAM,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IACD,IAAI,CAAC,WAAW,CAAC,UAAU,EAAE,CAAC;QAC5B,MAAM,iBAAiB,CAAC,YAAY,CAAC,CAAC;IACxC,CAAC;IACD,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;QAC3B,MAAM,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACvC,CAAC;IACD,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;QAC7B,MAAM,iBAAiB,CAAC,aAAa,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACzD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CACb,uBAAuB,WAAW,CAAC,IAAI,uDAAuD,CAC/F,CAAC;IACJ,CAAC;IAED,MAAM,kBAAkB,GACtB,WAAW,CAAC,kBAAkB;QAC9B,CAAC,MAAM,aAAa,CAAC,6BAA6B,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IAExE,OAAO;QACL,IAAI,EAAE,WAAW,CAAC,IAAI;QACtB,MAAM;QACN,UAAU,EAAE,WAAW,CAAC,UAAU;QAClC,SAAS,EAAE,WAAW,CAAC,SAAS;QAChC,WAAW,EAAE,WAAW,CAAC,WAAW;QACpC,kBAAkB;KACnB,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAChD,aAAa,GAAG,IAAI,oBAAoB,EAAE;IAE1C,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACxD,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type YagrPaths } from './yagr-home.js';
|
|
2
|
+
export type YagrResetScope = 'config' | 'config+creds' | 'full';
|
|
3
|
+
export interface YagrCleanupPlan {
|
|
4
|
+
scope: YagrResetScope;
|
|
5
|
+
paths: YagrPaths;
|
|
6
|
+
configPaths: string[];
|
|
7
|
+
credentialPaths: string[];
|
|
8
|
+
deletePaths: string[];
|
|
9
|
+
workspacePaths: string[];
|
|
10
|
+
preservedWorkspacePaths: string[];
|
|
11
|
+
}
|
|
12
|
+
export declare function buildYagrCleanupPlan(scope?: YagrResetScope): YagrCleanupPlan;
|
|
13
|
+
export interface YagrResetResult {
|
|
14
|
+
plan: YagrCleanupPlan;
|
|
15
|
+
removedPaths: string[];
|
|
16
|
+
}
|
|
17
|
+
export declare function resetYagrLocalState(scope: YagrResetScope, options?: {
|
|
18
|
+
dryRun?: boolean;
|
|
19
|
+
}): Promise<YagrResetResult>;
|
|
20
|
+
//# sourceMappingURL=local-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-state.d.ts","sourceRoot":"","sources":["../../src/config/local-state.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,cAAc,GAAG,MAAM,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,EAAE,SAAS,CAAC;IACjB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,uBAAuB,EAAE,MAAM,EAAE,CAAC;CACnC;AAmCD,wBAAgB,oBAAoB,CAAC,KAAK,GAAE,cAA+B,GAAG,eAAe,CAoC5F;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,eAAe,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAMD,wBAAsB,mBAAmB,CAAC,KAAK,EAAE,cAAc,EAAE,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAAC,eAAe,CAAC,CAY7H"}
|