@unbrained/pm-web 2026.6.2-1 → 2026.6.2
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/CHANGELOG.md +0 -15
- package/README.md +1 -49
- package/dist/index.js +6 -351
- package/dist/index.js.map +1 -1
- package/dist/server.js +2 -13
- package/dist/server.js.map +1 -1
- package/manifest.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,5 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 2026.6.2-1 - 2026-06-02
|
|
4
|
-
|
|
5
|
-
### Added
|
|
6
|
-
|
|
7
|
-
- Do NOT add the 'services' extension capability to pm-web ([pm-web-vyfp](https://github.com/unbraind/pm-web/blob/main/.agents/pm/decisions/pm-web-vyfp.toon))
|
|
8
|
-
- Deepen pm-web extension command surface \(status/stop/doctor\) + services-capability evaluation ([pm-web-7pxa](https://github.com/unbraind/pm-web/blob/main/.agents/pm/features/pm-web-7pxa.toon))
|
|
9
|
-
- Add /healthz version + unit tests + README docs ([pm-web-edyj](https://github.com/unbraind/pm-web/blob/main/.agents/pm/tasks/pm-web-edyj.toon))
|
|
10
|
-
- Introduce CommandError \(numeric exitCode\) for new handlers ([pm-web-9ycn](https://github.com/unbraind/pm-web/blob/main/.agents/pm/tasks/pm-web-9ycn.toon))
|
|
11
|
-
|
|
12
|
-
### Other
|
|
13
|
-
|
|
14
|
-
- Implement 'pm web doctor' command ([pm-web-vyqb](https://github.com/unbraind/pm-web/blob/main/.agents/pm/tasks/pm-web-vyqb.toon))
|
|
15
|
-
- Implement 'pm web stop' command + pidfile-on-detach ([pm-web-odwq](https://github.com/unbraind/pm-web/blob/main/.agents/pm/tasks/pm-web-odwq.toon))
|
|
16
|
-
- Implement 'pm web status' command ([pm-web-8eqs](https://github.com/unbraind/pm-web/blob/main/.agents/pm/tasks/pm-web-8eqs.toon))
|
|
17
|
-
|
|
18
3
|
## 2026.05.30 - 2026-05-30
|
|
19
4
|
|
|
20
5
|
### Fixed
|
package/README.md
CHANGED
|
@@ -52,55 +52,8 @@ The package repository is at **github.com/unbraind/pm-web**.
|
|
|
52
52
|
|
|
53
53
|
| Command | Description |
|
|
54
54
|
|---|---|
|
|
55
|
-
| `pm web` | Start the pm-web server
|
|
55
|
+
| `pm web` | Start the pm-web server |
|
|
56
56
|
| `pm web --port 8080` | Start on a custom port |
|
|
57
|
-
| `pm web --detach` | Start the server in the background (tracked via a pidfile) |
|
|
58
|
-
| `pm web status` | Report whether a server is reachable (probes `/healthz`); `--json` supported |
|
|
59
|
-
| `pm web stop` | Stop a server previously started with `--detach`; `--json` supported |
|
|
60
|
-
| `pm web doctor` | Preflight diagnostics (Node, runtime deps, port, pm, workspace); `--json` supported |
|
|
61
|
-
|
|
62
|
-
#### `pm web status`
|
|
63
|
-
|
|
64
|
-
Probes `http://localhost:<port>/healthz` and reports `up`/`down`, the responding
|
|
65
|
-
port, and the server version. Never errors when the server is down — it returns a
|
|
66
|
-
structured `down` result. The port is resolved from `--port`, then `PORT`, then
|
|
67
|
-
the default `4000`.
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
pm web status # human-readable
|
|
71
|
-
pm web status --port 8080 --json
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
#### `pm web stop`
|
|
75
|
-
|
|
76
|
-
Stops a server started with `pm web --detach`. The detached PID is recorded in a
|
|
77
|
-
pidfile (under `PM_WEB_STATE_DIR` if set, otherwise the OS temp dir, keyed by
|
|
78
|
-
port). `pm web stop` reads the pidfile, sends `SIGTERM`, and clears the pidfile.
|
|
79
|
-
If nothing is running it reports `not_running` gracefully and cleans up any stale
|
|
80
|
-
pidfile.
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
pm web stop # stops the server on the default port
|
|
84
|
-
pm web stop --port 8080 --json
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
#### `pm web doctor`
|
|
88
|
-
|
|
89
|
-
Runs preflight checks before starting the server: Node version (>= 20), whether
|
|
90
|
-
runtime dependencies (express, etc.) are installed, whether the target port is
|
|
91
|
-
free, whether `pm` is on `PATH`, and whether the workspace is initialized.
|
|
92
|
-
Returns an overall `ok` boolean. The `port_available` check is informational (a
|
|
93
|
-
busy port may just be a server you already started) and does not gate `ok`.
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
pm web doctor
|
|
97
|
-
pm web doctor --json
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
> Note: the `services` extension capability is intentionally **not** declared.
|
|
101
|
-
> The pm SDK's `registerService` only overrides one of eight fixed core services
|
|
102
|
-
> (e.g. `output_format`), which would alter core output for unrelated commands;
|
|
103
|
-
> the server lifecycle is exposed safely through the commands above instead.
|
|
104
57
|
|
|
105
58
|
### Environment Variables
|
|
106
59
|
|
|
@@ -111,7 +64,6 @@ pm web doctor --json
|
|
|
111
64
|
| `PM_WEB_SECRET_KEY` | Recommended | At-rest encryption key for saved GitHub PATs. Falls back to `JWT_SECRET`; use at least 32 characters |
|
|
112
65
|
| `PM_WEB_BOOTSTRAP_ADMIN_EMAIL` | Recommended | Email of the user account to auto-promote to admin on schema init. Leave unset to skip auto-promotion (manage admins via the admin UI). |
|
|
113
66
|
| `PORT` | No | Server port (default: 4000) |
|
|
114
|
-
| `PM_WEB_STATE_DIR` | No | Directory for the `--detach` pidfile used by `pm web stop` (default: OS temp dir) |
|
|
115
67
|
| `NODE_ENV` | No | `production` enables caching |
|
|
116
68
|
| `OLLAMA_BASE_URL` / `OLLAMA_HOST` | No | Local Ollama endpoint for semantic pm search |
|
|
117
69
|
| `PM_OLLAMA_MODEL` | No | Embedding model for new projects, default `qwen3-embedding:0.6b` |
|
package/dist/index.js
CHANGED
|
@@ -2,81 +2,16 @@
|
|
|
2
2
|
// This file registers the web server as a pm extension command.
|
|
3
3
|
import { spawn, spawnSync } from "node:child_process";
|
|
4
4
|
import fs from "node:fs";
|
|
5
|
-
import net from "node:net";
|
|
6
|
-
import os from "node:os";
|
|
7
5
|
import path from "node:path";
|
|
8
6
|
import { fileURLToPath } from "node:url";
|
|
9
7
|
// Inline defineExtension helper (avoids runtime dependency on @unbrained/pm-cli/sdk)
|
|
10
8
|
function defineExtension(m) { return m; }
|
|
11
|
-
// ---------------------------------------------------------------------------
|
|
12
|
-
// Error contract
|
|
13
|
-
// CommandError carries a numeric exitCode so the pm runtime surfaces a clean
|
|
14
|
-
// failure instead of double-invoking the handler on a plain thrown Error.
|
|
15
|
-
// 1 = generic, 2 = usage, 3 = not-found
|
|
16
|
-
// ---------------------------------------------------------------------------
|
|
17
|
-
class CommandError extends Error {
|
|
18
|
-
exitCode;
|
|
19
|
-
constructor(message, exitCode = 1) {
|
|
20
|
-
super(message);
|
|
21
|
-
this.name = "CommandError";
|
|
22
|
-
this.exitCode = exitCode;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
9
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
26
10
|
const packageRoot = path.resolve(__dirname, "..");
|
|
27
11
|
let serverProcess = null;
|
|
28
|
-
const DEFAULT_PORT = "4000";
|
|
29
|
-
// ---------------------------------------------------------------------------
|
|
30
|
-
// Pure helpers (unit-tested in test/)
|
|
31
|
-
// ---------------------------------------------------------------------------
|
|
32
|
-
/** Resolve the port from flag → PORT env → default 4000. */
|
|
33
|
-
export function resolvePort(options, env = process.env) {
|
|
34
|
-
const flag = options["port"];
|
|
35
|
-
if (flag !== undefined && flag !== null && String(flag).length > 0) {
|
|
36
|
-
return String(flag);
|
|
37
|
-
}
|
|
38
|
-
if (env["PORT"] && String(env["PORT"]).length > 0) {
|
|
39
|
-
return String(env["PORT"]);
|
|
40
|
-
}
|
|
41
|
-
return DEFAULT_PORT;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Resolve the pidfile path used to track a detached server.
|
|
45
|
-
* Uses PM_WEB_STATE_DIR when set, else the OS temp dir, keyed by port so
|
|
46
|
-
* multiple detached servers don't clobber each other's pidfile.
|
|
47
|
-
*/
|
|
48
|
-
export function pidfilePath(port, env = process.env, tmpDir = os.tmpdir()) {
|
|
49
|
-
const baseDir = env["PM_WEB_STATE_DIR"] && String(env["PM_WEB_STATE_DIR"]).length > 0
|
|
50
|
-
? String(env["PM_WEB_STATE_DIR"])
|
|
51
|
-
: tmpDir;
|
|
52
|
-
return path.join(baseDir, `pm-web-${String(port)}.pid`);
|
|
53
|
-
}
|
|
54
|
-
/** Shape a /healthz probe outcome into a stable status result object. */
|
|
55
|
-
export function shapeStatusResult(input) {
|
|
56
|
-
const portNum = Number(input.port);
|
|
57
|
-
const body = (input.body ?? null);
|
|
58
|
-
const version = body && typeof body["version"] === "string" ? body["version"] : null;
|
|
59
|
-
const result = {
|
|
60
|
-
status: input.reachable ? "up" : "down",
|
|
61
|
-
port: portNum,
|
|
62
|
-
reachable: input.reachable,
|
|
63
|
-
url: `http://localhost:${portNum}/healthz`,
|
|
64
|
-
version,
|
|
65
|
-
healthz: input.body ?? null,
|
|
66
|
-
};
|
|
67
|
-
if (input.error)
|
|
68
|
-
result.error = input.error;
|
|
69
|
-
return result;
|
|
70
|
-
}
|
|
71
|
-
// ---------------------------------------------------------------------------
|
|
72
|
-
// Runtime helpers
|
|
73
|
-
// ---------------------------------------------------------------------------
|
|
74
|
-
function runtimeDependenciesInstalled() {
|
|
75
|
-
const expressPackage = path.join(packageRoot, "node_modules", "express", "package.json");
|
|
76
|
-
return fs.existsSync(expressPackage);
|
|
77
|
-
}
|
|
78
12
|
function ensureRuntimeDependencies() {
|
|
79
|
-
|
|
13
|
+
const expressPackage = path.join(packageRoot, "node_modules", "express", "package.json");
|
|
14
|
+
if (fs.existsSync(expressPackage))
|
|
80
15
|
return;
|
|
81
16
|
console.error("Installing pm-web runtime dependencies...");
|
|
82
17
|
const install = spawnSync("npm", ["install", "--omit=dev"], {
|
|
@@ -87,77 +22,7 @@ function ensureRuntimeDependencies() {
|
|
|
87
22
|
if (install.error)
|
|
88
23
|
throw install.error;
|
|
89
24
|
if (install.status !== 0) {
|
|
90
|
-
throw new
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
/** HTTP GET /healthz with a short timeout. Never throws; returns a probe result. */
|
|
94
|
-
async function probeHealthz(port) {
|
|
95
|
-
const url = `http://localhost:${port}/healthz`;
|
|
96
|
-
const controller = new AbortController();
|
|
97
|
-
const timer = setTimeout(() => controller.abort(), 1500);
|
|
98
|
-
try {
|
|
99
|
-
const res = await fetch(url, { signal: controller.signal });
|
|
100
|
-
let body = null;
|
|
101
|
-
try {
|
|
102
|
-
body = await res.json();
|
|
103
|
-
}
|
|
104
|
-
catch {
|
|
105
|
-
body = null;
|
|
106
|
-
}
|
|
107
|
-
return { reachable: res.ok, body };
|
|
108
|
-
}
|
|
109
|
-
catch (err) {
|
|
110
|
-
return { reachable: false, error: err instanceof Error ? err.message : String(err) };
|
|
111
|
-
}
|
|
112
|
-
finally {
|
|
113
|
-
clearTimeout(timer);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
/** Check whether a TCP port is free to bind locally. Never throws. */
|
|
117
|
-
function isPortFree(port) {
|
|
118
|
-
return new Promise((resolve) => {
|
|
119
|
-
const tester = net
|
|
120
|
-
.createServer()
|
|
121
|
-
.once("error", () => resolve(false))
|
|
122
|
-
.once("listening", () => {
|
|
123
|
-
tester.close(() => resolve(true));
|
|
124
|
-
})
|
|
125
|
-
.listen(port, "127.0.0.1");
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
function pmOnPath() {
|
|
129
|
-
const probe = spawnSync("pm", ["--version"], { stdio: "ignore" });
|
|
130
|
-
return !probe.error && probe.status === 0;
|
|
131
|
-
}
|
|
132
|
-
function workspaceInitialized(pmRoot) {
|
|
133
|
-
if (!pmRoot)
|
|
134
|
-
return false;
|
|
135
|
-
// A pm workspace has a settings.json plus item-type directories under the
|
|
136
|
-
// pm root (e.g. tasks/, features/). Match on the settings file or a known
|
|
137
|
-
// item-type dir so detection is robust across pm versions.
|
|
138
|
-
if (!fs.existsSync(pmRoot))
|
|
139
|
-
return false;
|
|
140
|
-
return (fs.existsSync(path.join(pmRoot, "settings.json")) ||
|
|
141
|
-
fs.existsSync(path.join(pmRoot, "schema")) ||
|
|
142
|
-
fs.existsSync(path.join(pmRoot, "tasks")));
|
|
143
|
-
}
|
|
144
|
-
function readPackageVersion() {
|
|
145
|
-
try {
|
|
146
|
-
const pkg = JSON.parse(fs.readFileSync(path.join(packageRoot, "package.json"), "utf8"));
|
|
147
|
-
return pkg.version ?? "unknown";
|
|
148
|
-
}
|
|
149
|
-
catch {
|
|
150
|
-
return "unknown";
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
function processAlive(pid) {
|
|
154
|
-
try {
|
|
155
|
-
process.kill(pid, 0);
|
|
156
|
-
return true;
|
|
157
|
-
}
|
|
158
|
-
catch (err) {
|
|
159
|
-
// ESRCH = no such process; EPERM = exists but not ours (treat as alive)
|
|
160
|
-
return err.code === "EPERM";
|
|
25
|
+
throw new Error(`npm install --omit=dev failed with exit code ${install.status ?? "unknown"}`);
|
|
161
26
|
}
|
|
162
27
|
}
|
|
163
28
|
export default defineExtension({
|
|
@@ -165,7 +30,7 @@ export default defineExtension({
|
|
|
165
30
|
version: "1.0.0",
|
|
166
31
|
activate(api) {
|
|
167
32
|
// -----------------------------------------------------------------------
|
|
168
|
-
// Command: pm web [--port <port>]
|
|
33
|
+
// Command: pm web [--port <port>]
|
|
169
34
|
// -----------------------------------------------------------------------
|
|
170
35
|
api.registerCommand({
|
|
171
36
|
name: "web",
|
|
@@ -174,14 +39,13 @@ export default defineExtension({
|
|
|
174
39
|
examples: [
|
|
175
40
|
"pm web",
|
|
176
41
|
"pm web --port 8080",
|
|
177
|
-
"pm web --detach",
|
|
178
42
|
],
|
|
179
43
|
flags: [
|
|
180
44
|
{ long: "--port", value_name: "port", description: "Port to listen on (default: 4000 or PORT env var)" },
|
|
181
45
|
{ long: "--detach", description: "Run the server in the background" },
|
|
182
46
|
],
|
|
183
47
|
async run(ctx) {
|
|
184
|
-
const port =
|
|
48
|
+
const port = ctx.options["port"] ?? process.env["PORT"] ?? "4000";
|
|
185
49
|
const detach = Boolean(ctx.options["detach"]);
|
|
186
50
|
const serverPath = path.resolve(__dirname, "server.js");
|
|
187
51
|
ensureRuntimeDependencies();
|
|
@@ -196,15 +60,6 @@ export default defineExtension({
|
|
|
196
60
|
stdio: "ignore",
|
|
197
61
|
});
|
|
198
62
|
serverProcess.unref();
|
|
199
|
-
// Track the detached PID so `pm web stop` can terminate it.
|
|
200
|
-
if (serverProcess.pid) {
|
|
201
|
-
try {
|
|
202
|
-
fs.writeFileSync(pidfilePath(port), String(serverProcess.pid), "utf8");
|
|
203
|
-
}
|
|
204
|
-
catch (err) {
|
|
205
|
-
console.error(`Warning: could not write pidfile: ${err instanceof Error ? err.message : String(err)}`);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
63
|
console.error(`pm-web started on port ${port} (PID ${serverProcess.pid})`);
|
|
209
64
|
return { status: "started", port: Number(port), pid: serverProcess.pid };
|
|
210
65
|
}
|
|
@@ -222,212 +77,12 @@ export default defineExtension({
|
|
|
222
77
|
resolve();
|
|
223
78
|
return;
|
|
224
79
|
}
|
|
225
|
-
reject(new
|
|
80
|
+
reject(new Error(`pm-web exited with code ${code ?? `signal ${signal}`}`));
|
|
226
81
|
});
|
|
227
82
|
});
|
|
228
83
|
return { status: "stopped", port: Number(port) };
|
|
229
84
|
},
|
|
230
85
|
});
|
|
231
|
-
// -----------------------------------------------------------------------
|
|
232
|
-
// Command: pm web status [--port <port>] [--json]
|
|
233
|
-
// -----------------------------------------------------------------------
|
|
234
|
-
api.registerCommand({
|
|
235
|
-
name: "web status",
|
|
236
|
-
description: "Report whether a pm-web server is reachable on the configured port.",
|
|
237
|
-
intent: "check pm-web server status",
|
|
238
|
-
examples: ["pm web status", "pm web status --port 8080 --json"],
|
|
239
|
-
flags: [
|
|
240
|
-
{ long: "--port", value_name: "port", description: "Port to probe (default: 4000 or PORT env var)" },
|
|
241
|
-
{ long: "--json", description: "Emit machine-readable JSON" },
|
|
242
|
-
],
|
|
243
|
-
async run(ctx) {
|
|
244
|
-
const port = resolvePort(ctx.options);
|
|
245
|
-
const json = Boolean(ctx.options["json"]);
|
|
246
|
-
const probe = await probeHealthz(port);
|
|
247
|
-
const result = shapeStatusResult({
|
|
248
|
-
port,
|
|
249
|
-
reachable: probe.reachable,
|
|
250
|
-
body: probe.body,
|
|
251
|
-
error: probe.error,
|
|
252
|
-
});
|
|
253
|
-
if (json) {
|
|
254
|
-
console.log(JSON.stringify(result, null, 2));
|
|
255
|
-
}
|
|
256
|
-
else if (result.status === "up") {
|
|
257
|
-
console.log(`pm-web is UP on port ${result.port}` +
|
|
258
|
-
(result.version ? ` (version ${result.version})` : ""));
|
|
259
|
-
}
|
|
260
|
-
else {
|
|
261
|
-
console.log(`pm-web is DOWN on port ${result.port}`);
|
|
262
|
-
}
|
|
263
|
-
return result;
|
|
264
|
-
},
|
|
265
|
-
});
|
|
266
|
-
// -----------------------------------------------------------------------
|
|
267
|
-
// Command: pm web stop [--port <port>] [--json]
|
|
268
|
-
// -----------------------------------------------------------------------
|
|
269
|
-
api.registerCommand({
|
|
270
|
-
name: "web stop",
|
|
271
|
-
description: "Stop a pm-web server previously started with --detach.",
|
|
272
|
-
intent: "stop a detached pm-web server",
|
|
273
|
-
examples: ["pm web stop", "pm web stop --port 8080"],
|
|
274
|
-
flags: [
|
|
275
|
-
{ long: "--port", value_name: "port", description: "Port of the detached server (default: 4000 or PORT env var)" },
|
|
276
|
-
{ long: "--json", description: "Emit machine-readable JSON" },
|
|
277
|
-
],
|
|
278
|
-
async run(ctx) {
|
|
279
|
-
const port = resolvePort(ctx.options);
|
|
280
|
-
const json = Boolean(ctx.options["json"]);
|
|
281
|
-
const pidfile = pidfilePath(port);
|
|
282
|
-
const emit = (result) => {
|
|
283
|
-
if (json) {
|
|
284
|
-
console.log(JSON.stringify(result, null, 2));
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
console.log(String(result["message"]));
|
|
288
|
-
}
|
|
289
|
-
return result;
|
|
290
|
-
};
|
|
291
|
-
// Prefer the in-process handle if we started it this session.
|
|
292
|
-
let pid = null;
|
|
293
|
-
if (serverProcess?.pid) {
|
|
294
|
-
pid = serverProcess.pid;
|
|
295
|
-
}
|
|
296
|
-
else if (fs.existsSync(pidfile)) {
|
|
297
|
-
const raw = fs.readFileSync(pidfile, "utf8").trim();
|
|
298
|
-
const parsed = Number.parseInt(raw, 10);
|
|
299
|
-
if (Number.isInteger(parsed) && parsed > 0)
|
|
300
|
-
pid = parsed;
|
|
301
|
-
}
|
|
302
|
-
if (pid === null) {
|
|
303
|
-
return emit({
|
|
304
|
-
status: "not_running",
|
|
305
|
-
port: Number(port),
|
|
306
|
-
message: `pm-web is not running (no pidfile for port ${port}).`,
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
if (!processAlive(pid)) {
|
|
310
|
-
// Stale pidfile — clean it up and report gracefully.
|
|
311
|
-
if (fs.existsSync(pidfile))
|
|
312
|
-
fs.rmSync(pidfile, { force: true });
|
|
313
|
-
return emit({
|
|
314
|
-
status: "not_running",
|
|
315
|
-
port: Number(port),
|
|
316
|
-
pid,
|
|
317
|
-
message: `pm-web process (PID ${pid}) is not running; cleared stale pidfile.`,
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
try {
|
|
321
|
-
process.kill(pid, "SIGTERM");
|
|
322
|
-
}
|
|
323
|
-
catch (err) {
|
|
324
|
-
throw new CommandError(`Failed to stop pm-web (PID ${pid}): ${err instanceof Error ? err.message : String(err)}`);
|
|
325
|
-
}
|
|
326
|
-
if (fs.existsSync(pidfile))
|
|
327
|
-
fs.rmSync(pidfile, { force: true });
|
|
328
|
-
if (serverProcess?.pid === pid)
|
|
329
|
-
serverProcess = null;
|
|
330
|
-
return emit({
|
|
331
|
-
status: "stopped",
|
|
332
|
-
port: Number(port),
|
|
333
|
-
pid,
|
|
334
|
-
message: `Stopped pm-web (PID ${pid}) on port ${port}.`,
|
|
335
|
-
});
|
|
336
|
-
},
|
|
337
|
-
});
|
|
338
|
-
// -----------------------------------------------------------------------
|
|
339
|
-
// Command: pm web doctor [--port <port>] [--json]
|
|
340
|
-
// -----------------------------------------------------------------------
|
|
341
|
-
api.registerCommand({
|
|
342
|
-
name: "web doctor",
|
|
343
|
-
description: "Preflight diagnostics for running pm-web (Node, deps, port, pm, workspace).",
|
|
344
|
-
intent: "diagnose pm-web preflight readiness",
|
|
345
|
-
examples: ["pm web doctor", "pm web doctor --json"],
|
|
346
|
-
flags: [
|
|
347
|
-
{ long: "--port", value_name: "port", description: "Port to check availability for (default: 4000 or PORT env var)" },
|
|
348
|
-
{ long: "--json", description: "Emit machine-readable JSON" },
|
|
349
|
-
],
|
|
350
|
-
async run(ctx) {
|
|
351
|
-
const port = resolvePort(ctx.options);
|
|
352
|
-
const json = Boolean(ctx.options["json"]);
|
|
353
|
-
const nodeMajor = Number.parseInt(process.versions.node.split(".")[0] ?? "0", 10);
|
|
354
|
-
const depsInstalled = runtimeDependenciesInstalled();
|
|
355
|
-
const portFree = await isPortFree(Number(port));
|
|
356
|
-
const pmAvailable = pmOnPath();
|
|
357
|
-
const wsInit = workspaceInitialized(ctx.pm_root);
|
|
358
|
-
const checks = [
|
|
359
|
-
{
|
|
360
|
-
name: "node_version",
|
|
361
|
-
ok: nodeMajor >= 20,
|
|
362
|
-
detail: `Node ${process.versions.node} (requires >= 20)`,
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
name: "runtime_dependencies",
|
|
366
|
-
ok: depsInstalled,
|
|
367
|
-
detail: depsInstalled
|
|
368
|
-
? "express and runtime deps installed"
|
|
369
|
-
: "runtime deps missing (will auto-install on `pm web`)",
|
|
370
|
-
},
|
|
371
|
-
{
|
|
372
|
-
name: "port_available",
|
|
373
|
-
ok: portFree,
|
|
374
|
-
detail: portFree
|
|
375
|
-
? `port ${port} is free`
|
|
376
|
-
: `port ${port} is in use (a server may already be running)`,
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
name: "pm_on_path",
|
|
380
|
-
ok: pmAvailable,
|
|
381
|
-
detail: pmAvailable ? "pm CLI is on PATH" : "pm CLI not found on PATH",
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
name: "workspace_initialized",
|
|
385
|
-
ok: wsInit,
|
|
386
|
-
detail: wsInit
|
|
387
|
-
? `pm workspace found at ${ctx.pm_root}`
|
|
388
|
-
: `no pm workspace at ${ctx.pm_root || "(unset)"} — run \`pm init\``,
|
|
389
|
-
},
|
|
390
|
-
];
|
|
391
|
-
// port_available is informational (in-use can be a healthy running server),
|
|
392
|
-
// so it does not gate overall readiness.
|
|
393
|
-
const ok = checks
|
|
394
|
-
.filter((c) => c.name !== "port_available")
|
|
395
|
-
.every((c) => c.ok);
|
|
396
|
-
const result = {
|
|
397
|
-
ok,
|
|
398
|
-
version: readPackageVersion(),
|
|
399
|
-
node: process.versions.node,
|
|
400
|
-
port: Number(port),
|
|
401
|
-
checks,
|
|
402
|
-
};
|
|
403
|
-
if (json) {
|
|
404
|
-
console.log(JSON.stringify(result, null, 2));
|
|
405
|
-
}
|
|
406
|
-
else {
|
|
407
|
-
console.log(`pm-web doctor — overall: ${ok ? "OK" : "ISSUES"}`);
|
|
408
|
-
for (const c of checks) {
|
|
409
|
-
console.log(` [${c.ok ? "ok" : "!!"}] ${c.name}: ${c.detail}`);
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
return result;
|
|
413
|
-
},
|
|
414
|
-
});
|
|
415
|
-
// -----------------------------------------------------------------------
|
|
416
|
-
// services capability — intentionally NOT registered.
|
|
417
|
-
//
|
|
418
|
-
// The SDK's `registerService(name, override)` only accepts one of the eight
|
|
419
|
-
// fixed CORE service names (output_format, error_format, help_format,
|
|
420
|
-
// lock_acquire, lock_release, history_append, item_store_write,
|
|
421
|
-
// item_store_delete) and OVERRIDES that core service on every pm command.
|
|
422
|
-
// There is no API to register a new "pm-web lifecycle" service, and
|
|
423
|
-
// overriding a core service would alter/replace core output for unrelated
|
|
424
|
-
// commands. The pm-web server lifecycle is surfaced safely via the
|
|
425
|
-
// web/status/stop/doctor commands instead. The guarded block below
|
|
426
|
-
// documents the deliberate no-op; the "services" capability is therefore
|
|
427
|
-
// NOT declared in manifest.json.
|
|
428
|
-
if (typeof api.registerService === "function") {
|
|
429
|
-
// Deliberately register no service overrides — see comment above.
|
|
430
|
-
}
|
|
431
86
|
},
|
|
432
87
|
});
|
|
433
88
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,gEAAgE;AAEhE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,qFAAqF;AACrF,SAAS,eAAe,CAAI,CAAI,IAAO,OAAO,CAAC,CAAC,CAAC,CAAC;AAwBlD,8EAA8E;AAC9E,iBAAiB;AACjB,6EAA6E;AAC7E,0EAA0E;AAC1E,0CAA0C;AAC1C,8EAA8E;AAC9E,MAAM,YAAa,SAAQ,KAAK;IAC9B,QAAQ,CAAS;IACjB,YAAY,OAAe,EAAE,QAAQ,GAAG,CAAC;QACvC,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;CACF;AAED,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IA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AAG,EAAE,aAAa,CAAC,GAAG,EAAE,CAAC;gBAC3E,CAAC;gBAED,sDAAsD;gBACtD,OAAO,CAAC,KAAK,CAAC,2BAA2B,IAAI,GAAG,CAAC,CAAC;gBAClD,OAAO,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;gBAEzC,MAAM,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE;oBACxC,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE;oBAC3C,KAAK,EAAE,SAAS;iBACjB,CAAC,CAAC;gBAEH,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;oBAC1C,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;oBAC1B,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;wBAChC,IAAI,IAAI,KAAK,CAAC,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;4BAC9D,OAAO,EAAE,CAAC;4BACV,OAAO;wBACT,CAAC;wBACD,MAAM,CAAC,IAAI,KAAK,CAAC,2BAA2B,IAAI,IAAI,UAAU,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;oBAC7E,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;gBAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;YACnD,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import express from "express";
|
|
2
2
|
import cookieParser from "cookie-parser";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import { readFileSync } from "node:fs";
|
|
5
4
|
import { fileURLToPath } from "node:url";
|
|
6
5
|
import { initSchema, assertDbConfigured } from "./db.js";
|
|
7
6
|
import { authRouter } from "./routes/auth.js";
|
|
@@ -34,18 +33,8 @@ app.use((_req, res, next) => {
|
|
|
34
33
|
res.setHeader("Referrer-Policy", "strict-origin-when-cross-origin");
|
|
35
34
|
next();
|
|
36
35
|
});
|
|
37
|
-
// Health check
|
|
38
|
-
|
|
39
|
-
const PM_WEB_VERSION = (() => {
|
|
40
|
-
try {
|
|
41
|
-
const pkg = JSON.parse(readFileSync(path.resolve(__dirname, "..", "package.json"), "utf8"));
|
|
42
|
-
return pkg.version ?? "unknown";
|
|
43
|
-
}
|
|
44
|
-
catch {
|
|
45
|
-
return "unknown";
|
|
46
|
-
}
|
|
47
|
-
})();
|
|
48
|
-
app.get("/healthz", (_req, res) => res.json({ ok: true, version: PM_WEB_VERSION }));
|
|
36
|
+
// Health check
|
|
37
|
+
app.get("/healthz", (_req, res) => res.json({ ok: true }));
|
|
49
38
|
// API routes
|
|
50
39
|
app.use("/api/auth", authRouter);
|
|
51
40
|
app.use("/api/projects", projectsRouter);
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,YAAY,MAAM,eAAe,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAE,UAAU,EAA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|
+
"version": "2026.6.2",
|
|
4
4
|
"description": "Full web UI for pm-cli — browse, create, update, search and manage pm projects in the browser. Self-hosted via Docker or Node.js.",
|
|
5
5
|
"author": "@unbraind",
|
|
6
6
|
"entry": "./dist/index.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbrained/pm-web",
|
|
3
|
-
"version": "2026.6.2
|
|
3
|
+
"version": "2026.6.2",
|
|
4
4
|
"description": "Full web UI for pm-cli — browse, create, update, search and manage pm projects in the browser. Self-hosted via Docker or Node.js.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@types/pg": "^8.11.11",
|
|
53
53
|
"@types/uuid": "^10.0.0",
|
|
54
54
|
"@unbrained/pm-cli": "^2026.5.31",
|
|
55
|
-
"pm-changelog": "^2026.
|
|
55
|
+
"pm-changelog": "^2026.5.29-2",
|
|
56
56
|
"tsx": "^4.19.4",
|
|
57
57
|
"typescript": "^6.0.3"
|
|
58
58
|
},
|