@olierjs/fugue-cli 0.0.0-stage → 0.1.2
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 +99 -2
- package/THIRD_PARTY_NOTICES +467 -0
- package/bin/fugue-cli.mjs +23 -0
- package/dist/darwin-arm64/fugue-cli +0 -0
- package/dist/darwin-x64/fugue-cli +0 -0
- package/dist/linux-arm64/fugue-cli +0 -0
- package/dist/linux-x64/fugue-cli +0 -0
- package/dist/win32-arm64/fugue-cli.exe +0 -0
- package/dist/win32-x64/fugue-cli.exe +0 -0
- package/package.json +27 -4
- package/scripts/postinstall.mjs +13 -0
- package/scripts/skills.mjs +104 -0
- package/skills/fugue-show-me/SKILL.md +16 -0
- package/skills/fugue-stack/SKILL.md +10 -0
- package/skills/plan-with-remote/SKILL.md +60 -0
- package/skills/plan-with-remote/references/configuration.md +43 -0
- package/skills/plan-with-remote/scripts/client.mjs +61 -0
- package/skills/plan-with-remote/scripts/config.mjs +53 -0
- package/skills/plan-with-remote/scripts/planning.mjs +279 -0
- package/skills/plan-with-remote/scripts/protocol.mjs +147 -0
- package/skills/plan-with-remote/scripts/service.mjs +146 -0
- package/skills/plan-with-remote/scripts/storage.mjs +74 -0
- package/skills/show-me/SKILL.md +128 -0
- package/skills/show-me/agents/openai.yaml +2 -0
- package/skills/statechart/SKILL.md +36 -0
- package/skills/statechart/scripts/bug-states.mjs +81 -0
- package/skills/statechart/scripts/chart-edges.mjs +68 -0
- package/skills/statechart/scripts/chart-parts.mjs +21 -0
- package/skills/statechart/scripts/chart-to-tla.mjs +205 -0
- package/skills/statechart/scripts/compare-charts.mjs +74 -0
- package/skills/statechart/scripts/lib.mjs +970 -0
- package/skills/statechart/scripts/map-view.mjs +92 -0
- package/skills/statechart/scripts/property-loop.mjs +60 -0
- package/skills/statechart/scripts/read-check.mjs +79 -0
- package/skills/statechart/scripts/regions-chart.mjs +307 -0
- package/skills/statechart/scripts/render.mjs +531 -0
- package/skills/statechart/scripts/rule-book.mjs +84 -0
- package/skills/statechart/scripts/second-replay.mjs +122 -0
- package/skills/statechart/scripts/snapshot.mjs +74 -0
- package/skills/statechart/scripts/spec-text.mjs +126 -0
- package/skills/statechart/scripts/statechart-help.mjs +350 -0
- package/skills/statechart/scripts/statechart.mjs +903 -0
- package/skills/statechart/scripts/test/band.mmd +15 -0
- package/skills/statechart/scripts/test/regions.mmd +62 -0
- package/skills/statechart/scripts/test/statechart.test.mjs +6854 -0
- package/skills/statechart/scripts/test/sync.mmd +19 -0
- package/skills/statechart/scripts/test/upload.mmd +16 -0
- package/skills/statechart/scripts/tlc-to-chart-args.mjs +52 -0
- package/skills/statechart/scripts/tlc-to-chart.mjs +802 -0
- package/skills/statechart/scripts/tlc-tools.mjs +69 -0
- package/skills/statechart/scripts/ways-in.mjs +69 -0
- package/upstream-skills.json +18 -0
|
@@ -0,0 +1,467 @@
|
|
|
1
|
+
Third-party components distributed with fugue-cli.
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
github.com/spf13/cobra v1.10.2
|
|
5
|
+
|
|
6
|
+
Apache License
|
|
7
|
+
Version 2.0, January 2004
|
|
8
|
+
http://www.apache.org/licenses/
|
|
9
|
+
|
|
10
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
11
|
+
|
|
12
|
+
1. Definitions.
|
|
13
|
+
|
|
14
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
15
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
16
|
+
|
|
17
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
18
|
+
the copyright owner that is granting the License.
|
|
19
|
+
|
|
20
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
21
|
+
other entities that control, are controlled by, or are under common
|
|
22
|
+
control with that entity. For the purposes of this definition,
|
|
23
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
24
|
+
direction or management of such entity, whether by contract or
|
|
25
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
26
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
27
|
+
|
|
28
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
29
|
+
exercising permissions granted by this License.
|
|
30
|
+
|
|
31
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
32
|
+
including but not limited to software source code, documentation
|
|
33
|
+
source, and configuration files.
|
|
34
|
+
|
|
35
|
+
"Object" form shall mean any form resulting from mechanical
|
|
36
|
+
transformation or translation of a Source form, including but
|
|
37
|
+
not limited to compiled object code, generated documentation,
|
|
38
|
+
and conversions to other media types.
|
|
39
|
+
|
|
40
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
41
|
+
Object form, made available under the License, as indicated by a
|
|
42
|
+
copyright notice that is included in or attached to the work
|
|
43
|
+
(an example is provided in the Appendix below).
|
|
44
|
+
|
|
45
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
46
|
+
form, that is based on (or derived from) the Work and for which the
|
|
47
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
48
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
49
|
+
of this License, Derivative Works shall not include works that remain
|
|
50
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
51
|
+
the Work and Derivative Works thereof.
|
|
52
|
+
|
|
53
|
+
"Contribution" shall mean any work of authorship, including
|
|
54
|
+
the original version of the Work and any modifications or additions
|
|
55
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
56
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
57
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
58
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
59
|
+
means any form of electronic, verbal, or written communication sent
|
|
60
|
+
to the Licensor or its representatives, including but not limited to
|
|
61
|
+
communication on electronic mailing lists, source code control systems,
|
|
62
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
63
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
64
|
+
excluding communication that is conspicuously marked or otherwise
|
|
65
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
66
|
+
|
|
67
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
68
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
69
|
+
subsequently incorporated within the Work.
|
|
70
|
+
|
|
71
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
72
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
73
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
74
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
75
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
76
|
+
Work and such Derivative Works in Source or Object form.
|
|
77
|
+
|
|
78
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
79
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
80
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
81
|
+
(except as stated in this section) patent license to make, have made,
|
|
82
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
83
|
+
where such license applies only to those patent claims licensable
|
|
84
|
+
by such Contributor that are necessarily infringed by their
|
|
85
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
86
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
87
|
+
institute patent litigation against any entity (including a
|
|
88
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
89
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
90
|
+
or contributory patent infringement, then any patent licenses
|
|
91
|
+
granted to You under this License for that Work shall terminate
|
|
92
|
+
as of the date such litigation is filed.
|
|
93
|
+
|
|
94
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
95
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
96
|
+
modifications, and in Source or Object form, provided that You
|
|
97
|
+
meet the following conditions:
|
|
98
|
+
|
|
99
|
+
(a) You must give any other recipients of the Work or
|
|
100
|
+
Derivative Works a copy of this License; and
|
|
101
|
+
|
|
102
|
+
(b) You must cause any modified files to carry prominent notices
|
|
103
|
+
stating that You changed the files; and
|
|
104
|
+
|
|
105
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
106
|
+
that You distribute, all copyright, patent, trademark, and
|
|
107
|
+
attribution notices from the Source form of the Work,
|
|
108
|
+
excluding those notices that do not pertain to any part of
|
|
109
|
+
the Derivative Works; and
|
|
110
|
+
|
|
111
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
112
|
+
distribution, then any Derivative Works that You distribute must
|
|
113
|
+
include a readable copy of the attribution notices contained
|
|
114
|
+
within such NOTICE file, excluding those notices that do not
|
|
115
|
+
pertain to any part of the Derivative Works, in at least one
|
|
116
|
+
of the following places: within a NOTICE text file distributed
|
|
117
|
+
as part of the Derivative Works; within the Source form or
|
|
118
|
+
documentation, if provided along with the Derivative Works; or,
|
|
119
|
+
within a display generated by the Derivative Works, if and
|
|
120
|
+
wherever such third-party notices normally appear. The contents
|
|
121
|
+
of the NOTICE file are for informational purposes only and
|
|
122
|
+
do not modify the License. You may add Your own attribution
|
|
123
|
+
notices within Derivative Works that You distribute, alongside
|
|
124
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
125
|
+
that such additional attribution notices cannot be construed
|
|
126
|
+
as modifying the License.
|
|
127
|
+
|
|
128
|
+
You may add Your own copyright statement to Your modifications and
|
|
129
|
+
may provide additional or different license terms and conditions
|
|
130
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
131
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
132
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
133
|
+
the conditions stated in this License.
|
|
134
|
+
|
|
135
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
136
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
137
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
138
|
+
this License, without any additional terms or conditions.
|
|
139
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
140
|
+
the terms of any separate license agreement you may have executed
|
|
141
|
+
with Licensor regarding such Contributions.
|
|
142
|
+
|
|
143
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
144
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
145
|
+
except as required for reasonable and customary use in describing the
|
|
146
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
147
|
+
|
|
148
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
149
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
150
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
151
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
152
|
+
implied, including, without limitation, any warranties or conditions
|
|
153
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
154
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
155
|
+
appropriateness of using or redistributing the Work and assume any
|
|
156
|
+
risks associated with Your exercise of permissions under this License.
|
|
157
|
+
|
|
158
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
159
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
160
|
+
unless required by applicable law (such as deliberate and grossly
|
|
161
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
162
|
+
liable to You for damages, including any direct, indirect, special,
|
|
163
|
+
incidental, or consequential damages of any character arising as a
|
|
164
|
+
result of this License or out of the use or inability to use the
|
|
165
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
166
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
167
|
+
other commercial damages or losses), even if such Contributor
|
|
168
|
+
has been advised of the possibility of such damages.
|
|
169
|
+
|
|
170
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
171
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
172
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
173
|
+
or other liability obligations and/or rights consistent with this
|
|
174
|
+
License. However, in accepting such obligations, You may act only
|
|
175
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
176
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
177
|
+
defend, and hold each Contributor harmless for any liability
|
|
178
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
179
|
+
of your accepting any such warranty or additional liability.
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
github.com/spf13/pflag v1.0.9
|
|
183
|
+
|
|
184
|
+
Copyright (c) 2012 Alex Ogier. All rights reserved.
|
|
185
|
+
Copyright (c) 2012 The Go Authors. All rights reserved.
|
|
186
|
+
|
|
187
|
+
Redistribution and use in source and binary forms, with or without
|
|
188
|
+
modification, are permitted provided that the following conditions are
|
|
189
|
+
met:
|
|
190
|
+
|
|
191
|
+
* Redistributions of source code must retain the above copyright
|
|
192
|
+
notice, this list of conditions and the following disclaimer.
|
|
193
|
+
* Redistributions in binary form must reproduce the above
|
|
194
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
195
|
+
in the documentation and/or other materials provided with the
|
|
196
|
+
distribution.
|
|
197
|
+
* Neither the name of Google Inc. nor the names of its
|
|
198
|
+
contributors may be used to endorse or promote products derived from
|
|
199
|
+
this software without specific prior written permission.
|
|
200
|
+
|
|
201
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
202
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
203
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
204
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
205
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
206
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
207
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
208
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
209
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
210
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
211
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
github.com/inconshreveable/mousetrap v1.1.0
|
|
215
|
+
|
|
216
|
+
Apache License
|
|
217
|
+
Version 2.0, January 2004
|
|
218
|
+
http://www.apache.org/licenses/
|
|
219
|
+
|
|
220
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
221
|
+
|
|
222
|
+
1. Definitions.
|
|
223
|
+
|
|
224
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
225
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
226
|
+
|
|
227
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
228
|
+
the copyright owner that is granting the License.
|
|
229
|
+
|
|
230
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
231
|
+
other entities that control, are controlled by, or are under common
|
|
232
|
+
control with that entity. For the purposes of this definition,
|
|
233
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
234
|
+
direction or management of such entity, whether by contract or
|
|
235
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
236
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
237
|
+
|
|
238
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
239
|
+
exercising permissions granted by this License.
|
|
240
|
+
|
|
241
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
242
|
+
including but not limited to software source code, documentation
|
|
243
|
+
source, and configuration files.
|
|
244
|
+
|
|
245
|
+
"Object" form shall mean any form resulting from mechanical
|
|
246
|
+
transformation or translation of a Source form, including but
|
|
247
|
+
not limited to compiled object code, generated documentation,
|
|
248
|
+
and conversions to other media types.
|
|
249
|
+
|
|
250
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
251
|
+
Object form, made available under the License, as indicated by a
|
|
252
|
+
copyright notice that is included in or attached to the work
|
|
253
|
+
(an example is provided in the Appendix below).
|
|
254
|
+
|
|
255
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
256
|
+
form, that is based on (or derived from) the Work and for which the
|
|
257
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
258
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
259
|
+
of this License, Derivative Works shall not include works that remain
|
|
260
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
261
|
+
the Work and Derivative Works thereof.
|
|
262
|
+
|
|
263
|
+
"Contribution" shall mean any work of authorship, including
|
|
264
|
+
the original version of the Work and any modifications or additions
|
|
265
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
266
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
267
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
268
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
269
|
+
means any form of electronic, verbal, or written communication sent
|
|
270
|
+
to the Licensor or its representatives, including but not limited to
|
|
271
|
+
communication on electronic mailing lists, source code control systems,
|
|
272
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
273
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
274
|
+
excluding communication that is conspicuously marked or otherwise
|
|
275
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
276
|
+
|
|
277
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
278
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
279
|
+
subsequently incorporated within the Work.
|
|
280
|
+
|
|
281
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
282
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
283
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
284
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
285
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
286
|
+
Work and such Derivative Works in Source or Object form.
|
|
287
|
+
|
|
288
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
289
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
290
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
291
|
+
(except as stated in this section) patent license to make, have made,
|
|
292
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
293
|
+
where such license applies only to those patent claims licensable
|
|
294
|
+
by such Contributor that are necessarily infringed by their
|
|
295
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
296
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
297
|
+
institute patent litigation against any entity (including a
|
|
298
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
299
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
300
|
+
or contributory patent infringement, then any patent licenses
|
|
301
|
+
granted to You under this License for that Work shall terminate
|
|
302
|
+
as of the date such litigation is filed.
|
|
303
|
+
|
|
304
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
305
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
306
|
+
modifications, and in Source or Object form, provided that You
|
|
307
|
+
meet the following conditions:
|
|
308
|
+
|
|
309
|
+
(a) You must give any other recipients of the Work or
|
|
310
|
+
Derivative Works a copy of this License; and
|
|
311
|
+
|
|
312
|
+
(b) You must cause any modified files to carry prominent notices
|
|
313
|
+
stating that You changed the files; and
|
|
314
|
+
|
|
315
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
316
|
+
that You distribute, all copyright, patent, trademark, and
|
|
317
|
+
attribution notices from the Source form of the Work,
|
|
318
|
+
excluding those notices that do not pertain to any part of
|
|
319
|
+
the Derivative Works; and
|
|
320
|
+
|
|
321
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
322
|
+
distribution, then any Derivative Works that You distribute must
|
|
323
|
+
include a readable copy of the attribution notices contained
|
|
324
|
+
within such NOTICE file, excluding those notices that do not
|
|
325
|
+
pertain to any part of the Derivative Works, in at least one
|
|
326
|
+
of the following places: within a NOTICE text file distributed
|
|
327
|
+
as part of the Derivative Works; within the Source form or
|
|
328
|
+
documentation, if provided along with the Derivative Works; or,
|
|
329
|
+
within a display generated by the Derivative Works, if and
|
|
330
|
+
wherever such third-party notices normally appear. The contents
|
|
331
|
+
of the NOTICE file are for informational purposes only and
|
|
332
|
+
do not modify the License. You may add Your own attribution
|
|
333
|
+
notices within Derivative Works that You distribute, alongside
|
|
334
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
335
|
+
that such additional attribution notices cannot be construed
|
|
336
|
+
as modifying the License.
|
|
337
|
+
|
|
338
|
+
You may add Your own copyright statement to Your modifications and
|
|
339
|
+
may provide additional or different license terms and conditions
|
|
340
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
341
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
342
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
343
|
+
the conditions stated in this License.
|
|
344
|
+
|
|
345
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
346
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
347
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
348
|
+
this License, without any additional terms or conditions.
|
|
349
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
350
|
+
the terms of any separate license agreement you may have executed
|
|
351
|
+
with Licensor regarding such Contributions.
|
|
352
|
+
|
|
353
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
354
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
355
|
+
except as required for reasonable and customary use in describing the
|
|
356
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
357
|
+
|
|
358
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
359
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
360
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
361
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
362
|
+
implied, including, without limitation, any warranties or conditions
|
|
363
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
364
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
365
|
+
appropriateness of using or redistributing the Work and assume any
|
|
366
|
+
risks associated with Your exercise of permissions under this License.
|
|
367
|
+
|
|
368
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
369
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
370
|
+
unless required by applicable law (such as deliberate and grossly
|
|
371
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
372
|
+
liable to You for damages, including any direct, indirect, special,
|
|
373
|
+
incidental, or consequential damages of any character arising as a
|
|
374
|
+
result of this License or out of the use or inability to use the
|
|
375
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
376
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
377
|
+
other commercial damages or losses), even if such Contributor
|
|
378
|
+
has been advised of the possibility of such damages.
|
|
379
|
+
|
|
380
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
381
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
382
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
383
|
+
or other liability obligations and/or rights consistent with this
|
|
384
|
+
License. However, in accepting such obligations, You may act only
|
|
385
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
386
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
387
|
+
defend, and hold each Contributor harmless for any liability
|
|
388
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
389
|
+
of your accepting any such warranty or additional liability.
|
|
390
|
+
|
|
391
|
+
END OF TERMS AND CONDITIONS
|
|
392
|
+
|
|
393
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
394
|
+
|
|
395
|
+
To apply the Apache License to your work, attach the following
|
|
396
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
397
|
+
replaced with your own identifying information. (Don't include
|
|
398
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
399
|
+
comment syntax for the file format. We also recommend that a
|
|
400
|
+
file or class name and description of purpose be included on the
|
|
401
|
+
same "printed page" as the copyright notice for easier
|
|
402
|
+
identification within third-party archives.
|
|
403
|
+
|
|
404
|
+
Copyright 2022 Alan Shreve (@inconshreveable)
|
|
405
|
+
|
|
406
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
407
|
+
you may not use this file except in compliance with the License.
|
|
408
|
+
You may obtain a copy of the License at
|
|
409
|
+
|
|
410
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
411
|
+
|
|
412
|
+
Unless required by applicable law or agreed to in writing, software
|
|
413
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
414
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
415
|
+
See the License for the specific language governing permissions and
|
|
416
|
+
limitations under the License.
|
|
417
|
+
|
|
418
|
+
humanlayer/skills: show-me (653b6411c1f70c275a18e37673b042ff99f67ceb)
|
|
419
|
+
https://github.com/humanlayer/skills/tree/653b6411c1f70c275a18e37673b042ff99f67ceb/plugins/show-me/skills/show-me
|
|
420
|
+
|
|
421
|
+
MIT License
|
|
422
|
+
|
|
423
|
+
Copyright (c) 2026 HumanLayer
|
|
424
|
+
|
|
425
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
426
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
427
|
+
in the Software without restriction, including without limitation the rights
|
|
428
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
429
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
430
|
+
furnished to do so, subject to the following conditions:
|
|
431
|
+
|
|
432
|
+
The above copyright notice and this permission notice shall be included in all
|
|
433
|
+
copies or substantial portions of the Software.
|
|
434
|
+
|
|
435
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
436
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
437
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
438
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
439
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
440
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
441
|
+
SOFTWARE.
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
cursor/plugins: pstack statechart (99b609a72323b70204eab407c622f436e858e112)
|
|
445
|
+
https://github.com/cursor/plugins/tree/99b609a72323b70204eab407c622f436e858e112/pstack/skills/statechart
|
|
446
|
+
|
|
447
|
+
MIT License
|
|
448
|
+
|
|
449
|
+
Copyright (c) 2026 Lauren Tan
|
|
450
|
+
|
|
451
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
452
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
453
|
+
in the Software without restriction, including without limitation the rights
|
|
454
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
455
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
456
|
+
furnished to do so, subject to the following conditions:
|
|
457
|
+
|
|
458
|
+
The above copyright notice and this permission notice shall be included in all
|
|
459
|
+
copies or substantial portions of the Software.
|
|
460
|
+
|
|
461
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
462
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
463
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
464
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
465
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
466
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
467
|
+
SOFTWARE.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
6
|
+
const supported = new Set(['darwin-x64', 'darwin-arm64', 'linux-x64', 'linux-arm64', 'win32-x64', 'win32-arm64']);
|
|
7
|
+
|
|
8
|
+
if (!supported.has(platform)) {
|
|
9
|
+
console.error(`fugue-cli 不支持当前平台:${platform}`);
|
|
10
|
+
process.exitCode = 1;
|
|
11
|
+
} else {
|
|
12
|
+
const filename = process.platform === 'win32' ? 'fugue-cli.exe' : 'fugue-cli';
|
|
13
|
+
const binary = fileURLToPath(new URL(`../dist/${platform}/${filename}`, import.meta.url));
|
|
14
|
+
const result = spawnSync(binary, process.argv.slice(2), { stdio: 'inherit' });
|
|
15
|
+
if (result.error) {
|
|
16
|
+
console.error(`无法运行 fugue-cli,请重新安装 @olierjs/fugue-cli:${result.error.message}`);
|
|
17
|
+
process.exitCode = 1;
|
|
18
|
+
} else if (result.signal) {
|
|
19
|
+
process.kill(process.pid, result.signal);
|
|
20
|
+
} else {
|
|
21
|
+
process.exitCode = result.status ?? 1;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olierjs/fugue-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
}
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Fugue 需求交付工作指南与 Agent 技能",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": { "fugue-cli": "bin/fugue-cli.mjs" },
|
|
7
|
+
"files": [
|
|
8
|
+
"bin/",
|
|
9
|
+
"dist/",
|
|
10
|
+
"scripts/postinstall.mjs",
|
|
11
|
+
"scripts/skills.mjs",
|
|
12
|
+
"skills/",
|
|
13
|
+
"upstream-skills.json",
|
|
14
|
+
"THIRD_PARTY_NOTICES"
|
|
15
|
+
],
|
|
16
|
+
"engines": { "node": ">=22.19.0" },
|
|
17
|
+
"os": ["darwin", "linux", "win32"],
|
|
18
|
+
"cpu": ["x64", "arm64"],
|
|
19
|
+
"license": "Apache-2.0",
|
|
20
|
+
"repository": { "type": "git", "url": "git+https://github.com/TbhT/fugue-stack.git" },
|
|
21
|
+
"publishConfig": { "access": "public", "registry": "https://registry.npmjs.org/" },
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "node --test tests/*.test.mjs",
|
|
24
|
+
"test:go": "go test ./...",
|
|
25
|
+
"build": "node scripts/build.mjs",
|
|
26
|
+
"prepack": "node scripts/build.mjs",
|
|
27
|
+
"postinstall": "node scripts/postinstall.mjs"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { syncSkills } from './skills.mjs';
|
|
4
|
+
|
|
5
|
+
try {
|
|
6
|
+
const { version } = JSON.parse(await readFile(new URL('../package.json', import.meta.url), 'utf8'));
|
|
7
|
+
const result = await syncSkills({ sourceDirectory: fileURLToPath(new URL('../skills/', import.meta.url)), version });
|
|
8
|
+
console.log(`fugue-cli:技能已同步到 ${result.directory}`);
|
|
9
|
+
if (result.backupDirectory) console.log(`旧技能备份:${result.backupDirectory}`);
|
|
10
|
+
} catch (error) {
|
|
11
|
+
console.error(`fugue-cli 技能同步失败:${error.message}`);
|
|
12
|
+
process.exitCode = 1;
|
|
13
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
2
|
+
import { cp, lstat, mkdir, readFile, readdir, readlink, rename, rm, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
|
|
6
|
+
const owner = '@olierjs/fugue-cli';
|
|
7
|
+
const marker = '.fugue-cli.json';
|
|
8
|
+
|
|
9
|
+
async function exists(path) {
|
|
10
|
+
try { return await lstat(path); }
|
|
11
|
+
catch (error) { if (error.code === 'ENOENT') return null; throw error; }
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async function managed(path) {
|
|
15
|
+
if (!(await exists(path))?.isDirectory()) return false;
|
|
16
|
+
try { return JSON.parse(await readFile(join(path, marker), 'utf8')).owner === owner; }
|
|
17
|
+
catch (error) {
|
|
18
|
+
if (['ENOENT', 'ENOTDIR'].includes(error.code) || error instanceof SyntaxError) return false;
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
async function digest(path) {
|
|
24
|
+
const hash = createHash('sha256');
|
|
25
|
+
async function visit(current, relative) {
|
|
26
|
+
const info = await lstat(current);
|
|
27
|
+
hash.update(JSON.stringify([relative, info.mode & 0o777]));
|
|
28
|
+
if (info.isSymbolicLink()) hash.update(JSON.stringify(['link', await readlink(current)]));
|
|
29
|
+
else if (info.isDirectory()) {
|
|
30
|
+
hash.update('directory');
|
|
31
|
+
for (const name of (await readdir(current)).sort()) await visit(join(current, name), `${relative}/${name}`);
|
|
32
|
+
} else if (info.isFile()) {
|
|
33
|
+
hash.update('file');
|
|
34
|
+
hash.update(await readFile(current));
|
|
35
|
+
} else throw new Error(`技能包含不支持的文件类型:${current}`);
|
|
36
|
+
}
|
|
37
|
+
await visit(path, '');
|
|
38
|
+
return hash.digest('hex');
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export async function syncSkills({ sourceDirectory, version, homeDirectory = homedir() }) {
|
|
42
|
+
const directory = join(homeDirectory, '.agents', 'skills');
|
|
43
|
+
const storage = join(homeDirectory, '.local', 'share', 'fugue-cli');
|
|
44
|
+
const batch = randomUUID();
|
|
45
|
+
const staging = join(storage, `.staging-${batch}`);
|
|
46
|
+
const backupDirectory = join(storage, 'backups', batch);
|
|
47
|
+
const names = (await readdir(sourceDirectory, { withFileTypes: true })).filter(entry => entry.isDirectory()).map(entry => entry.name).sort();
|
|
48
|
+
if (!names.length) throw new Error('安装包没有可用技能。');
|
|
49
|
+
for (const name of names) {
|
|
50
|
+
if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(name) || !(await exists(join(sourceDirectory, name, 'SKILL.md')))?.isFile()) {
|
|
51
|
+
throw new Error(`安装包技能无效:${name}`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
await mkdir(directory, { recursive: true });
|
|
55
|
+
await mkdir(staging, { recursive: true });
|
|
56
|
+
const result = { directory, installed: [], removed: [], unchanged: [], backupDirectory: null };
|
|
57
|
+
const changed = [];
|
|
58
|
+
const stale = [];
|
|
59
|
+
const backedUp = [];
|
|
60
|
+
const installed = [];
|
|
61
|
+
try {
|
|
62
|
+
for (const name of names) {
|
|
63
|
+
const prepared = join(staging, name);
|
|
64
|
+
await cp(join(sourceDirectory, name), prepared, { recursive: true, dereference: false, verbatimSymlinks: true });
|
|
65
|
+
await writeFile(join(prepared, marker), JSON.stringify({ owner, version }) + '\n');
|
|
66
|
+
const target = join(directory, name);
|
|
67
|
+
if (await exists(target) && await digest(target) === await digest(prepared)) result.unchanged.push(name);
|
|
68
|
+
else changed.push(name);
|
|
69
|
+
}
|
|
70
|
+
for (const name of await readdir(directory)) {
|
|
71
|
+
if (!names.includes(name) && await managed(join(directory, name))) stale.push(name);
|
|
72
|
+
}
|
|
73
|
+
for (const name of [...changed, ...stale]) {
|
|
74
|
+
const target = join(directory, name);
|
|
75
|
+
if (await exists(target)) {
|
|
76
|
+
await mkdir(backupDirectory, { recursive: true });
|
|
77
|
+
await rename(target, join(backupDirectory, name));
|
|
78
|
+
backedUp.push(name);
|
|
79
|
+
result.backupDirectory = backupDirectory;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
for (const name of changed) {
|
|
83
|
+
await rename(join(staging, name), join(directory, name));
|
|
84
|
+
installed.push(name);
|
|
85
|
+
}
|
|
86
|
+
result.installed = changed;
|
|
87
|
+
result.removed = stale;
|
|
88
|
+
return result;
|
|
89
|
+
} catch (error) {
|
|
90
|
+
const failures = [];
|
|
91
|
+
for (const name of installed.reverse()) {
|
|
92
|
+
try { await rm(join(directory, name), { recursive: true, force: true }); }
|
|
93
|
+
catch (rollbackError) { failures.push(rollbackError.message); }
|
|
94
|
+
}
|
|
95
|
+
for (const name of backedUp.reverse()) {
|
|
96
|
+
try { await rename(join(backupDirectory, name), join(directory, name)); }
|
|
97
|
+
catch (rollbackError) { failures.push(rollbackError.message); }
|
|
98
|
+
}
|
|
99
|
+
if (failures.length) throw new Error(`${error.message};恢复未完成,备份位于 ${backupDirectory}:${failures.join(';')}`, { cause: error });
|
|
100
|
+
throw error;
|
|
101
|
+
} finally {
|
|
102
|
+
await rm(staging, { recursive: true, force: true });
|
|
103
|
+
}
|
|
104
|
+
}
|