shin-engine 1.0.5 → 1.0.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.
Files changed (2) hide show
  1. package/bin/ee.js +17 -6
  2. package/package.json +1 -1
package/bin/ee.js CHANGED
@@ -59,22 +59,33 @@ function isRunning() {
59
59
  } catch { return false; }
60
60
  }
61
61
 
62
+ function installJava() {
63
+ try {
64
+ execSync("winget install --id EclipseAdoptium.Temurin.21.JDK --accept-package-agreements --silent 2>&1", { encoding: "utf-8", timeout: 120000 });
65
+ ok("Java 21 installed via winget");
66
+ } catch {
67
+ log(" Auto-install failed. Install manually from: https://adoptium.net/");
68
+ process.exit(1);
69
+ }
70
+ }
71
+
62
72
  async function ensureSetup() {
63
73
  if (existsSync(JAR)) return true;
64
74
 
65
75
  step("SHIN first-time setup");
66
76
 
67
- // Check Java
77
+ // Check/Install Java
68
78
  try {
69
79
  const v = execSync("java -version 2>&1", { encoding: "utf-8" });
70
80
  if (!v.match(/"(\d+)/) || parseInt(v.match(/"(\d+)/)[1]) < 21) {
71
- log(" Java 21+ required. Install from: https://adoptium.net/");
72
- return false;
81
+ log(" Java version too old. Installing Java 21...");
82
+ installJava();
83
+ } else {
84
+ ok("Java found");
73
85
  }
74
- ok("Java found");
75
86
  } catch {
76
- log(" Java 21+ required. Install from: https://adoptium.net/");
77
- return false;
87
+ log(" Java not found. Installing Java 21...");
88
+ installJava();
78
89
  }
79
90
 
80
91
  // Download EE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shin-engine",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "Engineering Experience Engine — engineering judgment for AI coding agents",
5
5
  "bin": {
6
6
  "shin": "bin/ee.js"