@future-agi/cli 0.0.0-stage → 0.2.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 +202 -0
- package/README.md +59 -2
- package/THIRD-PARTY-NOTICES +747 -0
- package/bin/fagi.js +5 -0
- package/bin/fi.js +161 -0
- package/bin/futureagi.js +6 -0
- package/lib/platform.cjs +27 -0
- package/package.json +32 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,60 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @future-agi/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Future AGI command line, `fagi`, packaged for npm.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install -g @future-agi/cli
|
|
7
|
+
fagi --version
|
|
8
|
+
fagi auth login
|
|
9
|
+
fagi doctor
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
To run it once without installing, name the command with `-p`:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npx -p @future-agi/cli fagi --help
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
(`npx @future-agi/cli` alone does not work: the package has three commands and
|
|
19
|
+
npx cannot tell which one to run.) Release candidates use the `next` tag:
|
|
20
|
+
`npm install -g @future-agi/cli@next`. To remove it: `npm uninstall -g @future-agi/cli`.
|
|
21
|
+
|
|
22
|
+
`fagi` is the primary command; `futureagi` and `fi` remain aliases. All three
|
|
23
|
+
launch the same native executable with the invoked name in `argv[0]`, so native
|
|
24
|
+
help and hints can reflect that name. Prefer `fagi`: `fi` is a reserved word in
|
|
25
|
+
POSIX shells (use `command fi` or `\fi`), and an older Python `ai-evaluation`
|
|
26
|
+
install may already own `fi` on PATH. Node is required only for this wrapper;
|
|
27
|
+
the native installer needs no Node runtime. The npm package identifiers are
|
|
28
|
+
unchanged.
|
|
29
|
+
|
|
30
|
+
On Linux and macOS the wrapper needs Node.js `^22.15.0 || >=23.11.0`, which provides
|
|
31
|
+
`process.execve`: it replaces itself with the native binary (exec), so each
|
|
32
|
+
signal, whether sent to the PID or to the whole process group, arrives once and
|
|
33
|
+
exit status behaves exactly as with a direct install. Older Node exits 1 with
|
|
34
|
+
an upgrade message instead of starting the CLI, because a waiting launcher
|
|
35
|
+
would repeat group signals or swallow ones sent only to its PID. Before the
|
|
36
|
+
exec it rejects a missing, non-executable (including `noexec` mounts) or
|
|
37
|
+
wrong-format binary with a normal error; on Node 22 and 24 a rarer exec failure
|
|
38
|
+
(for example `ETXTBSY` or `E2BIG`) still aborts Node with status 134 and a
|
|
39
|
+
native stack trace rather than that error (Node 26 reports it normally). On
|
|
40
|
+
Windows the wrapper does not need `process.execve`: it waits for `fagi.exe`,
|
|
41
|
+
which receives console Ctrl-C itself.
|
|
42
|
+
|
|
43
|
+
`npx` and `npm run` forward Ctrl-C to the command themselves, so under them a
|
|
44
|
+
terminal interrupt can arrive twice, which `fagi eval run` treats as a forced stop;
|
|
45
|
+
run the installed `fagi` directly for its graceful first-interrupt shutdown.
|
|
46
|
+
|
|
47
|
+
Keep optional dependencies enabled. The wrapper selects exactly one of six
|
|
48
|
+
`@future-agi/cli-<os>-<arch>` packages (darwin/linux/win32, x64/arm64), each carrying
|
|
49
|
+
byte-identical `fagi`, `futureagi` and `fi` executables (`.exe` on Windows). There
|
|
50
|
+
is no postinstall download or network fallback. For an offline npm registry,
|
|
51
|
+
mirror both the wrapper and its exact-version native package. Restricted packages
|
|
52
|
+
need registry credentials even when the GitHub repository is accessible.
|
|
53
|
+
|
|
54
|
+
Maintainers: merges to `main` publish a new `VERSION` (see `docs/RELEASING.md`).
|
|
55
|
+
`node scripts/build-packages.mjs --dist ../dist --out /absolute/new/output`
|
|
56
|
+
only assembles packages; it does not publish. All six platforms must supply all
|
|
57
|
+
three nonempty, byte-identical executables before any output is created.
|
|
58
|
+
Output manifests default to `private: true` and `publishConfig.access: restricted`.
|
|
59
|
+
`--publishable` requires `FI_PUBLISH_NPM=1`; public visibility additionally requires
|
|
60
|
+
`--access public`.
|
|
@@ -0,0 +1,747 @@
|
|
|
1
|
+
FutureAGI CLI third-party notices
|
|
2
|
+
Components linked into the fagi/futureagi/fi binaries.
|
|
3
|
+
Legal file bodies below are copied verbatim; byte counts exclude framing newlines.
|
|
4
|
+
|
|
5
|
+
========================================================================
|
|
6
|
+
al.essio.dev/pkg/shellescape v1.5.1
|
|
7
|
+
SPDX-License-Identifier: MIT
|
|
8
|
+
|
|
9
|
+
--- LICENSE | bytes=1082 | sha256=01a4609ac3c7ac0a26d65a967c26c0deb146aa01bdcc8531048a70be52695556 ---
|
|
10
|
+
The MIT License (MIT)
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2016 Alessio Treglia
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
========================================================================
|
|
34
|
+
github.com/BurntSushi/toml v1.5.0
|
|
35
|
+
SPDX-License-Identifier: MIT
|
|
36
|
+
|
|
37
|
+
--- COPYING | bytes=1079 | sha256=d21cb1c60785d6d3a84a7059323ccafc45c645b1bbda281c76a62d66ad2d7dc3 ---
|
|
38
|
+
The MIT License (MIT)
|
|
39
|
+
|
|
40
|
+
Copyright (c) 2013 TOML authors
|
|
41
|
+
|
|
42
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
43
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
44
|
+
in the Software without restriction, including without limitation the rights
|
|
45
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
46
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
47
|
+
furnished to do so, subject to the following conditions:
|
|
48
|
+
|
|
49
|
+
The above copyright notice and this permission notice shall be included in
|
|
50
|
+
all copies or substantial portions of the Software.
|
|
51
|
+
|
|
52
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
53
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
54
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
55
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
56
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
57
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
58
|
+
THE SOFTWARE.
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
========================================================================
|
|
62
|
+
github.com/danieljoos/wincred v1.2.2
|
|
63
|
+
SPDX-License-Identifier: MIT
|
|
64
|
+
|
|
65
|
+
--- LICENSE | bytes=1077 | sha256=1702a813fa31858c0d6c7788216fa3dd202472265716998024654c252fc7bb41 ---
|
|
66
|
+
The MIT License (MIT)
|
|
67
|
+
|
|
68
|
+
Copyright (c) 2014 Daniel Joos
|
|
69
|
+
|
|
70
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
71
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
72
|
+
in the Software without restriction, including without limitation the rights
|
|
73
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
74
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
75
|
+
furnished to do so, subject to the following conditions:
|
|
76
|
+
|
|
77
|
+
The above copyright notice and this permission notice shall be included in all
|
|
78
|
+
copies or substantial portions of the Software.
|
|
79
|
+
|
|
80
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
81
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
82
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
83
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
84
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
85
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
86
|
+
SOFTWARE.
|
|
87
|
+
|
|
88
|
+
========================================================================
|
|
89
|
+
github.com/godbus/dbus/v5 v5.1.0
|
|
90
|
+
SPDX-License-Identifier: BSD-2-Clause
|
|
91
|
+
|
|
92
|
+
--- LICENSE | bytes=1328 | sha256=e4646a82a976369d7ae8f6ed5c11d35dc0af18433a8ccc24c85b459ad8b95128 ---
|
|
93
|
+
Copyright (c) 2013, Georg Reinke (<guelfey at gmail dot com>), Google
|
|
94
|
+
All rights reserved.
|
|
95
|
+
|
|
96
|
+
Redistribution and use in source and binary forms, with or without
|
|
97
|
+
modification, are permitted provided that the following conditions
|
|
98
|
+
are met:
|
|
99
|
+
|
|
100
|
+
1. Redistributions of source code must retain the above copyright notice,
|
|
101
|
+
this list of conditions and the following disclaimer.
|
|
102
|
+
|
|
103
|
+
2. Redistributions in binary form must reproduce the above copyright
|
|
104
|
+
notice, this list of conditions and the following disclaimer in the
|
|
105
|
+
documentation and/or other materials provided with the distribution.
|
|
106
|
+
|
|
107
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
108
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
109
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
110
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
111
|
+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
112
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
|
113
|
+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
114
|
+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
115
|
+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
116
|
+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
117
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
========================================================================
|
|
121
|
+
github.com/inconshreveable/mousetrap v1.1.0
|
|
122
|
+
SPDX-License-Identifier: Apache-2.0
|
|
123
|
+
|
|
124
|
+
--- LICENSE | bytes=11360 | sha256=4819582701f150b28a563a6cd8ed0bf5a754e3c67b90ad38d78ba4131bf77795 ---
|
|
125
|
+
Apache License
|
|
126
|
+
Version 2.0, January 2004
|
|
127
|
+
http://www.apache.org/licenses/
|
|
128
|
+
|
|
129
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
130
|
+
|
|
131
|
+
1. Definitions.
|
|
132
|
+
|
|
133
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
134
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
135
|
+
|
|
136
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
137
|
+
the copyright owner that is granting the License.
|
|
138
|
+
|
|
139
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
140
|
+
other entities that control, are controlled by, or are under common
|
|
141
|
+
control with that entity. For the purposes of this definition,
|
|
142
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
143
|
+
direction or management of such entity, whether by contract or
|
|
144
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
145
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
146
|
+
|
|
147
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
148
|
+
exercising permissions granted by this License.
|
|
149
|
+
|
|
150
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
151
|
+
including but not limited to software source code, documentation
|
|
152
|
+
source, and configuration files.
|
|
153
|
+
|
|
154
|
+
"Object" form shall mean any form resulting from mechanical
|
|
155
|
+
transformation or translation of a Source form, including but
|
|
156
|
+
not limited to compiled object code, generated documentation,
|
|
157
|
+
and conversions to other media types.
|
|
158
|
+
|
|
159
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
160
|
+
Object form, made available under the License, as indicated by a
|
|
161
|
+
copyright notice that is included in or attached to the work
|
|
162
|
+
(an example is provided in the Appendix below).
|
|
163
|
+
|
|
164
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
165
|
+
form, that is based on (or derived from) the Work and for which the
|
|
166
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
167
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
168
|
+
of this License, Derivative Works shall not include works that remain
|
|
169
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
170
|
+
the Work and Derivative Works thereof.
|
|
171
|
+
|
|
172
|
+
"Contribution" shall mean any work of authorship, including
|
|
173
|
+
the original version of the Work and any modifications or additions
|
|
174
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
175
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
176
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
177
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
178
|
+
means any form of electronic, verbal, or written communication sent
|
|
179
|
+
to the Licensor or its representatives, including but not limited to
|
|
180
|
+
communication on electronic mailing lists, source code control systems,
|
|
181
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
182
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
183
|
+
excluding communication that is conspicuously marked or otherwise
|
|
184
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
185
|
+
|
|
186
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
187
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
188
|
+
subsequently incorporated within the Work.
|
|
189
|
+
|
|
190
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
191
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
192
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
193
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
194
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
195
|
+
Work and such Derivative Works in Source or Object form.
|
|
196
|
+
|
|
197
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
198
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
199
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
200
|
+
(except as stated in this section) patent license to make, have made,
|
|
201
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
202
|
+
where such license applies only to those patent claims licensable
|
|
203
|
+
by such Contributor that are necessarily infringed by their
|
|
204
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
205
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
206
|
+
institute patent litigation against any entity (including a
|
|
207
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
208
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
209
|
+
or contributory patent infringement, then any patent licenses
|
|
210
|
+
granted to You under this License for that Work shall terminate
|
|
211
|
+
as of the date such litigation is filed.
|
|
212
|
+
|
|
213
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
214
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
215
|
+
modifications, and in Source or Object form, provided that You
|
|
216
|
+
meet the following conditions:
|
|
217
|
+
|
|
218
|
+
(a) You must give any other recipients of the Work or
|
|
219
|
+
Derivative Works a copy of this License; and
|
|
220
|
+
|
|
221
|
+
(b) You must cause any modified files to carry prominent notices
|
|
222
|
+
stating that You changed the files; and
|
|
223
|
+
|
|
224
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
225
|
+
that You distribute, all copyright, patent, trademark, and
|
|
226
|
+
attribution notices from the Source form of the Work,
|
|
227
|
+
excluding those notices that do not pertain to any part of
|
|
228
|
+
the Derivative Works; and
|
|
229
|
+
|
|
230
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
231
|
+
distribution, then any Derivative Works that You distribute must
|
|
232
|
+
include a readable copy of the attribution notices contained
|
|
233
|
+
within such NOTICE file, excluding those notices that do not
|
|
234
|
+
pertain to any part of the Derivative Works, in at least one
|
|
235
|
+
of the following places: within a NOTICE text file distributed
|
|
236
|
+
as part of the Derivative Works; within the Source form or
|
|
237
|
+
documentation, if provided along with the Derivative Works; or,
|
|
238
|
+
within a display generated by the Derivative Works, if and
|
|
239
|
+
wherever such third-party notices normally appear. The contents
|
|
240
|
+
of the NOTICE file are for informational purposes only and
|
|
241
|
+
do not modify the License. You may add Your own attribution
|
|
242
|
+
notices within Derivative Works that You distribute, alongside
|
|
243
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
244
|
+
that such additional attribution notices cannot be construed
|
|
245
|
+
as modifying the License.
|
|
246
|
+
|
|
247
|
+
You may add Your own copyright statement to Your modifications and
|
|
248
|
+
may provide additional or different license terms and conditions
|
|
249
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
250
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
251
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
252
|
+
the conditions stated in this License.
|
|
253
|
+
|
|
254
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
255
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
256
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
257
|
+
this License, without any additional terms or conditions.
|
|
258
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
259
|
+
the terms of any separate license agreement you may have executed
|
|
260
|
+
with Licensor regarding such Contributions.
|
|
261
|
+
|
|
262
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
263
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
264
|
+
except as required for reasonable and customary use in describing the
|
|
265
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
266
|
+
|
|
267
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
268
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
269
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
270
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
271
|
+
implied, including, without limitation, any warranties or conditions
|
|
272
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
273
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
274
|
+
appropriateness of using or redistributing the Work and assume any
|
|
275
|
+
risks associated with Your exercise of permissions under this License.
|
|
276
|
+
|
|
277
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
278
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
279
|
+
unless required by applicable law (such as deliberate and grossly
|
|
280
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
281
|
+
liable to You for damages, including any direct, indirect, special,
|
|
282
|
+
incidental, or consequential damages of any character arising as a
|
|
283
|
+
result of this License or out of the use or inability to use the
|
|
284
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
285
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
286
|
+
other commercial damages or losses), even if such Contributor
|
|
287
|
+
has been advised of the possibility of such damages.
|
|
288
|
+
|
|
289
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
290
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
291
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
292
|
+
or other liability obligations and/or rights consistent with this
|
|
293
|
+
License. However, in accepting such obligations, You may act only
|
|
294
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
295
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
296
|
+
defend, and hold each Contributor harmless for any liability
|
|
297
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
298
|
+
of your accepting any such warranty or additional liability.
|
|
299
|
+
|
|
300
|
+
END OF TERMS AND CONDITIONS
|
|
301
|
+
|
|
302
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
303
|
+
|
|
304
|
+
To apply the Apache License to your work, attach the following
|
|
305
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
306
|
+
replaced with your own identifying information. (Don't include
|
|
307
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
308
|
+
comment syntax for the file format. We also recommend that a
|
|
309
|
+
file or class name and description of purpose be included on the
|
|
310
|
+
same "printed page" as the copyright notice for easier
|
|
311
|
+
identification within third-party archives.
|
|
312
|
+
|
|
313
|
+
Copyright 2022 Alan Shreve (@inconshreveable)
|
|
314
|
+
|
|
315
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
316
|
+
you may not use this file except in compliance with the License.
|
|
317
|
+
You may obtain a copy of the License at
|
|
318
|
+
|
|
319
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
320
|
+
|
|
321
|
+
Unless required by applicable law or agreed to in writing, software
|
|
322
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
323
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
324
|
+
See the License for the specific language governing permissions and
|
|
325
|
+
limitations under the License.
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
========================================================================
|
|
329
|
+
github.com/spf13/cobra v1.9.1
|
|
330
|
+
SPDX-License-Identifier: Apache-2.0
|
|
331
|
+
|
|
332
|
+
--- LICENSE.txt | bytes=10140 | sha256=5e3400b93bbb099e83e52bab885e7441750673c21f97988ca3f1240639b63283 ---
|
|
333
|
+
Apache License
|
|
334
|
+
Version 2.0, January 2004
|
|
335
|
+
http://www.apache.org/licenses/
|
|
336
|
+
|
|
337
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
338
|
+
|
|
339
|
+
1. Definitions.
|
|
340
|
+
|
|
341
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
342
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
343
|
+
|
|
344
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
345
|
+
the copyright owner that is granting the License.
|
|
346
|
+
|
|
347
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
348
|
+
other entities that control, are controlled by, or are under common
|
|
349
|
+
control with that entity. For the purposes of this definition,
|
|
350
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
351
|
+
direction or management of such entity, whether by contract or
|
|
352
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
353
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
354
|
+
|
|
355
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
356
|
+
exercising permissions granted by this License.
|
|
357
|
+
|
|
358
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
359
|
+
including but not limited to software source code, documentation
|
|
360
|
+
source, and configuration files.
|
|
361
|
+
|
|
362
|
+
"Object" form shall mean any form resulting from mechanical
|
|
363
|
+
transformation or translation of a Source form, including but
|
|
364
|
+
not limited to compiled object code, generated documentation,
|
|
365
|
+
and conversions to other media types.
|
|
366
|
+
|
|
367
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
368
|
+
Object form, made available under the License, as indicated by a
|
|
369
|
+
copyright notice that is included in or attached to the work
|
|
370
|
+
(an example is provided in the Appendix below).
|
|
371
|
+
|
|
372
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
373
|
+
form, that is based on (or derived from) the Work and for which the
|
|
374
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
375
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
376
|
+
of this License, Derivative Works shall not include works that remain
|
|
377
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
378
|
+
the Work and Derivative Works thereof.
|
|
379
|
+
|
|
380
|
+
"Contribution" shall mean any work of authorship, including
|
|
381
|
+
the original version of the Work and any modifications or additions
|
|
382
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
383
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
384
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
385
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
386
|
+
means any form of electronic, verbal, or written communication sent
|
|
387
|
+
to the Licensor or its representatives, including but not limited to
|
|
388
|
+
communication on electronic mailing lists, source code control systems,
|
|
389
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
390
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
391
|
+
excluding communication that is conspicuously marked or otherwise
|
|
392
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
393
|
+
|
|
394
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
395
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
396
|
+
subsequently incorporated within the Work.
|
|
397
|
+
|
|
398
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
399
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
400
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
401
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
402
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
403
|
+
Work and such Derivative Works in Source or Object form.
|
|
404
|
+
|
|
405
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
406
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
407
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
408
|
+
(except as stated in this section) patent license to make, have made,
|
|
409
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
410
|
+
where such license applies only to those patent claims licensable
|
|
411
|
+
by such Contributor that are necessarily infringed by their
|
|
412
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
413
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
414
|
+
institute patent litigation against any entity (including a
|
|
415
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
416
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
417
|
+
or contributory patent infringement, then any patent licenses
|
|
418
|
+
granted to You under this License for that Work shall terminate
|
|
419
|
+
as of the date such litigation is filed.
|
|
420
|
+
|
|
421
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
422
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
423
|
+
modifications, and in Source or Object form, provided that You
|
|
424
|
+
meet the following conditions:
|
|
425
|
+
|
|
426
|
+
(a) You must give any other recipients of the Work or
|
|
427
|
+
Derivative Works a copy of this License; and
|
|
428
|
+
|
|
429
|
+
(b) You must cause any modified files to carry prominent notices
|
|
430
|
+
stating that You changed the files; and
|
|
431
|
+
|
|
432
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
433
|
+
that You distribute, all copyright, patent, trademark, and
|
|
434
|
+
attribution notices from the Source form of the Work,
|
|
435
|
+
excluding those notices that do not pertain to any part of
|
|
436
|
+
the Derivative Works; and
|
|
437
|
+
|
|
438
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
439
|
+
distribution, then any Derivative Works that You distribute must
|
|
440
|
+
include a readable copy of the attribution notices contained
|
|
441
|
+
within such NOTICE file, excluding those notices that do not
|
|
442
|
+
pertain to any part of the Derivative Works, in at least one
|
|
443
|
+
of the following places: within a NOTICE text file distributed
|
|
444
|
+
as part of the Derivative Works; within the Source form or
|
|
445
|
+
documentation, if provided along with the Derivative Works; or,
|
|
446
|
+
within a display generated by the Derivative Works, if and
|
|
447
|
+
wherever such third-party notices normally appear. The contents
|
|
448
|
+
of the NOTICE file are for informational purposes only and
|
|
449
|
+
do not modify the License. You may add Your own attribution
|
|
450
|
+
notices within Derivative Works that You distribute, alongside
|
|
451
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
452
|
+
that such additional attribution notices cannot be construed
|
|
453
|
+
as modifying the License.
|
|
454
|
+
|
|
455
|
+
You may add Your own copyright statement to Your modifications and
|
|
456
|
+
may provide additional or different license terms and conditions
|
|
457
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
458
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
459
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
460
|
+
the conditions stated in this License.
|
|
461
|
+
|
|
462
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
463
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
464
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
465
|
+
this License, without any additional terms or conditions.
|
|
466
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
467
|
+
the terms of any separate license agreement you may have executed
|
|
468
|
+
with Licensor regarding such Contributions.
|
|
469
|
+
|
|
470
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
471
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
472
|
+
except as required for reasonable and customary use in describing the
|
|
473
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
474
|
+
|
|
475
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
476
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
477
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
478
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
479
|
+
implied, including, without limitation, any warranties or conditions
|
|
480
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
481
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
482
|
+
appropriateness of using or redistributing the Work and assume any
|
|
483
|
+
risks associated with Your exercise of permissions under this License.
|
|
484
|
+
|
|
485
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
486
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
487
|
+
unless required by applicable law (such as deliberate and grossly
|
|
488
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
489
|
+
liable to You for damages, including any direct, indirect, special,
|
|
490
|
+
incidental, or consequential damages of any character arising as a
|
|
491
|
+
result of this License or out of the use or inability to use the
|
|
492
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
493
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
494
|
+
other commercial damages or losses), even if such Contributor
|
|
495
|
+
has been advised of the possibility of such damages.
|
|
496
|
+
|
|
497
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
498
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
499
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
500
|
+
or other liability obligations and/or rights consistent with this
|
|
501
|
+
License. However, in accepting such obligations, You may act only
|
|
502
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
503
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
504
|
+
defend, and hold each Contributor harmless for any liability
|
|
505
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
506
|
+
of your accepting any such warranty or additional liability.
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
========================================================================
|
|
510
|
+
github.com/spf13/pflag v1.0.6
|
|
511
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
512
|
+
|
|
513
|
+
--- LICENSE | bytes=1531 | sha256=b8514c577c1c4b46cee454d5a882b15fa411e72c5bd7f801f241591789fce61a ---
|
|
514
|
+
Copyright (c) 2012 Alex Ogier. All rights reserved.
|
|
515
|
+
Copyright (c) 2012 The Go Authors. All rights reserved.
|
|
516
|
+
|
|
517
|
+
Redistribution and use in source and binary forms, with or without
|
|
518
|
+
modification, are permitted provided that the following conditions are
|
|
519
|
+
met:
|
|
520
|
+
|
|
521
|
+
* Redistributions of source code must retain the above copyright
|
|
522
|
+
notice, this list of conditions and the following disclaimer.
|
|
523
|
+
* Redistributions in binary form must reproduce the above
|
|
524
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
525
|
+
in the documentation and/or other materials provided with the
|
|
526
|
+
distribution.
|
|
527
|
+
* Neither the name of Google Inc. nor the names of its
|
|
528
|
+
contributors may be used to endorse or promote products derived from
|
|
529
|
+
this software without specific prior written permission.
|
|
530
|
+
|
|
531
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
532
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
533
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
534
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
535
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
536
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
537
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
538
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
539
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
540
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
541
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
========================================================================
|
|
545
|
+
github.com/zalando/go-keyring v0.2.6
|
|
546
|
+
SPDX-License-Identifier: MIT
|
|
547
|
+
|
|
548
|
+
--- LICENSE | bytes=1077 | sha256=14bc00f1a298eb6af250216b9e60027a4386c8a84fa2c7ddc2b5c10908e06d0d ---
|
|
549
|
+
The MIT License (MIT)
|
|
550
|
+
|
|
551
|
+
Copyright (c) 2016 Zalando SE
|
|
552
|
+
|
|
553
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
554
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
555
|
+
in the Software without restriction, including without limitation the rights
|
|
556
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
557
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
558
|
+
furnished to do so, subject to the following conditions:
|
|
559
|
+
|
|
560
|
+
The above copyright notice and this permission notice shall be included in all
|
|
561
|
+
copies or substantial portions of the Software.
|
|
562
|
+
|
|
563
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
564
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
565
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
566
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
567
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
568
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
569
|
+
SOFTWARE.
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
========================================================================
|
|
573
|
+
golang.org/x/sys v0.31.0
|
|
574
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
575
|
+
|
|
576
|
+
--- LICENSE | bytes=1453 | sha256=911f8f5782931320f5b8d1160a76365b83aea6447ee6c04fa6d5591467db9dad ---
|
|
577
|
+
Copyright 2009 The Go Authors.
|
|
578
|
+
|
|
579
|
+
Redistribution and use in source and binary forms, with or without
|
|
580
|
+
modification, are permitted provided that the following conditions are
|
|
581
|
+
met:
|
|
582
|
+
|
|
583
|
+
* Redistributions of source code must retain the above copyright
|
|
584
|
+
notice, this list of conditions and the following disclaimer.
|
|
585
|
+
* Redistributions in binary form must reproduce the above
|
|
586
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
587
|
+
in the documentation and/or other materials provided with the
|
|
588
|
+
distribution.
|
|
589
|
+
* Neither the name of Google LLC nor the names of its
|
|
590
|
+
contributors may be used to endorse or promote products derived from
|
|
591
|
+
this software without specific prior written permission.
|
|
592
|
+
|
|
593
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
594
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
595
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
596
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
597
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
598
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
599
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
600
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
601
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
602
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
603
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
--- PATENTS | bytes=1303 | sha256=96f408bfae65bf137fc2525d3ecb030271c50c1e90799f87abf8846d8dd505cc ---
|
|
607
|
+
Additional IP Rights Grant (Patents)
|
|
608
|
+
|
|
609
|
+
"This implementation" means the copyrightable works distributed by
|
|
610
|
+
Google as part of the Go project.
|
|
611
|
+
|
|
612
|
+
Google hereby grants to You a perpetual, worldwide, non-exclusive,
|
|
613
|
+
no-charge, royalty-free, irrevocable (except as stated in this section)
|
|
614
|
+
patent license to make, have made, use, offer to sell, sell, import,
|
|
615
|
+
transfer and otherwise run, modify and propagate the contents of this
|
|
616
|
+
implementation of Go, where such license applies only to those patent
|
|
617
|
+
claims, both currently owned or controlled by Google and acquired in
|
|
618
|
+
the future, licensable by Google that are necessarily infringed by this
|
|
619
|
+
implementation of Go. This grant does not include claims that would be
|
|
620
|
+
infringed only as a consequence of further modification of this
|
|
621
|
+
implementation. If you or your agent or exclusive licensee institute or
|
|
622
|
+
order or agree to the institution of patent litigation against any
|
|
623
|
+
entity (including a cross-claim or counterclaim in a lawsuit) alleging
|
|
624
|
+
that this implementation of Go or any code incorporated within this
|
|
625
|
+
implementation of Go constitutes direct or contributory patent
|
|
626
|
+
infringement, or inducement of patent infringement, then any patent
|
|
627
|
+
rights granted to you under this License for this implementation of Go
|
|
628
|
+
shall terminate as of the date such litigation is filed.
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
========================================================================
|
|
632
|
+
golang.org/x/term v0.30.0
|
|
633
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
634
|
+
|
|
635
|
+
--- LICENSE | bytes=1453 | sha256=911f8f5782931320f5b8d1160a76365b83aea6447ee6c04fa6d5591467db9dad ---
|
|
636
|
+
Copyright 2009 The Go Authors.
|
|
637
|
+
|
|
638
|
+
Redistribution and use in source and binary forms, with or without
|
|
639
|
+
modification, are permitted provided that the following conditions are
|
|
640
|
+
met:
|
|
641
|
+
|
|
642
|
+
* Redistributions of source code must retain the above copyright
|
|
643
|
+
notice, this list of conditions and the following disclaimer.
|
|
644
|
+
* Redistributions in binary form must reproduce the above
|
|
645
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
646
|
+
in the documentation and/or other materials provided with the
|
|
647
|
+
distribution.
|
|
648
|
+
* Neither the name of Google LLC nor the names of its
|
|
649
|
+
contributors may be used to endorse or promote products derived from
|
|
650
|
+
this software without specific prior written permission.
|
|
651
|
+
|
|
652
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
653
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
654
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
655
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
656
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
657
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
658
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
659
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
660
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
661
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
662
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
663
|
+
|
|
664
|
+
|
|
665
|
+
--- PATENTS | bytes=1303 | sha256=96f408bfae65bf137fc2525d3ecb030271c50c1e90799f87abf8846d8dd505cc ---
|
|
666
|
+
Additional IP Rights Grant (Patents)
|
|
667
|
+
|
|
668
|
+
"This implementation" means the copyrightable works distributed by
|
|
669
|
+
Google as part of the Go project.
|
|
670
|
+
|
|
671
|
+
Google hereby grants to You a perpetual, worldwide, non-exclusive,
|
|
672
|
+
no-charge, royalty-free, irrevocable (except as stated in this section)
|
|
673
|
+
patent license to make, have made, use, offer to sell, sell, import,
|
|
674
|
+
transfer and otherwise run, modify and propagate the contents of this
|
|
675
|
+
implementation of Go, where such license applies only to those patent
|
|
676
|
+
claims, both currently owned or controlled by Google and acquired in
|
|
677
|
+
the future, licensable by Google that are necessarily infringed by this
|
|
678
|
+
implementation of Go. This grant does not include claims that would be
|
|
679
|
+
infringed only as a consequence of further modification of this
|
|
680
|
+
implementation. If you or your agent or exclusive licensee institute or
|
|
681
|
+
order or agree to the institution of patent litigation against any
|
|
682
|
+
entity (including a cross-claim or counterclaim in a lawsuit) alleging
|
|
683
|
+
that this implementation of Go or any code incorporated within this
|
|
684
|
+
implementation of Go constitutes direct or contributory patent
|
|
685
|
+
infringement, or inducement of patent infringement, then any patent
|
|
686
|
+
rights granted to you under this License for this implementation of Go
|
|
687
|
+
shall terminate as of the date such litigation is filed.
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
========================================================================
|
|
691
|
+
Go standard library go1.24.3
|
|
692
|
+
SPDX-License-Identifier: BSD-3-Clause
|
|
693
|
+
|
|
694
|
+
--- LICENSE | bytes=1453 | sha256=911f8f5782931320f5b8d1160a76365b83aea6447ee6c04fa6d5591467db9dad ---
|
|
695
|
+
Copyright 2009 The Go Authors.
|
|
696
|
+
|
|
697
|
+
Redistribution and use in source and binary forms, with or without
|
|
698
|
+
modification, are permitted provided that the following conditions are
|
|
699
|
+
met:
|
|
700
|
+
|
|
701
|
+
* Redistributions of source code must retain the above copyright
|
|
702
|
+
notice, this list of conditions and the following disclaimer.
|
|
703
|
+
* Redistributions in binary form must reproduce the above
|
|
704
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
705
|
+
in the documentation and/or other materials provided with the
|
|
706
|
+
distribution.
|
|
707
|
+
* Neither the name of Google LLC nor the names of its
|
|
708
|
+
contributors may be used to endorse or promote products derived from
|
|
709
|
+
this software without specific prior written permission.
|
|
710
|
+
|
|
711
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
712
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
713
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
714
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
715
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
716
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
717
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
718
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
719
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
720
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
721
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
--- PATENTS | bytes=1303 | sha256=96f408bfae65bf137fc2525d3ecb030271c50c1e90799f87abf8846d8dd505cc ---
|
|
725
|
+
Additional IP Rights Grant (Patents)
|
|
726
|
+
|
|
727
|
+
"This implementation" means the copyrightable works distributed by
|
|
728
|
+
Google as part of the Go project.
|
|
729
|
+
|
|
730
|
+
Google hereby grants to You a perpetual, worldwide, non-exclusive,
|
|
731
|
+
no-charge, royalty-free, irrevocable (except as stated in this section)
|
|
732
|
+
patent license to make, have made, use, offer to sell, sell, import,
|
|
733
|
+
transfer and otherwise run, modify and propagate the contents of this
|
|
734
|
+
implementation of Go, where such license applies only to those patent
|
|
735
|
+
claims, both currently owned or controlled by Google and acquired in
|
|
736
|
+
the future, licensable by Google that are necessarily infringed by this
|
|
737
|
+
implementation of Go. This grant does not include claims that would be
|
|
738
|
+
infringed only as a consequence of further modification of this
|
|
739
|
+
implementation. If you or your agent or exclusive licensee institute or
|
|
740
|
+
order or agree to the institution of patent litigation against any
|
|
741
|
+
entity (including a cross-claim or counterclaim in a lawsuit) alleging
|
|
742
|
+
that this implementation of Go or any code incorporated within this
|
|
743
|
+
implementation of Go constitutes direct or contributory patent
|
|
744
|
+
infringement, or inducement of patent infringement, then any patent
|
|
745
|
+
rights granted to you under this License for this implementation of Go
|
|
746
|
+
shall terminate as of the date such litigation is filed.
|
|
747
|
+
|
package/bin/fagi.js
ADDED
package/bin/fi.js
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
// OpenAPI cannot generate process/packaging adapters. No shell or postinstall download.
|
|
5
|
+
const { spawn } = require('node:child_process');
|
|
6
|
+
const fs = require('node:fs');
|
|
7
|
+
const { constants } = require('node:os');
|
|
8
|
+
const { resolveBinary } = require('../lib/platform.cjs');
|
|
9
|
+
|
|
10
|
+
// Windows has no exec and no process groups: the console delivers Ctrl-C and
|
|
11
|
+
// Ctrl-Break to every attached process, and Node's child.kill() is
|
|
12
|
+
// TerminateProcess, so the waiting launcher only survives these, forwarding none.
|
|
13
|
+
const WINDOWS_SIGNALS = ['SIGINT', 'SIGBREAK', 'SIGHUP'];
|
|
14
|
+
|
|
15
|
+
const NEEDS_EXECVE = 'on Linux and macOS this launcher needs Node.js 22.15+ or 23.11+ (process.execve)';
|
|
16
|
+
|
|
17
|
+
// The native CLI renders its help and hints with the name it was started as
|
|
18
|
+
// (its argv[0]), so it is given the public command name the person typed, never
|
|
19
|
+
// the platform package's bin/fagi path. npm links each name to its own entry
|
|
20
|
+
// script (fagi.js, futureagi.js or this file for fi) on every platform,
|
|
21
|
+
// including Windows .cmd shims, which name the script rather than the command.
|
|
22
|
+
const COMMAND_NAMES = new Set(['fagi', 'futureagi', 'fi']);
|
|
23
|
+
const commandName = (name) => (COMMAND_NAMES.has(name) ? name : 'fagi');
|
|
24
|
+
|
|
25
|
+
function run(args = process.argv.slice(2), options = {}) {
|
|
26
|
+
const name = commandName(options.name);
|
|
27
|
+
let binary;
|
|
28
|
+
try {
|
|
29
|
+
binary = options.binary || resolveBinary();
|
|
30
|
+
} catch (error) {
|
|
31
|
+
console.error(`${name}: ${error.message}`);
|
|
32
|
+
process.exitCode = 1;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (process.platform === 'win32') return spawnNative(binary, args, name);
|
|
36
|
+
// POSIX: become the native CLI (exec, like `exec fi "$@"`). It keeps this PID
|
|
37
|
+
// and process group, so each signal reaches it exactly once, whether it was
|
|
38
|
+
// sent to the PID (kill PID, docker stop) or to the group (Ctrl-C, timeout(1),
|
|
39
|
+
// CI cancellation), and its exit status or signal reaches the caller unchanged.
|
|
40
|
+
// A waiting launcher cannot do that: it shares the group, so it either repeats
|
|
41
|
+
// group signals (a second interrupt force-stops `fi eval run`) or swallows the
|
|
42
|
+
// ones sent only to its PID. Older Node therefore fails instead of degrading.
|
|
43
|
+
const execve = 'execve' in options ? options.execve : process.execve;
|
|
44
|
+
if (typeof execve !== 'function') {
|
|
45
|
+
console.error(`${name}: ${NEEDS_EXECVE}; found Node.js ${process.version}. Upgrade Node.js, or install the native CLI without Node (see docs/INSTALL.md in github.com/future-agi/futureagi-cli).`);
|
|
46
|
+
process.exitCode = 1;
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
checkExecutable(binary);
|
|
51
|
+
execNative(execve, binary, args, name);
|
|
52
|
+
} catch (error) {
|
|
53
|
+
console.error(`${name}: cannot execute the native CLI: ${error.message}`);
|
|
54
|
+
process.exitCode = 1;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Node 22 and 24 abort the whole process (SIGABRT, a native stack trace) when
|
|
59
|
+
// process.execve fails instead of throwing, so the friendly error above would
|
|
60
|
+
// never print. Reject the predictable failures first: a missing path, a
|
|
61
|
+
// directory, no execute permission (including noexec mounts), and a file that
|
|
62
|
+
// is not a native executable or script for this platform. Rarer exec failures
|
|
63
|
+
// (ETXTBSY, E2BIG, ENOMEM) can still abort there with status 134.
|
|
64
|
+
const ELF_MACHINE = { x64: 62, arm64: 183 }; // EM_X86_64, EM_AARCH64
|
|
65
|
+
const MACHO_MAGIC = new Set(['cffaedfe', 'cefaedfe', 'cafebabe', 'cafebabf']);
|
|
66
|
+
|
|
67
|
+
function checkExecutable(binary) {
|
|
68
|
+
const fail = (reason) => { throw new Error(`${binary}: ${reason}. Reinstall @future-agi/cli for this platform.`); };
|
|
69
|
+
let stat;
|
|
70
|
+
try {
|
|
71
|
+
stat = fs.statSync(binary);
|
|
72
|
+
} catch (error) {
|
|
73
|
+
fail(`${error.code || 'EIO'}: not found or not accessible`);
|
|
74
|
+
}
|
|
75
|
+
if (!stat.isFile()) fail('not a regular file');
|
|
76
|
+
try {
|
|
77
|
+
fs.accessSync(binary, fs.constants.X_OK);
|
|
78
|
+
} catch (error) {
|
|
79
|
+
fail(`${error.code || 'EACCES'}: not executable (missing execute permission or a noexec mount)`);
|
|
80
|
+
}
|
|
81
|
+
const header = Buffer.alloc(256);
|
|
82
|
+
let length = 0;
|
|
83
|
+
let fd;
|
|
84
|
+
try {
|
|
85
|
+
fd = fs.openSync(binary, 'r');
|
|
86
|
+
length = fs.readSync(fd, header, 0, header.length, 0);
|
|
87
|
+
} catch (error) {
|
|
88
|
+
fail(`${error.code || 'EIO'}: cannot read the executable header`);
|
|
89
|
+
} finally {
|
|
90
|
+
if (fd !== undefined) fs.closeSync(fd);
|
|
91
|
+
}
|
|
92
|
+
if (length >= 2 && header[0] === 0x23 && header[1] === 0x21) { // "#!"
|
|
93
|
+
const line = header.subarray(2, length).toString('latin1').split('\n')[0].trim();
|
|
94
|
+
const interpreter = line.split(/[ \t]/)[0];
|
|
95
|
+
try {
|
|
96
|
+
if (!interpreter.startsWith('/') || !fs.statSync(interpreter).isFile()) throw new Error('missing');
|
|
97
|
+
fs.accessSync(interpreter, fs.constants.X_OK);
|
|
98
|
+
} catch {
|
|
99
|
+
fail(`script interpreter ${JSON.stringify(interpreter)} is not executable`);
|
|
100
|
+
}
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const magic = header.subarray(0, 4).toString('hex');
|
|
104
|
+
if (process.platform === 'linux') {
|
|
105
|
+
if (length < 20 || magic !== '7f454c46') fail('not a Linux (ELF) executable');
|
|
106
|
+
const machine = header[5] === 2 ? header.readUInt16BE(18) : header.readUInt16LE(18);
|
|
107
|
+
const expected = ELF_MACHINE[process.arch];
|
|
108
|
+
if (expected !== undefined && machine !== expected) fail(`built for another CPU architecture, not ${process.arch}`);
|
|
109
|
+
} else if (process.platform === 'darwin') {
|
|
110
|
+
// No CPU check: Apple silicon runs either architecture (Rosetta 2).
|
|
111
|
+
if (length < 4 || !MACHO_MAGIC.has(magic)) fail('not a macOS (Mach-O) executable');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function execNative(execve, binary, args, name) {
|
|
116
|
+
// process.execve is experimental; Node only prints that warning if the exec
|
|
117
|
+
// fails and this process continues, where it would precede our own error.
|
|
118
|
+
const emitWarning = process.emitWarning;
|
|
119
|
+
process.emitWarning = function (warning, ...rest) {
|
|
120
|
+
const type = typeof rest[0] === 'string' ? rest[0] : rest[0] && rest[0].type;
|
|
121
|
+
if (type === 'ExperimentalWarning' && /execve/.test(String(warning && warning.message || warning))) return;
|
|
122
|
+
return emitWarning.call(process, warning, ...rest);
|
|
123
|
+
};
|
|
124
|
+
try {
|
|
125
|
+
execve.call(process, binary, [name, ...args], process.env); // returns only on failure
|
|
126
|
+
} finally {
|
|
127
|
+
process.emitWarning = emitWarning;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Windows only (exported for tests): keep the launcher alive until the native
|
|
132
|
+
// CLI exits and report its exit status. argv0 carries the command name.
|
|
133
|
+
function spawnNative(binary, args, name) {
|
|
134
|
+
name = commandName(name);
|
|
135
|
+
const child = spawn(binary, args, { stdio: 'inherit', shell: false, argv0: name });
|
|
136
|
+
const windows = process.platform === 'win32';
|
|
137
|
+
const ignore = () => {};
|
|
138
|
+
for (const signal of WINDOWS_SIGNALS) process.on(signal, ignore);
|
|
139
|
+
const cleanup = () => {
|
|
140
|
+
for (const signal of WINDOWS_SIGNALS) process.removeListener(signal, ignore);
|
|
141
|
+
};
|
|
142
|
+
child.once('error', (error) => {
|
|
143
|
+
cleanup();
|
|
144
|
+
console.error(`${name}: cannot execute the native CLI: ${error.message}`);
|
|
145
|
+
process.exitCode = 1;
|
|
146
|
+
});
|
|
147
|
+
child.once('exit', (code, signal) => {
|
|
148
|
+
cleanup();
|
|
149
|
+
if (signal) {
|
|
150
|
+
// Re-raise on POSIX (tests), so callers observe the signal, not success.
|
|
151
|
+
if (!windows) process.kill(process.pid, signal);
|
|
152
|
+
else process.exitCode = 128 + (constants.signals[signal] || 1);
|
|
153
|
+
} else {
|
|
154
|
+
process.exitCode = code === null ? 1 : code;
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
return child;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (require.main === module) run(process.argv.slice(2), { name: 'fi' });
|
|
161
|
+
module.exports = { run, spawnNative };
|
package/bin/futureagi.js
ADDED
package/lib/platform.cjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const path = require('node:path');
|
|
4
|
+
const fs = require('node:fs');
|
|
5
|
+
const platforms = new Set(['darwin', 'linux', 'win32']);
|
|
6
|
+
const architectures = new Set(['x64', 'arm64']);
|
|
7
|
+
|
|
8
|
+
function packageFor(platform = process.platform, arch = process.arch) {
|
|
9
|
+
if (!platforms.has(platform) || !architectures.has(arch)) {
|
|
10
|
+
throw new Error(`Unsupported FutureAGI CLI platform: ${platform}-${arch}. Use a supported native release instead.`);
|
|
11
|
+
}
|
|
12
|
+
return `@future-agi/cli-${platform}-${arch}`;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function resolveBinary(platform = process.platform, arch = process.arch, resolve = require.resolve) {
|
|
16
|
+
const name = packageFor(platform, arch);
|
|
17
|
+
try {
|
|
18
|
+
const manifest = resolve(`${name}/package.json`);
|
|
19
|
+
const binary = path.join(path.dirname(manifest), 'bin', platform === 'win32' ? 'fagi.exe' : 'fagi');
|
|
20
|
+
if (!fs.statSync(binary).isFile()) throw new Error('not a file');
|
|
21
|
+
return binary;
|
|
22
|
+
} catch (cause) {
|
|
23
|
+
throw new Error(`Missing native package ${name}. Reinstall @future-agi/cli with optional dependencies enabled (do not use --omit=optional). For offline installs, supply that exact-version platform package too.`, { cause });
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
module.exports = { packageFor, resolveBinary };
|
package/package.json
CHANGED
|
@@ -1,6 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@future-agi/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "The FutureAGI CLI, with a native binary for your platform",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"repository": "github:future-agi/futureagi-cli",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": "^22.15.0 || >=23.11.0"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"fagi": "bin/fagi.js",
|
|
13
|
+
"futureagi": "bin/futureagi.js",
|
|
14
|
+
"fi": "bin/fi.js"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"bin",
|
|
18
|
+
"lib",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"THIRD-PARTY-NOTICES",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"optionalDependencies": {
|
|
27
|
+
"@future-agi/cli-darwin-arm64": "0.2.0",
|
|
28
|
+
"@future-agi/cli-darwin-x64": "0.2.0",
|
|
29
|
+
"@future-agi/cli-linux-arm64": "0.2.0",
|
|
30
|
+
"@future-agi/cli-linux-x64": "0.2.0",
|
|
31
|
+
"@future-agi/cli-win32-x64": "0.2.0",
|
|
32
|
+
"@future-agi/cli-win32-arm64": "0.2.0"
|
|
33
|
+
}
|
|
34
|
+
}
|