@camstack/server 1.2.787 → 1.2.789
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/CHANGELOG.md +13 -0
- package/dist/core/addon/addon-registry.service.js +12 -15
- package/dist/core/addon/boot-health-snapshot.js +42 -0
- package/dist/core/addon/hub-spawn-gate.js +1 -0
- package/package.json +15 -39
- package/system/dist/addon-utils.mjs +1 -1
- package/system/dist/{agent-https--lvZp4PX.js → agent-https-jJDe-XNl.js} +1 -1
- package/system/dist/{agent-https-pSCzmbQd.mjs → agent-https-szf2FU49.mjs} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +10 -10
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +285 -285
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{capture-engine-N1-UaQr0.mjs → capture-engine-BsKY_3xa.mjs} +1 -1
- package/system/dist/{capture-engine-CTFHb-UX.js → capture-engine-DNHgjQot.js} +1 -1
- package/system/dist/{composition-sources-Qe3MRI1x.mjs → composition-sources-BRdGsbVT.mjs} +1 -1
- package/system/dist/{composition-sources-Yjz-b6-8.js → composition-sources-BgO0GQYW.js} +1 -1
- package/system/dist/{constants-7gannWcO.js → constants-C3jGKQSQ.js} +1 -1
- package/system/dist/{constants-lWMAnwmj.mjs → constants-CQeMrR4f.mjs} +1 -1
- package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
- package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
- package/system/dist/{device-ca-8lpRo9Ss.mjs → device-ca-ByVi5eUC.mjs} +1 -1
- package/system/dist/{device-ca-HGx3Pwb6.js → device-ca-D3y6wGmn.js} +1 -1
- package/system/dist/{dist-j7uy5oG9.js → dist-BRI-Mwx0.js} +69 -31
- package/system/dist/{dist-DgZrPBbX.mjs → dist-BsQA6-0i.mjs} +69 -31
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-BM3peDu1.mjs → hub-mdns-ciao-8dJTW2LI.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-BUKHJL6N.js → hub-mdns-ciao-Ry_Jpljx.js} +2 -2
- package/system/dist/index.js +53 -11
- package/system/dist/index.mjs +264 -222
- package/system/dist/kernel/addon-health-monitor.d.ts +21 -0
- package/system/dist/{legacy-integration-rows-door-DIm4Q3Jj.mjs → legacy-integration-rows-door-CjXTbmvH.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-D51X6Fdr.js → legacy-integration-rows-door-D5BdSNla.js} +1 -1
- package/system/dist/migrations/hub/2026-11-06-addon-settings-bare-rows.d.ts +3 -0
- package/system/dist/{restore-archive-8jRnSzmw.js → restore-archive-GoWJMdHy.js} +1 -1
- package/system/dist/{restore-archive-D-Wmp8OK.mjs → restore-archive-vn4co_kf.mjs} +150 -150
- package/system/dist/{wal-maintenance-CBnqPn4u.mjs → wal-maintenance-CadfiGWy.mjs} +0 -0
- package/system/dist/{wal-maintenance-D0FMnpba.js → wal-maintenance-sSlXJm4k.js} +0 -0
- package/system/package.json +1 -1
|
@@ -1171,7 +1171,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
|
1171
1171
|
return DeviceRole;
|
|
1172
1172
|
}({});
|
|
1173
1173
|
//#endregion
|
|
1174
|
-
//#region ../types/dist/sleep-
|
|
1174
|
+
//#region ../types/dist/sleep-D7ZKm4nb.mjs
|
|
1175
1175
|
/**
|
|
1176
1176
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
1177
1177
|
* window to float samples (D455).
|
|
@@ -1944,10 +1944,33 @@ function integrationRowsApiOver(api) {
|
|
|
1944
1944
|
};
|
|
1945
1945
|
}
|
|
1946
1946
|
var PREFIX = "records/";
|
|
1947
|
+
/**
|
|
1948
|
+
* Cross-realm brand. An addon bundles its own copy of this module (D15) while
|
|
1949
|
+
* `ctx.records` is the HOST's door, so an error thrown by the host is an
|
|
1950
|
+
* instance of the host's classes, not of the addon's. The brand plus the code
|
|
1951
|
+
* make `instanceof` answer by identity of the failure, not of the copy.
|
|
1952
|
+
*/
|
|
1953
|
+
var RECORDS_ERROR_BRAND = Symbol.for("camstack.records-error");
|
|
1954
|
+
function carriesBrand(value) {
|
|
1955
|
+
return typeof value === "object" && value !== null && Reflect.get(value, RECORDS_ERROR_BRAND) === true;
|
|
1956
|
+
}
|
|
1947
1957
|
/** The base of every records failure. `detail` is the human part of the message. */
|
|
1948
1958
|
var RecordsError = class extends Error {
|
|
1959
|
+
/** The code a subclass stands for; the base stands for every code. */
|
|
1960
|
+
static code = void 0;
|
|
1961
|
+
/**
|
|
1962
|
+
* `instanceof` across copies of this module: any branded error is a
|
|
1963
|
+
* `RecordsError`, and is an instance of a subclass only when its code is the
|
|
1964
|
+
* subclass's code. Same-copy answers are unchanged.
|
|
1965
|
+
*/
|
|
1966
|
+
static [Symbol.hasInstance](value) {
|
|
1967
|
+
if (Function.prototype[Symbol.hasInstance].call(this, value)) return true;
|
|
1968
|
+
if (!carriesBrand(value)) return false;
|
|
1969
|
+
return this.code === void 0 || value.code === this.code;
|
|
1970
|
+
}
|
|
1949
1971
|
code;
|
|
1950
1972
|
detail;
|
|
1973
|
+
[RECORDS_ERROR_BRAND] = true;
|
|
1951
1974
|
constructor(code, detail) {
|
|
1952
1975
|
super(`${PREFIX}${code}: ${detail}`);
|
|
1953
1976
|
this.name = "RecordsError";
|
|
@@ -1956,96 +1979,110 @@ var RecordsError = class extends Error {
|
|
|
1956
1979
|
}
|
|
1957
1980
|
};
|
|
1958
1981
|
/** A write guarded by `ifRev` found another revision (or an existing row for `ifRev: 0`). */
|
|
1959
|
-
var RevConflictError = class extends RecordsError {
|
|
1982
|
+
var RevConflictError = class RevConflictError extends RecordsError {
|
|
1983
|
+
static code = "rev-conflict";
|
|
1960
1984
|
constructor(detail) {
|
|
1961
|
-
super(
|
|
1985
|
+
super(RevConflictError.code, detail);
|
|
1962
1986
|
this.name = "RevConflictError";
|
|
1963
1987
|
}
|
|
1964
1988
|
};
|
|
1965
1989
|
/** `data` exceeds the kind's `maxDataBytes`. Bytes are never record fields (D613). */
|
|
1966
|
-
var RecordTooLargeError = class extends RecordsError {
|
|
1990
|
+
var RecordTooLargeError = class RecordTooLargeError extends RecordsError {
|
|
1991
|
+
static code = "too-large";
|
|
1967
1992
|
constructor(detail) {
|
|
1968
|
-
super(
|
|
1993
|
+
super(RecordTooLargeError.code, detail);
|
|
1969
1994
|
this.name = "RecordTooLargeError";
|
|
1970
1995
|
}
|
|
1971
1996
|
};
|
|
1972
1997
|
/** A filter, order or aggregate names a field no declared index serves. */
|
|
1973
|
-
var UnindexedFilterError = class extends RecordsError {
|
|
1998
|
+
var UnindexedFilterError = class UnindexedFilterError extends RecordsError {
|
|
1999
|
+
static code = "unindexed-filter";
|
|
1974
2000
|
constructor(detail) {
|
|
1975
|
-
super(
|
|
2001
|
+
super(UnindexedFilterError.code, detail);
|
|
1976
2002
|
this.name = "UnindexedFilterError";
|
|
1977
2003
|
}
|
|
1978
2004
|
};
|
|
1979
2005
|
/** A bulk delete with no predicate at all. */
|
|
1980
|
-
var FilterRequiredError = class extends RecordsError {
|
|
2006
|
+
var FilterRequiredError = class FilterRequiredError extends RecordsError {
|
|
2007
|
+
static code = "filter-required";
|
|
1981
2008
|
constructor(detail) {
|
|
1982
|
-
super(
|
|
2009
|
+
super(FilterRequiredError.code, detail);
|
|
1983
2010
|
this.name = "FilterRequiredError";
|
|
1984
2011
|
}
|
|
1985
2012
|
};
|
|
1986
2013
|
/** The caller declared no such kind (another addon's kind is indistinguishable from none). */
|
|
1987
|
-
var UnknownRecordKindError = class extends RecordsError {
|
|
2014
|
+
var UnknownRecordKindError = class UnknownRecordKindError extends RecordsError {
|
|
2015
|
+
static code = "unknown-kind";
|
|
1988
2016
|
constructor(detail) {
|
|
1989
|
-
super(
|
|
2017
|
+
super(UnknownRecordKindError.code, detail);
|
|
1990
2018
|
this.name = "UnknownRecordKindError";
|
|
1991
2019
|
}
|
|
1992
2020
|
};
|
|
1993
|
-
var RecordNotFoundError = class extends RecordsError {
|
|
2021
|
+
var RecordNotFoundError = class RecordNotFoundError extends RecordsError {
|
|
2022
|
+
static code = "not-found";
|
|
1994
2023
|
constructor(detail) {
|
|
1995
|
-
super(
|
|
2024
|
+
super(RecordNotFoundError.code, detail);
|
|
1996
2025
|
this.name = "RecordNotFoundError";
|
|
1997
2026
|
}
|
|
1998
2027
|
};
|
|
1999
2028
|
/** A unique index refused the write. */
|
|
2000
|
-
var RecordUniqueViolationError = class extends RecordsError {
|
|
2029
|
+
var RecordUniqueViolationError = class RecordUniqueViolationError extends RecordsError {
|
|
2030
|
+
static code = "unique-violation";
|
|
2001
2031
|
constructor(detail) {
|
|
2002
|
-
super(
|
|
2032
|
+
super(RecordUniqueViolationError.code, detail);
|
|
2003
2033
|
this.name = "RecordUniqueViolationError";
|
|
2004
2034
|
}
|
|
2005
2035
|
};
|
|
2006
2036
|
/** A secret field held a plain string where only a keychain marker may be stored. */
|
|
2007
|
-
var PlaintextSecretError = class extends RecordsError {
|
|
2037
|
+
var PlaintextSecretError = class PlaintextSecretError extends RecordsError {
|
|
2038
|
+
static code = "plaintext-secret";
|
|
2008
2039
|
constructor(detail) {
|
|
2009
|
-
super(
|
|
2040
|
+
super(PlaintextSecretError.code, detail);
|
|
2010
2041
|
this.name = "PlaintextSecretError";
|
|
2011
2042
|
}
|
|
2012
2043
|
};
|
|
2013
2044
|
/** A marker whose ref is not the row's own (the D878 rule). */
|
|
2014
|
-
var ForeignSecretMarkerError = class extends RecordsError {
|
|
2045
|
+
var ForeignSecretMarkerError = class ForeignSecretMarkerError extends RecordsError {
|
|
2046
|
+
static code = "foreign-marker";
|
|
2015
2047
|
constructor(detail) {
|
|
2016
|
-
super(
|
|
2048
|
+
super(ForeignSecretMarkerError.code, detail);
|
|
2017
2049
|
this.name = "ForeignSecretMarkerError";
|
|
2018
2050
|
}
|
|
2019
2051
|
};
|
|
2020
2052
|
/** The keychain could not store or serve a value: explicit, never an empty string. */
|
|
2021
|
-
var RecordSecretUnavailableError = class extends RecordsError {
|
|
2053
|
+
var RecordSecretUnavailableError = class RecordSecretUnavailableError extends RecordsError {
|
|
2054
|
+
static code = "secret-unavailable";
|
|
2022
2055
|
constructor(detail) {
|
|
2023
|
-
super(
|
|
2056
|
+
super(RecordSecretUnavailableError.code, detail);
|
|
2024
2057
|
this.name = "RecordSecretUnavailableError";
|
|
2025
2058
|
}
|
|
2026
2059
|
};
|
|
2027
|
-
var InvalidRecordError = class extends RecordsError {
|
|
2060
|
+
var InvalidRecordError = class InvalidRecordError extends RecordsError {
|
|
2061
|
+
static code = "invalid-record";
|
|
2028
2062
|
constructor(detail) {
|
|
2029
|
-
super(
|
|
2063
|
+
super(InvalidRecordError.code, detail);
|
|
2030
2064
|
this.name = "InvalidRecordError";
|
|
2031
2065
|
}
|
|
2032
2066
|
};
|
|
2033
2067
|
/** A kind declaration the engine refuses (non-additive change, bad shape, wrong file). */
|
|
2034
|
-
var DeclarationRefusedError = class extends RecordsError {
|
|
2068
|
+
var DeclarationRefusedError = class DeclarationRefusedError extends RecordsError {
|
|
2069
|
+
static code = "declaration-refused";
|
|
2035
2070
|
constructor(detail) {
|
|
2036
|
-
super(
|
|
2071
|
+
super(DeclarationRefusedError.code, detail);
|
|
2037
2072
|
this.name = "DeclarationRefusedError";
|
|
2038
2073
|
}
|
|
2039
2074
|
};
|
|
2040
|
-
var NoCallerError = class extends RecordsError {
|
|
2075
|
+
var NoCallerError = class NoCallerError extends RecordsError {
|
|
2076
|
+
static code = "no-caller";
|
|
2041
2077
|
constructor(detail) {
|
|
2042
|
-
super(
|
|
2078
|
+
super(NoCallerError.code, detail);
|
|
2043
2079
|
this.name = "NoCallerError";
|
|
2044
2080
|
}
|
|
2045
2081
|
};
|
|
2046
|
-
var BatchTooLargeError = class extends RecordsError {
|
|
2082
|
+
var BatchTooLargeError = class BatchTooLargeError extends RecordsError {
|
|
2083
|
+
static code = "batch-too-large";
|
|
2047
2084
|
constructor(detail) {
|
|
2048
|
-
super(
|
|
2085
|
+
super(BatchTooLargeError.code, detail);
|
|
2049
2086
|
this.name = "BatchTooLargeError";
|
|
2050
2087
|
}
|
|
2051
2088
|
};
|
|
@@ -2054,9 +2091,10 @@ var BatchTooLargeError = class extends RecordsError {
|
|
|
2054
2091
|
* caller did not declare in ONE file and ONE `transactFamily`. The detail names
|
|
2055
2092
|
* which rule (`cross-file`, `cross-family`, `no-family`); it is never a silent split.
|
|
2056
2093
|
*/
|
|
2057
|
-
var TransactRefusedError = class extends RecordsError {
|
|
2094
|
+
var TransactRefusedError = class TransactRefusedError extends RecordsError {
|
|
2095
|
+
static code = "transact-refused";
|
|
2058
2096
|
constructor(detail) {
|
|
2059
|
-
super(
|
|
2097
|
+
super(TransactRefusedError.code, detail);
|
|
2060
2098
|
this.name = "TransactRefusedError";
|
|
2061
2099
|
}
|
|
2062
2100
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
2
|
+
const require_wal_maintenance = require("./wal-maintenance-sSlXJm4k.js");
|
|
3
3
|
let node_worker_threads = require("node:worker_threads");
|
|
4
4
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-
|
|
1
|
+
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-CadfiGWy.mjs";
|
|
2
2
|
import { parentPort, threadId, workerData } from "node:worker_threads";
|
|
3
3
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
4
4
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { bc as userError } from "./dist-
|
|
2
|
+
import { bc as userError } from "./dist-BsQA6-0i.mjs";
|
|
3
3
|
import { f as X509Certificate$1 } from "./x509.es-BRiJgOvu.mjs";
|
|
4
|
-
import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-
|
|
4
|
+
import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-szf2FU49.mjs";
|
|
5
5
|
import { X509Certificate, createPrivateKey } from "node:crypto";
|
|
6
6
|
import { writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
7
7
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BRI-Mwx0.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
|
-
const require_agent_https = require("./agent-https
|
|
4
|
+
const require_agent_https = require("./agent-https-jJDe-XNl.js");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
6
|
let _camstack_types_node = require("@camstack/types/node");
|
|
7
7
|
let node_fs = require("node:fs");
|
package/system/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("./dist-
|
|
4
|
-
const require_device_ca = require("./device-ca-
|
|
3
|
+
const require_dist = require("./dist-BRI-Mwx0.js");
|
|
4
|
+
const require_device_ca = require("./device-ca-D3y6wGmn.js");
|
|
5
5
|
const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
|
|
6
6
|
const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
|
|
7
7
|
require("./builtins/alerts/index.js");
|
|
@@ -26,22 +26,22 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
|
|
|
26
26
|
const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
|
|
27
27
|
const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
|
|
28
28
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
|
|
29
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
30
|
-
const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-
|
|
29
|
+
const require_wal_maintenance = require("./wal-maintenance-sSlXJm4k.js");
|
|
30
|
+
const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-D5BdSNla.js");
|
|
31
31
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
|
|
32
32
|
const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
|
|
33
33
|
const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
|
|
34
34
|
require("./builtins/storage-orchestrator/index.js");
|
|
35
|
-
const require_agent_https = require("./agent-https
|
|
36
|
-
const require_constants = require("./constants-
|
|
35
|
+
const require_agent_https = require("./agent-https-jJDe-XNl.js");
|
|
36
|
+
const require_constants = require("./constants-C3jGKQSQ.js");
|
|
37
37
|
const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
|
|
38
38
|
require("./builtins/system-config/index.js");
|
|
39
39
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
40
40
|
const require_custom_action_registry = require("./custom-action-registry-CmWpSeMS.js");
|
|
41
|
-
const require_hub_mdns_ciao = require("./hub-mdns-ciao-
|
|
41
|
+
const require_hub_mdns_ciao = require("./hub-mdns-ciao-Ry_Jpljx.js");
|
|
42
42
|
const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
|
|
43
43
|
const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
|
|
44
|
-
const require_restore_archive = require("./restore-archive-
|
|
44
|
+
const require_restore_archive = require("./restore-archive-GoWJMdHy.js");
|
|
45
45
|
const require_coral_accelerators = require("./coral-accelerators-BSVsBVzt.js");
|
|
46
46
|
let zod = require("zod");
|
|
47
47
|
let node_crypto = require("node:crypto");
|
|
@@ -25558,6 +25558,7 @@ var AddonHealthMonitor = class {
|
|
|
25558
25558
|
logger;
|
|
25559
25559
|
retryFn;
|
|
25560
25560
|
now;
|
|
25561
|
+
isHeldBack;
|
|
25561
25562
|
timer = null;
|
|
25562
25563
|
graceEmittedFor = false;
|
|
25563
25564
|
constructor(opts) {
|
|
@@ -25565,6 +25566,7 @@ var AddonHealthMonitor = class {
|
|
|
25565
25566
|
this.logger = opts.logger;
|
|
25566
25567
|
this.retryFn = opts.retryFn;
|
|
25567
25568
|
this.now = opts.now ?? (() => Date.now());
|
|
25569
|
+
this.isHeldBack = opts.isHeldBack ?? (() => false);
|
|
25568
25570
|
this.tickIntervalMs = opts.tickIntervalMs ?? 3e4;
|
|
25569
25571
|
this.gracePeriodMs = opts.gracePeriodMs ?? 3e5;
|
|
25570
25572
|
this.retryIntervalsMs = opts.retryIntervalsMs ?? HEALTH_MONITOR_RETRY_INTERVALS_MS;
|
|
@@ -25592,7 +25594,8 @@ var AddonHealthMonitor = class {
|
|
|
25592
25594
|
lastError: null,
|
|
25593
25595
|
nextRetryAt: null,
|
|
25594
25596
|
alertEmitted: false,
|
|
25595
|
-
retrying: false
|
|
25597
|
+
retrying: false,
|
|
25598
|
+
heldBack: false
|
|
25596
25599
|
});
|
|
25597
25600
|
if (wasAlerting) this.emit(require_dist.EventCategory.AddonLoadRecovered, {
|
|
25598
25601
|
packageName,
|
|
@@ -25607,6 +25610,11 @@ var AddonHealthMonitor = class {
|
|
|
25607
25610
|
*/
|
|
25608
25611
|
recordFailure(packageName, err, addonId) {
|
|
25609
25612
|
const existing = this.state.get(packageName);
|
|
25613
|
+
const id = addonId ?? existing?.addonId;
|
|
25614
|
+
if (id !== void 0 && this.isHeldBack(id)) {
|
|
25615
|
+
this.recordHeldBack(packageName, require_dist.errMsg(err), id);
|
|
25616
|
+
return;
|
|
25617
|
+
}
|
|
25610
25618
|
const t = this.now();
|
|
25611
25619
|
const retryCount = (existing?.retryCount ?? 0) + 1;
|
|
25612
25620
|
const intervalIdx = Math.min(retryCount - 1, this.retryIntervalsMs.length - 1);
|
|
@@ -25625,7 +25633,8 @@ var AddonHealthMonitor = class {
|
|
|
25625
25633
|
lastError: errPayload,
|
|
25626
25634
|
nextRetryAt,
|
|
25627
25635
|
alertEmitted: existing?.alertEmitted ?? false,
|
|
25628
|
-
retrying: false
|
|
25636
|
+
retrying: false,
|
|
25637
|
+
heldBack: false
|
|
25629
25638
|
};
|
|
25630
25639
|
this.state.set(packageName, next);
|
|
25631
25640
|
this.logger.warn("Addon load/init failure recorded", { meta: {
|
|
@@ -25654,6 +25663,39 @@ var AddonHealthMonitor = class {
|
|
|
25654
25663
|
}
|
|
25655
25664
|
}
|
|
25656
25665
|
/**
|
|
25666
|
+
* The spawn gate holds this addon back (its package is not yet at the version the
|
|
25667
|
+
* server requires). Not a failure: the same retry backoff is armed, so the addon
|
|
25668
|
+
* is reloaded once its package is current, but no failure is logged as a warning
|
|
25669
|
+
* and no `AddonLoadFailed` / `AddonRetryScheduled` event is emitted. A retry that
|
|
25670
|
+
* finds the gate open records success the normal way.
|
|
25671
|
+
*/
|
|
25672
|
+
recordHeldBack(packageName, reason, addonId) {
|
|
25673
|
+
const existing = this.state.get(packageName);
|
|
25674
|
+
const t = this.now();
|
|
25675
|
+
const retryCount = (existing?.retryCount ?? 0) + 1;
|
|
25676
|
+
const nextRetryAt = t + this.retryIntervalsMs[Math.min(retryCount - 1, this.retryIntervalsMs.length - 1)];
|
|
25677
|
+
this.state.set(packageName, {
|
|
25678
|
+
packageName,
|
|
25679
|
+
addonId: addonId ?? existing?.addonId,
|
|
25680
|
+
phase: "failed",
|
|
25681
|
+
retryCount,
|
|
25682
|
+
firstFailureAt: existing?.firstFailureAt ?? t,
|
|
25683
|
+
lastAttemptAt: t,
|
|
25684
|
+
lastError: { message: reason },
|
|
25685
|
+
nextRetryAt,
|
|
25686
|
+
alertEmitted: false,
|
|
25687
|
+
retrying: false,
|
|
25688
|
+
heldBack: true
|
|
25689
|
+
});
|
|
25690
|
+
this.logger.info("Addon held back by the stale gate, retry armed", { meta: {
|
|
25691
|
+
packageName,
|
|
25692
|
+
addonId: addonId ?? existing?.addonId,
|
|
25693
|
+
retryCount,
|
|
25694
|
+
nextRetryAt,
|
|
25695
|
+
reason
|
|
25696
|
+
} });
|
|
25697
|
+
}
|
|
25698
|
+
/**
|
|
25657
25699
|
* Force an immediate retry attempt for a package, resetting the
|
|
25658
25700
|
* counter back to 0 (next failure goes to the 60s interval again).
|
|
25659
25701
|
* Used by the user-facing `addons.retryLoad` tRPC procedure and by
|
|
@@ -25730,7 +25772,7 @@ var AddonHealthMonitor = class {
|
|
|
25730
25772
|
const t = this.now();
|
|
25731
25773
|
if (!this.inGracePeriod() && !this.graceEmittedFor) {
|
|
25732
25774
|
this.graceEmittedFor = true;
|
|
25733
|
-
for (const s of this.state.values()) if (s.phase === "failed" && !s.alertEmitted && s.lastError) {
|
|
25775
|
+
for (const s of this.state.values()) if (s.phase === "failed" && !s.heldBack && !s.alertEmitted && s.lastError) {
|
|
25734
25776
|
s.alertEmitted = true;
|
|
25735
25777
|
this.emit(require_dist.EventCategory.AddonLoadFailed, {
|
|
25736
25778
|
packageName: s.packageName,
|