@kl-c/matrixos 0.3.22 → 0.3.24
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/dist/cli/dashboard.d.ts +6 -0
- package/dist/cli/index.js +32 -1
- package/dist/cli-node/index.js +32 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli/dashboard.d.ts
CHANGED
|
@@ -4,3 +4,9 @@ export interface DashboardCliOptions {
|
|
|
4
4
|
readonly daemon?: boolean;
|
|
5
5
|
}
|
|
6
6
|
export declare function dashboardCli(options: DashboardCliOptions): Promise<number>;
|
|
7
|
+
/**
|
|
8
|
+
* Kill any existing dashboard process bound to the target port, then start a fresh
|
|
9
|
+
* daemon instance. Allows Morpheus (or any agent) to self-heal the dashboard with a
|
|
10
|
+
* single idempotent command: `matrixos dashboard restart --host 0.0.0.0`.
|
|
11
|
+
*/
|
|
12
|
+
export declare function restartDashboard(options: DashboardCliOptions): Promise<number>;
|
package/dist/cli/index.js
CHANGED
|
@@ -2163,7 +2163,7 @@ var package_default;
|
|
|
2163
2163
|
var init_package = __esm(() => {
|
|
2164
2164
|
package_default = {
|
|
2165
2165
|
name: "@kl-c/matrixos",
|
|
2166
|
-
version: "0.3.
|
|
2166
|
+
version: "0.3.24",
|
|
2167
2167
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
2168
2168
|
main: "./dist/index.js",
|
|
2169
2169
|
types: "dist/index.d.ts",
|
|
@@ -187456,6 +187456,29 @@ async function dashboardCli(options) {
|
|
|
187456
187456
|
return 1;
|
|
187457
187457
|
}
|
|
187458
187458
|
}
|
|
187459
|
+
async function restartDashboard(options) {
|
|
187460
|
+
const port3 = options.port ?? 9123;
|
|
187461
|
+
const host = options.host ?? "0.0.0.0";
|
|
187462
|
+
try {
|
|
187463
|
+
const { execSync: execSync2 } = __require("child_process");
|
|
187464
|
+
if (process.platform === "win32") {
|
|
187465
|
+
const pid = execSync2(`netstat -ano | findstr :${port3} | findstr LISTENING`, { encoding: "utf-8" }).split(`
|
|
187466
|
+
`)[0]?.trim().split(/\s+/).pop();
|
|
187467
|
+
if (pid)
|
|
187468
|
+
execSync2(`taskkill /PID ${pid} /F`);
|
|
187469
|
+
} else {
|
|
187470
|
+
const pids = execSync2(`lsof -ti tcp:${port3} 2>/dev/null || true`, { encoding: "utf-8" }).split(`
|
|
187471
|
+
`).map((l2) => l2.trim()).filter(Boolean);
|
|
187472
|
+
for (const pid of pids) {
|
|
187473
|
+
try {
|
|
187474
|
+
execSync2(`kill -9 ${pid} 2>/dev/null || true`);
|
|
187475
|
+
} catch {}
|
|
187476
|
+
}
|
|
187477
|
+
}
|
|
187478
|
+
} catch {}
|
|
187479
|
+
await new Promise((r2) => setTimeout(r2, 1500));
|
|
187480
|
+
return dashboardCli({ ...options, port: port3, host, daemon: true });
|
|
187481
|
+
}
|
|
187459
187482
|
|
|
187460
187483
|
// packages/omo-opencode/src/cli/architect.ts
|
|
187461
187484
|
import { join as join75 } from "path";
|
|
@@ -187756,6 +187779,14 @@ function configureRuntimeCommands(program2) {
|
|
|
187756
187779
|
if (!options.daemon)
|
|
187757
187780
|
process.exit(exitCode);
|
|
187758
187781
|
});
|
|
187782
|
+
program2.command("dashboard:restart").description("Restart the MaTrixOS web dashboard (kill existing + start daemon)").option("-p, --port <number>", "HTTP port", "9123").option("--host <addr>", "Bind address", "0.0.0.0").action(async (options) => {
|
|
187783
|
+
const exitCode = await restartDashboard({
|
|
187784
|
+
port: parseInt(options.port ?? "9123", 10),
|
|
187785
|
+
host: options.host ?? "0.0.0.0"
|
|
187786
|
+
});
|
|
187787
|
+
if (exitCode !== 0)
|
|
187788
|
+
process.exit(exitCode);
|
|
187789
|
+
});
|
|
187759
187790
|
}
|
|
187760
187791
|
|
|
187761
187792
|
// packages/omo-opencode/src/cli/cli-program.ts
|
package/dist/cli-node/index.js
CHANGED
|
@@ -2163,7 +2163,7 @@ var package_default;
|
|
|
2163
2163
|
var init_package = __esm(() => {
|
|
2164
2164
|
package_default = {
|
|
2165
2165
|
name: "@kl-c/matrixos",
|
|
2166
|
-
version: "0.3.
|
|
2166
|
+
version: "0.3.24",
|
|
2167
2167
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
2168
2168
|
main: "./dist/index.js",
|
|
2169
2169
|
types: "dist/index.d.ts",
|
|
@@ -187511,6 +187511,29 @@ async function dashboardCli(options) {
|
|
|
187511
187511
|
return 1;
|
|
187512
187512
|
}
|
|
187513
187513
|
}
|
|
187514
|
+
async function restartDashboard(options) {
|
|
187515
|
+
const port3 = options.port ?? 9123;
|
|
187516
|
+
const host = options.host ?? "0.0.0.0";
|
|
187517
|
+
try {
|
|
187518
|
+
const { execSync: execSync2 } = __require("child_process");
|
|
187519
|
+
if (process.platform === "win32") {
|
|
187520
|
+
const pid = execSync2(`netstat -ano | findstr :${port3} | findstr LISTENING`, { encoding: "utf-8" }).split(`
|
|
187521
|
+
`)[0]?.trim().split(/\s+/).pop();
|
|
187522
|
+
if (pid)
|
|
187523
|
+
execSync2(`taskkill /PID ${pid} /F`);
|
|
187524
|
+
} else {
|
|
187525
|
+
const pids = execSync2(`lsof -ti tcp:${port3} 2>/dev/null || true`, { encoding: "utf-8" }).split(`
|
|
187526
|
+
`).map((l2) => l2.trim()).filter(Boolean);
|
|
187527
|
+
for (const pid of pids) {
|
|
187528
|
+
try {
|
|
187529
|
+
execSync2(`kill -9 ${pid} 2>/dev/null || true`);
|
|
187530
|
+
} catch {}
|
|
187531
|
+
}
|
|
187532
|
+
}
|
|
187533
|
+
} catch {}
|
|
187534
|
+
await new Promise((r2) => setTimeout(r2, 1500));
|
|
187535
|
+
return dashboardCli({ ...options, port: port3, host, daemon: true });
|
|
187536
|
+
}
|
|
187514
187537
|
|
|
187515
187538
|
// packages/omo-opencode/src/cli/architect.ts
|
|
187516
187539
|
import { join as join75 } from "path";
|
|
@@ -187811,6 +187834,14 @@ function configureRuntimeCommands(program2) {
|
|
|
187811
187834
|
if (!options.daemon)
|
|
187812
187835
|
process.exit(exitCode);
|
|
187813
187836
|
});
|
|
187837
|
+
program2.command("dashboard:restart").description("Restart the MaTrixOS web dashboard (kill existing + start daemon)").option("-p, --port <number>", "HTTP port", "9123").option("--host <addr>", "Bind address", "0.0.0.0").action(async (options) => {
|
|
187838
|
+
const exitCode = await restartDashboard({
|
|
187839
|
+
port: parseInt(options.port ?? "9123", 10),
|
|
187840
|
+
host: options.host ?? "0.0.0.0"
|
|
187841
|
+
});
|
|
187842
|
+
if (exitCode !== 0)
|
|
187843
|
+
process.exit(exitCode);
|
|
187844
|
+
});
|
|
187814
187845
|
}
|
|
187815
187846
|
|
|
187816
187847
|
// packages/omo-opencode/src/cli/cli-program.ts
|
package/dist/index.js
CHANGED
|
@@ -368019,7 +368019,7 @@ function getCachedVersion(options = {}) {
|
|
|
368019
368019
|
// package.json
|
|
368020
368020
|
var package_default = {
|
|
368021
368021
|
name: "@kl-c/matrixos",
|
|
368022
|
-
version: "0.3.
|
|
368022
|
+
version: "0.3.24",
|
|
368023
368023
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
368024
368024
|
main: "./dist/index.js",
|
|
368025
368025
|
types: "dist/index.d.ts",
|
package/package.json
CHANGED