@camstack/server 1.2.787 → 1.2.788
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 +7 -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 +64 -37
- 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 +1 -1
- 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 +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- 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 +2 -2
- 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 +2 -2
- 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 +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- 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 +1 -1
- 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 +3 -3
- 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/{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 +53 -11
- 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/{restore-archive-D-Wmp8OK.mjs → restore-archive-Co2lk3OU.mjs} +1 -1
- package/system/dist/{restore-archive-8jRnSzmw.js → restore-archive-GoWJMdHy.js} +1 -1
- package/system/dist/{wal-maintenance-D0FMnpba.js → wal-maintenance-C1Haue74.js} +0 -0
- package/system/dist/{wal-maintenance-CBnqPn4u.mjs → wal-maintenance-DRnV6QYu.mjs} +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-C1Haue74.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-DRnV6QYu.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-C1Haue74.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,
|
package/system/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Aa as splitTranslationRef, Bo as DATAPLANE_SECRET_HEADER$1, D as CatalogFileSchema, Ec as EventCategory$1, Es as collectSecretMarkerRefs, Hn as compareVersions, Ho as DEVICE_STATUS_METHOD, Hr as interpolate, Hs as isDebugChannelName, Is as expandCapMethods, Kr as isArrayOutputSchema, Mi as objectInputDeclaresRequiredDeviceId, Ns as defineRecordKinds, Nt as PackageRequiresSchema, Or as extractNestedAddonId, Os as createEvent$1, Ps as emitDownForOwnedCaps, Qr as isObjectInput, Ra as supportedRuntimes, Rs as getDebugInterest, St as METHOD_ACCESS_MAP, Tc as errMsg$1, Vo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Wa as unmetRequirements, a as AGENT_MDNS_SERVICE_TYPE, ac as parseJsonObject, as as ReadinessTimeoutError, b as CATALOG_LANGS, ba as scopesAllowDeviceCap, bc as userError, bs as asString$1, bt as LOG_LEVEL_RANK, cc as readinessKey, dr as describeUnmet, ei as isVoidInput, fc as scopeKey, hn as addonSettingsCapability, is as ReadinessRegistry, ji as objectInputDeclaresAddonId, mi as looseSchema, o as AGENT_MDNS_TXT_KEYS, oc as parseJsonUnknown, oi as lifecycleJobSchema, pi as logLevelAtMost, qi as procedureAuthKey, qr as isCollectionArrayMethod, rs as RUNTIME_DEFAULTS, s as ALL_CAPABILITY_DEFINITIONS, ti as kebabToCamel$1, ua as resolveMethodAuth, uc as resolveCapMount, vs as asJsonObject$1, wn as bareAddonId, xc as withoutCallerStamp, ya as scopesAllowAddon, ys as asNumber, zo as CALLER_STAMPED_CAPABILITIES$1 } from "./dist-
|
|
3
|
-
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-
|
|
2
|
+
import { Aa as splitTranslationRef, Bo as DATAPLANE_SECRET_HEADER$1, D as CatalogFileSchema, Ec as EventCategory$1, Es as collectSecretMarkerRefs, Hn as compareVersions, Ho as DEVICE_STATUS_METHOD, Hr as interpolate, Hs as isDebugChannelName, Is as expandCapMethods, Kr as isArrayOutputSchema, Mi as objectInputDeclaresRequiredDeviceId, Ns as defineRecordKinds, Nt as PackageRequiresSchema, Or as extractNestedAddonId, Os as createEvent$1, Ps as emitDownForOwnedCaps, Qr as isObjectInput, Ra as supportedRuntimes, Rs as getDebugInterest, St as METHOD_ACCESS_MAP, Tc as errMsg$1, Vo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Wa as unmetRequirements, a as AGENT_MDNS_SERVICE_TYPE, ac as parseJsonObject, as as ReadinessTimeoutError, b as CATALOG_LANGS, ba as scopesAllowDeviceCap, bc as userError, bs as asString$1, bt as LOG_LEVEL_RANK, cc as readinessKey, dr as describeUnmet, ei as isVoidInput, fc as scopeKey, hn as addonSettingsCapability, is as ReadinessRegistry, ji as objectInputDeclaresAddonId, mi as looseSchema, o as AGENT_MDNS_TXT_KEYS, oc as parseJsonUnknown, oi as lifecycleJobSchema, pi as logLevelAtMost, qi as procedureAuthKey, qr as isCollectionArrayMethod, rs as RUNTIME_DEFAULTS, s as ALL_CAPABILITY_DEFINITIONS, ti as kebabToCamel$1, ua as resolveMethodAuth, uc as resolveCapMount, vs as asJsonObject$1, wn as bareAddonId, xc as withoutCallerStamp, ya as scopesAllowAddon, ys as asNumber, zo as CALLER_STAMPED_CAPABILITIES$1 } from "./dist-BsQA6-0i.mjs";
|
|
3
|
+
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-ByVi5eUC.mjs";
|
|
4
4
|
import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
|
|
5
5
|
import { AlertCenterAddon, a as redactLogEntry, i as isCredentialKeyName, n as lastCauseAfterChunk, o as redactLogMeta, r as readRunnerDisplayName, s as redactLogText, t as CRASH_BREAKER_ERROR_PREFIX } from "./builtins/alerts/alerts.addon.mjs";
|
|
6
6
|
import "./builtins/alerts/index.mjs";
|
|
@@ -25,22 +25,22 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
|
|
|
25
25
|
import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
|
|
26
26
|
import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
|
|
27
27
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
28
|
-
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-
|
|
29
|
-
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-
|
|
28
|
+
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-DRnV6QYu.mjs";
|
|
29
|
+
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-CjXTbmvH.mjs";
|
|
30
30
|
import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
31
31
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
32
32
|
import { StorageOrchestratorAddon, a as stripForwardedCaller, i as createHubCapForwardService, l as storageOrchestratorRecordKinds, n as HUB_CAP_FWD_ACTION, o as buildStorageLocationRegistry, r as HUB_CAP_FWD_SERVICE, t as StorageOrchestratorService } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
33
33
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
34
|
-
import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-
|
|
35
|
-
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-
|
|
34
|
+
import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-szf2FU49.mjs";
|
|
35
|
+
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-CQeMrR4f.mjs";
|
|
36
36
|
import { $ as caFingerprintCompact, A as getProcessNodeMeshTransport, B as MESH_NODE_CERTIFICATES_COLLECTION, C as MESH_TLS_PORT_HELLO_FIELD, Ct as readOriginSetting, D as setProcessMeshTlsEnabler, Dt as readCidrSetting, E as ServiceBroker, Et as parseCidrList, F as renewMeshCertificate, G as getProcessMeshCertificateRegistry, H as MeshCertificateRegistry, I as revokeMeshCertificate, J as processMeshCrl, K as setProcessMeshCertificateRegistry, L as getProcessMeshTlsListenerState, M as isProcessVerifiedMeshPeer, N as onProcessNodeRegistered, O as dropProcessPeer, P as setProcessMeshPeerTransportLookup, Q as caFingerprint, R as openMeshTlsWhenRevocationsLoaded, S as verifyMembershipAnswer, St as parseOriginList, SystemConfigAddon, T as Errors, Tt as normalizeIp, U as RENEWAL_ABANDONED, V as MESH_NODE_CERTIFICATES_COLUMNS, W as describeMeshLeaf, X as getProcessMeshCaState, Y as MeshCaKeeper, Z as requireProcessMeshCa, _ as signPairingProof, _t as verifyAgentUiUnlockTicket, a as hubHostFromMeshAddress, at as issueMeshLeafForNode, b as MembershipResponder, bt as isInsecureOrigin, c as PAIRING_MAX_SESSIONS, ct as AGENT_DASHBOARD_ORIGINS_FIELD, d as PAIRING_PROTOCOL, dt as AGENT_UI_UNLOCK_USE, et as createMeshCsrPem, f as PAIRING_TTL_MS, ft as AGENT_UI_UNLOCK_VERSION, g as keyFingerprintShort, gt as parseAgentDashboardOrigins, h as describeCsr, ht as mintAgentUiUnlockTicket, i as AgentPairing, it as isValidAgentNodeId, j as getProcessPeerLeaf, k as emitProcessNodeRegistered, l as PAIRING_PATHS, lt as AGENT_UI_UNLOCK_TTL_MS, m as computePairingSas, mt as isAllowedAgentDashboardReturnTo, n as HubPairing, nt as generateMeshCa, o as PAIRING_CODE_DIGITS, ot as issueMeshLeafFromCsr, p as computePairingCommitment, pt as UnlockTicketJtiStore, q as MeshCrl, r as PairingHttpError, rt as generateMeshKeyPair, s as PAIRING_MAX_CODE_ATTEMPTS, st as loadMeshCa, tt as exportMeshPrivateKeyPem, u as PAIRING_PIN_DIGITS, ut as AGENT_UI_UNLOCK_TYP, v as verifyPairingProof, vt as InvalidCorsOriginError, w as TlsTcpTransporter, wt as createCidrMatcher, x as signMembershipProof, xt as normalizeOrigin, y as MEMBERSHIP_PATHS, yt as OPAQUE_ORIGIN, z as setProcessMeshTlsListenerState } from "./builtins/system-config/system-config.addon.mjs";
|
|
37
37
|
import "./builtins/system-config/index.mjs";
|
|
38
38
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
39
39
|
import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-N7flBDwT.mjs";
|
|
40
|
-
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-
|
|
40
|
+
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-8dJTW2LI.mjs";
|
|
41
41
|
import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
|
|
42
42
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
|
|
43
|
-
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-
|
|
43
|
+
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-Co2lk3OU.mjs";
|
|
44
44
|
import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-BW3OcrLD.mjs";
|
|
45
45
|
import { z } from "zod";
|
|
46
46
|
import * as crypto$1 from "node:crypto";
|
|
@@ -25554,6 +25554,7 @@ var AddonHealthMonitor = class {
|
|
|
25554
25554
|
logger;
|
|
25555
25555
|
retryFn;
|
|
25556
25556
|
now;
|
|
25557
|
+
isHeldBack;
|
|
25557
25558
|
timer = null;
|
|
25558
25559
|
graceEmittedFor = false;
|
|
25559
25560
|
constructor(opts) {
|
|
@@ -25561,6 +25562,7 @@ var AddonHealthMonitor = class {
|
|
|
25561
25562
|
this.logger = opts.logger;
|
|
25562
25563
|
this.retryFn = opts.retryFn;
|
|
25563
25564
|
this.now = opts.now ?? (() => Date.now());
|
|
25565
|
+
this.isHeldBack = opts.isHeldBack ?? (() => false);
|
|
25564
25566
|
this.tickIntervalMs = opts.tickIntervalMs ?? 3e4;
|
|
25565
25567
|
this.gracePeriodMs = opts.gracePeriodMs ?? 3e5;
|
|
25566
25568
|
this.retryIntervalsMs = opts.retryIntervalsMs ?? HEALTH_MONITOR_RETRY_INTERVALS_MS;
|
|
@@ -25588,7 +25590,8 @@ var AddonHealthMonitor = class {
|
|
|
25588
25590
|
lastError: null,
|
|
25589
25591
|
nextRetryAt: null,
|
|
25590
25592
|
alertEmitted: false,
|
|
25591
|
-
retrying: false
|
|
25593
|
+
retrying: false,
|
|
25594
|
+
heldBack: false
|
|
25592
25595
|
});
|
|
25593
25596
|
if (wasAlerting) this.emit(EventCategory$1.AddonLoadRecovered, {
|
|
25594
25597
|
packageName,
|
|
@@ -25603,6 +25606,11 @@ var AddonHealthMonitor = class {
|
|
|
25603
25606
|
*/
|
|
25604
25607
|
recordFailure(packageName, err, addonId) {
|
|
25605
25608
|
const existing = this.state.get(packageName);
|
|
25609
|
+
const id = addonId ?? existing?.addonId;
|
|
25610
|
+
if (id !== void 0 && this.isHeldBack(id)) {
|
|
25611
|
+
this.recordHeldBack(packageName, errMsg$1(err), id);
|
|
25612
|
+
return;
|
|
25613
|
+
}
|
|
25606
25614
|
const t = this.now();
|
|
25607
25615
|
const retryCount = (existing?.retryCount ?? 0) + 1;
|
|
25608
25616
|
const intervalIdx = Math.min(retryCount - 1, this.retryIntervalsMs.length - 1);
|
|
@@ -25621,7 +25629,8 @@ var AddonHealthMonitor = class {
|
|
|
25621
25629
|
lastError: errPayload,
|
|
25622
25630
|
nextRetryAt,
|
|
25623
25631
|
alertEmitted: existing?.alertEmitted ?? false,
|
|
25624
|
-
retrying: false
|
|
25632
|
+
retrying: false,
|
|
25633
|
+
heldBack: false
|
|
25625
25634
|
};
|
|
25626
25635
|
this.state.set(packageName, next);
|
|
25627
25636
|
this.logger.warn("Addon load/init failure recorded", { meta: {
|
|
@@ -25650,6 +25659,39 @@ var AddonHealthMonitor = class {
|
|
|
25650
25659
|
}
|
|
25651
25660
|
}
|
|
25652
25661
|
/**
|
|
25662
|
+
* The spawn gate holds this addon back (its package is not yet at the version the
|
|
25663
|
+
* server requires). Not a failure: the same retry backoff is armed, so the addon
|
|
25664
|
+
* is reloaded once its package is current, but no failure is logged as a warning
|
|
25665
|
+
* and no `AddonLoadFailed` / `AddonRetryScheduled` event is emitted. A retry that
|
|
25666
|
+
* finds the gate open records success the normal way.
|
|
25667
|
+
*/
|
|
25668
|
+
recordHeldBack(packageName, reason, addonId) {
|
|
25669
|
+
const existing = this.state.get(packageName);
|
|
25670
|
+
const t = this.now();
|
|
25671
|
+
const retryCount = (existing?.retryCount ?? 0) + 1;
|
|
25672
|
+
const nextRetryAt = t + this.retryIntervalsMs[Math.min(retryCount - 1, this.retryIntervalsMs.length - 1)];
|
|
25673
|
+
this.state.set(packageName, {
|
|
25674
|
+
packageName,
|
|
25675
|
+
addonId: addonId ?? existing?.addonId,
|
|
25676
|
+
phase: "failed",
|
|
25677
|
+
retryCount,
|
|
25678
|
+
firstFailureAt: existing?.firstFailureAt ?? t,
|
|
25679
|
+
lastAttemptAt: t,
|
|
25680
|
+
lastError: { message: reason },
|
|
25681
|
+
nextRetryAt,
|
|
25682
|
+
alertEmitted: false,
|
|
25683
|
+
retrying: false,
|
|
25684
|
+
heldBack: true
|
|
25685
|
+
});
|
|
25686
|
+
this.logger.info("Addon held back by the stale gate, retry armed", { meta: {
|
|
25687
|
+
packageName,
|
|
25688
|
+
addonId: addonId ?? existing?.addonId,
|
|
25689
|
+
retryCount,
|
|
25690
|
+
nextRetryAt,
|
|
25691
|
+
reason
|
|
25692
|
+
} });
|
|
25693
|
+
}
|
|
25694
|
+
/**
|
|
25653
25695
|
* Force an immediate retry attempt for a package, resetting the
|
|
25654
25696
|
* counter back to 0 (next failure goes to the 60s interval again).
|
|
25655
25697
|
* Used by the user-facing `addons.retryLoad` tRPC procedure and by
|
|
@@ -25726,7 +25768,7 @@ var AddonHealthMonitor = class {
|
|
|
25726
25768
|
const t = this.now();
|
|
25727
25769
|
if (!this.inGracePeriod() && !this.graceEmittedFor) {
|
|
25728
25770
|
this.graceEmittedFor = true;
|
|
25729
|
-
for (const s of this.state.values()) if (s.phase === "failed" && !s.alertEmitted && s.lastError) {
|
|
25771
|
+
for (const s of this.state.values()) if (s.phase === "failed" && !s.heldBack && !s.alertEmitted && s.lastError) {
|
|
25730
25772
|
s.alertEmitted = true;
|
|
25731
25773
|
this.emit(EventCategory$1.AddonLoadFailed, {
|
|
25732
25774
|
packageName: s.packageName,
|
|
@@ -63,6 +63,12 @@ export interface AddonHealthState {
|
|
|
63
63
|
alertEmitted: boolean;
|
|
64
64
|
/** True if a retry attempt is currently in flight. */
|
|
65
65
|
retrying: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* True while the hub spawn gate holds the addon back (its package is below what
|
|
68
|
+
* the running server requires). Retried on the same backoff, but never a
|
|
69
|
+
* failure: no alert, no failure event.
|
|
70
|
+
*/
|
|
71
|
+
heldBack: boolean;
|
|
66
72
|
}
|
|
67
73
|
export interface AddonHealthSnapshot {
|
|
68
74
|
readonly packageName: string;
|
|
@@ -78,6 +84,7 @@ export interface AddonHealthSnapshot {
|
|
|
78
84
|
readonly nextRetryAt: number | null;
|
|
79
85
|
readonly alertEmitted: boolean;
|
|
80
86
|
readonly retrying: boolean;
|
|
87
|
+
readonly heldBack: boolean;
|
|
81
88
|
/** Whether the boot grace window is still open (suppresses alerts). */
|
|
82
89
|
readonly inGracePeriod: boolean;
|
|
83
90
|
}
|
|
@@ -91,6 +98,11 @@ export interface AddonHealthMonitorOptions {
|
|
|
91
98
|
* success; throws on failure (the monitor records the new error).
|
|
92
99
|
*/
|
|
93
100
|
readonly retryFn: (packageName: string) => Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Whether the spawn gate currently holds this addon back. A failure recorded for
|
|
103
|
+
* a held-back addon (a retry the gate refused) stays a quiet retry, not an alert.
|
|
104
|
+
*/
|
|
105
|
+
readonly isHeldBack?: (addonId: string) => boolean;
|
|
94
106
|
/** Override for tests. Defaults to `HEALTH_MONITOR_TICK_MS`. */
|
|
95
107
|
readonly tickIntervalMs?: number;
|
|
96
108
|
/** Override for tests. Defaults to `HEALTH_MONITOR_GRACE_PERIOD_MS`. */
|
|
@@ -110,6 +122,7 @@ export declare class AddonHealthMonitor {
|
|
|
110
122
|
private readonly logger;
|
|
111
123
|
private readonly retryFn;
|
|
112
124
|
private readonly now;
|
|
125
|
+
private readonly isHeldBack;
|
|
113
126
|
private timer;
|
|
114
127
|
private graceEmittedFor;
|
|
115
128
|
constructor(opts: AddonHealthMonitorOptions);
|
|
@@ -128,6 +141,14 @@ export declare class AddonHealthMonitor {
|
|
|
128
141
|
*/
|
|
129
142
|
recordFailure(packageName: string, err: unknown, addonId?: string): void;
|
|
130
143
|
/**
|
|
144
|
+
* The spawn gate holds this addon back (its package is not yet at the version the
|
|
145
|
+
* server requires). Not a failure: the same retry backoff is armed, so the addon
|
|
146
|
+
* is reloaded once its package is current, but no failure is logged as a warning
|
|
147
|
+
* and no `AddonLoadFailed` / `AddonRetryScheduled` event is emitted. A retry that
|
|
148
|
+
* finds the gate open records success the normal way.
|
|
149
|
+
*/
|
|
150
|
+
recordHeldBack(packageName: string, reason: string, addonId?: string): void;
|
|
151
|
+
/**
|
|
131
152
|
* Force an immediate retry attempt for a package, resetting the
|
|
132
153
|
* counter back to 0 (next failure goes to the 60s interval again).
|
|
133
154
|
* Used by the user-facing `addons.retryLoad` tRPC procedure and by
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Es as collectSecretMarkerRefs } from "./dist-
|
|
1
|
+
import { Es as collectSecretMarkerRefs } from "./dist-BsQA6-0i.mjs";
|
|
2
2
|
//#region src/builtins/sqlite-storage/migrations/legacy-integration-rows-door.ts
|
|
3
3
|
/**
|
|
4
4
|
* Migration-only door for the leftover integration rows (planning#416).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ns as defineRecordKinds, P as DATABASE_SNAPSHOT_SUFFIX, q as DataStoreDatabaseSchema } from "./dist-
|
|
1
|
+
import { Ns as defineRecordKinds, P as DATABASE_SNAPSHOT_SUFFIX, q as DataStoreDatabaseSchema } from "./dist-BsQA6-0i.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createCipheriv, createDecipheriv, createHash, createPrivateKey, createPublicKey, diffieHellman, generateKeyPairSync, hkdfSync, randomBytes } from "node:crypto";
|
|
4
4
|
import { Buffer as Buffer$1 } from "buffer";
|
|
Binary file
|
|
Binary file
|