@moor-sh/mcp 0.12.0 → 0.13.0
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 +1 -1
- package/src/index.ts +17 -1
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -90,6 +90,17 @@ type Project = {
|
|
|
90
90
|
domain: string | null;
|
|
91
91
|
docker_image: string | null;
|
|
92
92
|
github_url: string | null;
|
|
93
|
+
// #71: live_* fields are written by the API's status reconciler.
|
|
94
|
+
// status above is moor's RECORDED state (only changes on explicit
|
|
95
|
+
// start/stop/build/cancel). live_status reflects Docker's view at
|
|
96
|
+
// last successful inspect. Differences mean moor missed an external
|
|
97
|
+
// change (or the reconciler hasn't run yet). live_error non-null
|
|
98
|
+
// means the most recent inspect failed; the live_status / exit_code
|
|
99
|
+
// shown is the last successful snapshot.
|
|
100
|
+
live_status?: "running" | "stopped" | "error" | "missing" | null;
|
|
101
|
+
live_exit_code?: number | null;
|
|
102
|
+
live_checked_at?: string | null;
|
|
103
|
+
live_error?: string | null;
|
|
93
104
|
};
|
|
94
105
|
|
|
95
106
|
async function resolveProject(name: string): Promise<Project> {
|
|
@@ -284,7 +295,8 @@ server.registerTool(
|
|
|
284
295
|
"moor_status",
|
|
285
296
|
{
|
|
286
297
|
title: "List Projects",
|
|
287
|
-
description:
|
|
298
|
+
description:
|
|
299
|
+
"List all projects managed by Moor. `status` is moor's recorded state (only changes on explicit start/stop/build/cancel). `live_status` is Docker's view at last successful inspect; differences (e.g. recorded='running' live='error') mean moor missed an external change like a host docker stop, crash, or OOM kill. `live_error` non-null means the most recent inspect failed and the live_* values are the last successful snapshot, not necessarily current.",
|
|
288
300
|
},
|
|
289
301
|
async () => {
|
|
290
302
|
const res = await apiGet("/api/projects");
|
|
@@ -293,6 +305,10 @@ server.registerTool(
|
|
|
293
305
|
const summary = projects.map((p) => ({
|
|
294
306
|
name: p.name,
|
|
295
307
|
status: p.status,
|
|
308
|
+
live_status: p.live_status ?? null,
|
|
309
|
+
live_exit_code: p.live_exit_code ?? null,
|
|
310
|
+
live_checked_at: p.live_checked_at ?? null,
|
|
311
|
+
live_error: p.live_error ?? null,
|
|
296
312
|
source: p.docker_image || p.github_url || null,
|
|
297
313
|
domain: p.domain,
|
|
298
314
|
}));
|