shin-engine 1.0.2 → 1.0.4

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 +28 -14
  2. package/package.json +1 -1
package/bin/ee.js CHANGED
@@ -51,7 +51,7 @@ function isRunning() {
51
51
  async function ensureSetup() {
52
52
  if (existsSync(JAR)) return true;
53
53
 
54
- step("First-time setup");
54
+ step("SHIN first-time setup");
55
55
 
56
56
  // Check Java
57
57
  try {
@@ -67,7 +67,7 @@ async function ensureSetup() {
67
67
  }
68
68
 
69
69
  // Download EE
70
- step("Downloading EE (" + RELEASE_URL + ")");
70
+ step("Downloading SHIN (" + RELEASE_URL + ")");
71
71
  if (!existsSync(EE_HOME)) mkdirSync(EE_HOME, { recursive: true });
72
72
  const zipPath = join(os.tmpdir(), "ee.zip");
73
73
  try {
@@ -112,12 +112,18 @@ async function ensureSetup() {
112
112
  }
113
113
 
114
114
  async function main() {
115
- if (!cmd || cmd === "start") {
116
- if (isRunning()) { log("EE is already running on port " + PORT); return; }
115
+ if (!cmd) {
116
+ log("Usage: shin <command>");
117
+ log("Run 'shin --help' for options");
118
+ return;
119
+ }
120
+
121
+ if (cmd === "start") {
122
+ if (isRunning()) { log("SHIN is already running on port " + PORT); return; }
117
123
  const setup = await ensureSetup();
118
124
  if (!setup) { process.exit(1); }
119
125
 
120
- step("Starting EE backend...");
126
+ step("Starting SHIN backend...");
121
127
  const env = { ...process.env, ENGINEERING_BRAIN_PATH: BRAIN_DIR };
122
128
  const child = spawn("java", [
123
129
  "-jar", JAR,
@@ -128,7 +134,7 @@ async function main() {
128
134
  for (let i = 0; i < 30; i++) {
129
135
  await sleep(1000);
130
136
  if (isRunning()) {
131
- log("EE ready on port " + PORT);
137
+ log("SHIN ready on port " + PORT);
132
138
  log("\nTell your OpenCode agent: 'load the engineering-experience-engine skill'");
133
139
  return;
134
140
  }
@@ -143,32 +149,40 @@ async function main() {
143
149
  `powershell -Command "$conn = Get-NetTCPConnection -LocalPort ${PORT} -ErrorAction SilentlyContinue; if ($conn) { $pids = $conn.OwningProcess; $pids | ForEach-Object { Stop-Process -Id $_ -Force -ErrorAction SilentlyContinue }; Write-Output 'stopped' } else { Write-Output 'not running' }"`,
144
150
  { encoding: "utf-8", timeout: 10000 }
145
151
  );
146
- log("EE stopped");
147
- } catch { log("EE not running"); }
152
+ log("SHIN stopped");
153
+ } catch { log("SHIN not running"); }
148
154
  return;
149
155
  }
150
156
 
151
157
  if (cmd === "status") {
152
158
  if (isRunning()) {
153
- log("EE is running on port " + PORT);
159
+ log("SHIN is running on port " + PORT);
154
160
  } else {
155
- log("EE is not running");
161
+ log("SHIN is not running");
156
162
  }
157
163
  return;
158
164
  }
159
165
 
166
+ if (cmd === "view") {
167
+ if (!isRunning()) { log("SHIN is not running. Run 'shin start' first."); return; }
168
+ execSync("powershell -Command \"Start-Process 'http://localhost:" + PORT + "'\"", { timeout: 5000 });
169
+ log("Opening SHIN dashboard...");
170
+ return;
171
+ }
172
+
160
173
  if (cmd === "--help" || cmd === "-h") {
161
174
  log("Usage: shin <command>");
162
175
  log("");
163
176
  log("Commands:");
164
- log(" shin start Start the EE backend (first run downloads + installs)");
165
- log(" shin stop Stop the EE backend");
166
- log(" shin status Check if EE is running");
177
+ log(" shin start Start the SHIN backend (first run downloads + installs)");
178
+ log(" shin stop Stop the SHIN backend");
179
+ log(" shin status Check if SHIN is running");
180
+ log(" shin view Open the SHIN dashboard in browser");
167
181
  return;
168
182
  }
169
183
 
170
184
  log("Unknown command: " + cmd);
171
- log("Run 'ee --help' for usage");
185
+ log("Run 'shin --help' for usage");
172
186
  }
173
187
 
174
188
  main().catch(e => { console.error(e); process.exit(1); });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shin-engine",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Engineering Experience Engine — engineering judgment for AI coding agents",
5
5
  "bin": {
6
6
  "shin": "bin/ee.js"