@yagr/agent 0.1.0
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 +201 -0
- package/README.md +257 -0
- package/dist/agent.d.ts +21 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +47 -0
- package/dist/agent.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +293 -0
- package/dist/cli.js.map +1 -0
- package/dist/config/init-yagr-home.d.ts +2 -0
- package/dist/config/init-yagr-home.d.ts.map +1 -0
- package/dist/config/init-yagr-home.js +6 -0
- package/dist/config/init-yagr-home.js.map +1 -0
- package/dist/config/load-env.d.ts +2 -0
- package/dist/config/load-env.d.ts.map +1 -0
- package/dist/config/load-env.js +20 -0
- package/dist/config/load-env.js.map +1 -0
- package/dist/config/load-n8n-engine-config.d.ts +6 -0
- package/dist/config/load-n8n-engine-config.d.ts.map +1 -0
- package/dist/config/load-n8n-engine-config.js +39 -0
- package/dist/config/load-n8n-engine-config.js.map +1 -0
- package/dist/config/yagr-config-service.d.ts +51 -0
- package/dist/config/yagr-config-service.d.ts.map +1 -0
- package/dist/config/yagr-config-service.js +103 -0
- package/dist/config/yagr-config-service.js.map +1 -0
- package/dist/config/yagr-home.d.ts +4 -0
- package/dist/config/yagr-home.d.ts.map +1 -0
- package/dist/config/yagr-home.js +25 -0
- package/dist/config/yagr-home.js.map +1 -0
- package/dist/engine/engine.d.ts +15 -0
- package/dist/engine/engine.d.ts.map +1 -0
- package/dist/engine/engine.js +2 -0
- package/dist/engine/engine.js.map +1 -0
- package/dist/engine/n8n-engine.d.ts +26 -0
- package/dist/engine/n8n-engine.d.ts.map +1 -0
- package/dist/engine/n8n-engine.js +200 -0
- package/dist/engine/n8n-engine.js.map +1 -0
- package/dist/engine/yagr-engine.d.ts +17 -0
- package/dist/engine/yagr-engine.d.ts.map +1 -0
- package/dist/engine/yagr-engine.js +37 -0
- package/dist/engine/yagr-engine.js.map +1 -0
- package/dist/gateway/cli.d.ts +8 -0
- package/dist/gateway/cli.d.ts.map +1 -0
- package/dist/gateway/cli.js +50 -0
- package/dist/gateway/cli.js.map +1 -0
- package/dist/gateway/history-viewport.d.ts +14 -0
- package/dist/gateway/history-viewport.d.ts.map +1 -0
- package/dist/gateway/history-viewport.js +51 -0
- package/dist/gateway/history-viewport.js.map +1 -0
- package/dist/gateway/interactive-ui.d.ts +4 -0
- package/dist/gateway/interactive-ui.d.ts.map +1 -0
- package/dist/gateway/interactive-ui.js +430 -0
- package/dist/gateway/interactive-ui.js.map +1 -0
- package/dist/gateway/manager.d.ts +25 -0
- package/dist/gateway/manager.d.ts.map +1 -0
- package/dist/gateway/manager.js +204 -0
- package/dist/gateway/manager.js.map +1 -0
- package/dist/gateway/telegram.d.ts +30 -0
- package/dist/gateway/telegram.d.ts.map +1 -0
- package/dist/gateway/telegram.js +406 -0
- package/dist/gateway/telegram.js.map +1 -0
- package/dist/gateway/types.d.ts +19 -0
- package/dist/gateway/types.d.ts.map +1 -0
- package/dist/gateway/types.js +2 -0
- package/dist/gateway/types.js.map +1 -0
- package/dist/gateway/webui.d.ts +13 -0
- package/dist/gateway/webui.d.ts.map +1 -0
- package/dist/gateway/webui.js +663 -0
- package/dist/gateway/webui.js.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/create-language-model.d.ts +31 -0
- package/dist/llm/create-language-model.d.ts.map +1 -0
- package/dist/llm/create-language-model.js +129 -0
- package/dist/llm/create-language-model.js.map +1 -0
- package/dist/prompt/build-system-prompt.d.ts +3 -0
- package/dist/prompt/build-system-prompt.d.ts.map +1 -0
- package/dist/prompt/build-system-prompt.js +64 -0
- package/dist/prompt/build-system-prompt.js.map +1 -0
- package/dist/runtime/completion-gate.d.ts +21 -0
- package/dist/runtime/completion-gate.d.ts.map +1 -0
- package/dist/runtime/completion-gate.js +59 -0
- package/dist/runtime/completion-gate.js.map +1 -0
- package/dist/runtime/context-compaction.d.ts +25 -0
- package/dist/runtime/context-compaction.d.ts.map +1 -0
- package/dist/runtime/context-compaction.js +197 -0
- package/dist/runtime/context-compaction.js.map +1 -0
- package/dist/runtime/outcome.d.ts +23 -0
- package/dist/runtime/outcome.d.ts.map +1 -0
- package/dist/runtime/outcome.js +89 -0
- package/dist/runtime/outcome.js.map +1 -0
- package/dist/runtime/policy-hooks.d.ts +15 -0
- package/dist/runtime/policy-hooks.d.ts.map +1 -0
- package/dist/runtime/policy-hooks.js +54 -0
- package/dist/runtime/policy-hooks.js.map +1 -0
- package/dist/runtime/required-actions.d.ts +5 -0
- package/dist/runtime/required-actions.d.ts.map +1 -0
- package/dist/runtime/required-actions.js +77 -0
- package/dist/runtime/required-actions.js.map +1 -0
- package/dist/runtime/run-engine.d.ts +15 -0
- package/dist/runtime/run-engine.d.ts.map +1 -0
- package/dist/runtime/run-engine.js +624 -0
- package/dist/runtime/run-engine.js.map +1 -0
- package/dist/setup/setup-wizard.d.ts +52 -0
- package/dist/setup/setup-wizard.d.ts.map +1 -0
- package/dist/setup/setup-wizard.js +613 -0
- package/dist/setup/setup-wizard.js.map +1 -0
- package/dist/setup/start-launcher.d.ts +22 -0
- package/dist/setup/start-launcher.d.ts.map +1 -0
- package/dist/setup/start-launcher.js +76 -0
- package/dist/setup/start-launcher.js.map +1 -0
- package/dist/setup.d.ts +20 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +247 -0
- package/dist/setup.js.map +1 -0
- package/dist/tools/build-tools.d.ts +608 -0
- package/dist/tools/build-tools.d.ts.map +1 -0
- package/dist/tools/build-tools.js +35 -0
- package/dist/tools/build-tools.js.map +1 -0
- package/dist/tools/delete-workspace-file.d.ts +38 -0
- package/dist/tools/delete-workspace-file.d.ts.map +1 -0
- package/dist/tools/delete-workspace-file.js +31 -0
- package/dist/tools/delete-workspace-file.js.map +1 -0
- package/dist/tools/deploy.d.ts +110 -0
- package/dist/tools/deploy.d.ts.map +1 -0
- package/dist/tools/deploy.js +28 -0
- package/dist/tools/deploy.js.map +1 -0
- package/dist/tools/generate-workflow.d.ts +180 -0
- package/dist/tools/generate-workflow.d.ts.map +1 -0
- package/dist/tools/generate-workflow.js +46 -0
- package/dist/tools/generate-workflow.js.map +1 -0
- package/dist/tools/index.d.ts +20 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +20 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/list-directory.d.ts +48 -0
- package/dist/tools/list-directory.d.ts.map +1 -0
- package/dist/tools/list-directory.js +61 -0
- package/dist/tools/list-directory.js.map +1 -0
- package/dist/tools/list-workflows.d.ts +18 -0
- package/dist/tools/list-workflows.d.ts.map +1 -0
- package/dist/tools/list-workflows.js +17 -0
- package/dist/tools/list-workflows.js.map +1 -0
- package/dist/tools/manage-workflow.d.ts +42 -0
- package/dist/tools/manage-workflow.d.ts.map +1 -0
- package/dist/tools/manage-workflow.js +26 -0
- package/dist/tools/manage-workflow.js.map +1 -0
- package/dist/tools/move-workspace-file.d.ts +42 -0
- package/dist/tools/move-workspace-file.d.ts.map +1 -0
- package/dist/tools/move-workspace-file.js +45 -0
- package/dist/tools/move-workspace-file.js.map +1 -0
- package/dist/tools/n8nac.d.ts +144 -0
- package/dist/tools/n8nac.d.ts.map +1 -0
- package/dist/tools/n8nac.js +349 -0
- package/dist/tools/n8nac.js.map +1 -0
- package/dist/tools/node-info.d.ts +18 -0
- package/dist/tools/node-info.d.ts.map +1 -0
- package/dist/tools/node-info.js +15 -0
- package/dist/tools/node-info.js.map +1 -0
- package/dist/tools/observer.d.ts +32 -0
- package/dist/tools/observer.d.ts.map +1 -0
- package/dist/tools/observer.js +10 -0
- package/dist/tools/observer.js.map +1 -0
- package/dist/tools/read-workspace-file.d.ts +54 -0
- package/dist/tools/read-workspace-file.d.ts.map +1 -0
- package/dist/tools/read-workspace-file.js +49 -0
- package/dist/tools/read-workspace-file.js.map +1 -0
- package/dist/tools/replace-in-workspace-file.d.ts +62 -0
- package/dist/tools/replace-in-workspace-file.d.ts.map +1 -0
- package/dist/tools/replace-in-workspace-file.js +46 -0
- package/dist/tools/replace-in-workspace-file.js.map +1 -0
- package/dist/tools/report-progress.d.ts +20 -0
- package/dist/tools/report-progress.d.ts.map +1 -0
- package/dist/tools/report-progress.js +20 -0
- package/dist/tools/report-progress.js.map +1 -0
- package/dist/tools/request-required-action.d.ts +31 -0
- package/dist/tools/request-required-action.d.ts.map +1 -0
- package/dist/tools/request-required-action.js +33 -0
- package/dist/tools/request-required-action.js.map +1 -0
- package/dist/tools/search-nodes.d.ts +18 -0
- package/dist/tools/search-nodes.d.ts.map +1 -0
- package/dist/tools/search-nodes.js +15 -0
- package/dist/tools/search-nodes.js.map +1 -0
- package/dist/tools/search-templates.d.ts +18 -0
- package/dist/tools/search-templates.d.ts.map +1 -0
- package/dist/tools/search-templates.js +15 -0
- package/dist/tools/search-templates.js.map +1 -0
- package/dist/tools/search-workspace.d.ts +55 -0
- package/dist/tools/search-workspace.d.ts.map +1 -0
- package/dist/tools/search-workspace.js +86 -0
- package/dist/tools/search-workspace.js.map +1 -0
- package/dist/tools/validate.d.ts +110 -0
- package/dist/tools/validate.d.ts.map +1 -0
- package/dist/tools/validate.js +28 -0
- package/dist/tools/validate.js.map +1 -0
- package/dist/tools/workspace-utils.d.ts +10 -0
- package/dist/tools/workspace-utils.d.ts.map +1 -0
- package/dist/tools/workspace-utils.js +63 -0
- package/dist/tools/workspace-utils.js.map +1 -0
- package/dist/tools/write-workspace-file.d.ts +46 -0
- package/dist/tools/write-workspace-file.d.ts.map +1 -0
- package/dist/tools/write-workspace-file.js +39 -0
- package/dist/tools/write-workspace-file.js.map +1 -0
- package/dist/types.d.ts +243 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/webui/app.js +26759 -0
- package/dist/webui/app.js.map +7 -0
- package/dist/webui/styles.css +740 -0
- package/dist/webui/styles.css.map +7 -0
- package/package.json +72 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
<table>
|
|
4
|
+
<tr>
|
|
5
|
+
<td align="center" width="180">
|
|
6
|
+
<img src="res/yagr-logo.png" alt="Yagr logo" width="140">
|
|
7
|
+
</td>
|
|
8
|
+
<td align="left">
|
|
9
|
+
|
|
10
|
+
# Yagr
|
|
11
|
+
|
|
12
|
+
### (Y)our (A)gent (G)rounded in (R)eality
|
|
13
|
+
|
|
14
|
+
**Autonomous automation agent · orchestrator-ready by design · powered by n8n-as-code today**
|
|
15
|
+
|
|
16
|
+
</td>
|
|
17
|
+
</tr>
|
|
18
|
+
</table>
|
|
19
|
+
|
|
20
|
+
[](https://github.com/EtienneLescot/n8n-as-code/actions/workflows/ci.yml)
|
|
21
|
+
[](https://n8nascode.dev/)
|
|
22
|
+
[](https://n8nascode.dev/yagr/docs/)
|
|
23
|
+
[](https://n8n.io/)
|
|
24
|
+
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
25
|
+
|
|
26
|
+
<br>
|
|
27
|
+
|
|
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
|
+
|
|
30
|
+
[**Read Yagr docs**](https://n8nascode.dev/yagr/docs/) · [**Open n8n-as-code**](https://n8nascode.dev/n8n-as-code/) · [**Workflow GitOps docs**](https://n8nascode.dev/docs/)
|
|
31
|
+
|
|
32
|
+
</div>
|
|
33
|
+
|
|
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
|
+
|
|
49
|
+
## Quick Start
|
|
50
|
+
|
|
51
|
+
If you want to see Yagr working before reading the full product story, start here.
|
|
52
|
+
|
|
53
|
+
### 1. Install Yagr globally
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npm install -g yagr@latest
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### 2. Run onboarding once
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
yagr onboard
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
This connects three things:
|
|
66
|
+
|
|
67
|
+
- your execution orchestrator connection, which is n8n today
|
|
68
|
+
- your default model
|
|
69
|
+
- your optional messaging integrations
|
|
70
|
+
|
|
71
|
+
### 3. Start the agent
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
yagr start
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
`yagr start` now lets you choose whether to open the Web UI or the TUI. If you want to skip the prompt, use `yagr start webui` or `yagr start tui`.
|
|
78
|
+
|
|
79
|
+
After setup, the day-to-day loop is:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
yagr start
|
|
83
|
+
yagr gateway status
|
|
84
|
+
yagr telegram onboarding
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
If you are contributing from this repository instead of installing the product globally, use the repo-scoped dev flow:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npm install
|
|
91
|
+
npm run build --workspace=packages/yagr
|
|
92
|
+
npm run yagr:onboard
|
|
93
|
+
npm run yagr:start
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
The repository dev scripts intentionally use `.yagr-test-workspace` so local development does not pollute your real Yagr home.
|
|
97
|
+
|
|
98
|
+
Read next if you want more than the fast path:
|
|
99
|
+
|
|
100
|
+
- [Yagr getting started](https://n8nascode.dev/yagr/docs/getting-started/)
|
|
101
|
+
- [Yagr command reference](https://n8nascode.dev/yagr/docs/reference/commands/)
|
|
102
|
+
- [n8n-as-code product page](https://n8nascode.dev/n8n-as-code/)
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## 🧠 Why Another Autonomous Agent? (The Reality Check)
|
|
107
|
+
|
|
108
|
+
Most AI agents today execute tasks by writing ephemeral scripts or firing blind API calls.
|
|
109
|
+
|
|
110
|
+
It works once, but it creates a black box:
|
|
111
|
+
|
|
112
|
+
- hard to audit
|
|
113
|
+
- hard to secure
|
|
114
|
+
- hard to maintain
|
|
115
|
+
- easy to break
|
|
116
|
+
|
|
117
|
+
Yagr takes a radically different approach.
|
|
118
|
+
|
|
119
|
+
Yagr is a general-purpose autonomous agent, but its execution layer is grounded in deterministic workflows.
|
|
120
|
+
|
|
121
|
+
When you ask Yagr to sort your emails, draft replies, monitor Stripe churn, or automate an operations loop, it should not disappear into a temporary Python script that nobody can inspect tomorrow.
|
|
122
|
+
|
|
123
|
+
Instead, Yagr dynamically architects, validates, and deploys a real workflow underneath the conversation.
|
|
124
|
+
|
|
125
|
+
That means Yagr is an **automation agent** where:
|
|
126
|
+
|
|
127
|
+
- you express intent in natural language
|
|
128
|
+
- Yagr plans against a grounded node ecosystem
|
|
129
|
+
- Yagr generates and validates a workflow on a deterministic execution orchestrator
|
|
130
|
+
- the resulting workflow becomes durable, executable memory and muscle that Yagr can revisit later
|
|
131
|
+
|
|
132
|
+
For the user, it feels like magic chat.
|
|
133
|
+
|
|
134
|
+
For the engineer, it is auditable, inspectable, safer, and grounded in strict ontology rather than improvisation.
|
|
135
|
+
|
|
136
|
+
The workflow is the agent's durable memory and muscle.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Why Yagr
|
|
141
|
+
|
|
142
|
+
<table>
|
|
143
|
+
<tr>
|
|
144
|
+
<td width="33%" valign="top">
|
|
145
|
+
|
|
146
|
+
### Intent First
|
|
147
|
+
|
|
148
|
+
Yagr starts from what you want to automate, not from manually wiring implementation primitives.
|
|
149
|
+
|
|
150
|
+
</td>
|
|
151
|
+
<td width="33%" valign="top">
|
|
152
|
+
|
|
153
|
+
### Workflows Remember
|
|
154
|
+
|
|
155
|
+
Generated workflows are not throwaway output. They are persisted intent that Yagr can inspect, explain, modify, and extend.
|
|
156
|
+
|
|
157
|
+
</td>
|
|
158
|
+
<td width="33%" valign="top">
|
|
159
|
+
|
|
160
|
+
### Engine Boundary
|
|
161
|
+
|
|
162
|
+
Yagr stays above the execution orchestrator. Today that means n8n through n8n-as-code. Tomorrow it can mean a native Yagr runtime or another orchestrator.
|
|
163
|
+
|
|
164
|
+
</td>
|
|
165
|
+
</tr>
|
|
166
|
+
</table>
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## What Yagr Is And Is Not
|
|
171
|
+
|
|
172
|
+
<table>
|
|
173
|
+
<tr>
|
|
174
|
+
<td width="50%" valign="top">
|
|
175
|
+
|
|
176
|
+
### Yagr Is
|
|
177
|
+
|
|
178
|
+
- an autonomous automation agent
|
|
179
|
+
- a product layer above the engine
|
|
180
|
+
- a stable runtime with a dedicated home
|
|
181
|
+
- a way to reach the same agent through TUI, Telegram, CLI, and future gateways
|
|
182
|
+
|
|
183
|
+
</td>
|
|
184
|
+
<td width="50%" valign="top">
|
|
185
|
+
|
|
186
|
+
### Yagr Is Not
|
|
187
|
+
|
|
188
|
+
- a monolithic n8n workflow pretending to be an agent
|
|
189
|
+
- a generic memory/notes/reminders product
|
|
190
|
+
- a pile of shell variables glued together
|
|
191
|
+
- a replacement for n8n-as-code workflow engineering tooling
|
|
192
|
+
|
|
193
|
+
</td>
|
|
194
|
+
</tr>
|
|
195
|
+
</table>
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Architecture In One View
|
|
200
|
+
|
|
201
|
+
```text
|
|
202
|
+
User intent
|
|
203
|
+
-> Yagr agent
|
|
204
|
+
-> Orchestrator interface
|
|
205
|
+
-> today: n8n via n8n-as-code
|
|
206
|
+
-> tomorrow: native Yagr runtime or other orchestrators
|
|
207
|
+
-> workflow is generated, validated, deployed
|
|
208
|
+
-> workflow becomes durable executable memory
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
This separation is deliberate:
|
|
212
|
+
|
|
213
|
+
- gateways are thin surfaces
|
|
214
|
+
- the agent is the reasoning layer
|
|
215
|
+
- the engine executes automations
|
|
216
|
+
- workflows are the lasting artifact, memory, and muscle
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## What Setup Actually Does
|
|
221
|
+
|
|
222
|
+
`yagr setup` configures three things:
|
|
223
|
+
|
|
224
|
+
1. your **current orchestrator connection**: today that means an n8n instance, API key, project, and local sync folder
|
|
225
|
+
2. your **default model**: provider, model, API key, optional base URL
|
|
226
|
+
3. your **optional messaging integrations**: for example Telegram
|
|
227
|
+
|
|
228
|
+
Yagr stores that state in its own home so the product does not depend on whatever repo or shell happens to be open.
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
## Product Philosophy
|
|
233
|
+
|
|
234
|
+
- **Yagr is the agent.** It should stay above the execution orchestrator.
|
|
235
|
+
- **Gateways are not the brain.** Telegram and TUI are surfaces into the same agent loop.
|
|
236
|
+
- **Workflows are memory and muscle.** They persist how the problem was solved and they execute it reliably over time.
|
|
237
|
+
- **The orchestrator must stay swappable.** Today that orchestrator is n8n via n8n-as-code. Tomorrow it may be a native Yagr runtime or something else.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Products In This Repository
|
|
242
|
+
|
|
243
|
+
| Product | Role | Where to go |
|
|
244
|
+
|---|---|---|
|
|
245
|
+
| **Yagr** | Autonomous automation agent | [Yagr docs](https://n8nascode.dev/yagr/docs/) |
|
|
246
|
+
| **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
|
+
|
|
248
|
+
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
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Read Next
|
|
253
|
+
|
|
254
|
+
- [Yagr overview](https://n8nascode.dev/yagr/docs/)
|
|
255
|
+
- [Yagr getting started](https://n8nascode.dev/yagr/docs/getting-started/)
|
|
256
|
+
- [n8n-as-code product page](https://n8nascode.dev/n8n-as-code/)
|
|
257
|
+
- [n8n-as-code documentation](https://n8nascode.dev/docs/)
|
package/dist/agent.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Engine } from './engine/engine.js';
|
|
2
|
+
import type { DeployedWorkflow, GeneratedWorkflow, YagrRunOptions, YagrRunResult, WorkflowSpec, WorkflowValidationResult } from './types.js';
|
|
3
|
+
export declare class YagrAgent {
|
|
4
|
+
private readonly engine;
|
|
5
|
+
private readonly history;
|
|
6
|
+
constructor(engine: Engine);
|
|
7
|
+
plan(spec: WorkflowSpec): Promise<GeneratedWorkflow>;
|
|
8
|
+
validate(generatedWorkflow: GeneratedWorkflow): Promise<WorkflowValidationResult>;
|
|
9
|
+
create(spec: WorkflowSpec): Promise<{
|
|
10
|
+
workflow: GeneratedWorkflow;
|
|
11
|
+
validation: WorkflowValidationResult;
|
|
12
|
+
deployed?: DeployedWorkflow;
|
|
13
|
+
}>;
|
|
14
|
+
list(): Promise<DeployedWorkflow[]>;
|
|
15
|
+
activate(id: string): Promise<void>;
|
|
16
|
+
deactivate(id: string): Promise<void>;
|
|
17
|
+
delete(id: string): Promise<void>;
|
|
18
|
+
run(prompt: string, options?: YagrRunOptions): Promise<YagrRunResult>;
|
|
19
|
+
clearConversation(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAGjD,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,wBAAwB,EACzB,MAAM,YAAY,CAAC;AAEpB,qBAAa,SAAS;IAGR,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;gBAEhB,MAAM,EAAE,MAAM;IAErC,IAAI,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAIpD,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAIjF,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,iBAAiB,CAAC;QAAC,UAAU,EAAE,wBAAwB,CAAC;QAAC,QAAQ,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC;IAYvI,IAAI,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAInC,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAInC,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,OAAO,CAAC,aAAa,CAAC;IAW/E,iBAAiB,IAAI,IAAI;CAG1B"}
|
package/dist/agent.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { YagrRunEngine } from './runtime/run-engine.js';
|
|
2
|
+
export class YagrAgent {
|
|
3
|
+
engine;
|
|
4
|
+
history = [];
|
|
5
|
+
constructor(engine) {
|
|
6
|
+
this.engine = engine;
|
|
7
|
+
}
|
|
8
|
+
async plan(spec) {
|
|
9
|
+
return this.engine.generateWorkflow(spec);
|
|
10
|
+
}
|
|
11
|
+
async validate(generatedWorkflow) {
|
|
12
|
+
return this.engine.validate(generatedWorkflow);
|
|
13
|
+
}
|
|
14
|
+
async create(spec) {
|
|
15
|
+
const workflow = await this.plan(spec);
|
|
16
|
+
const validation = await this.validate(workflow);
|
|
17
|
+
if (!validation.valid) {
|
|
18
|
+
return { workflow, validation };
|
|
19
|
+
}
|
|
20
|
+
const deployed = await this.engine.deploy(workflow);
|
|
21
|
+
return { workflow, validation, deployed };
|
|
22
|
+
}
|
|
23
|
+
async list() {
|
|
24
|
+
return this.engine.listWorkflows();
|
|
25
|
+
}
|
|
26
|
+
async activate(id) {
|
|
27
|
+
return this.engine.activateWorkflow(id);
|
|
28
|
+
}
|
|
29
|
+
async deactivate(id) {
|
|
30
|
+
return this.engine.deactivateWorkflow(id);
|
|
31
|
+
}
|
|
32
|
+
async delete(id) {
|
|
33
|
+
return this.engine.deleteWorkflow(id);
|
|
34
|
+
}
|
|
35
|
+
async run(prompt, options = {}) {
|
|
36
|
+
const runner = new YagrRunEngine(this.engine, this.history);
|
|
37
|
+
const { result, persistedMessages } = await runner.execute(prompt, options);
|
|
38
|
+
if (options.rememberConversation !== false) {
|
|
39
|
+
this.history.push(...persistedMessages);
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
clearConversation() {
|
|
44
|
+
this.history.length = 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../src/agent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAUxD,MAAM,OAAO,SAAS;IAGS;IAFZ,OAAO,GAAkB,EAAE,CAAC;IAE7C,YAA6B,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/C,KAAK,CAAC,IAAI,CAAC,IAAkB;QAC3B,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,iBAAoC;QACjD,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAkB;QAC7B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAEjD,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;YACtB,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;QAClC,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACpD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,CAAC;IACrC,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,EAAU;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,MAAc,EAAE,UAA0B,EAAE;QACpD,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC5D,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAE5E,IAAI,OAAO,CAAC,oBAAoB,KAAK,KAAK,EAAE,CAAC;YAC3C,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,CAAC;QAC1C,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;IAC1B,CAAC;CACF"}
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,4BAA4B,CAAC"}
|