@iron_adamant/trammel 0.0.0-stage → 4.0.1

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.
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { spawn } = require("child_process");
5
+ const path = require("path");
6
+
7
+ const names = {
8
+ "linux-x64": "@iron_adamant/trammel-linux-x64",
9
+ "linux-arm64": "@iron_adamant/trammel-linux-arm64",
10
+ "darwin-x64": "@iron_adamant/trammel-darwin-x64",
11
+ "darwin-arm64": "@iron_adamant/trammel-darwin-arm64",
12
+ "win32-x64": "@iron_adamant/trammel-windows-x64",
13
+ "win32-arm64": "@iron_adamant/trammel-windows-arm64",
14
+ };
15
+
16
+ function binary() {
17
+ const arch = process.arch === "arm64" ? "arm64" : "x64";
18
+ const pkg = names[`${process.platform}-${arch}`];
19
+ const file = process.platform === "win32" ? "trammel-mcp.exe" : "trammel-mcp";
20
+ if (!pkg) {
21
+ console.error("No Trammel MCP binary is published for " + process.platform + " " + process.arch);
22
+ process.exit(1);
23
+ }
24
+ try {
25
+ const root = path.dirname(require.resolve(pkg + "/package.json"));
26
+ return path.join(root, file);
27
+ } catch (err) {
28
+ console.error("The platform package " + pkg + " is not installed.");
29
+ process.exit(1);
30
+ }
31
+ }
32
+
33
+ const child = spawn(binary(), process.argv.slice(2), { stdio: "inherit" });
34
+ child.on("exit", (code, signal) => {
35
+ if (signal) process.kill(process.pid, signal);
36
+ process.exit(code == null ? 1 : code);
37
+ });
package/bin/trammel.js ADDED
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { spawn } = require("child_process");
5
+ const path = require("path");
6
+
7
+ const names = {
8
+ "linux-x64": "@iron_adamant/trammel-linux-x64",
9
+ "linux-arm64": "@iron_adamant/trammel-linux-arm64",
10
+ "darwin-x64": "@iron_adamant/trammel-darwin-x64",
11
+ "darwin-arm64": "@iron_adamant/trammel-darwin-arm64",
12
+ "win32-x64": "@iron_adamant/trammel-windows-x64",
13
+ "win32-arm64": "@iron_adamant/trammel-windows-arm64",
14
+ };
15
+
16
+ function target() {
17
+ const arch = process.arch === "arm64" ? "arm64" : "x64";
18
+ return names[`${process.platform}-${arch}`];
19
+ }
20
+
21
+ function binary() {
22
+ const pkg = target();
23
+ const file = process.platform === "win32" ? "trammel.exe" : "trammel";
24
+ if (!pkg) {
25
+ console.error("No Trammel binary is published for " + process.platform + " " + process.arch);
26
+ process.exit(1);
27
+ }
28
+ try {
29
+ const root = path.dirname(require.resolve(pkg + "/package.json"));
30
+ return path.join(root, file);
31
+ } catch (err) {
32
+ console.error(
33
+ "The platform package " + pkg + " is not installed. " +
34
+ "Install Trammel from the GitHub Release, or reinstall so the optional dependency for this OS is selected."
35
+ );
36
+ process.exit(1);
37
+ }
38
+ }
39
+
40
+ const child = spawn(binary(), process.argv.slice(2), { stdio: "inherit" });
41
+ child.on("exit", (code, signal) => {
42
+ if (signal) process.kill(process.pid, signal);
43
+ process.exit(code == null ? 1 : code);
44
+ });
package/package.json CHANGED
@@ -1,6 +1,24 @@
1
1
  {
2
2
  "name": "@iron_adamant/trammel",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "4.0.1",
4
+ "description": "Launcher for the Trammel planning binary. The Rust build has no npm dependencies.",
5
+ "mcpName": "io.github.IronAdamant/trammel",
6
+ "bin": {
7
+ "trammel": "bin/trammel.js",
8
+ "trammel-mcp": "bin/trammel-mcp.js"
9
+ },
10
+ "files": [
11
+ "bin"
12
+ ],
13
+ "optionalDependencies": {
14
+ "@iron_adamant/trammel-darwin-arm64": "4.0.1",
15
+ "@iron_adamant/trammel-darwin-x64": "4.0.1",
16
+ "@iron_adamant/trammel-linux-arm64": "4.0.1",
17
+ "@iron_adamant/trammel-linux-x64": "4.0.1",
18
+ "@iron_adamant/trammel-windows-arm64": "4.0.1",
19
+ "@iron_adamant/trammel-windows-x64": "4.0.1"
20
+ },
21
+ "engines": {
22
+ "node": ">=18"
23
+ }
24
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.