@tenkara/afm 0.0.0-stage → 4.0.0-alpha.6
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/afm-mcp.js +22 -0
- package/bin/afm.js +22 -0
- package/package.json +23 -5
- package/README.md +0 -3
package/bin/afm-mcp.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
const { spawnSync } = require("node:child_process");
|
|
4
|
+
|
|
5
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
6
|
+
const pkg = `@tenkara/afm-${platform}`;
|
|
7
|
+
const ext = process.platform === "win32" ? ".exe" : "";
|
|
8
|
+
let binary;
|
|
9
|
+
try {
|
|
10
|
+
binary = require.resolve(`${pkg}/bin/afm${ext}`);
|
|
11
|
+
} catch {
|
|
12
|
+
console.error(
|
|
13
|
+
`afm: no binary for ${platform}: ${pkg} is not installed. It is an optional dependency, so the install may have skipped it (--no-optional) or this platform is not supported.`,
|
|
14
|
+
);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
const result = spawnSync(binary, [...["mcp"], ...process.argv.slice(2)], { stdio: "inherit" });
|
|
18
|
+
if (result.error) {
|
|
19
|
+
console.error(`afm: cannot run ${binary}: ${result.error.message}`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
process.exit(result.status === null ? 1 : result.status);
|
package/bin/afm.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
const { spawnSync } = require("node:child_process");
|
|
4
|
+
|
|
5
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
6
|
+
const pkg = `@tenkara/afm-${platform}`;
|
|
7
|
+
const ext = process.platform === "win32" ? ".exe" : "";
|
|
8
|
+
let binary;
|
|
9
|
+
try {
|
|
10
|
+
binary = require.resolve(`${pkg}/bin/afm${ext}`);
|
|
11
|
+
} catch {
|
|
12
|
+
console.error(
|
|
13
|
+
`afm: no binary for ${platform}: ${pkg} is not installed. It is an optional dependency, so the install may have skipped it (--no-optional) or this platform is not supported.`,
|
|
14
|
+
);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
const result = spawnSync(binary, [...[], ...process.argv.slice(2)], { stdio: "inherit" });
|
|
18
|
+
if (result.error) {
|
|
19
|
+
console.error(`afm: cannot run ${binary}: ${result.error.message}`);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
process.exit(result.status === null ? 1 : result.status);
|
package/package.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@tenkara/afm",
|
|
3
|
+
"version": "4.0.0-alpha.6",
|
|
4
|
+
"description": "AFM (Agent Flow Methodology): the afm CLI and the afm-mcp server (`afm mcp`), as one compiled binary per platform.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"bin": {
|
|
10
|
+
"afm": "bin/afm.js",
|
|
11
|
+
"afm-mcp": "bin/afm-mcp.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"bin"
|
|
15
|
+
],
|
|
16
|
+
"optionalDependencies": {
|
|
17
|
+
"@tenkara/afm-linux-x64": "4.0.0-alpha.6",
|
|
18
|
+
"@tenkara/afm-linux-arm64": "4.0.0-alpha.6",
|
|
19
|
+
"@tenkara/afm-darwin-x64": "4.0.0-alpha.6",
|
|
20
|
+
"@tenkara/afm-darwin-arm64": "4.0.0-alpha.6",
|
|
21
|
+
"@tenkara/afm-win32-x64": "4.0.0-alpha.6",
|
|
22
|
+
"@tenkara/afm-win32-arm64": "4.0.0-alpha.6"
|
|
23
|
+
}
|
|
24
|
+
}
|
package/README.md
DELETED