openmates 0.14.5-alpha.0 → 0.14.6-alpha.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.
@@ -9526,9 +9526,9 @@ function formatTs(ts) {
9526
9526
  }
9527
9527
 
9528
9528
  // src/server.ts
9529
- import { execFileSync as execFileSync2, execSync, spawn as nodeSpawn } from "child_process";
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, copyFileSync, cpSync, existsSync as existsSync5, mkdirSync as mkdirSync3, mkdtempSync, 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";
@@ -9652,7 +9652,7 @@ function planUpdate(input) {
9652
9652
  const missingRequiredSecrets = input.missingRequiredSecrets ?? [];
9653
9653
  const blocked = input.continuous === true && missingRequiredSecrets.length > 0;
9654
9654
  const steps = ["preflight"];
9655
- const backupName = runtime.dataBearing && input.skipBackup !== true ? `latest-pre-update-${runtime.role}.tar.zst` : null;
9655
+ const backupName = runtime.dataBearing && input.skipBackup !== true ? `latest-pre-update-${runtime.role}.tar.gz` : null;
9656
9656
  if (backupName) steps.push("backup:latest-pre-update");
9657
9657
  steps.push("pull", "up", "health-check");
9658
9658
  return {
@@ -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
- const hash = createHash6("sha256").update(readFileSync5(path)).digest("hex");
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 = createHash6("sha256").update(readFileSync5(filePath)).digest("hex");
10579
+ const actual = hashFile(filePath);
10550
10580
  if (actual !== match[1]) throw new Error(`Backup checksum mismatch for ${relative3}.`);
10551
10581
  }
10552
10582
  }
@@ -10573,14 +10603,19 @@ function createServerBackup(installPath, role, options = {}) {
10573
10603
  if (role === "core") {
10574
10604
  const databaseUser = env.DATABASE_USERNAME || "directus";
10575
10605
  const databaseName = env.DATABASE_NAME || "directus";
10606
+ const dumpFile = openSync(join3(tempDir, "postgres.sql"), "w");
10576
10607
  try {
10577
- const dump = execSync(
10578
- `docker exec cms-database pg_dump --clean --if-exists --no-owner --no-privileges -U ${shellQuote(databaseUser)} ${shellQuote(databaseName)}`,
10579
- { encoding: "utf-8", maxBuffer: 256 * 1024 * 1024 }
10608
+ const result = spawnSync(
10609
+ "docker",
10610
+ ["exec", "cms-database", "pg_dump", "--clean", "--if-exists", "--no-owner", "--no-privileges", "-U", databaseUser, databaseName],
10611
+ { encoding: "utf-8", stdio: ["ignore", dumpFile, "pipe"] }
10580
10612
  );
10581
- writeFileSync3(join3(tempDir, "postgres.sql"), dump);
10613
+ if (result.error) throw result.error;
10614
+ if (result.status !== 0) throw new Error(result.stderr || `pg_dump exited with status ${result.status}`);
10582
10615
  } catch (error) {
10583
10616
  throw new Error(`Postgres backup failed. Is cms-database running? ${error instanceof Error ? error.message : String(error)}`);
10617
+ } finally {
10618
+ closeSync(dumpFile);
10584
10619
  }
10585
10620
  }
10586
10621
  for (const item of [
@@ -46833,6 +46868,22 @@ var TuiTerminal = class {
46833
46868
  }
46834
46869
  };
46835
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
+
46836
46887
  // src/tuiRenderer.ts
46837
46888
  var MIN_WIDTH = 48;
46838
46889
  var CONTENT_PREVIEW_LINES = 12;
@@ -46948,7 +46999,7 @@ function renderBody(state, width) {
46948
46999
  function renderStart(width) {
46949
47000
  return [
46950
47001
  "",
46951
- ...asciiLogo(width),
47002
+ ...openMatesAsciiLogo(width),
46952
47003
  "",
46953
47004
  "AI team mates.",
46954
47005
  "For everyday tasks & learning.",
@@ -47097,17 +47148,6 @@ function interestScore(haystack, interest) {
47097
47148
  }
47098
47149
  return score;
47099
47150
  }
47100
- function asciiLogo(width) {
47101
- const large = [
47102
- " \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",
47103
- "\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 ",
47104
- "\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",
47105
- "\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",
47106
- " \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"
47107
- ];
47108
- if (width >= 78) return large;
47109
- return ["OPENMATES"];
47110
- }
47111
47151
  function labelForRole(role) {
47112
47152
  if (role === "user") return "You";
47113
47153
  if (role === "system") return "System";
@@ -47722,7 +47762,7 @@ function assertRemoteAccessSourceRecord(value, index) {
47722
47762
  }
47723
47763
 
47724
47764
  // src/selfUpdate.ts
47725
- import { spawnSync } from "child_process";
47765
+ import { spawnSync as spawnSync2 } from "child_process";
47726
47766
  import { readFileSync as readFileSync8 } from "fs";
47727
47767
  var PACKAGE_NAME = "openmates";
47728
47768
  var DEFAULT_TARGET = "latest";
@@ -47745,24 +47785,63 @@ function buildSelfUpdatePlan(flags) {
47745
47785
  command,
47746
47786
  args,
47747
47787
  packageSpec,
47788
+ target,
47748
47789
  currentVersion: getCliPackageVersion(),
47749
47790
  dryRun: flags["dry-run"] === true
47750
47791
  };
47751
47792
  }
47752
- function runSelfUpdate(plan) {
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 = {}) {
47753
47811
  if (plan.dryRun) return;
47754
- const result = spawnSync(plan.command, plan.args, {
47812
+ const result = spawnSync2(plan.command, plan.args, {
47755
47813
  encoding: "utf-8",
47756
47814
  stdio: ["ignore", "pipe", "pipe"]
47757
47815
  });
47758
- if (result.stdout) process.stderr.write(result.stdout);
47759
- 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);
47760
47818
  if (result.error) {
47761
47819
  throw new Error(`Unable to run ${plan.command}: ${result.error.message}`);
47762
47820
  }
47763
47821
  if (result.status !== 0) {
47764
- throw new Error(`${plan.command} ${plan.args.join(" ")} failed with exit code ${result.status ?? "unknown"}`);
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 };
47765
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" };
47766
47845
  }
47767
47846
  function parsePackageManager(value) {
47768
47847
  if (value === void 0) return detectPackageManager();
@@ -47814,6 +47893,10 @@ async function main() {
47814
47893
  }
47815
47894
  }
47816
47895
  if (!command) {
47896
+ if (parsed.flags.version !== void 0) {
47897
+ handleCliVersion(parsed.flags);
47898
+ return;
47899
+ }
47817
47900
  if (parsed.flags.help === true) {
47818
47901
  printHelp();
47819
47902
  return;
@@ -47832,6 +47915,14 @@ async function main() {
47832
47915
  printHelp();
47833
47916
  return;
47834
47917
  }
47918
+ if (command === "version") {
47919
+ if (parsed.flags.help === true) {
47920
+ printVersionHelp();
47921
+ return;
47922
+ }
47923
+ handleCliVersion(parsed.flags);
47924
+ return;
47925
+ }
47835
47926
  if (parsed.flags.help === true && !subcommand) {
47836
47927
  if (command === "chats") {
47837
47928
  printChatsHelp();
@@ -47889,6 +47980,10 @@ async function main() {
47889
47980
  printSelfUpdateHelp();
47890
47981
  return;
47891
47982
  }
47983
+ if (command === "version") {
47984
+ printVersionHelp();
47985
+ return;
47986
+ }
47892
47987
  if (command === "feedback") {
47893
47988
  printFeedbackHelp();
47894
47989
  return;
@@ -48018,12 +48113,17 @@ function handleSupport(flags) {
48018
48113
  }
48019
48114
  function handleSelfUpdate(command, flags) {
48020
48115
  const plan = buildSelfUpdatePlan(flags);
48116
+ const status = checkSelfUpdateStatus(plan);
48117
+ const shouldInstall = status.updateAvailable !== false;
48021
48118
  if (flags.json === true) {
48022
- if (!plan.dryRun) runSelfUpdate(plan);
48119
+ if (!plan.dryRun && shouldInstall) runSelfUpdate(plan, { verbose: flags.verbose === true });
48023
48120
  printJson2({
48024
48121
  command,
48025
- status: plan.dryRun ? "planned" : "success",
48122
+ status: status.updateAvailable === false ? "up_to_date" : plan.dryRun ? "planned" : "success",
48026
48123
  current_version: plan.currentVersion,
48124
+ latest_version: status.latestVersion,
48125
+ update_available: status.updateAvailable,
48126
+ check_error: status.checkError,
48027
48127
  package_manager: plan.packageManager,
48028
48128
  package: plan.packageSpec,
48029
48129
  run: [plan.command, ...plan.args],
@@ -48031,14 +48131,61 @@ function handleSelfUpdate(command, flags) {
48031
48131
  });
48032
48132
  return;
48033
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("");
48034
48144
  if (plan.dryRun) {
48035
- console.log(`Current OpenMates CLI version: ${plan.currentVersion}`);
48145
+ if (status.updateAvailable === false) {
48146
+ console.log("OpenMates CLI is already up to date.");
48147
+ return;
48148
+ }
48036
48149
  console.log(`Would run: ${[plan.command, ...plan.args].join(" ")}`);
48037
48150
  return;
48038
48151
  }
48039
- console.log(`Updating OpenMates CLI from ${plan.currentVersion} with ${plan.packageManager}...`);
48040
- runSelfUpdate(plan);
48041
- console.log("OpenMates CLI update completed.");
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.");
48042
48189
  }
48043
48190
  async function handleRemoteAccess(client, subcommand, rest, flags) {
48044
48191
  if (!subcommand || subcommand === "help" || flags.help === true) {
@@ -52940,6 +53087,7 @@ Commands:
52940
53087
  openmates benchmark [--help] Run real model benchmarks with usage tagged as benchmark spend
52941
53088
  openmates remote-access [--help] Attach and search local Project sources
52942
53089
  openmates support Show voluntary financial support options
53090
+ openmates version Show CLI version and update availability
52943
53091
  openmates update Update the installed OpenMates CLI package
52944
53092
  openmates upgrade Alias for openmates update
52945
53093
  openmates server [--help] Server management (install, start, stop, ...)
@@ -52950,12 +53098,24 @@ Flags:
52950
53098
  --json Output raw JSON instead of formatted output
52951
53099
  --api-url <url> Override API base URL (default: installed self-host server, then https://api.openmates.org)
52952
53100
  --api-key <key> Optional API key override (or set OPENMATES_API_KEY)
53101
+ --version Show CLI version and update availability
52953
53102
  --help Show contextual help for any command`);
52954
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
+ }
52955
53115
  function printSelfUpdateHelp() {
52956
53116
  console.log(`OpenMates CLI update commands:
52957
- openmates update [--version <version|tag>] [--package-manager <name>] [--dry-run] [--json]
52958
- 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]
52959
53119
 
52960
53120
  Updates the globally installed openmates package. The default target is latest.
52961
53121
 
@@ -52963,6 +53123,7 @@ Options:
52963
53123
  --version <version|tag> Install a specific npm version or dist-tag (default: latest)
52964
53124
  --package-manager <name> npm, pnpm, yarn, or bun (default: detect, then npm)
52965
53125
  --dry-run Print the package-manager command without running it
53126
+ --verbose Stream package-manager output during installation
52966
53127
  --json Output the update plan/result as JSON`);
52967
53128
  }
52968
53129
  function printRemoteAccessHelp() {
package/dist/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  getExtForLang,
4
4
  serializeToYaml
5
- } from "./chunk-YNYJMWKY.js";
5
+ } from "./chunk-U2RKIE56.js";
6
6
  import "./chunk-AXNRPVLE.js";
7
7
  export {
8
8
  getExtForLang,
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ import {
25
25
  renderSupportInfo,
26
26
  serializeToYaml,
27
27
  unwrapApiKeyMasterKey
28
- } from "./chunk-YNYJMWKY.js";
28
+ } from "./chunk-U2RKIE56.js";
29
29
  import "./chunk-AXNRPVLE.js";
30
30
 
31
31
  // src/generated/appSkills.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmates",
3
- "version": "0.14.5-alpha.0",
3
+ "version": "0.14.6-alpha.0",
4
4
  "description": "OpenMates CLI and SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,5 +1,37 @@
1
1
  name: openmates-core
2
2
 
3
+ x-openmates-worker-base: &openmates-worker-base
4
+ image: ${OPENMATES_IMAGE_REGISTRY:-ghcr.io/glowingkitty}/openmates-api:${OPENMATES_IMAGE_TAG:-dev}
5
+ restart: unless-stopped
6
+ user: root
7
+ env_file: ../../.env
8
+ environment: &openmates-worker-env
9
+ PYTHONPATH: /app
10
+ PYTHONDONTWRITEBYTECODE: "1"
11
+ CMS_URL: http://cms:8055
12
+ DIRECTUS_TOKEN: ${DIRECTUS_TOKEN}
13
+ DRAGONFLY_URL: cache:6379
14
+ DRAGONFLY_PASSWORD: ${DRAGONFLY_PASSWORD}
15
+ VAULT_URL: http://vault:8200
16
+ PROVIDER_CONFIG_DIR: /app_config/providers
17
+ BACKEND_CONFIG_FILE: /app_config/backend_config.yml
18
+ LOG_LEVEL: ${LOG_LEVEL:-info}
19
+ SERVER_ENVIRONMENT: ${SERVER_ENVIRONMENT}
20
+ volumes:
21
+ - ../../config:/app_config
22
+ - vault-setup-data:/vault-data
23
+ - api-logs:/app/logs
24
+ networks: [openmates]
25
+ depends_on:
26
+ cache:
27
+ condition: service_healthy
28
+ cms:
29
+ condition: service_healthy
30
+ vault-setup:
31
+ condition: service_completed_successfully
32
+ cms-setup:
33
+ condition: service_completed_successfully
34
+
3
35
  services:
4
36
  api:
5
37
  image: ${OPENMATES_IMAGE_REGISTRY:-ghcr.io/glowingkitty}/openmates-api:${OPENMATES_IMAGE_TAG:-dev}
@@ -152,8 +184,9 @@ services:
152
184
  image: ${OPENMATES_IMAGE_REGISTRY:-ghcr.io/glowingkitty}/openmates-api:${OPENMATES_IMAGE_TAG:-dev}
153
185
  container_name: task-worker
154
186
  restart: unless-stopped
187
+ mem_limit: ${TASK_WORKER_MEMORY_LIMIT:-3g}
155
188
  env_file: ../../.env
156
- 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=3
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
157
190
  networks: [openmates]
158
191
  depends_on: [api]
159
192
 
@@ -168,6 +201,92 @@ services:
168
201
  networks: [openmates]
169
202
  depends_on: [api]
170
203
 
204
+ app-ai-worker:
205
+ <<: *openmates-worker-base
206
+ container_name: app-ai-worker
207
+ mem_limit: ${APP_AI_WORKER_MEMORY_LIMIT:-2g}
208
+ environment:
209
+ <<: *openmates-worker-env
210
+ CELERY_QUEUES: app_ai
211
+ CELERY_AUTOSCALE_MAX: ${APP_AI_WORKER_CONCURRENCY:-${CELERY_AUTOSCALE_MAX:-3}}
212
+ command: >
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"
214
+
215
+ app-images-worker:
216
+ <<: *openmates-worker-base
217
+ container_name: app-images-worker
218
+ mem_limit: ${APP_IMAGES_WORKER_MEMORY_LIMIT:-1792m}
219
+ environment:
220
+ <<: *openmates-worker-env
221
+ CELERY_QUEUES: app_images
222
+ CELERY_AUTOSCALE_MAX: ${APP_IMAGES_WORKER_CONCURRENCY:-${CELERY_AUTOSCALE_MAX:-3}}
223
+ command: >
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"
225
+
226
+ app-music-worker:
227
+ <<: *openmates-worker-base
228
+ container_name: app-music-worker
229
+ mem_limit: ${APP_MUSIC_WORKER_MEMORY_LIMIT:-1536m}
230
+ environment:
231
+ <<: *openmates-worker-env
232
+ CELERY_QUEUES: app_music
233
+ CELERY_AUTOSCALE_MAX: ${APP_MUSIC_WORKER_CONCURRENCY:-2}
234
+ command: >
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"
236
+
237
+ app-videos-worker:
238
+ <<: *openmates-worker-base
239
+ container_name: app-videos-worker
240
+ mem_limit: ${APP_VIDEOS_WORKER_MEMORY_LIMIT:-1280m}
241
+ environment:
242
+ <<: *openmates-worker-env
243
+ CELERY_QUEUES: app_videos
244
+ CELERY_VIDEOS_AUTOSCALE_MAX: ${CELERY_VIDEOS_AUTOSCALE_MAX:-2}
245
+ E2B_REMOTION_TEMPLATE: ${E2B_REMOTION_TEMPLATE:-}
246
+ command: >
247
+ 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_videos --concurrency=$${CELERY_VIDEOS_AUTOSCALE_MAX} --max-tasks-per-child=10 --max-memory-per-child=1000000 --prefetch-multiplier=1"
248
+
249
+ app-pdf-worker:
250
+ <<: *openmates-worker-base
251
+ container_name: app-pdf-worker
252
+ mem_limit: ${APP_PDF_WORKER_MEMORY_LIMIT:-1536m}
253
+ environment:
254
+ <<: *openmates-worker-env
255
+ CELERY_QUEUES: app_pdf
256
+ command: >
257
+ 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_pdf --concurrency=2 --max-tasks-per-child=10 --max-memory-per-child=1000000 --prefetch-multiplier=1"
258
+
259
+ app-docs-worker:
260
+ <<: *openmates-worker-base
261
+ image: ${OPENMATES_IMAGE_REGISTRY:-ghcr.io/glowingkitty}/openmates-docs-worker:${OPENMATES_IMAGE_TAG:-dev}
262
+ container_name: app-docs-worker
263
+ mem_limit: ${APP_DOCS_WORKER_MEMORY_LIMIT:-1536m}
264
+ environment:
265
+ <<: *openmates-worker-env
266
+ CELERY_QUEUES: app_docs
267
+ command: >
268
+ 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_docs --concurrency=2 --max-tasks-per-child=10 --max-memory-per-child=1000000 --prefetch-multiplier=1"
269
+
270
+ app-code-worker:
271
+ <<: *openmates-worker-base
272
+ container_name: app-code-worker
273
+ mem_limit: ${APP_CODE_WORKER_MEMORY_LIMIT:-1g}
274
+ environment:
275
+ <<: *openmates-worker-env
276
+ CELERY_QUEUES: app_code
277
+ command: >
278
+ 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_code --concurrency=2 --max-tasks-per-child=20 --max-memory-per-child=600000 --prefetch-multiplier=1"
279
+
280
+ app-social-media-worker:
281
+ <<: *openmates-worker-base
282
+ container_name: app-social-media-worker
283
+ mem_limit: ${APP_SOCIAL_MEDIA_WORKER_MEMORY_LIMIT:-1536m}
284
+ environment:
285
+ <<: *openmates-worker-env
286
+ CELERY_QUEUES: app_social_media
287
+ command: >
288
+ 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_social_media --concurrency=2 --max-tasks-per-child=50 --max-memory-per-child=600000 --prefetch-multiplier=1"
289
+
171
290
  admin-sidecar:
172
291
  image: ${OPENMATES_IMAGE_REGISTRY:-ghcr.io/glowingkitty}/openmates-admin-sidecar:${OPENMATES_IMAGE_TAG:-dev}
173
292
  container_name: core-admin-sidecar