@actcore/act 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/bin/act +44 -0
- package/package.json +25 -0
package/bin/act
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execFileSync } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
const os = require("os");
|
|
6
|
+
|
|
7
|
+
const PLATFORMS = {
|
|
8
|
+
"linux-x64": "@actcore/act-cli-linux-x64",
|
|
9
|
+
"linux-arm64": "@actcore/act-cli-linux-arm64",
|
|
10
|
+
"linux-riscv64": "@actcore/act-cli-linux-riscv64",
|
|
11
|
+
"darwin-x64": "@actcore/act-cli-darwin-x64",
|
|
12
|
+
"darwin-arm64": "@actcore/act-cli-darwin-arm64",
|
|
13
|
+
"win32-x64": "@actcore/act-cli-win32-x64",
|
|
14
|
+
"win32-arm64": "@actcore/act-cli-win32-arm64",
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const platform = os.platform();
|
|
18
|
+
const arch = os.arch();
|
|
19
|
+
const key = `${platform}-${arch}`;
|
|
20
|
+
const pkg = PLATFORMS[key];
|
|
21
|
+
|
|
22
|
+
if (!pkg) {
|
|
23
|
+
console.error(`Unsupported platform: ${key}`);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let binPath;
|
|
28
|
+
try {
|
|
29
|
+
const pkgDir = path.dirname(require.resolve(`${pkg}/package.json`));
|
|
30
|
+
const ext = platform === "win32" ? ".exe" : "";
|
|
31
|
+
binPath = path.join(pkgDir, `act${ext}`);
|
|
32
|
+
} catch {
|
|
33
|
+
console.error(
|
|
34
|
+
`Could not find binary package ${pkg}. ` +
|
|
35
|
+
`Make sure optional dependencies are installed (npm install --include=optional).`
|
|
36
|
+
);
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const result = require("child_process").spawnSync(binPath, process.argv.slice(2), {
|
|
41
|
+
stdio: "inherit",
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
process.exit(result.status ?? 1);
|
package/package.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@actcore/act",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "CLI host for ACT (Agent Component Tools) WebAssembly components",
|
|
5
|
+
"license": "MIT OR Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/actcore/act-cli"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://actcore.dev",
|
|
11
|
+
"keywords": ["act", "wasm", "component-model", "mcp", "agent"],
|
|
12
|
+
"bin": {
|
|
13
|
+
"act": "bin/act"
|
|
14
|
+
},
|
|
15
|
+
"files": ["bin"],
|
|
16
|
+
"optionalDependencies": {
|
|
17
|
+
"@actcore/act-cli-linux-x64": "0.2.0",
|
|
18
|
+
"@actcore/act-cli-linux-arm64": "0.2.0",
|
|
19
|
+
"@actcore/act-cli-linux-riscv64": "0.2.0",
|
|
20
|
+
"@actcore/act-cli-darwin-x64": "0.2.0",
|
|
21
|
+
"@actcore/act-cli-darwin-arm64": "0.2.0",
|
|
22
|
+
"@actcore/act-cli-win32-x64": "0.2.0",
|
|
23
|
+
"@actcore/act-cli-win32-arm64": "0.2.0"
|
|
24
|
+
}
|
|
25
|
+
}
|