ework-aio 0.2.4 → 0.2.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ework-aio",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "All-in-one installer for ework (issue tracker) + ework-daemon (AI bridge) + opencode-ework (plugin). One command: npm i -g ework-aio && ework-aio install.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/cli.ts CHANGED
@@ -35,7 +35,7 @@ import {
35
35
  type ConfigArgs,
36
36
  } from "./commands/config.ts";
37
37
 
38
- const VERSION = "0.2.4-dev";
38
+ const VERSION = "0.2.5-dev";
39
39
 
40
40
  const USAGE = `ework-aio <command> [options]
41
41
 
@@ -97,20 +97,35 @@ export async function runInstall(
97
97
  logger.ok(`preflight: bun, npm, opencode all on PATH`);
98
98
 
99
99
  // 2. Resolve ework-web / ework-daemon binaries (npm-installed global bins).
100
+ //
101
+ // ework-daemon ships TWO bins: `ework-daemon` (client CLI: status/issues/...)
102
+ // and `ework-daemon-server` (actual HTTP server). We start the SERVER, not
103
+ // the client — pre-v0.2.5 we spawned the client, which prints help and
104
+ // exits, leaving the daemon "looking dead" with a help-text log.
100
105
  const webBin = resolveCommand("ework-web");
101
- const daemonBin = resolveCommand("ework-daemon");
106
+ const daemonClientBin = resolveCommand("ework-daemon");
107
+ const daemonServerBin = resolveCommand("ework-daemon-server");
102
108
  if (!webBin) {
103
109
  throw new InstallError(
104
110
  `ework-web binary not found on PATH. Install with: npm install -g ework-web`,
105
111
  );
106
112
  }
107
- if (!daemonBin) {
113
+ if (!daemonClientBin && !daemonServerBin) {
114
+ throw new InstallError(
115
+ `ework-daemon not installed. Install with: npm install -g ework-daemon`,
116
+ );
117
+ }
118
+ if (!daemonServerBin) {
119
+ // Client CLI present but server bin missing — old / partial install.
108
120
  throw new InstallError(
109
- `ework-daemon binary not found on PATH. Install with: npm install -g ework-daemon`,
121
+ `ework-daemon-server binary not found on PATH, but ework-daemon (client) is present. ` +
122
+ `Your ework-daemon npm install is incomplete or outdated. Reinstall with: ` +
123
+ `npm install -g ework-daemon@latest`,
110
124
  );
111
125
  }
112
- logger.ok(`web bin : ${webBin}`);
113
- logger.ok(`daemon bin : ${daemonBin}`);
126
+ logger.ok(`web bin : ${webBin}`);
127
+ logger.ok(`daemon client : ${daemonClientBin ?? "(not on PATH)"}`);
128
+ logger.ok(`daemon server : ${daemonServerBin}`);
114
129
 
115
130
  // 3. Resolve all filesystem paths.
116
131
  const paths = resolvePaths({
@@ -349,7 +364,7 @@ export async function runInstall(
349
364
  user: userInfo.username,
350
365
  group: userInfo.username,
351
366
  binPath: preflight.found.get("bun")!,
352
- mainScript: daemonBin,
367
+ mainScript: daemonServerBin,
353
368
  envFile: paths.daemonEnvFile,
354
369
  workingDirectory: paths.daemonDataDir,
355
370
  logFile: paths.daemonLogFile,
@@ -388,7 +403,7 @@ export async function runInstall(
388
403
  logger.log(`starting ework-daemon (PID-file mode)...`);
389
404
  const env = await loadEnvIntoProcess(paths.daemonEnvFile);
390
405
  const { pid } = await startProcess({
391
- cmd: daemonBin,
406
+ cmd: daemonServerBin,
392
407
  args: [],
393
408
  cwd: paths.daemonDataDir,
394
409
  env,
@@ -41,7 +41,11 @@ function servicePaths(paths: PathConfig, svc: "web" | "daemon"): ServicePaths {
41
41
  };
42
42
  }
43
43
  return {
44
- bin: "ework-daemon",
44
+ // ework-daemon ships two bins; only `ework-daemon-server` actually starts
45
+ // the HTTP server. The `ework-daemon` bin is a client CLI that prints help
46
+ // and exits — spawning it leaves the daemon "looking dead" with help text
47
+ // in the log. See install.ts preflight for the full rationale.
48
+ bin: "ework-daemon-server",
45
49
  dataDir: paths.daemonDataDir,
46
50
  envFile: paths.daemonEnvFile,
47
51
  pidFile: paths.daemonPidFile,