openmates 0.23.0 → 0.24.0-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.
package/README.md
CHANGED
|
@@ -349,12 +349,12 @@ intentionally want the chat saved to the OpenMates account.
|
|
|
349
349
|
|
|
350
350
|
## Versioning
|
|
351
351
|
|
|
352
|
-
OpenMates shows the short product line, for example `v0.
|
|
352
|
+
OpenMates shows the short product line, for example `v0.24`, in the web app.
|
|
353
353
|
The npm package uses exact artifact versions:
|
|
354
354
|
|
|
355
|
-
- `0.
|
|
355
|
+
- `0.24.0-alpha.N` is a prerelease from the `dev` branch published under the
|
|
356
356
|
`alpha` npm tag.
|
|
357
|
-
- `0.
|
|
357
|
+
- `0.24.0` is a stable release from `main` published under the `latest` npm tag.
|
|
358
358
|
|
|
359
359
|
Install stable releases with `npm install -g openmates`. Install prereleases with
|
|
360
360
|
`npm install -g openmates@alpha`.
|
|
@@ -32710,6 +32710,7 @@ var RUNTIME_CHECKS = {
|
|
|
32710
32710
|
{ id: "http.role_health", required: true, timeoutSeconds: 10 },
|
|
32711
32711
|
{ id: "core.database", required: true, timeoutSeconds: 10 },
|
|
32712
32712
|
{ id: "core.cache", required: true, timeoutSeconds: 10 },
|
|
32713
|
+
{ id: "core.cms_cache_consistency", required: true, timeoutSeconds: 10 },
|
|
32713
32714
|
{ id: "core.vault", required: true, timeoutSeconds: 10 },
|
|
32714
32715
|
{ id: "core.worker_queue", required: true, timeoutSeconds: CELERY_PROBE_CHECK_TIMEOUT_SECONDS },
|
|
32715
32716
|
{ id: "core.scheduler_freshness", required: true, timeoutSeconds: CELERY_PROBE_CHECK_TIMEOUT_SECONDS },
|
|
@@ -32981,6 +32982,19 @@ function planRestore(input) {
|
|
|
32981
32982
|
steps: input.yes === true ? ["stop", "restore", "start", "health-check"] : ["confirm", "stop", "restore", "start", "health-check"]
|
|
32982
32983
|
};
|
|
32983
32984
|
}
|
|
32985
|
+
function resolveTemplateSource(input) {
|
|
32986
|
+
const role = parseServerRole(input.role);
|
|
32987
|
+
const definition = ROLE_DEFINITIONS[role];
|
|
32988
|
+
if (input.templateUrl) return { type: "url", url: input.templateUrl };
|
|
32989
|
+
if (input.packagedTemplateExists && input.packageVersion && input.imageTag === `v${input.packageVersion}`) {
|
|
32990
|
+
return { type: "packaged", path: definition.templatePath };
|
|
32991
|
+
}
|
|
32992
|
+
return {
|
|
32993
|
+
type: "github-raw",
|
|
32994
|
+
ref: input.templateRef ?? "dev",
|
|
32995
|
+
path: `frontend/packages/openmates-cli/${definition.templatePath}`
|
|
32996
|
+
};
|
|
32997
|
+
}
|
|
32984
32998
|
function parseSecretEnvKey(envKey) {
|
|
32985
32999
|
if (!envKey.startsWith("SECRET__")) return null;
|
|
32986
33000
|
const parts = envKey.slice("SECRET__".length).split("__", 2);
|
|
@@ -33991,6 +34005,18 @@ async function deliverRuntimeNotification(config, payload) {
|
|
|
33991
34005
|
}
|
|
33992
34006
|
return Promise.all(deliveries);
|
|
33993
34007
|
}
|
|
34008
|
+
var CMS_CACHE_INSPECT_FORMAT = '{{range .Config.Env}}{{if eq . "CACHE_SKIP_ALLOWED=true"}}CACHE_SKIP_ALLOWED=true,{{end}}{{if eq . "CACHE_AUTO_PURGE=true"}}CACHE_AUTO_PURGE=true,{{end}}{{end}}';
|
|
34009
|
+
function evaluateCmsCacheConsistency(input) {
|
|
34010
|
+
const result = { id: "core.cms_cache_consistency", required: true, duration_ms: 0 };
|
|
34011
|
+
if (!input.containerFound || !input.inspectionSucceeded) {
|
|
34012
|
+
return { ...result, status: "failed", failureClass: "configuration", sanitized_reason: "cms_cache_inspection_unavailable" };
|
|
34013
|
+
}
|
|
34014
|
+
const flags = new Set(input.filteredEnvironment.split(",").map((value) => value.trim()));
|
|
34015
|
+
if (!flags.has("CACHE_SKIP_ALLOWED=true") || !flags.has("CACHE_AUTO_PURGE=true")) {
|
|
34016
|
+
return { ...result, status: "failed", failureClass: "configuration", sanitized_reason: "cms_cache_flags_missing_or_disabled" };
|
|
34017
|
+
}
|
|
34018
|
+
return { ...result, status: "passed" };
|
|
34019
|
+
}
|
|
33994
34020
|
function applyRuntimeCheckResults(state, results, timestamp) {
|
|
33995
34021
|
const current = state ?? initialRuntimeIncidentState();
|
|
33996
34022
|
const checks = { ...current.checks ?? {} };
|
|
@@ -34957,25 +34983,30 @@ function fileHash(path2) {
|
|
|
34957
34983
|
if (!existsSync13(path2)) return null;
|
|
34958
34984
|
return createHash18("sha256").update(readFileSync14(path2)).digest("hex");
|
|
34959
34985
|
}
|
|
34960
|
-
async function loadSelfHostComposeTemplate(templateRef, role) {
|
|
34986
|
+
async function loadSelfHostComposeTemplate(templateRef, role, imageTag, packageVersion = getPackageVersion()) {
|
|
34961
34987
|
const templateDir = process.env.OPENMATES_SELFHOST_TEMPLATE_DIR;
|
|
34962
34988
|
if (templateDir) {
|
|
34963
34989
|
return readFileSync14(join15(resolve7(templateDir), ROLE_TEMPLATE_FILES[role]), "utf-8");
|
|
34964
34990
|
}
|
|
34965
|
-
const overrideUrl = process.env.OPENMATES_SELFHOST_COMPOSE_URL;
|
|
34966
|
-
if (overrideUrl) {
|
|
34967
|
-
return fetchText(overrideUrl);
|
|
34968
|
-
}
|
|
34969
34991
|
const packaged = packagedTemplatePath(role);
|
|
34970
|
-
|
|
34971
|
-
|
|
34992
|
+
const source = resolveTemplateSource({
|
|
34993
|
+
role,
|
|
34994
|
+
packagedTemplateExists: existsSync13(packaged),
|
|
34995
|
+
templateUrl: process.env.OPENMATES_SELFHOST_COMPOSE_URL,
|
|
34996
|
+
templateRef,
|
|
34997
|
+
imageTag,
|
|
34998
|
+
packageVersion
|
|
34999
|
+
});
|
|
35000
|
+
if (source.type === "packaged") return readFileSync14(packaged, "utf-8");
|
|
35001
|
+
if (source.type === "url") return fetchText(source.url);
|
|
35002
|
+
return fetchText(`https://raw.githubusercontent.com/glowingkitty/OpenMates/${source.ref}/${source.path}`);
|
|
34972
35003
|
}
|
|
34973
35004
|
async function writeImageModeRuntimeFiles(installPath, imageTag, role) {
|
|
34974
35005
|
const roleDir = join15(installPath, "backend", role === "core" ? "core" : role);
|
|
34975
35006
|
const vaultConfigDir = join15(roleDir, "vault", "config");
|
|
34976
35007
|
mkdirSync13(vaultConfigDir, { recursive: true });
|
|
34977
35008
|
mkdirSync13(join15(installPath, "config", "providers"), { recursive: true });
|
|
34978
|
-
writeFileSync8(join15(installPath, ROLE_IMAGE_COMPOSE_FILES[role]), await loadSelfHostComposeTemplate(templateRefForImageTag(imageTag, getPackageVersion()), role));
|
|
35009
|
+
writeFileSync8(join15(installPath, ROLE_IMAGE_COMPOSE_FILES[role]), await loadSelfHostComposeTemplate(templateRefForImageTag(imageTag, getPackageVersion()), role, imageTag));
|
|
34979
35010
|
if (role === "core") {
|
|
34980
35011
|
writeFileSync8(join15(installPath, OFFICIAL_CLOUD_NO_WEBAPP_COMPOSE_FILE), readOfficialCloudNoWebappComposeTemplate());
|
|
34981
35012
|
}
|
|
@@ -36259,6 +36290,28 @@ async function installContinuousUpdateService(flags) {
|
|
|
36259
36290
|
}
|
|
36260
36291
|
console.log(`Installed ${plan.timerName}.`);
|
|
36261
36292
|
}
|
|
36293
|
+
function inspectCmsCacheConsistency(installPath, withOverrides, installMode) {
|
|
36294
|
+
const composeResult = spawnSync(
|
|
36295
|
+
"docker",
|
|
36296
|
+
[...composeArgs(installPath, withOverrides, installMode, "core"), "ps", "-q", "cms"],
|
|
36297
|
+
{ cwd: installPath, encoding: "utf-8", timeout: 5e3 }
|
|
36298
|
+
);
|
|
36299
|
+
const containerIds = composeResult.status === 0 ? composeResult.stdout.trim().split(/\s+/).filter(Boolean) : [];
|
|
36300
|
+
const containerId = containerIds.length === 1 ? containerIds[0] : void 0;
|
|
36301
|
+
if (!containerId) {
|
|
36302
|
+
return evaluateCmsCacheConsistency({ containerFound: false, inspectionSucceeded: false, filteredEnvironment: "" });
|
|
36303
|
+
}
|
|
36304
|
+
const inspectResult = spawnSync(
|
|
36305
|
+
"docker",
|
|
36306
|
+
["inspect", "--format", CMS_CACHE_INSPECT_FORMAT, containerId],
|
|
36307
|
+
{ cwd: installPath, encoding: "utf-8", timeout: 5e3 }
|
|
36308
|
+
);
|
|
36309
|
+
return evaluateCmsCacheConsistency({
|
|
36310
|
+
containerFound: true,
|
|
36311
|
+
inspectionSucceeded: inspectResult.status === 0,
|
|
36312
|
+
filteredEnvironment: inspectResult.status === 0 ? inspectResult.stdout : ""
|
|
36313
|
+
});
|
|
36314
|
+
}
|
|
36262
36315
|
function runRuntimeVerification(installPath, role, config) {
|
|
36263
36316
|
const envText = existsSync13(join15(installPath, ".env")) ? readFileSync14(join15(installPath, ".env"), "utf-8") : "";
|
|
36264
36317
|
const mode = resolveRuntimeDeploymentMode({
|
|
@@ -36285,6 +36338,11 @@ function runRuntimeVerification(installPath, role, config) {
|
|
|
36285
36338
|
throw new Error(`Runtime verifier returned invalid output (${result.status ?? "unknown"}).`);
|
|
36286
36339
|
}
|
|
36287
36340
|
output.checks = output.checks.map((check) => ({ ...check, failureClass: check.failureClass ?? check.failure_class }));
|
|
36341
|
+
if (role === "core") {
|
|
36342
|
+
const cmsCacheCheck = inspectCmsCacheConsistency(installPath, withOverrides, installMode);
|
|
36343
|
+
output.checks.push(cmsCacheCheck);
|
|
36344
|
+
if (cmsCacheCheck.status !== "passed") output.status = "failed";
|
|
36345
|
+
}
|
|
36288
36346
|
if (mode.effectiveMode === "official_cloud") {
|
|
36289
36347
|
const destinations = runtimeNotificationConfig(installPath);
|
|
36290
36348
|
const configuredCount = [destinations.email, destinations.discordWebhookUrl, destinations.genericWebhook].filter(Boolean).length;
|
|
@@ -76167,7 +76225,7 @@ As of mid-2026, the severe supply shocks from the 2024\u20132025 avian flu have
|
|
|
76167
76225
|
text: "Test for free"
|
|
76168
76226
|
},
|
|
76169
76227
|
version_title: {
|
|
76170
|
-
text: "v0.
|
|
76228
|
+
text: "v0.24"
|
|
76171
76229
|
},
|
|
76172
76230
|
domain_not_allowed: {
|
|
76173
76231
|
text: "E-Mail domain not allowed."
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -21,6 +21,7 @@ services:
|
|
|
21
21
|
VAULT_AUTO_UNSEAL: "true"
|
|
22
22
|
volumes:
|
|
23
23
|
- vault-setup-data:/app/data
|
|
24
|
+
- vault-app-data:/app/app-data
|
|
24
25
|
networks: [uploads]
|
|
25
26
|
depends_on: [vault]
|
|
26
27
|
restart: on-failure
|
|
@@ -45,7 +46,7 @@ services:
|
|
|
45
46
|
CLAMAV_HOST: clamav
|
|
46
47
|
CLAMAV_PORT: 3310
|
|
47
48
|
volumes:
|
|
48
|
-
- vault-
|
|
49
|
+
- vault-app-data:/vault-data:ro
|
|
49
50
|
networks: [uploads]
|
|
50
51
|
depends_on: [clamav, vault-setup]
|
|
51
52
|
healthcheck:
|
|
@@ -81,3 +82,5 @@ volumes:
|
|
|
81
82
|
name: openmates-uploads-vault-data
|
|
82
83
|
vault-setup-data:
|
|
83
84
|
name: openmates-uploads-vault-setup-data
|
|
85
|
+
vault-app-data:
|
|
86
|
+
name: openmates-uploads-vault-app-data
|