@maka-agent/cli 0.0.0-placeholder.2 → 0.2.0-rust-preview.36750050427.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +331 -0
- package/NOTICE +8 -0
- package/README.md +37 -9
- package/README.zh-CN.md +68 -0
- package/bin/maka.mjs +78 -0
- package/package.json +25 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,331 @@
|
|
|
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.
|
|
203
|
+
|
|
204
|
+
THIRD-PARTY COMPONENTS
|
|
205
|
+
|
|
206
|
+
Vercel AI SDK provider-utils patch
|
|
207
|
+
|
|
208
|
+
Source: https://github.com/vercel/ai
|
|
209
|
+
Version: @ai-sdk/provider-utils 5.0.40
|
|
210
|
+
License: Apache License 2.0 (the text above).
|
|
211
|
+
|
|
212
|
+
patches/@ai-sdk+provider-utils+5.0.40.patch modifies this component.
|
|
213
|
+
|
|
214
|
+
Zod dependency patch
|
|
215
|
+
|
|
216
|
+
Source: https://www.npmjs.com/package/zod/v/4.6.5
|
|
217
|
+
Repository: https://github.com/colinhacks/zod
|
|
218
|
+
Version: 4.6.5
|
|
219
|
+
Dependency patch: patches/zod+4.6.5.patch
|
|
220
|
+
Copyright (c) 2025 Colin McDonnell
|
|
221
|
+
License: MIT
|
|
222
|
+
|
|
223
|
+
Maka redistributes a source patch that releases recursive parse state after
|
|
224
|
+
completion or failure. The following MIT License applies to that material:
|
|
225
|
+
|
|
226
|
+
MIT License
|
|
227
|
+
|
|
228
|
+
Copyright (c) 2025 Colin McDonnell
|
|
229
|
+
|
|
230
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
231
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
232
|
+
in the Software without restriction, including without limitation the rights
|
|
233
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
234
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
235
|
+
furnished to do so, subject to the following conditions:
|
|
236
|
+
|
|
237
|
+
The above copyright notice and this permission notice shall be included in all
|
|
238
|
+
copies or substantial portions of the Software.
|
|
239
|
+
|
|
240
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
241
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
242
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
243
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
244
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
245
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
246
|
+
SOFTWARE.
|
|
247
|
+
|
|
248
|
+
anomalyco/models.dev (generated model catalog snapshot)
|
|
249
|
+
|
|
250
|
+
Source: https://models.dev/api.json
|
|
251
|
+
Repository: https://github.com/anomalyco/models.dev
|
|
252
|
+
Copyright (c) 2025 models.dev
|
|
253
|
+
License: MIT
|
|
254
|
+
|
|
255
|
+
crates/providers/data/catalog-facts.json and crates/config/data/pricing-facts.json
|
|
256
|
+
contain normalized provider, model and pricing facts from this catalog.
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
MIT License
|
|
260
|
+
|
|
261
|
+
Copyright (c) 2025 models.dev
|
|
262
|
+
|
|
263
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
264
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
265
|
+
in the Software without restriction, including without limitation the rights
|
|
266
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
267
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
268
|
+
furnished to do so, subject to the following conditions:
|
|
269
|
+
|
|
270
|
+
The above copyright notice and this permission notice shall be included in all
|
|
271
|
+
copies or substantial portions of the Software.
|
|
272
|
+
|
|
273
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
274
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
275
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
276
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
277
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
278
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
279
|
+
SOFTWARE.
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
OpenAI Codex apply-patch (adapted source)
|
|
283
|
+
|
|
284
|
+
Source: https://github.com/openai/codex
|
|
285
|
+
Copyright 2025 OpenAI
|
|
286
|
+
License: Apache License 2.0 (the text at the beginning of this file).
|
|
287
|
+
|
|
288
|
+
The pure patch parser, contextual matching and line-ending reconstruction in
|
|
289
|
+
crates/apply-patch/src/{lib,parser,seek_sequence,text_file,update}.rs
|
|
290
|
+
contain adapted portions of codex-rs/apply-patch. The parser is based on revision
|
|
291
|
+
d45513ce5ad99d37638f355601f075d55860001e; matching and line-ending handling are
|
|
292
|
+
based on revision 624ccf794703e2d84e748fc3ef547d6191a8c0a4. Maka removes filesystem,
|
|
293
|
+
shell, streaming and execution-service dependencies, adds bounded pure APIs,
|
|
294
|
+
and excludes unsupported patch operations. Detailed provenance and modifications
|
|
295
|
+
are recorded in crates/apply-patch/SOURCE.md.
|
|
296
|
+
|
|
297
|
+
OpenAI Codex sandbox policy (unmodified source)
|
|
298
|
+
|
|
299
|
+
crates/sandbox/src/seatbelt/{base,network}.sbpl are Copyright OpenAI, Apache License 2.0.
|
|
300
|
+
Source provenance is recorded in crates/sandbox/README.md.
|
|
301
|
+
|
|
302
|
+
Deno telemetry TypeScript sources (unmodified)
|
|
303
|
+
|
|
304
|
+
crates/js-runtime/third-party/deno-telemetry/{telemetry,util}.ts are copied from
|
|
305
|
+
deno_telemetry 0.80.0, revision e518fbd66dda5debcbdefc0beb0b3756b37b64fa:
|
|
306
|
+
https://github.com/denoland/deno/tree/e518fbd66dda5debcbdefc0beb0b3756b37b64fa/ext/telemetry
|
|
307
|
+
They are transpiled during the build; tests compare them with the locked extension.
|
|
308
|
+
|
|
309
|
+
MIT License
|
|
310
|
+
|
|
311
|
+
Copyright 2018-2026 the Deno authors
|
|
312
|
+
|
|
313
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
314
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
315
|
+
the Software without restriction, including without limitation the rights to
|
|
316
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
317
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
318
|
+
subject to the following conditions:
|
|
319
|
+
|
|
320
|
+
The above copyright notice and this permission notice shall be included in all
|
|
321
|
+
copies or substantial portions of the Software.
|
|
322
|
+
|
|
323
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
324
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
325
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
326
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
327
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
328
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
329
|
+
|
|
330
|
+
Native Computer Use dependency notices are recorded in
|
|
331
|
+
crates/computer-use/THIRD_PARTY_NOTICES.
|
package/NOTICE
ADDED
package/README.md
CHANGED
|
@@ -17,24 +17,52 @@
|
|
|
17
17
|
under the License.
|
|
18
18
|
-->
|
|
19
19
|
|
|
20
|
-
# Maka
|
|
20
|
+
# Maka experimental Rust preview
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
[简体中文](README.zh-CN.md)
|
|
23
23
|
|
|
24
|
-
**
|
|
24
|
+
**This npm distribution is an independent, experimental preview. It is not an official release of the Apache Software Foundation (ASF), and is not approved, endorsed, or supported by the ASF. Its publication does not imply ASF affiliation or sponsorship.** The source repository and Apache-2.0 license do not change this distribution's unofficial status.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Install the experimental CLI explicitly:
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
29
|
npm install --global @maka-agent/cli@rust-preview
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
`@maka-agent/cli@latest`, the native components’ `latest` tags, and the separate `maka-agent@latest` are empty placeholders with no CLI, runtime, dependencies, or install scripts. The `@maka-agent/cli-*` packages are platform components of the same unofficial preview. Preview behavior and compatibility can change without notice.
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
The `@maka-agent/cli` npm launcher starts the native Maka CLI for the current OS and CPU. Exact-version optional dependencies carry the executables. Arguments, standard input/output and exit status pass through to the native process.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
The supported preview set is macOS arm64, Linux x64 with glibc, and Windows x64. WSL uses the Linux executable and can obtain the matching Windows helper through the native distribution layer.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
## Build and publish
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
Create a committed source candidate with `just source <version>`. Each platform runs:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
just package <source.tar.gz> <target> <build-id> native-preview
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The package command writes the platform archive and `<target>.json` receipt. Collect all three platforms and the source archive with its SHA-512 sidecar, then run:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
just release-prepare native-preview
|
|
50
|
+
just release-check native-preview
|
|
51
|
+
just publish native-preview
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`release-prepare` assembles and validates all four packages from one source. `release-check` installs the launcher and native package offline on the current platform and exercises the CLI/V8; run it on all three platforms. Publication installs the Windows component first, the other native packages next, and the launcher last, then verifies every `rust-preview` tag. Retry the same artifacts after interruption; never rebuild an already published version. Use one publisher at a time per channel: npm tags have no conditional-write API.
|
|
55
|
+
|
|
56
|
+
GitHub uses the registered `npm-publication.yml` entry. `gh workflow run npm-publication.yml --ref <branch> -f publish=false` produces the complete artifacts and three-platform verification. Unofficial publication runs in the personal fork `M4n5ter/maka-agent`, not the ASF repository. It requires explicit `publish=true` on `feat/runtime-host-rust` and the dedicated `npm-rust-preview` environment. That environment permits only this branch and holds its npm publishing token; the main-branch publication environment is independent. Use `gh workflow run npm-publication.yml --repo M4n5ter/maka-agent --ref feat/runtime-host-rust -f publish=true` to build, verify, and publish the preview.
|
|
57
|
+
|
|
58
|
+
The shared `latest` placeholder template is maintained in `packages/cli/placeholder/`. Stage a copy with the intended package name, inspect its tarball, then publish it with `--tag latest`; it has no executable code. Never move `latest` to a preview build.
|
|
59
|
+
|
|
60
|
+
Release packages use pinned V8 builds with optional LGPL glibc math disabled. Native macOS packaging requires Xcode 26 or newer for Computer Use; CI builds on macOS 26 and checks installation on macOS 15. Linux needs glib development files and cargo-zigbuild/Zig. A fallback V8 source build additionally requires Python 3, Git, Clang/libclang 19 or newer and a native C++ toolchain. It downloads Chromium tools, can take over an hour and needs tens of GiB of temporary space, removed after the build.
|
|
61
|
+
|
|
62
|
+
Completed V8 libraries, bindings and notices are reused from `target/v8` (or `$CARGO_TARGET_DIR/v8`). On a cache miss, packaging downloads the matching bundle pinned in `scripts/rust/v8-prebuilts.json`; only an absent pin triggers source compilation. The key binds V8 source, target, features and producer code, independently of Maka/deno_core versions and download tooling. Downloads must match the source-pinned SHA-256, and every use validates the bundle's file digests. A broken pin or corrupt cache fails explicitly. Native link and smoke checks still run for every package.
|
|
63
|
+
|
|
64
|
+
For keys without pins, native CI exports `v8-prebuilt-*` artifacts with archives, digests and the validating commit/run. After the complete workflow passes, publish those exact archives as versioned GitHub dependency prerelease assets under a `deps-v8-*` tag and commit their URLs, hashes and validation records to `v8-prebuilts.json`. Never overwrite an existing asset or change the meaning of a key. Actions caches accelerate unpublished builds; the committed manifest is the trust root for downloads. Remove a corrupt local entry (and its Actions cache, if applicable) before retrying; deleting local cache alone normally downloads the pinned bundle again.
|
|
65
|
+
|
|
66
|
+
After dependency changes, run `node scripts/rust/notices.mjs generate` and review the snapshot. It collects full and nested license texts from pinned dependency sources; reviewed exceptions for missing upstream license files live in `notices-sources.json`. Release builds validate the snapshot's source-input binding and append notices from the actual V8 build graph and Rust standard library. The license TSV is an inventory, not a substitute for these texts.
|
|
67
|
+
|
|
68
|
+
No install script downloads or executes an unverified helper. Runtime behavior lives in `crates/cli`.
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
or more contributor license agreements. See the NOTICE file
|
|
4
|
+
distributed with this work for additional information
|
|
5
|
+
regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
to you under the Apache License, Version 2.0 (the
|
|
7
|
+
"License"); you may not use this file except in compliance
|
|
8
|
+
with the License. You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing,
|
|
13
|
+
software distributed under the License is distributed on an
|
|
14
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
KIND, either express or implied. See the License for the
|
|
16
|
+
specific language governing permissions and limitations
|
|
17
|
+
under the License.
|
|
18
|
+
-->
|
|
19
|
+
|
|
20
|
+
# Maka 实验性 Rust 预览版
|
|
21
|
+
|
|
22
|
+
[English](README.md)
|
|
23
|
+
|
|
24
|
+
**本 npm 分发是独立发布的实验性预览版,与 ASF 官方发布无关。它不是 Apache 软件基金会(ASF)的官方版本,未经 ASF 批准、背书或支持,也不代表 ASF 的关联或赞助。** 源码仓库和 Apache-2.0 许可证不改变本分发的非官方性质。
|
|
25
|
+
|
|
26
|
+
请显式安装实验性 CLI:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
npm install --global @maka-agent/cli@rust-preview
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`@maka-agent/cli@latest`、原生平台包的 `latest` 以及独立的 `maka-agent@latest` 均为空占位包,不含 CLI、运行时、依赖或安装脚本。`@maka-agent/cli-*` 是同一非官方预览版的平台组件。预览版的行为和兼容性可能随时变化。
|
|
33
|
+
|
|
34
|
+
`@maka-agent/cli` npm 启动器启动当前操作系统和 CPU 对应的原生 Maka CLI,通过精确版本的可选依赖分发可执行文件。命令参数、标准输入输出和退出状态直接传递给原生进程。
|
|
35
|
+
|
|
36
|
+
预览分发支持 macOS arm64、使用 glibc 的 Linux x64 和 Windows x64。WSL 使用 Linux 可执行文件,并由原生分发层获取匹配的 Windows 辅助程序。
|
|
37
|
+
|
|
38
|
+
## 构建与发布
|
|
39
|
+
|
|
40
|
+
通过 `just source <version>` 从已提交代码生成源码候选包。各平台分别运行:
|
|
41
|
+
|
|
42
|
+
```sh
|
|
43
|
+
just package <source.tar.gz> <target> <build-id> native-preview
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
打包命令会在输出目录写入平台包及 `<target>.json` 回执。将三个平台的产物、源码包及其 SHA-512 文件收集到同一目录后:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
just release-prepare native-preview
|
|
50
|
+
just release-check native-preview
|
|
51
|
+
just publish native-preview
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`release-prepare` 从同一源码包生成启动器并校验四个包;`release-check` 在当前平台离线安装启动器和原生包,实际运行 CLI/V8。三个平台均应完成验收。`publish` 先发布 Windows 辅助组件,再发布其余原生包,最后发布启动器,并确认各包的 `rust-preview` 标签。中断后重试同一份产物;不要重新构建同一版本。一个发布通道同一时刻只允许一个发布者,npm 标签没有条件写入接口。
|
|
55
|
+
|
|
56
|
+
GitHub 使用已登记的 `npm-publication.yml`。在功能分支可运行 `gh workflow run npm-publication.yml --ref <branch> -f publish=false`,得到完整产物与三平台验收结果。非官方发布在个人 fork `M4n5ter/maka-agent` 中执行,不从 ASF 仓库发布。须在 `feat/runtime-host-rust` 分支显式选择 `publish=true`,使用独立的 `npm-rust-preview` 环境。该环境仅允许此分支,并保存 npm 发布 Token;主分支的发布环境独立管理。执行 `gh workflow run npm-publication.yml --repo M4n5ter/maka-agent --ref feat/runtime-host-rust -f publish=true` 即可完成构建、验证及预览发布。
|
|
57
|
+
|
|
58
|
+
`latest` 的共用占位模板维护在 `packages/cli/placeholder/`。复制到临时目录并设置目标包名,打包检查后,用 `--tag latest` 发布生成的 tarball;包内没有可执行代码。不要将 `latest` 指向预览构建。
|
|
59
|
+
|
|
60
|
+
正式包使用固定的 V8 构建,关闭可选的 LGPL glibc 数学实现。macOS 打包需要 Xcode 26 或更新版本来编译 Computer Use;CI 使用 macOS 26 构建,并在 macOS 15 验证安装。Linux 需要 glib 开发包和 cargo-zigbuild/Zig。回退到 V8 源码构建时,还需 Python 3、Git、Clang/libclang 19 或更新版本及原生 C++ 工具链;该过程会下载 Chromium 工具,可能耗时超过一小时,并使用数十 GiB 临时空间,完成后自动清理。
|
|
61
|
+
|
|
62
|
+
完成的 V8 静态库、bindings 和声明保存在 `target/v8`(或 `$CARGO_TARGET_DIR/v8`)。缓存未命中时,打包程序下载 `scripts/rust/v8-prebuilts.json` 中固定的匹配产物;只有缺少对应条目才源码编译。key 绑定 V8 源码、平台、功能和生产代码,不绑定 Maka/deno_core 版本或下载工具。下载必须匹配源码内固定的 SHA-256,每次使用还会校验包内文件摘要;下载异常或缓存损坏会明确报错。每次打包仍执行实际链接和原生冒烟测试。
|
|
63
|
+
|
|
64
|
+
对于尚未固定的 key,原生 CI 导出 `v8-prebuilt-*` 产物,包含压缩包、摘要和完成验证的提交及运行记录。完整工作流通过后,将同一批压缩包发布到 `deps-v8-*` 标签下,作为固定版本的 GitHub 依赖预构建资产,并把 URL、摘要和验证记录提交到 `v8-prebuilts.json`。不要覆盖既有资产或改变同一 key 的含义。Actions 缓存加速尚未发布的构建,源码内的清单负责认证下载内容。缓存损坏时删除对应的本地条目及 Actions 缓存后重试;单独删除本地缓存通常会重新下载已固定的预构建。
|
|
65
|
+
|
|
66
|
+
依赖变化后运行 `node scripts/rust/notices.mjs generate` 并审查许可证快照。它从固定依赖版本收集全文和嵌套声明,少数上游缺少独立许可文件的例外记录在 `notices-sources.json`。发布校验快照与源码输入的绑定,并追加实际 V8 构建图和 Rust 标准库声明;许可证 TSV 仅用作清单,不能代替全文。
|
|
67
|
+
|
|
68
|
+
安装脚本不会下载或执行未经验证的辅助程序。运行时行为由 `crates/cli` 实现。
|
package/bin/maka.mjs
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*
|
|
3
|
+
* Licensed to the Apache Software Foundation (ASF) under one
|
|
4
|
+
* or more contributor license agreements. See the NOTICE file
|
|
5
|
+
* distributed with this work for additional information
|
|
6
|
+
* regarding copyright ownership. The ASF licenses this file
|
|
7
|
+
* to you under the Apache License, Version 2.0 (the
|
|
8
|
+
* "License"); you may not use this file except in compliance
|
|
9
|
+
* with the License. You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing,
|
|
14
|
+
* software distributed under the License is distributed on an
|
|
15
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
16
|
+
* KIND, either express or implied. See the License for the
|
|
17
|
+
* specific language governing permissions and limitations
|
|
18
|
+
* under the License.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
import { spawn } from 'node:child_process';
|
|
22
|
+
import { readFileSync } from 'node:fs';
|
|
23
|
+
import { createRequire } from 'node:module';
|
|
24
|
+
import { dirname, join } from 'node:path';
|
|
25
|
+
|
|
26
|
+
const require = createRequire(import.meta.url);
|
|
27
|
+
const manifest = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
const platform = process.platform;
|
|
31
|
+
if (platform === 'linux' && !process.report.getReport().header.glibcVersionRuntime) {
|
|
32
|
+
throw new Error('This Maka release requires glibc on Linux.');
|
|
33
|
+
}
|
|
34
|
+
const target = `${platform}-${process.arch}${platform === 'linux' ? '-gnu' : ''}`;
|
|
35
|
+
const name = `@maka-agent/cli-${target}`;
|
|
36
|
+
if (manifest.optionalDependencies?.[name] !== manifest.version) {
|
|
37
|
+
throw new Error(`This Maka release does not include ${target}.`);
|
|
38
|
+
}
|
|
39
|
+
let packagePath;
|
|
40
|
+
try {
|
|
41
|
+
packagePath = require.resolve(`${name}/package.json`);
|
|
42
|
+
} catch {
|
|
43
|
+
throw new Error(
|
|
44
|
+
`Missing ${name}@${manifest.version}. Reinstall with: npm install --global --include=optional @maka-agent/cli@${manifest.version}`,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
const native = JSON.parse(readFileSync(packagePath, 'utf8'));
|
|
48
|
+
const executable = platform === 'win32' ? 'maka.exe' : 'maka';
|
|
49
|
+
if (
|
|
50
|
+
native.name !== name ||
|
|
51
|
+
native.version !== manifest.version ||
|
|
52
|
+
native.bin?.maka !== `bin/${executable}`
|
|
53
|
+
) {
|
|
54
|
+
throw new Error('The installed native Maka package does not match this launcher.');
|
|
55
|
+
}
|
|
56
|
+
const child = spawn(join(dirname(packagePath), 'bin', executable), process.argv.slice(2), {
|
|
57
|
+
stdio: 'inherit',
|
|
58
|
+
});
|
|
59
|
+
const signals = ['SIGINT', 'SIGTERM', 'SIGHUP'];
|
|
60
|
+
const handlers = new Map(signals.map((signal) => [signal, () => child.kill(signal)]));
|
|
61
|
+
const cleanup = () => {
|
|
62
|
+
for (const [signal, handler] of handlers) process.off(signal, handler);
|
|
63
|
+
};
|
|
64
|
+
for (const [signal, handler] of handlers) process.on(signal, handler);
|
|
65
|
+
child.once('error', (error) => {
|
|
66
|
+
cleanup();
|
|
67
|
+
console.error(`maka: ${error.message}`);
|
|
68
|
+
process.exitCode = 1;
|
|
69
|
+
});
|
|
70
|
+
child.once('exit', (code, signal) => {
|
|
71
|
+
cleanup();
|
|
72
|
+
if (signal) process.kill(process.pid, signal);
|
|
73
|
+
else process.exitCode = code ?? 1;
|
|
74
|
+
});
|
|
75
|
+
} catch (error) {
|
|
76
|
+
console.error(`maka: ${error.message}`);
|
|
77
|
+
process.exitCode = 1;
|
|
78
|
+
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maka-agent/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.0-rust-preview.36750050427.1",
|
|
4
|
+
"description": "Unofficial experimental Maka Rust preview; not an ASF release or endorsement",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=22.19.0"
|
|
9
|
+
},
|
|
10
|
+
"bin": {
|
|
11
|
+
"maka": "bin/maka.mjs"
|
|
12
|
+
},
|
|
6
13
|
"files": [
|
|
7
|
-
"
|
|
14
|
+
"bin",
|
|
15
|
+
"LICENSE",
|
|
16
|
+
"NOTICE",
|
|
17
|
+
"README.md",
|
|
18
|
+
"README.zh-CN.md"
|
|
8
19
|
],
|
|
9
20
|
"repository": {
|
|
10
21
|
"type": "git",
|
|
11
22
|
"url": "https://github.com/M4n5ter/maka-agent.git"
|
|
12
23
|
},
|
|
24
|
+
"optionalDependencies": {
|
|
25
|
+
"@maka-agent/cli-win32-x64": "0.2.0-rust-preview.36750050427.1",
|
|
26
|
+
"@maka-agent/cli-darwin-arm64": "0.2.0-rust-preview.36750050427.1",
|
|
27
|
+
"@maka-agent/cli-linux-x64-gnu": "0.2.0-rust-preview.36750050427.1"
|
|
28
|
+
},
|
|
29
|
+
"makaSource": {
|
|
30
|
+
"archive": "apache-maka-0.2.0-incubating-src.tar.gz",
|
|
31
|
+
"version": "0.2.0",
|
|
32
|
+
"sha512": "533a2b90c72b148243e23bfe95030a9fee6d18be764799f16d22ab8bc0a4afe9c96210dd693fc2a5a7e21ea23d0f2e15ac7b409a2377346aa47b2e00563c402d"
|
|
33
|
+
},
|
|
13
34
|
"publishConfig": {
|
|
14
35
|
"access": "public",
|
|
15
36
|
"registry": "https://registry.npmjs.org/",
|
|
16
|
-
"tag": "
|
|
37
|
+
"tag": "rust-preview"
|
|
17
38
|
}
|
|
18
39
|
}
|