@meridian-flow/mars-agents 0.0.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.
Files changed (3) hide show
  1. package/README.md +27 -0
  2. package/bin/mars +45 -0
  3. package/package.json +23 -0
package/README.md ADDED
@@ -0,0 +1,27 @@
1
+ # @meridian-flow/mars-agents
2
+
3
+ `@meridian-flow/mars-agents` is the npm distribution of the `mars` CLI.
4
+
5
+ It installs a small launcher plus the matching prebuilt binary package for the current supported platform.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install -g @meridian-flow/mars-agents
11
+ ```
12
+
13
+ Supported prebuilt platforms:
14
+
15
+ - macOS `arm64`
16
+ - macOS `x64`
17
+ - Linux `arm64` (glibc)
18
+ - Linux `x64` (glibc)
19
+
20
+ If your platform is not supported, install from source instead:
21
+
22
+ ```bash
23
+ cargo install --git https://github.com/meridian-flow/mars-agents
24
+ ```
25
+
26
+ Project README:
27
+ <https://github.com/meridian-flow/mars-agents>
package/bin/mars ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { execFileSync } = require("child_process");
4
+
5
+ const PLATFORMS = {
6
+ "darwin arm64": "@meridian-flow/mars-agents-darwin-arm64",
7
+ "darwin x64": "@meridian-flow/mars-agents-darwin-x64",
8
+ "linux arm64": "@meridian-flow/mars-agents-linux-arm64",
9
+ "linux x64": "@meridian-flow/mars-agents-linux-x64",
10
+ };
11
+
12
+ const key = `${process.platform} ${process.arch}`;
13
+ const pkg = PLATFORMS[key];
14
+
15
+ if (!pkg) {
16
+ console.error(
17
+ `mars: unsupported platform ${process.platform} ${process.arch}\n` +
18
+ `Supported: linux-arm64, linux-x64, darwin-arm64, darwin-x64\n` +
19
+ `Try: cargo install mars-agents`
20
+ );
21
+ process.exit(1);
22
+ }
23
+
24
+ let binaryPath;
25
+ try {
26
+ binaryPath = require.resolve(`${pkg}/mars`);
27
+ } catch {
28
+ console.error(
29
+ `mars: could not find binary package ${pkg}\n` +
30
+ `This usually means the optional dependency was not installed.\n` +
31
+ `Try reinstalling: npm i -g @meridian-flow/mars-agents\n` +
32
+ `Or install from source: cargo install mars-agents`
33
+ );
34
+ process.exit(1);
35
+ }
36
+
37
+ try {
38
+ execFileSync(binaryPath, process.argv.slice(2), {
39
+ stdio: "inherit",
40
+ env: process.env,
41
+ });
42
+ } catch (e) {
43
+ // execFileSync throws on non-zero exit — forward the exit code
44
+ process.exit(e.status ?? 1);
45
+ }
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@meridian-flow/mars-agents",
3
+ "version": "0.0.1",
4
+ "description": "Mars — agent package manager for .agents/ directories",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/meridian-flow/mars-agents.git"
9
+ },
10
+ "bin": {
11
+ "mars": "bin/mars"
12
+ },
13
+ "files": ["bin/mars"],
14
+ "engines": {
15
+ "node": ">=16"
16
+ },
17
+ "optionalDependencies": {
18
+ "@meridian-flow/mars-agents-linux-x64": "0.0.1",
19
+ "@meridian-flow/mars-agents-linux-arm64": "0.0.1",
20
+ "@meridian-flow/mars-agents-darwin-arm64": "0.0.1",
21
+ "@meridian-flow/mars-agents-darwin-x64": "0.0.1"
22
+ }
23
+ }