@atheory-ai/skillex 0.6.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/.gitkeep ADDED
File without changes
package/bin/skillex.js ADDED
@@ -0,0 +1,71 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ // This script is the platform selector shim for @atheory-ai/skillex.
5
+ //
6
+ // npm installs only the optionalDependency that matches the current
7
+ // platform (via the "os" and "cpu" fields in each platform package).
8
+ // This script resolves which platform package was installed, locates
9
+ // its binary, and exec's it — passing all arguments through.
10
+
11
+ const { execFileSync } = require("child_process");
12
+ const path = require("path");
13
+
14
+ // Maps process.platform + process.arch to the npm package name.
15
+ const PLATFORM_PACKAGES = {
16
+ "darwin-arm64": "@atheory-ai/skillex-darwin-arm64",
17
+ "darwin-x64": "@atheory-ai/skillex-darwin-x64",
18
+ "linux-x64": "@atheory-ai/skillex-linux-x64",
19
+ "linux-arm64": "@atheory-ai/skillex-linux-arm64",
20
+ "win32-x64": "@atheory-ai/skillex-win32-x64",
21
+ };
22
+
23
+ function getBinaryPath() {
24
+ const key = `${process.platform}-${process.arch}`;
25
+ const packageName = PLATFORM_PACKAGES[key];
26
+
27
+ if (!packageName) {
28
+ throw new Error(
29
+ `skillex: unsupported platform "${key}"\n` +
30
+ `Supported platforms: ${Object.keys(PLATFORM_PACKAGES).join(", ")}\n` +
31
+ `\nPlease open an issue at https://github.com/atheory-ai/skillex/issues`
32
+ );
33
+ }
34
+
35
+ let packageDir;
36
+ try {
37
+ // require.resolve finds the package.json of the platform package,
38
+ // which npm installed (or skipped if the platform didn't match).
39
+ packageDir = path.dirname(require.resolve(`${packageName}/package.json`));
40
+ } catch {
41
+ throw new Error(
42
+ `skillex: the platform package "${packageName}" is not installed.\n` +
43
+ `\nThis usually happens when optional dependencies were skipped. Try:\n` +
44
+ ` npm install --include=optional\n` +
45
+ ` pnpm install\n` +
46
+ ` yarn install`
47
+ );
48
+ }
49
+
50
+ const isWindows = process.platform === "win32";
51
+ return path.join(packageDir, "bin", isWindows ? "skillex.exe" : "skillex");
52
+ }
53
+
54
+ let binaryPath;
55
+ try {
56
+ binaryPath = getBinaryPath();
57
+ } catch (err) {
58
+ process.stderr.write(err.message + "\n");
59
+ process.exit(1);
60
+ }
61
+
62
+ try {
63
+ execFileSync(binaryPath, process.argv.slice(2), {
64
+ stdio: "inherit",
65
+ windowsHide: false,
66
+ });
67
+ } catch (err) {
68
+ // execFileSync throws when the child exits non-zero.
69
+ // The child already printed its own output; we just mirror the exit code.
70
+ process.exit(err.status ?? 1);
71
+ }
package/package.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@atheory-ai/skillex",
3
+ "version": "0.6.0",
4
+ "description": "Skill management for AI agents in Node.js projects",
5
+ "license": "Apache-2.0",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/atheory-ai/skillex"
9
+ },
10
+ "bin": {
11
+ "skillex": "bin/skillex.js"
12
+ },
13
+ "files": [
14
+ "bin/"
15
+ ],
16
+ "engines": {
17
+ "node": ">=18"
18
+ },
19
+ "optionalDependencies": {
20
+ "@atheory-ai/skillex-darwin-arm64": "0.6.0",
21
+ "@atheory-ai/skillex-darwin-x64": "0.6.0",
22
+ "@atheory-ai/skillex-linux-x64": "0.6.0",
23
+ "@atheory-ai/skillex-linux-arm64": "0.6.0",
24
+ "@atheory-ai/skillex-win32-x64": "0.6.0"
25
+ }
26
+ }