openmates 0.14.5 → 0.14.6-alpha.1
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.
|
@@ -9528,7 +9528,7 @@ function formatTs(ts) {
|
|
|
9528
9528
|
// src/server.ts
|
|
9529
9529
|
import { execFileSync as execFileSync2, execSync, spawn as nodeSpawn, spawnSync } from "child_process";
|
|
9530
9530
|
import { createHash as createHash6, randomBytes as randomBytes2 } from "crypto";
|
|
9531
|
-
import { chmodSync as chmodSync2, closeSync, copyFileSync, cpSync, existsSync as existsSync5, mkdirSync as mkdirSync3, mkdtempSync, openSync, readFileSync as readFileSync5, readdirSync, rmSync as rmSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
9531
|
+
import { chmodSync as chmodSync2, closeSync, copyFileSync, cpSync, existsSync as existsSync5, mkdirSync as mkdirSync3, mkdtempSync, openSync, readFileSync as readFileSync5, readSync, readdirSync, rmSync as rmSync3, writeFileSync as writeFileSync3 } from "fs";
|
|
9532
9532
|
import { createInterface as createInterface2 } from "readline";
|
|
9533
9533
|
import { createInterface as createPromptInterface } from "readline/promises";
|
|
9534
9534
|
import { homedir as homedir5 } from "os";
|
|
@@ -9806,6 +9806,7 @@ var DEFAULT_IMAGE_REGISTRY = "ghcr.io/glowingkitty";
|
|
|
9806
9806
|
var UPDATE_HEALTH_TIMEOUT_MS = 12e4;
|
|
9807
9807
|
var UPDATE_HEALTH_INTERVAL_MS = 5e3;
|
|
9808
9808
|
var HEALTH_REQUEST_TIMEOUT_MS = 5e3;
|
|
9809
|
+
var CHECKSUM_BUFFER_BYTES = 1024 * 1024;
|
|
9809
9810
|
var IMAGE_CHANNEL_TAGS = {
|
|
9810
9811
|
stable: MAIN_BRANCH,
|
|
9811
9812
|
main: MAIN_BRANCH,
|
|
@@ -9895,6 +9896,21 @@ OPENMATES_IMAGE_REGISTRY=${DEFAULT_IMAGE_REGISTRY}
|
|
|
9895
9896
|
OPENMATES_IMAGE_TAG=
|
|
9896
9897
|
GIT_WORK_DIR=
|
|
9897
9898
|
DOCKER_GID=999
|
|
9899
|
+
CELERY_AUTOSCALE_MAX=3
|
|
9900
|
+
CELERY_AUTOSCALE_MIN=1
|
|
9901
|
+
TASK_WORKER_CONCURRENCY=3
|
|
9902
|
+
APP_AI_WORKER_CONCURRENCY=3
|
|
9903
|
+
APP_IMAGES_WORKER_CONCURRENCY=3
|
|
9904
|
+
APP_MUSIC_WORKER_CONCURRENCY=2
|
|
9905
|
+
TASK_WORKER_MEMORY_LIMIT=3g
|
|
9906
|
+
APP_AI_WORKER_MEMORY_LIMIT=2g
|
|
9907
|
+
APP_IMAGES_WORKER_MEMORY_LIMIT=1792m
|
|
9908
|
+
APP_MUSIC_WORKER_MEMORY_LIMIT=1536m
|
|
9909
|
+
APP_VIDEOS_WORKER_MEMORY_LIMIT=1280m
|
|
9910
|
+
APP_PDF_WORKER_MEMORY_LIMIT=1536m
|
|
9911
|
+
APP_DOCS_WORKER_MEMORY_LIMIT=1536m
|
|
9912
|
+
APP_CODE_WORKER_MEMORY_LIMIT=1g
|
|
9913
|
+
APP_SOCIAL_MEDIA_WORKER_MEMORY_LIMIT=1536m
|
|
9898
9914
|
`;
|
|
9899
9915
|
var VAULT_CONFIG_TEMPLATE = `# Minimal Vault configuration
|
|
9900
9916
|
listener "tcp" {
|
|
@@ -10513,6 +10529,21 @@ function formatSecretPreflight(preflight) {
|
|
|
10513
10529
|
if (preflight.vaultUnavailableReason) parts.push(preflight.vaultUnavailableReason);
|
|
10514
10530
|
return parts.join("; ");
|
|
10515
10531
|
}
|
|
10532
|
+
function hashFile(path) {
|
|
10533
|
+
const hash = createHash6("sha256");
|
|
10534
|
+
const fd = openSync(path, "r");
|
|
10535
|
+
const buffer = Buffer.allocUnsafe(CHECKSUM_BUFFER_BYTES);
|
|
10536
|
+
try {
|
|
10537
|
+
while (true) {
|
|
10538
|
+
const bytesRead = readSync(fd, buffer, 0, buffer.length, null);
|
|
10539
|
+
if (bytesRead === 0) break;
|
|
10540
|
+
hash.update(buffer.subarray(0, bytesRead));
|
|
10541
|
+
}
|
|
10542
|
+
} finally {
|
|
10543
|
+
closeSync(fd);
|
|
10544
|
+
}
|
|
10545
|
+
return hash.digest("hex");
|
|
10546
|
+
}
|
|
10516
10547
|
function writeChecksums(rootDir) {
|
|
10517
10548
|
const lines = [];
|
|
10518
10549
|
const walk = (dir) => {
|
|
@@ -10524,8 +10555,7 @@ function writeChecksums(rootDir) {
|
|
|
10524
10555
|
}
|
|
10525
10556
|
if (entry.name === "checksums.sha256") continue;
|
|
10526
10557
|
const relative3 = path.slice(rootDir.length + 1);
|
|
10527
|
-
|
|
10528
|
-
lines.push(`${hash} ${relative3}`);
|
|
10558
|
+
lines.push(`${hashFile(path)} ${relative3}`);
|
|
10529
10559
|
}
|
|
10530
10560
|
};
|
|
10531
10561
|
walk(rootDir);
|
|
@@ -10546,7 +10576,7 @@ function verifyChecksums(rootDir) {
|
|
|
10546
10576
|
}
|
|
10547
10577
|
const filePath = join3(rootDir, relative3);
|
|
10548
10578
|
if (!existsSync5(filePath)) throw new Error(`Backup archive is missing checksummed file: ${relative3}`);
|
|
10549
|
-
const actual =
|
|
10579
|
+
const actual = hashFile(filePath);
|
|
10550
10580
|
if (actual !== match[1]) throw new Error(`Backup checksum mismatch for ${relative3}.`);
|
|
10551
10581
|
}
|
|
10552
10582
|
}
|
|
@@ -46838,6 +46868,22 @@ var TuiTerminal = class {
|
|
|
46838
46868
|
}
|
|
46839
46869
|
};
|
|
46840
46870
|
|
|
46871
|
+
// src/branding.ts
|
|
46872
|
+
var OPENMATES_WORDMARK = "OPENMATES";
|
|
46873
|
+
var OPENMATES_ASCII_LARGE = [
|
|
46874
|
+
" \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588",
|
|
46875
|
+
"\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 ",
|
|
46876
|
+
"\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588",
|
|
46877
|
+
"\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588",
|
|
46878
|
+
" \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588"
|
|
46879
|
+
];
|
|
46880
|
+
function openMatesAsciiLogo(width = 100) {
|
|
46881
|
+
return width >= 86 ? [...OPENMATES_ASCII_LARGE, OPENMATES_WORDMARK] : [OPENMATES_WORDMARK];
|
|
46882
|
+
}
|
|
46883
|
+
function renderOpenMatesAsciiLogo(width = 100) {
|
|
46884
|
+
return openMatesAsciiLogo(width).join("\n");
|
|
46885
|
+
}
|
|
46886
|
+
|
|
46841
46887
|
// src/tuiRenderer.ts
|
|
46842
46888
|
var MIN_WIDTH = 48;
|
|
46843
46889
|
var CONTENT_PREVIEW_LINES = 12;
|
|
@@ -46953,7 +46999,7 @@ function renderBody(state, width) {
|
|
|
46953
46999
|
function renderStart(width) {
|
|
46954
47000
|
return [
|
|
46955
47001
|
"",
|
|
46956
|
-
...
|
|
47002
|
+
...openMatesAsciiLogo(width),
|
|
46957
47003
|
"",
|
|
46958
47004
|
"AI team mates.",
|
|
46959
47005
|
"For everyday tasks & learning.",
|
|
@@ -47102,17 +47148,6 @@ function interestScore(haystack, interest) {
|
|
|
47102
47148
|
}
|
|
47103
47149
|
return score;
|
|
47104
47150
|
}
|
|
47105
|
-
function asciiLogo(width) {
|
|
47106
|
-
const large = [
|
|
47107
|
-
" \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588",
|
|
47108
|
-
"\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 ",
|
|
47109
|
-
"\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588",
|
|
47110
|
-
"\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588",
|
|
47111
|
-
" \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588"
|
|
47112
|
-
];
|
|
47113
|
-
if (width >= 78) return large;
|
|
47114
|
-
return ["OPENMATES"];
|
|
47115
|
-
}
|
|
47116
47151
|
function labelForRole(role) {
|
|
47117
47152
|
if (role === "user") return "You";
|
|
47118
47153
|
if (role === "system") return "System";
|
|
@@ -47750,24 +47785,63 @@ function buildSelfUpdatePlan(flags) {
|
|
|
47750
47785
|
command,
|
|
47751
47786
|
args,
|
|
47752
47787
|
packageSpec,
|
|
47788
|
+
target,
|
|
47753
47789
|
currentVersion: getCliPackageVersion(),
|
|
47754
47790
|
dryRun: flags["dry-run"] === true
|
|
47755
47791
|
};
|
|
47756
47792
|
}
|
|
47757
|
-
function
|
|
47793
|
+
function checkSelfUpdateStatus(plan) {
|
|
47794
|
+
const latest = resolveTargetVersion(plan.target);
|
|
47795
|
+
if (!latest.version) {
|
|
47796
|
+
return {
|
|
47797
|
+
currentVersion: plan.currentVersion,
|
|
47798
|
+
latestVersion: null,
|
|
47799
|
+
updateAvailable: null,
|
|
47800
|
+
checkError: latest.error
|
|
47801
|
+
};
|
|
47802
|
+
}
|
|
47803
|
+
return {
|
|
47804
|
+
currentVersion: plan.currentVersion,
|
|
47805
|
+
latestVersion: latest.version,
|
|
47806
|
+
updateAvailable: plan.currentVersion !== latest.version,
|
|
47807
|
+
checkError: null
|
|
47808
|
+
};
|
|
47809
|
+
}
|
|
47810
|
+
function runSelfUpdate(plan, options = {}) {
|
|
47758
47811
|
if (plan.dryRun) return;
|
|
47759
47812
|
const result = spawnSync2(plan.command, plan.args, {
|
|
47760
47813
|
encoding: "utf-8",
|
|
47761
47814
|
stdio: ["ignore", "pipe", "pipe"]
|
|
47762
47815
|
});
|
|
47763
|
-
if (result.stdout) process.stderr.write(result.stdout);
|
|
47764
|
-
if (result.stderr) process.stderr.write(result.stderr);
|
|
47816
|
+
if (options.verbose && result.stdout) process.stderr.write(result.stdout);
|
|
47817
|
+
if (options.verbose && result.stderr) process.stderr.write(result.stderr);
|
|
47765
47818
|
if (result.error) {
|
|
47766
47819
|
throw new Error(`Unable to run ${plan.command}: ${result.error.message}`);
|
|
47767
47820
|
}
|
|
47768
47821
|
if (result.status !== 0) {
|
|
47769
|
-
|
|
47822
|
+
const output = [result.stdout, result.stderr].filter(Boolean).join("\n").trim();
|
|
47823
|
+
const suffix = output ? `
|
|
47824
|
+
${output}` : "";
|
|
47825
|
+
throw new Error(`${plan.command} ${plan.args.join(" ")} failed with exit code ${result.status ?? "unknown"}${suffix}`);
|
|
47826
|
+
}
|
|
47827
|
+
}
|
|
47828
|
+
function resolveTargetVersion(target) {
|
|
47829
|
+
const forced = process.env.OPENMATES_CLI_LATEST_VERSION;
|
|
47830
|
+
if (forced && forced.trim()) return { version: forced.trim(), error: null };
|
|
47831
|
+
if (/^\d+\.\d+\.\d+(?:[-+][a-zA-Z0-9._-]+)?$/.test(target)) {
|
|
47832
|
+
return { version: target, error: null };
|
|
47833
|
+
}
|
|
47834
|
+
const result = spawnSync2(commandName("npm"), ["view", `${PACKAGE_NAME}@${target}`, "version"], {
|
|
47835
|
+
encoding: "utf-8",
|
|
47836
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
47837
|
+
});
|
|
47838
|
+
if (result.error) return { version: null, error: result.error.message };
|
|
47839
|
+
if (result.status !== 0) {
|
|
47840
|
+
const message = (result.stderr || result.stdout || `npm view exited with ${result.status ?? "unknown"}`).trim();
|
|
47841
|
+
return { version: null, error: message };
|
|
47770
47842
|
}
|
|
47843
|
+
const version = result.stdout.trim().split("\n").at(-1)?.trim() ?? "";
|
|
47844
|
+
return version ? { version, error: null } : { version: null, error: "npm did not return a version" };
|
|
47771
47845
|
}
|
|
47772
47846
|
function parsePackageManager(value) {
|
|
47773
47847
|
if (value === void 0) return detectPackageManager();
|
|
@@ -47819,6 +47893,10 @@ async function main() {
|
|
|
47819
47893
|
}
|
|
47820
47894
|
}
|
|
47821
47895
|
if (!command) {
|
|
47896
|
+
if (parsed.flags.version !== void 0) {
|
|
47897
|
+
handleCliVersion(parsed.flags);
|
|
47898
|
+
return;
|
|
47899
|
+
}
|
|
47822
47900
|
if (parsed.flags.help === true) {
|
|
47823
47901
|
printHelp();
|
|
47824
47902
|
return;
|
|
@@ -47837,6 +47915,14 @@ async function main() {
|
|
|
47837
47915
|
printHelp();
|
|
47838
47916
|
return;
|
|
47839
47917
|
}
|
|
47918
|
+
if (command === "version") {
|
|
47919
|
+
if (parsed.flags.help === true) {
|
|
47920
|
+
printVersionHelp();
|
|
47921
|
+
return;
|
|
47922
|
+
}
|
|
47923
|
+
handleCliVersion(parsed.flags);
|
|
47924
|
+
return;
|
|
47925
|
+
}
|
|
47840
47926
|
if (parsed.flags.help === true && !subcommand) {
|
|
47841
47927
|
if (command === "chats") {
|
|
47842
47928
|
printChatsHelp();
|
|
@@ -47894,6 +47980,10 @@ async function main() {
|
|
|
47894
47980
|
printSelfUpdateHelp();
|
|
47895
47981
|
return;
|
|
47896
47982
|
}
|
|
47983
|
+
if (command === "version") {
|
|
47984
|
+
printVersionHelp();
|
|
47985
|
+
return;
|
|
47986
|
+
}
|
|
47897
47987
|
if (command === "feedback") {
|
|
47898
47988
|
printFeedbackHelp();
|
|
47899
47989
|
return;
|
|
@@ -48023,12 +48113,17 @@ function handleSupport(flags) {
|
|
|
48023
48113
|
}
|
|
48024
48114
|
function handleSelfUpdate(command, flags) {
|
|
48025
48115
|
const plan = buildSelfUpdatePlan(flags);
|
|
48116
|
+
const status = checkSelfUpdateStatus(plan);
|
|
48117
|
+
const shouldInstall = status.updateAvailable !== false;
|
|
48026
48118
|
if (flags.json === true) {
|
|
48027
|
-
if (!plan.dryRun) runSelfUpdate(plan);
|
|
48119
|
+
if (!plan.dryRun && shouldInstall) runSelfUpdate(plan, { verbose: flags.verbose === true });
|
|
48028
48120
|
printJson2({
|
|
48029
48121
|
command,
|
|
48030
|
-
status: plan.dryRun ? "planned" : "success",
|
|
48122
|
+
status: status.updateAvailable === false ? "up_to_date" : plan.dryRun ? "planned" : "success",
|
|
48031
48123
|
current_version: plan.currentVersion,
|
|
48124
|
+
latest_version: status.latestVersion,
|
|
48125
|
+
update_available: status.updateAvailable,
|
|
48126
|
+
check_error: status.checkError,
|
|
48032
48127
|
package_manager: plan.packageManager,
|
|
48033
48128
|
package: plan.packageSpec,
|
|
48034
48129
|
run: [plan.command, ...plan.args],
|
|
@@ -48036,14 +48131,61 @@ function handleSelfUpdate(command, flags) {
|
|
|
48036
48131
|
});
|
|
48037
48132
|
return;
|
|
48038
48133
|
}
|
|
48134
|
+
console.log(renderOpenMatesAsciiLogo());
|
|
48135
|
+
console.log("");
|
|
48136
|
+
console.log("Checking for updates...");
|
|
48137
|
+
console.log("");
|
|
48138
|
+
console.log(`Current version: ${plan.currentVersion}`);
|
|
48139
|
+
console.log(`Latest version: ${status.latestVersion ?? "unknown"}`);
|
|
48140
|
+
if (status.checkError) {
|
|
48141
|
+
console.log(`Update check failed: ${status.checkError}`);
|
|
48142
|
+
}
|
|
48143
|
+
console.log("");
|
|
48039
48144
|
if (plan.dryRun) {
|
|
48040
|
-
|
|
48145
|
+
if (status.updateAvailable === false) {
|
|
48146
|
+
console.log("OpenMates CLI is already up to date.");
|
|
48147
|
+
return;
|
|
48148
|
+
}
|
|
48041
48149
|
console.log(`Would run: ${[plan.command, ...plan.args].join(" ")}`);
|
|
48042
48150
|
return;
|
|
48043
48151
|
}
|
|
48044
|
-
|
|
48045
|
-
|
|
48046
|
-
|
|
48152
|
+
if (status.updateAvailable === false) {
|
|
48153
|
+
console.log("OpenMates CLI is already up to date.");
|
|
48154
|
+
return;
|
|
48155
|
+
}
|
|
48156
|
+
console.log(`Updating OpenMates CLI with ${plan.packageManager}...`);
|
|
48157
|
+
runSelfUpdate(plan, { verbose: flags.verbose === true });
|
|
48158
|
+
console.log(`Installed OpenMates CLI ${status.latestVersion ?? plan.target}.`);
|
|
48159
|
+
console.log("");
|
|
48160
|
+
console.log("OpenMates is up to date.");
|
|
48161
|
+
}
|
|
48162
|
+
function handleCliVersion(flags) {
|
|
48163
|
+
const planFlags = { ...flags, "dry-run": true };
|
|
48164
|
+
if (planFlags.version === true) delete planFlags.version;
|
|
48165
|
+
const plan = buildSelfUpdatePlan(planFlags);
|
|
48166
|
+
const status = checkSelfUpdateStatus(plan);
|
|
48167
|
+
if (flags.json === true) {
|
|
48168
|
+
printJson2({
|
|
48169
|
+
command: "version",
|
|
48170
|
+
current_version: status.currentVersion,
|
|
48171
|
+
latest_version: status.latestVersion,
|
|
48172
|
+
update_available: status.updateAvailable,
|
|
48173
|
+
check_error: status.checkError,
|
|
48174
|
+
upgrade_command: status.updateAvailable ? "openmates upgrade" : null
|
|
48175
|
+
});
|
|
48176
|
+
return;
|
|
48177
|
+
}
|
|
48178
|
+
console.log(`OpenMates CLI ${status.currentVersion}`);
|
|
48179
|
+
if (status.checkError) {
|
|
48180
|
+
console.log(`Update check failed: ${status.checkError}`);
|
|
48181
|
+
return;
|
|
48182
|
+
}
|
|
48183
|
+
if (status.updateAvailable) {
|
|
48184
|
+
console.log(`Update available: ${status.latestVersion}`);
|
|
48185
|
+
console.log("Run: openmates upgrade");
|
|
48186
|
+
return;
|
|
48187
|
+
}
|
|
48188
|
+
console.log("OpenMates CLI is up to date.");
|
|
48047
48189
|
}
|
|
48048
48190
|
async function handleRemoteAccess(client, subcommand, rest, flags) {
|
|
48049
48191
|
if (!subcommand || subcommand === "help" || flags.help === true) {
|
|
@@ -52945,6 +53087,7 @@ Commands:
|
|
|
52945
53087
|
openmates benchmark [--help] Run real model benchmarks with usage tagged as benchmark spend
|
|
52946
53088
|
openmates remote-access [--help] Attach and search local Project sources
|
|
52947
53089
|
openmates support Show voluntary financial support options
|
|
53090
|
+
openmates version Show CLI version and update availability
|
|
52948
53091
|
openmates update Update the installed OpenMates CLI package
|
|
52949
53092
|
openmates upgrade Alias for openmates update
|
|
52950
53093
|
openmates server [--help] Server management (install, start, stop, ...)
|
|
@@ -52955,12 +53098,24 @@ Flags:
|
|
|
52955
53098
|
--json Output raw JSON instead of formatted output
|
|
52956
53099
|
--api-url <url> Override API base URL (default: installed self-host server, then https://api.openmates.org)
|
|
52957
53100
|
--api-key <key> Optional API key override (or set OPENMATES_API_KEY)
|
|
53101
|
+
--version Show CLI version and update availability
|
|
52958
53102
|
--help Show contextual help for any command`);
|
|
52959
53103
|
}
|
|
53104
|
+
function printVersionHelp() {
|
|
53105
|
+
console.log(`OpenMates CLI version command:
|
|
53106
|
+
openmates version [--json]
|
|
53107
|
+
openmates --version [--json]
|
|
53108
|
+
|
|
53109
|
+
Prints the installed CLI version, checks the latest npm version, and shows the
|
|
53110
|
+
upgrade command when an update is available.
|
|
53111
|
+
|
|
53112
|
+
Options:
|
|
53113
|
+
--json Output the version/update status as JSON`);
|
|
53114
|
+
}
|
|
52960
53115
|
function printSelfUpdateHelp() {
|
|
52961
53116
|
console.log(`OpenMates CLI update commands:
|
|
52962
|
-
openmates update [--version <version|tag>] [--package-manager <name>] [--dry-run] [--json]
|
|
52963
|
-
openmates upgrade [--version <version|tag>] [--package-manager <name>] [--dry-run] [--json]
|
|
53117
|
+
openmates update [--version <version|tag>] [--package-manager <name>] [--dry-run] [--verbose] [--json]
|
|
53118
|
+
openmates upgrade [--version <version|tag>] [--package-manager <name>] [--dry-run] [--verbose] [--json]
|
|
52964
53119
|
|
|
52965
53120
|
Updates the globally installed openmates package. The default target is latest.
|
|
52966
53121
|
|
|
@@ -52968,6 +53123,7 @@ Options:
|
|
|
52968
53123
|
--version <version|tag> Install a specific npm version or dist-tag (default: latest)
|
|
52969
53124
|
--package-manager <name> npm, pnpm, yarn, or bun (default: detect, then npm)
|
|
52970
53125
|
--dry-run Print the package-manager command without running it
|
|
53126
|
+
--verbose Stream package-manager output during installation
|
|
52971
53127
|
--json Output the update plan/result as JSON`);
|
|
52972
53128
|
}
|
|
52973
53129
|
function printRemoteAccessHelp() {
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -184,8 +184,9 @@ services:
|
|
|
184
184
|
image: ${OPENMATES_IMAGE_REGISTRY:-ghcr.io/glowingkitty}/openmates-api:${OPENMATES_IMAGE_TAG:-dev}
|
|
185
185
|
container_name: task-worker
|
|
186
186
|
restart: unless-stopped
|
|
187
|
+
mem_limit: ${TASK_WORKER_MEMORY_LIMIT:-3g}
|
|
187
188
|
env_file: ../../.env
|
|
188
|
-
command: python -m celery -A backend.core.api.app.tasks.celery_config worker --loglevel=info --queues=email,user_init,persistence,health_check,server_stats,demo,reminder,push --concurrency=
|
|
189
|
+
command: python -m celery -A backend.core.api.app.tasks.celery_config worker --loglevel=info --queues=email,user_init,persistence,health_check,server_stats,demo,reminder,push --concurrency=${TASK_WORKER_CONCURRENCY:-3} --max-tasks-per-child=50 --max-memory-per-child=600000 --prefetch-multiplier=1
|
|
189
190
|
networks: [openmates]
|
|
190
191
|
depends_on: [api]
|
|
191
192
|
|
|
@@ -203,36 +204,40 @@ services:
|
|
|
203
204
|
app-ai-worker:
|
|
204
205
|
<<: *openmates-worker-base
|
|
205
206
|
container_name: app-ai-worker
|
|
207
|
+
mem_limit: ${APP_AI_WORKER_MEMORY_LIMIT:-2g}
|
|
206
208
|
environment:
|
|
207
209
|
<<: *openmates-worker-env
|
|
208
210
|
CELERY_QUEUES: app_ai
|
|
209
|
-
CELERY_AUTOSCALE_MAX: ${CELERY_AUTOSCALE_MAX:-
|
|
211
|
+
CELERY_AUTOSCALE_MAX: ${APP_AI_WORKER_CONCURRENCY:-${CELERY_AUTOSCALE_MAX:-3}}
|
|
210
212
|
command: >
|
|
211
213
|
sh -c "chown -R celeryuser:celeryuser /vault-data && gosu celeryuser python -m celery -A backend.core.api.app.tasks.celery_config worker --loglevel=info --queues=app_ai --concurrency=$${CELERY_AUTOSCALE_MAX} --max-tasks-per-child=50 --max-memory-per-child=600000 --prefetch-multiplier=1"
|
|
212
214
|
|
|
213
215
|
app-images-worker:
|
|
214
216
|
<<: *openmates-worker-base
|
|
215
217
|
container_name: app-images-worker
|
|
218
|
+
mem_limit: ${APP_IMAGES_WORKER_MEMORY_LIMIT:-1792m}
|
|
216
219
|
environment:
|
|
217
220
|
<<: *openmates-worker-env
|
|
218
221
|
CELERY_QUEUES: app_images
|
|
219
|
-
CELERY_AUTOSCALE_MAX: ${CELERY_AUTOSCALE_MAX:-
|
|
222
|
+
CELERY_AUTOSCALE_MAX: ${APP_IMAGES_WORKER_CONCURRENCY:-${CELERY_AUTOSCALE_MAX:-3}}
|
|
220
223
|
command: >
|
|
221
224
|
sh -c "chown -R celeryuser:celeryuser /vault-data && gosu celeryuser python -m celery -A backend.core.api.app.tasks.celery_config worker --loglevel=info --queues=app_images --concurrency=$${CELERY_AUTOSCALE_MAX} --max-tasks-per-child=50 --max-memory-per-child=600000 --prefetch-multiplier=1"
|
|
222
225
|
|
|
223
226
|
app-music-worker:
|
|
224
227
|
<<: *openmates-worker-base
|
|
225
228
|
container_name: app-music-worker
|
|
229
|
+
mem_limit: ${APP_MUSIC_WORKER_MEMORY_LIMIT:-1536m}
|
|
226
230
|
environment:
|
|
227
231
|
<<: *openmates-worker-env
|
|
228
232
|
CELERY_QUEUES: app_music
|
|
229
|
-
CELERY_AUTOSCALE_MAX: ${
|
|
233
|
+
CELERY_AUTOSCALE_MAX: ${APP_MUSIC_WORKER_CONCURRENCY:-2}
|
|
230
234
|
command: >
|
|
231
235
|
sh -c "chown -R celeryuser:celeryuser /vault-data && gosu celeryuser python -m celery -A backend.core.api.app.tasks.celery_config worker --loglevel=info --queues=app_music --concurrency=$${CELERY_AUTOSCALE_MAX} --max-tasks-per-child=20 --max-memory-per-child=600000 --prefetch-multiplier=1"
|
|
232
236
|
|
|
233
237
|
app-videos-worker:
|
|
234
238
|
<<: *openmates-worker-base
|
|
235
239
|
container_name: app-videos-worker
|
|
240
|
+
mem_limit: ${APP_VIDEOS_WORKER_MEMORY_LIMIT:-1280m}
|
|
236
241
|
environment:
|
|
237
242
|
<<: *openmates-worker-env
|
|
238
243
|
CELERY_QUEUES: app_videos
|
|
@@ -244,6 +249,7 @@ services:
|
|
|
244
249
|
app-pdf-worker:
|
|
245
250
|
<<: *openmates-worker-base
|
|
246
251
|
container_name: app-pdf-worker
|
|
252
|
+
mem_limit: ${APP_PDF_WORKER_MEMORY_LIMIT:-1536m}
|
|
247
253
|
environment:
|
|
248
254
|
<<: *openmates-worker-env
|
|
249
255
|
CELERY_QUEUES: app_pdf
|
|
@@ -254,6 +260,7 @@ services:
|
|
|
254
260
|
<<: *openmates-worker-base
|
|
255
261
|
image: ${OPENMATES_IMAGE_REGISTRY:-ghcr.io/glowingkitty}/openmates-docs-worker:${OPENMATES_IMAGE_TAG:-dev}
|
|
256
262
|
container_name: app-docs-worker
|
|
263
|
+
mem_limit: ${APP_DOCS_WORKER_MEMORY_LIMIT:-1536m}
|
|
257
264
|
environment:
|
|
258
265
|
<<: *openmates-worker-env
|
|
259
266
|
CELERY_QUEUES: app_docs
|
|
@@ -263,6 +270,7 @@ services:
|
|
|
263
270
|
app-code-worker:
|
|
264
271
|
<<: *openmates-worker-base
|
|
265
272
|
container_name: app-code-worker
|
|
273
|
+
mem_limit: ${APP_CODE_WORKER_MEMORY_LIMIT:-1g}
|
|
266
274
|
environment:
|
|
267
275
|
<<: *openmates-worker-env
|
|
268
276
|
CELERY_QUEUES: app_code
|
|
@@ -272,6 +280,7 @@ services:
|
|
|
272
280
|
app-social-media-worker:
|
|
273
281
|
<<: *openmates-worker-base
|
|
274
282
|
container_name: app-social-media-worker
|
|
283
|
+
mem_limit: ${APP_SOCIAL_MEDIA_WORKER_MEMORY_LIMIT:-1536m}
|
|
275
284
|
environment:
|
|
276
285
|
<<: *openmates-worker-env
|
|
277
286
|
CELERY_QUEUES: app_social_media
|