@open330/agt 2026.2.19
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/agt.js +39 -0
- package/package.json +33 -0
- package/platforms/darwin-arm64/bin/agt +0 -0
- package/platforms/darwin-arm64/package.json +22 -0
- package/platforms/darwin-x64/bin/agt +0 -0
- package/platforms/darwin-x64/package.json +22 -0
- package/platforms/linux-arm64/bin/agt +0 -0
- package/platforms/linux-arm64/package.json +22 -0
- package/platforms/linux-x64/bin/agt +0 -0
- package/platforms/linux-x64/package.json +22 -0
- package/scripts/postinstall.js +88 -0
package/bin/agt.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execFileSync } = require("child_process");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const PLATFORM_MAP = {
|
|
7
|
+
"darwin-arm64": "@open330/agt-darwin-arm64",
|
|
8
|
+
"darwin-x64": "@open330/agt-darwin-x64",
|
|
9
|
+
"linux-x64": "@open330/agt-linux-x64",
|
|
10
|
+
"linux-arm64": "@open330/agt-linux-arm64",
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
14
|
+
const binName = process.platform === "win32" ? "agt.exe" : "agt";
|
|
15
|
+
|
|
16
|
+
let binary;
|
|
17
|
+
|
|
18
|
+
// Try platform-specific optional dependency
|
|
19
|
+
const pkg = PLATFORM_MAP[platform];
|
|
20
|
+
if (pkg) {
|
|
21
|
+
try {
|
|
22
|
+
binary = require.resolve(`${pkg}/bin/${binName}`);
|
|
23
|
+
} catch {}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Fallback: binary downloaded by postinstall
|
|
27
|
+
if (!binary) {
|
|
28
|
+
binary = path.join(__dirname, binName);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
try {
|
|
32
|
+
execFileSync(binary, process.argv.slice(2), { stdio: "inherit" });
|
|
33
|
+
} catch (e) {
|
|
34
|
+
if (e.status !== undefined) {
|
|
35
|
+
process.exit(e.status);
|
|
36
|
+
}
|
|
37
|
+
console.error(`Failed to run agt: ${e.message}`);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@open330/agt",
|
|
3
|
+
"version": "2026.2.19",
|
|
4
|
+
"description": "Agent Skills CLI — manage AI agent skills and personas",
|
|
5
|
+
"bin": {
|
|
6
|
+
"agt": "bin/agt.js"
|
|
7
|
+
},
|
|
8
|
+
"scripts": {
|
|
9
|
+
"postinstall": "node scripts/postinstall.js"
|
|
10
|
+
},
|
|
11
|
+
"optionalDependencies": {
|
|
12
|
+
"@open330/agt-darwin-arm64": "2026.2.19",
|
|
13
|
+
"@open330/agt-darwin-x64": "2026.2.19",
|
|
14
|
+
"@open330/agt-linux-x64": "2026.2.19",
|
|
15
|
+
"@open330/agt-linux-arm64": "2026.2.19"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/jiunbae/agent-skills"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"agent",
|
|
23
|
+
"skills",
|
|
24
|
+
"personas",
|
|
25
|
+
"cli",
|
|
26
|
+
"ai"
|
|
27
|
+
],
|
|
28
|
+
"author": "jiunbae",
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@open330/agt-darwin-arm64",
|
|
3
|
+
"version": "2026.2.19",
|
|
4
|
+
"description": "agt binary for macOS Apple Silicon (arm64)",
|
|
5
|
+
"os": [
|
|
6
|
+
"darwin"
|
|
7
|
+
],
|
|
8
|
+
"cpu": [
|
|
9
|
+
"arm64"
|
|
10
|
+
],
|
|
11
|
+
"bin": {
|
|
12
|
+
"agt": "bin/agt"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/jiunbae/agent-skills"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@open330/agt-darwin-x64",
|
|
3
|
+
"version": "2026.2.19",
|
|
4
|
+
"description": "agt binary for macOS Intel (x64)",
|
|
5
|
+
"os": [
|
|
6
|
+
"darwin"
|
|
7
|
+
],
|
|
8
|
+
"cpu": [
|
|
9
|
+
"x64"
|
|
10
|
+
],
|
|
11
|
+
"bin": {
|
|
12
|
+
"agt": "bin/agt"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/jiunbae/agent-skills"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@open330/agt-linux-arm64",
|
|
3
|
+
"version": "2026.2.19",
|
|
4
|
+
"description": "agt binary for Linux ARM64",
|
|
5
|
+
"os": [
|
|
6
|
+
"linux"
|
|
7
|
+
],
|
|
8
|
+
"cpu": [
|
|
9
|
+
"arm64"
|
|
10
|
+
],
|
|
11
|
+
"bin": {
|
|
12
|
+
"agt": "bin/agt"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/jiunbae/agent-skills"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@open330/agt-linux-x64",
|
|
3
|
+
"version": "2026.2.19",
|
|
4
|
+
"description": "agt binary for Linux x64",
|
|
5
|
+
"os": [
|
|
6
|
+
"linux"
|
|
7
|
+
],
|
|
8
|
+
"cpu": [
|
|
9
|
+
"x64"
|
|
10
|
+
],
|
|
11
|
+
"bin": {
|
|
12
|
+
"agt": "bin/agt"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/jiunbae/agent-skills"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
const { execSync } = require("child_process");
|
|
2
|
+
const fs = require("fs");
|
|
3
|
+
const path = require("path");
|
|
4
|
+
const https = require("https");
|
|
5
|
+
|
|
6
|
+
const PLATFORM_MAP = {
|
|
7
|
+
"darwin-arm64": "aarch64-apple-darwin",
|
|
8
|
+
"darwin-x64": "x86_64-apple-darwin",
|
|
9
|
+
"linux-x64": "x86_64-unknown-linux-musl",
|
|
10
|
+
"linux-arm64": "aarch64-unknown-linux-musl",
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
14
|
+
const rustTarget = PLATFORM_MAP[platform];
|
|
15
|
+
|
|
16
|
+
if (!rustTarget) {
|
|
17
|
+
console.warn(`[agt] Unsupported platform: ${platform}`);
|
|
18
|
+
process.exit(0);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Check if binary already exists (from optionalDependencies)
|
|
22
|
+
const binDir = path.join(__dirname, "..", "bin");
|
|
23
|
+
const binPath = path.join(binDir, "agt");
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
// Try resolving from optional dependency
|
|
27
|
+
const pkg = `@open330/agt-${platform}`;
|
|
28
|
+
require.resolve(`${pkg}/bin/agt`);
|
|
29
|
+
// Binary available via optional dep, nothing to do
|
|
30
|
+
process.exit(0);
|
|
31
|
+
} catch {}
|
|
32
|
+
|
|
33
|
+
// Binary not found via optionalDependencies — download from GitHub releases
|
|
34
|
+
const pkg = JSON.parse(
|
|
35
|
+
fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8")
|
|
36
|
+
);
|
|
37
|
+
const version = `v${pkg.version}`;
|
|
38
|
+
const repo = "jiunbae/agent-skills";
|
|
39
|
+
const asset = `agt-${rustTarget}.tar.gz`;
|
|
40
|
+
const url = `https://github.com/${repo}/releases/download/${version}/${asset}`;
|
|
41
|
+
|
|
42
|
+
console.log(`[agt] Downloading binary for ${platform}...`);
|
|
43
|
+
|
|
44
|
+
function download(url, dest) {
|
|
45
|
+
return new Promise((resolve, reject) => {
|
|
46
|
+
const follow = (url) => {
|
|
47
|
+
https
|
|
48
|
+
.get(url, { headers: { "User-Agent": "agt-postinstall" } }, (res) => {
|
|
49
|
+
if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
|
|
50
|
+
follow(res.headers.location);
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (res.statusCode !== 200) {
|
|
54
|
+
reject(new Error(`Download failed: HTTP ${res.statusCode}`));
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const file = fs.createWriteStream(dest);
|
|
58
|
+
res.pipe(file);
|
|
59
|
+
file.on("finish", () => {
|
|
60
|
+
file.close();
|
|
61
|
+
resolve();
|
|
62
|
+
});
|
|
63
|
+
})
|
|
64
|
+
.on("error", reject);
|
|
65
|
+
};
|
|
66
|
+
follow(url);
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function main() {
|
|
71
|
+
const tmp = path.join(binDir, `agt-${platform}.tar.gz`);
|
|
72
|
+
|
|
73
|
+
try {
|
|
74
|
+
fs.mkdirSync(binDir, { recursive: true });
|
|
75
|
+
await download(url, tmp);
|
|
76
|
+
execSync(`tar -xzf "${tmp}" -C "${binDir}"`, { stdio: "pipe" });
|
|
77
|
+
fs.chmodSync(binPath, 0o755);
|
|
78
|
+
fs.unlinkSync(tmp);
|
|
79
|
+
console.log(`[agt] Binary installed successfully.`);
|
|
80
|
+
} catch (e) {
|
|
81
|
+
console.warn(`[agt] Failed to download binary: ${e.message}`);
|
|
82
|
+
console.warn(`[agt] You can install manually from: ${url}`);
|
|
83
|
+
// Don't fail install — binary is optional enhancement
|
|
84
|
+
try { fs.unlinkSync(tmp); } catch {}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
main();
|