@kl-c/matrixos 0.3.51 → 0.3.52
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/index.js +127 -20
- package/dist/cli/prepare.d.ts +14 -0
- package/dist/cli-node/index.js +127 -20
- package/dist/index.js +1 -1
- package/package.json +1 -1
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.52",
|
|
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",
|
|
@@ -168395,6 +168395,91 @@ function executeRgpdConsentCommand(args) {
|
|
|
168395
168395
|
}
|
|
168396
168396
|
}
|
|
168397
168397
|
|
|
168398
|
+
// packages/omo-opencode/src/cli/prepare.ts
|
|
168399
|
+
var exports_prepare = {};
|
|
168400
|
+
__export(exports_prepare, {
|
|
168401
|
+
submitPr: () => submitPr,
|
|
168402
|
+
preparePr: () => preparePr
|
|
168403
|
+
});
|
|
168404
|
+
import { execSync as execSync3 } from "child_process";
|
|
168405
|
+
function sh(cmd) {
|
|
168406
|
+
return execSync3(cmd, { encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"] }).trim();
|
|
168407
|
+
}
|
|
168408
|
+
function shOk(cmd) {
|
|
168409
|
+
try {
|
|
168410
|
+
execSync3(cmd, { encoding: "utf-8", stdio: "ignore" });
|
|
168411
|
+
return true;
|
|
168412
|
+
} catch {
|
|
168413
|
+
return false;
|
|
168414
|
+
}
|
|
168415
|
+
}
|
|
168416
|
+
function preparePr(options) {
|
|
168417
|
+
const apply = options.apply ?? false;
|
|
168418
|
+
const draft = options.draft ?? true;
|
|
168419
|
+
const base = options.base ?? "main";
|
|
168420
|
+
const steps = [];
|
|
168421
|
+
const run5 = (cmd, label) => {
|
|
168422
|
+
steps.push(`${label}: ${cmd}`);
|
|
168423
|
+
if (!apply)
|
|
168424
|
+
return "";
|
|
168425
|
+
try {
|
|
168426
|
+
return sh(cmd);
|
|
168427
|
+
} catch (e) {
|
|
168428
|
+
console.error(`[prepare] FAILED at: ${label}
|
|
168429
|
+
${e instanceof Error ? e.message : String(e)}`);
|
|
168430
|
+
process.exit(1);
|
|
168431
|
+
}
|
|
168432
|
+
};
|
|
168433
|
+
if (!shOk("git rev-parse --is-inside-work-tree")) {
|
|
168434
|
+
console.error("[prepare] not a git repository");
|
|
168435
|
+
return 1;
|
|
168436
|
+
}
|
|
168437
|
+
const status2 = sh("git status --porcelain");
|
|
168438
|
+
if (!status2 && !apply) {}
|
|
168439
|
+
if (apply && !status2) {
|
|
168440
|
+
console.error("[prepare] nothing to commit (working tree clean)");
|
|
168441
|
+
return 1;
|
|
168442
|
+
}
|
|
168443
|
+
const branch = `feat/matrixos-${Date.now().toString(36)}`;
|
|
168444
|
+
const title = options.title ?? (apply ? sh("git log -1 --pretty=%s") : "Prepared change");
|
|
168445
|
+
const body = options.body ?? "Prepared by matrixos prepare (draft, not yet submitted).";
|
|
168446
|
+
run5(`git checkout -b ${branch}`, "create branch");
|
|
168447
|
+
run5(`git add -A`, "stage");
|
|
168448
|
+
run5(`git commit -m "${title.replace(/"/g, "\\\"")}"`, "commit");
|
|
168449
|
+
run5(`git push -u origin ${branch}`, "push");
|
|
168450
|
+
const prFlags = draft ? "--fill --draft" : "--fill";
|
|
168451
|
+
const prOut = run5(`gh pr create ${prFlags} --base ${base} --title "${title.replace(/"/g, "\\\"")}" --body "${body.replace(/"/g, "\\\"")}"`, "open PR");
|
|
168452
|
+
if (!apply) {
|
|
168453
|
+
console.log(`[dry-run] would execute:
|
|
168454
|
+
` + steps.join(`
|
|
168455
|
+
`));
|
|
168456
|
+
console.log(`
|
|
168457
|
+
[dry-run] would open ${draft ? "DRAFT" : ""} PR on base '${base}' with title: ${title}`);
|
|
168458
|
+
console.log("[dry-run] re-run with --apply to actually create the PR.");
|
|
168459
|
+
return 0;
|
|
168460
|
+
}
|
|
168461
|
+
console.log(`[prepare] PR created: ${prOut}`);
|
|
168462
|
+
console.log(`[prepare] Draft PR is NOT submitted. Run 'matrixos submit <pr-url>' to mark ready.`);
|
|
168463
|
+
return 0;
|
|
168464
|
+
}
|
|
168465
|
+
function submitPr(options) {
|
|
168466
|
+
const pr = options.pr;
|
|
168467
|
+
if (!pr) {
|
|
168468
|
+
console.error("[submit] PR identifier required (URL or number)");
|
|
168469
|
+
return 1;
|
|
168470
|
+
}
|
|
168471
|
+
const prRef = pr.includes("/") || /^\d+$/.test(pr) ? pr : `#${pr}`;
|
|
168472
|
+
try {
|
|
168473
|
+
sh(`gh pr ready ${prRef}`);
|
|
168474
|
+
console.log(`[submit] PR ${prRef} marked ready.`);
|
|
168475
|
+
return 0;
|
|
168476
|
+
} catch (e) {
|
|
168477
|
+
console.error(`[submit] failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
168478
|
+
return 1;
|
|
168479
|
+
}
|
|
168480
|
+
}
|
|
168481
|
+
var init_prepare = () => {};
|
|
168482
|
+
|
|
168398
168483
|
// packages/omo-opencode/src/cli/service.ts
|
|
168399
168484
|
var exports_service = {};
|
|
168400
168485
|
__export(exports_service, {
|
|
@@ -168403,10 +168488,10 @@ __export(exports_service, {
|
|
|
168403
168488
|
import * as os15 from "os";
|
|
168404
168489
|
import * as fs24 from "fs";
|
|
168405
168490
|
import * as path29 from "path";
|
|
168406
|
-
import { execSync as
|
|
168491
|
+
import { execSync as execSync4 } from "child_process";
|
|
168407
168492
|
function resolveMatrixosBin2() {
|
|
168408
168493
|
try {
|
|
168409
|
-
const p2 =
|
|
168494
|
+
const p2 = execSync4("command -v matrixos", { encoding: "utf-8" }).trim();
|
|
168410
168495
|
if (p2)
|
|
168411
168496
|
return p2;
|
|
168412
168497
|
} catch {}
|
|
@@ -168418,7 +168503,7 @@ function resolveMatrixosBin2() {
|
|
|
168418
168503
|
}
|
|
168419
168504
|
function resolveBunBin() {
|
|
168420
168505
|
try {
|
|
168421
|
-
const p2 =
|
|
168506
|
+
const p2 = execSync4("command -v bun", { encoding: "utf-8" }).trim();
|
|
168422
168507
|
if (p2)
|
|
168423
168508
|
return p2;
|
|
168424
168509
|
} catch {}
|
|
@@ -168497,33 +168582,33 @@ WantedBy=${opts.user ? "default.target" : "multi-user.target"}
|
|
|
168497
168582
|
}
|
|
168498
168583
|
console.log("[service] reloading systemd...");
|
|
168499
168584
|
if (scope) {
|
|
168500
|
-
|
|
168585
|
+
execSync4(`${scope} systemctl --user daemon-reload`, { stdio: "inherit" });
|
|
168501
168586
|
if (opts.dashboard !== false)
|
|
168502
|
-
|
|
168587
|
+
execSync4(`${scope} systemctl --user enable matrixos-dashboard.service`, { stdio: "inherit" });
|
|
168503
168588
|
if (opts.gateway !== false)
|
|
168504
|
-
|
|
168589
|
+
execSync4(`${scope} systemctl --user enable matrixos-gateway.service`, { stdio: "inherit" });
|
|
168505
168590
|
if (opts.cron !== false)
|
|
168506
|
-
|
|
168591
|
+
execSync4(`${scope} systemctl --user enable matrixos-cron.service`, { stdio: "inherit" });
|
|
168507
168592
|
if (opts.dashboard !== false)
|
|
168508
|
-
|
|
168593
|
+
execSync4(`${scope} systemctl --user start matrixos-dashboard.service`, { stdio: "inherit" });
|
|
168509
168594
|
if (opts.gateway !== false)
|
|
168510
|
-
|
|
168595
|
+
execSync4(`${scope} systemctl --user start matrixos-gateway.service`, { stdio: "inherit" });
|
|
168511
168596
|
if (opts.cron !== false)
|
|
168512
|
-
|
|
168597
|
+
execSync4(`${scope} systemctl --user start matrixos-cron.service`, { stdio: "inherit" });
|
|
168513
168598
|
} else {
|
|
168514
|
-
|
|
168599
|
+
execSync4("systemctl daemon-reload", { stdio: "inherit" });
|
|
168515
168600
|
if (opts.dashboard !== false)
|
|
168516
|
-
|
|
168601
|
+
execSync4("systemctl enable matrixos-dashboard.service", { stdio: "inherit" });
|
|
168517
168602
|
if (opts.gateway !== false)
|
|
168518
|
-
|
|
168603
|
+
execSync4("systemctl enable matrixos-gateway.service", { stdio: "inherit" });
|
|
168519
168604
|
if (opts.cron !== false)
|
|
168520
|
-
|
|
168605
|
+
execSync4("systemctl enable matrixos-cron.service", { stdio: "inherit" });
|
|
168521
168606
|
if (opts.dashboard !== false)
|
|
168522
|
-
|
|
168607
|
+
execSync4("systemctl start matrixos-dashboard.service", { stdio: "inherit" });
|
|
168523
168608
|
if (opts.gateway !== false)
|
|
168524
|
-
|
|
168609
|
+
execSync4("systemctl start matrixos-gateway.service", { stdio: "inherit" });
|
|
168525
168610
|
if (opts.cron !== false)
|
|
168526
|
-
|
|
168611
|
+
execSync4("systemctl start matrixos-cron.service", { stdio: "inherit" });
|
|
168527
168612
|
}
|
|
168528
168613
|
console.log("[service] systemd units installed and started.");
|
|
168529
168614
|
}
|
|
@@ -168569,7 +168654,7 @@ function installLaunchd(opts) {
|
|
|
168569
168654
|
</plist>
|
|
168570
168655
|
`;
|
|
168571
168656
|
writeFileEnsureDir(path29.join(launchDir, `${label}.plist`), plist);
|
|
168572
|
-
|
|
168657
|
+
execSync4(`launchctl load ${path29.join(launchDir, `${label}.plist`)}`, { stdio: "inherit" });
|
|
168573
168658
|
}
|
|
168574
168659
|
if (opts.gateway !== false) {
|
|
168575
168660
|
const label = "com.klc.matrixos.gateway";
|
|
@@ -168608,7 +168693,7 @@ function installLaunchd(opts) {
|
|
|
168608
168693
|
</plist>
|
|
168609
168694
|
`;
|
|
168610
168695
|
writeFileEnsureDir(path29.join(launchDir, `${label}.plist`), plist);
|
|
168611
|
-
|
|
168696
|
+
execSync4(`launchctl load ${path29.join(launchDir, `${label}.plist`)}`, { stdio: "inherit" });
|
|
168612
168697
|
}
|
|
168613
168698
|
console.log("[service] launchd agents installed and loaded.");
|
|
168614
168699
|
}
|
|
@@ -190329,6 +190414,28 @@ Examples:
|
|
|
190329
190414
|
process.stdout.write(result.stdout);
|
|
190330
190415
|
process.exit(result.exitCode);
|
|
190331
190416
|
});
|
|
190417
|
+
var prepare = program2.command("prepare").description("Prepare a pull request WITHOUT submitting (draft by default; --apply to create)").option("-t, --title <text>", "PR title").option("-b, --body <text>", "PR body").option("--base <branch>", "Base branch", "main").option("--no-draft", "Open as ready PR (default is draft)").option("--apply", "Actually create the branch/commit/PR (default dry-run)").option("--json", "Output as JSON").addHelpText("after", `
|
|
190418
|
+
Examples:
|
|
190419
|
+
$ matrixos prepare # dry-run: show what would happen
|
|
190420
|
+
$ matrixos prepare --apply # create draft PR on main
|
|
190421
|
+
$ matrixos prepare --apply --title "Fix X" --no-draft
|
|
190422
|
+
`).action(async (options) => {
|
|
190423
|
+
const { preparePr: preparePr2 } = await Promise.resolve().then(() => (init_prepare(), exports_prepare));
|
|
190424
|
+
const code = preparePr2({
|
|
190425
|
+
title: options.title,
|
|
190426
|
+
body: options.body,
|
|
190427
|
+
base: options.base,
|
|
190428
|
+
draft: options.draft ?? true,
|
|
190429
|
+
apply: options.apply ?? false,
|
|
190430
|
+
json: options.json ?? false
|
|
190431
|
+
});
|
|
190432
|
+
process.exit(code);
|
|
190433
|
+
});
|
|
190434
|
+
prepare.command("submit <pr>").description("Mark a prepared PR as ready (human validation gate)").option("--json", "Output as JSON").action(async (pr, options) => {
|
|
190435
|
+
const { submitPr: submitPr2 } = await Promise.resolve().then(() => (init_prepare(), exports_prepare));
|
|
190436
|
+
const code = submitPr2({ pr, json: options.json ?? false });
|
|
190437
|
+
process.exit(code);
|
|
190438
|
+
});
|
|
190332
190439
|
program2.command("service").description("Install MaTrixOS as a persistent OS service (dashboard + gateway)").argument("<action>", "install | uninstall").option("--no-dashboard", "Skip dashboard service").option("--no-gateway", "Skip gateway service").option("--no-cron", "Skip cron scheduler service").option("--user", "Install as current user (systemd --user / launchd user agent)").action(async (action, options) => {
|
|
190333
190440
|
if (action !== "install" && action !== "uninstall") {
|
|
190334
190441
|
console.error(`[service] unknown action: ${action}. Use 'install' or 'uninstall'.`);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface PrepareOptions {
|
|
2
|
+
title?: string;
|
|
3
|
+
body?: string;
|
|
4
|
+
base?: string;
|
|
5
|
+
draft?: boolean;
|
|
6
|
+
apply?: boolean;
|
|
7
|
+
json?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SubmitOptions {
|
|
10
|
+
pr?: string;
|
|
11
|
+
json?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function preparePr(options: PrepareOptions): number;
|
|
14
|
+
export declare function submitPr(options: SubmitOptions): number;
|
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.52",
|
|
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",
|
|
@@ -168450,6 +168450,91 @@ function executeRgpdConsentCommand(args) {
|
|
|
168450
168450
|
}
|
|
168451
168451
|
}
|
|
168452
168452
|
|
|
168453
|
+
// packages/omo-opencode/src/cli/prepare.ts
|
|
168454
|
+
var exports_prepare = {};
|
|
168455
|
+
__export(exports_prepare, {
|
|
168456
|
+
submitPr: () => submitPr,
|
|
168457
|
+
preparePr: () => preparePr
|
|
168458
|
+
});
|
|
168459
|
+
import { execSync as execSync3 } from "child_process";
|
|
168460
|
+
function sh(cmd) {
|
|
168461
|
+
return execSync3(cmd, { encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"] }).trim();
|
|
168462
|
+
}
|
|
168463
|
+
function shOk(cmd) {
|
|
168464
|
+
try {
|
|
168465
|
+
execSync3(cmd, { encoding: "utf-8", stdio: "ignore" });
|
|
168466
|
+
return true;
|
|
168467
|
+
} catch {
|
|
168468
|
+
return false;
|
|
168469
|
+
}
|
|
168470
|
+
}
|
|
168471
|
+
function preparePr(options) {
|
|
168472
|
+
const apply = options.apply ?? false;
|
|
168473
|
+
const draft = options.draft ?? true;
|
|
168474
|
+
const base = options.base ?? "main";
|
|
168475
|
+
const steps = [];
|
|
168476
|
+
const run5 = (cmd, label) => {
|
|
168477
|
+
steps.push(`${label}: ${cmd}`);
|
|
168478
|
+
if (!apply)
|
|
168479
|
+
return "";
|
|
168480
|
+
try {
|
|
168481
|
+
return sh(cmd);
|
|
168482
|
+
} catch (e) {
|
|
168483
|
+
console.error(`[prepare] FAILED at: ${label}
|
|
168484
|
+
${e instanceof Error ? e.message : String(e)}`);
|
|
168485
|
+
process.exit(1);
|
|
168486
|
+
}
|
|
168487
|
+
};
|
|
168488
|
+
if (!shOk("git rev-parse --is-inside-work-tree")) {
|
|
168489
|
+
console.error("[prepare] not a git repository");
|
|
168490
|
+
return 1;
|
|
168491
|
+
}
|
|
168492
|
+
const status2 = sh("git status --porcelain");
|
|
168493
|
+
if (!status2 && !apply) {}
|
|
168494
|
+
if (apply && !status2) {
|
|
168495
|
+
console.error("[prepare] nothing to commit (working tree clean)");
|
|
168496
|
+
return 1;
|
|
168497
|
+
}
|
|
168498
|
+
const branch = `feat/matrixos-${Date.now().toString(36)}`;
|
|
168499
|
+
const title = options.title ?? (apply ? sh("git log -1 --pretty=%s") : "Prepared change");
|
|
168500
|
+
const body = options.body ?? "Prepared by matrixos prepare (draft, not yet submitted).";
|
|
168501
|
+
run5(`git checkout -b ${branch}`, "create branch");
|
|
168502
|
+
run5(`git add -A`, "stage");
|
|
168503
|
+
run5(`git commit -m "${title.replace(/"/g, "\\\"")}"`, "commit");
|
|
168504
|
+
run5(`git push -u origin ${branch}`, "push");
|
|
168505
|
+
const prFlags = draft ? "--fill --draft" : "--fill";
|
|
168506
|
+
const prOut = run5(`gh pr create ${prFlags} --base ${base} --title "${title.replace(/"/g, "\\\"")}" --body "${body.replace(/"/g, "\\\"")}"`, "open PR");
|
|
168507
|
+
if (!apply) {
|
|
168508
|
+
console.log(`[dry-run] would execute:
|
|
168509
|
+
` + steps.join(`
|
|
168510
|
+
`));
|
|
168511
|
+
console.log(`
|
|
168512
|
+
[dry-run] would open ${draft ? "DRAFT" : ""} PR on base '${base}' with title: ${title}`);
|
|
168513
|
+
console.log("[dry-run] re-run with --apply to actually create the PR.");
|
|
168514
|
+
return 0;
|
|
168515
|
+
}
|
|
168516
|
+
console.log(`[prepare] PR created: ${prOut}`);
|
|
168517
|
+
console.log(`[prepare] Draft PR is NOT submitted. Run 'matrixos submit <pr-url>' to mark ready.`);
|
|
168518
|
+
return 0;
|
|
168519
|
+
}
|
|
168520
|
+
function submitPr(options) {
|
|
168521
|
+
const pr = options.pr;
|
|
168522
|
+
if (!pr) {
|
|
168523
|
+
console.error("[submit] PR identifier required (URL or number)");
|
|
168524
|
+
return 1;
|
|
168525
|
+
}
|
|
168526
|
+
const prRef = pr.includes("/") || /^\d+$/.test(pr) ? pr : `#${pr}`;
|
|
168527
|
+
try {
|
|
168528
|
+
sh(`gh pr ready ${prRef}`);
|
|
168529
|
+
console.log(`[submit] PR ${prRef} marked ready.`);
|
|
168530
|
+
return 0;
|
|
168531
|
+
} catch (e) {
|
|
168532
|
+
console.error(`[submit] failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
168533
|
+
return 1;
|
|
168534
|
+
}
|
|
168535
|
+
}
|
|
168536
|
+
var init_prepare = () => {};
|
|
168537
|
+
|
|
168453
168538
|
// packages/omo-opencode/src/cli/service.ts
|
|
168454
168539
|
var exports_service = {};
|
|
168455
168540
|
__export(exports_service, {
|
|
@@ -168458,10 +168543,10 @@ __export(exports_service, {
|
|
|
168458
168543
|
import * as os15 from "os";
|
|
168459
168544
|
import * as fs24 from "fs";
|
|
168460
168545
|
import * as path29 from "path";
|
|
168461
|
-
import { execSync as
|
|
168546
|
+
import { execSync as execSync4 } from "child_process";
|
|
168462
168547
|
function resolveMatrixosBin2() {
|
|
168463
168548
|
try {
|
|
168464
|
-
const p2 =
|
|
168549
|
+
const p2 = execSync4("command -v matrixos", { encoding: "utf-8" }).trim();
|
|
168465
168550
|
if (p2)
|
|
168466
168551
|
return p2;
|
|
168467
168552
|
} catch {}
|
|
@@ -168473,7 +168558,7 @@ function resolveMatrixosBin2() {
|
|
|
168473
168558
|
}
|
|
168474
168559
|
function resolveBunBin() {
|
|
168475
168560
|
try {
|
|
168476
|
-
const p2 =
|
|
168561
|
+
const p2 = execSync4("command -v bun", { encoding: "utf-8" }).trim();
|
|
168477
168562
|
if (p2)
|
|
168478
168563
|
return p2;
|
|
168479
168564
|
} catch {}
|
|
@@ -168552,33 +168637,33 @@ WantedBy=${opts.user ? "default.target" : "multi-user.target"}
|
|
|
168552
168637
|
}
|
|
168553
168638
|
console.log("[service] reloading systemd...");
|
|
168554
168639
|
if (scope) {
|
|
168555
|
-
|
|
168640
|
+
execSync4(`${scope} systemctl --user daemon-reload`, { stdio: "inherit" });
|
|
168556
168641
|
if (opts.dashboard !== false)
|
|
168557
|
-
|
|
168642
|
+
execSync4(`${scope} systemctl --user enable matrixos-dashboard.service`, { stdio: "inherit" });
|
|
168558
168643
|
if (opts.gateway !== false)
|
|
168559
|
-
|
|
168644
|
+
execSync4(`${scope} systemctl --user enable matrixos-gateway.service`, { stdio: "inherit" });
|
|
168560
168645
|
if (opts.cron !== false)
|
|
168561
|
-
|
|
168646
|
+
execSync4(`${scope} systemctl --user enable matrixos-cron.service`, { stdio: "inherit" });
|
|
168562
168647
|
if (opts.dashboard !== false)
|
|
168563
|
-
|
|
168648
|
+
execSync4(`${scope} systemctl --user start matrixos-dashboard.service`, { stdio: "inherit" });
|
|
168564
168649
|
if (opts.gateway !== false)
|
|
168565
|
-
|
|
168650
|
+
execSync4(`${scope} systemctl --user start matrixos-gateway.service`, { stdio: "inherit" });
|
|
168566
168651
|
if (opts.cron !== false)
|
|
168567
|
-
|
|
168652
|
+
execSync4(`${scope} systemctl --user start matrixos-cron.service`, { stdio: "inherit" });
|
|
168568
168653
|
} else {
|
|
168569
|
-
|
|
168654
|
+
execSync4("systemctl daemon-reload", { stdio: "inherit" });
|
|
168570
168655
|
if (opts.dashboard !== false)
|
|
168571
|
-
|
|
168656
|
+
execSync4("systemctl enable matrixos-dashboard.service", { stdio: "inherit" });
|
|
168572
168657
|
if (opts.gateway !== false)
|
|
168573
|
-
|
|
168658
|
+
execSync4("systemctl enable matrixos-gateway.service", { stdio: "inherit" });
|
|
168574
168659
|
if (opts.cron !== false)
|
|
168575
|
-
|
|
168660
|
+
execSync4("systemctl enable matrixos-cron.service", { stdio: "inherit" });
|
|
168576
168661
|
if (opts.dashboard !== false)
|
|
168577
|
-
|
|
168662
|
+
execSync4("systemctl start matrixos-dashboard.service", { stdio: "inherit" });
|
|
168578
168663
|
if (opts.gateway !== false)
|
|
168579
|
-
|
|
168664
|
+
execSync4("systemctl start matrixos-gateway.service", { stdio: "inherit" });
|
|
168580
168665
|
if (opts.cron !== false)
|
|
168581
|
-
|
|
168666
|
+
execSync4("systemctl start matrixos-cron.service", { stdio: "inherit" });
|
|
168582
168667
|
}
|
|
168583
168668
|
console.log("[service] systemd units installed and started.");
|
|
168584
168669
|
}
|
|
@@ -168624,7 +168709,7 @@ function installLaunchd(opts) {
|
|
|
168624
168709
|
</plist>
|
|
168625
168710
|
`;
|
|
168626
168711
|
writeFileEnsureDir(path29.join(launchDir, `${label}.plist`), plist);
|
|
168627
|
-
|
|
168712
|
+
execSync4(`launchctl load ${path29.join(launchDir, `${label}.plist`)}`, { stdio: "inherit" });
|
|
168628
168713
|
}
|
|
168629
168714
|
if (opts.gateway !== false) {
|
|
168630
168715
|
const label = "com.klc.matrixos.gateway";
|
|
@@ -168663,7 +168748,7 @@ function installLaunchd(opts) {
|
|
|
168663
168748
|
</plist>
|
|
168664
168749
|
`;
|
|
168665
168750
|
writeFileEnsureDir(path29.join(launchDir, `${label}.plist`), plist);
|
|
168666
|
-
|
|
168751
|
+
execSync4(`launchctl load ${path29.join(launchDir, `${label}.plist`)}`, { stdio: "inherit" });
|
|
168667
168752
|
}
|
|
168668
168753
|
console.log("[service] launchd agents installed and loaded.");
|
|
168669
168754
|
}
|
|
@@ -190384,6 +190469,28 @@ Examples:
|
|
|
190384
190469
|
process.stdout.write(result.stdout);
|
|
190385
190470
|
process.exit(result.exitCode);
|
|
190386
190471
|
});
|
|
190472
|
+
var prepare = program2.command("prepare").description("Prepare a pull request WITHOUT submitting (draft by default; --apply to create)").option("-t, --title <text>", "PR title").option("-b, --body <text>", "PR body").option("--base <branch>", "Base branch", "main").option("--no-draft", "Open as ready PR (default is draft)").option("--apply", "Actually create the branch/commit/PR (default dry-run)").option("--json", "Output as JSON").addHelpText("after", `
|
|
190473
|
+
Examples:
|
|
190474
|
+
$ matrixos prepare # dry-run: show what would happen
|
|
190475
|
+
$ matrixos prepare --apply # create draft PR on main
|
|
190476
|
+
$ matrixos prepare --apply --title "Fix X" --no-draft
|
|
190477
|
+
`).action(async (options) => {
|
|
190478
|
+
const { preparePr: preparePr2 } = await Promise.resolve().then(() => (init_prepare(), exports_prepare));
|
|
190479
|
+
const code = preparePr2({
|
|
190480
|
+
title: options.title,
|
|
190481
|
+
body: options.body,
|
|
190482
|
+
base: options.base,
|
|
190483
|
+
draft: options.draft ?? true,
|
|
190484
|
+
apply: options.apply ?? false,
|
|
190485
|
+
json: options.json ?? false
|
|
190486
|
+
});
|
|
190487
|
+
process.exit(code);
|
|
190488
|
+
});
|
|
190489
|
+
prepare.command("submit <pr>").description("Mark a prepared PR as ready (human validation gate)").option("--json", "Output as JSON").action(async (pr, options) => {
|
|
190490
|
+
const { submitPr: submitPr2 } = await Promise.resolve().then(() => (init_prepare(), exports_prepare));
|
|
190491
|
+
const code = submitPr2({ pr, json: options.json ?? false });
|
|
190492
|
+
process.exit(code);
|
|
190493
|
+
});
|
|
190387
190494
|
program2.command("service").description("Install MaTrixOS as a persistent OS service (dashboard + gateway)").argument("<action>", "install | uninstall").option("--no-dashboard", "Skip dashboard service").option("--no-gateway", "Skip gateway service").option("--no-cron", "Skip cron scheduler service").option("--user", "Install as current user (systemd --user / launchd user agent)").action(async (action, options) => {
|
|
190388
190495
|
if (action !== "install" && action !== "uninstall") {
|
|
190389
190496
|
console.error(`[service] unknown action: ${action}. Use 'install' or 'uninstall'.`);
|
package/dist/index.js
CHANGED
|
@@ -368086,7 +368086,7 @@ function getCachedVersion(options = {}) {
|
|
|
368086
368086
|
// package.json
|
|
368087
368087
|
var package_default = {
|
|
368088
368088
|
name: "@kl-c/matrixos",
|
|
368089
|
-
version: "0.3.
|
|
368089
|
+
version: "0.3.52",
|
|
368090
368090
|
description: "MaTrixOS \u2014 Agentic OS for OpenCode. Personalizable, communicating, self-improving, resilient.",
|
|
368091
368091
|
main: "./dist/index.js",
|
|
368092
368092
|
types: "dist/index.d.ts",
|
package/package.json
CHANGED