a2ald 0.1.2 → 0.1.5
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/README.md +36 -0
- package/bin/a2ald +16 -16
- package/index.js +38 -38
- package/package.json +35 -35
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# a2ald
|
|
2
|
+
|
|
3
|
+
npm distribution of the **A2AL daemon** (`a2ald`): decentralized agent networking for AI agents.
|
|
4
|
+
|
|
5
|
+
The main package pulls in the correct **platform binary** via optional dependencies (`@a2al/a2ald-*`). Install once; the right binary is selected for Linux, macOS, or Windows (x64/arm64 where applicable).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install a2ald
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Programmatic use
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
const { getBinaryPath } = require("a2ald");
|
|
17
|
+
const bin = getBinaryPath();
|
|
18
|
+
// spawn or exec `bin` as your process needs
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## CLI
|
|
22
|
+
|
|
23
|
+
After install, the `a2ald` binary is available where npm links local binaries (e.g. `npx a2ald` or your `node_modules/.bin`).
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx a2ald --help
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Documentation
|
|
30
|
+
|
|
31
|
+
- Repository & full docs: [github.com/a2al/a2al](https://github.com/a2al/a2al)
|
|
32
|
+
- User-facing guides live under the repo `doc/` directory.
|
|
33
|
+
|
|
34
|
+
## License
|
|
35
|
+
|
|
36
|
+
[MPL-2.0](https://www.mozilla.org/MPL/2.0/)
|
package/bin/a2ald
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
const { getBinaryPath } = require("..");
|
|
5
|
-
const { spawnSync } = require("child_process");
|
|
6
|
-
|
|
7
|
-
let bin;
|
|
8
|
-
try {
|
|
9
|
-
bin = getBinaryPath();
|
|
10
|
-
} catch (e) {
|
|
11
|
-
process.stderr.write(e.message + "\n");
|
|
12
|
-
process.exit(1);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
|
|
16
|
-
process.exit(result.status != null ? result.status : 1);
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const { getBinaryPath } = require("..");
|
|
5
|
+
const { spawnSync } = require("child_process");
|
|
6
|
+
|
|
7
|
+
let bin;
|
|
8
|
+
try {
|
|
9
|
+
bin = getBinaryPath();
|
|
10
|
+
} catch (e) {
|
|
11
|
+
process.stderr.write(e.message + "\n");
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const result = spawnSync(bin, process.argv.slice(2), { stdio: "inherit" });
|
|
16
|
+
process.exit(result.status != null ? result.status : 1);
|
package/index.js
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
const os = require("os");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
|
|
6
|
-
const PLATFORM_PACKAGES = {
|
|
7
|
-
"linux-x64": "@a2al/a2ald-linux-x64",
|
|
8
|
-
"linux-arm64": "@a2al/a2ald-linux-arm64",
|
|
9
|
-
"darwin-x64": "@a2al/a2ald-darwin-x64",
|
|
10
|
-
"darwin-arm64": "@a2al/a2ald-darwin-arm64",
|
|
11
|
-
"win32-x64": "@a2al/a2ald-win32-x64",
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Returns the absolute path to the a2ald binary for the current platform.
|
|
16
|
-
* @throws {Error} if the platform is unsupported or the platform package is not installed.
|
|
17
|
-
*/
|
|
18
|
-
function getBinaryPath() {
|
|
19
|
-
const key = `${os.platform()}-${os.arch()}`;
|
|
20
|
-
const pkg = PLATFORM_PACKAGES[key];
|
|
21
|
-
if (!pkg) {
|
|
22
|
-
throw new Error(
|
|
23
|
-
`a2ald: unsupported platform ${key}. ` +
|
|
24
|
-
`Supported: ${Object.keys(PLATFORM_PACKAGES).join(", ")}`
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
const exe = os.platform() === "win32" ? "a2ald.exe" : "a2ald";
|
|
28
|
-
try {
|
|
29
|
-
return require.resolve(`${pkg}/bin/${exe}`);
|
|
30
|
-
} catch {
|
|
31
|
-
throw new Error(
|
|
32
|
-
`a2ald: platform package ${pkg} is not installed. ` +
|
|
33
|
-
`Try: npm install ${pkg}`
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
module.exports = { getBinaryPath };
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const os = require("os");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const PLATFORM_PACKAGES = {
|
|
7
|
+
"linux-x64": "@a2al/a2ald-linux-x64",
|
|
8
|
+
"linux-arm64": "@a2al/a2ald-linux-arm64",
|
|
9
|
+
"darwin-x64": "@a2al/a2ald-darwin-x64",
|
|
10
|
+
"darwin-arm64": "@a2al/a2ald-darwin-arm64",
|
|
11
|
+
"win32-x64": "@a2al/a2ald-win32-x64",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Returns the absolute path to the a2ald binary for the current platform.
|
|
16
|
+
* @throws {Error} if the platform is unsupported or the platform package is not installed.
|
|
17
|
+
*/
|
|
18
|
+
function getBinaryPath() {
|
|
19
|
+
const key = `${os.platform()}-${os.arch()}`;
|
|
20
|
+
const pkg = PLATFORM_PACKAGES[key];
|
|
21
|
+
if (!pkg) {
|
|
22
|
+
throw new Error(
|
|
23
|
+
`a2ald: unsupported platform ${key}. ` +
|
|
24
|
+
`Supported: ${Object.keys(PLATFORM_PACKAGES).join(", ")}`
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
const exe = os.platform() === "win32" ? "a2ald.exe" : "a2ald";
|
|
28
|
+
try {
|
|
29
|
+
return require.resolve(`${pkg}/bin/${exe}`);
|
|
30
|
+
} catch {
|
|
31
|
+
throw new Error(
|
|
32
|
+
`a2ald: platform package ${pkg} is not installed. ` +
|
|
33
|
+
`Try: npm install ${pkg}`
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
module.exports = { getBinaryPath };
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "a2ald",
|
|
3
|
+
"version": "0.1.5",
|
|
4
|
+
"description": "A2AL daemon 鈥?decentralized agent networking for AI agents",
|
|
5
|
+
"license": "MPL-2.0",
|
|
6
|
+
"homepage": "https://github.com/a2al/a2al",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/a2al/a2al.git",
|
|
10
|
+
"directory": "npm/a2ald"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"a2al",
|
|
14
|
+
"agent",
|
|
15
|
+
"mcp",
|
|
16
|
+
"p2p",
|
|
17
|
+
"decentralized",
|
|
18
|
+
"ai"
|
|
19
|
+
],
|
|
20
|
+
"bin": {
|
|
21
|
+
"a2ald": "bin/a2ald"
|
|
22
|
+
},
|
|
23
|
+
"main": "index.js",
|
|
24
|
+
"files": [
|
|
25
|
+
"bin",
|
|
26
|
+
"index.js"
|
|
27
|
+
],
|
|
28
|
+
"optionalDependencies": {
|
|
29
|
+
"@a2al/a2ald-linux-x64": "0.1.5",
|
|
30
|
+
"@a2al/a2ald-linux-arm64": "0.1.5",
|
|
31
|
+
"@a2al/a2ald-darwin-x64": "0.1.5",
|
|
32
|
+
"@a2al/a2ald-darwin-arm64": "0.1.5",
|
|
33
|
+
"@a2al/a2ald-win32-x64": "0.1.5"
|
|
34
|
+
}
|
|
35
|
+
}
|