@camstack/system 1.2.441 → 1.2.443

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.
Files changed (91) hide show
  1. package/dist/addon-runner.js +72 -2
  2. package/dist/addon-runner.mjs +72 -2
  3. package/dist/addon-utils.js +1 -1
  4. package/dist/addon-utils.mjs +1 -1
  5. package/dist/auth/totp-manager.d.ts +46 -1
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  7. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  9. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  10. package/dist/builtins/alerts/alerts.addon.d.ts +41 -1
  11. package/dist/builtins/alerts/alerts.addon.js +638 -26
  12. package/dist/builtins/alerts/alerts.addon.mjs +638 -26
  13. package/dist/builtins/alerts/critical-push.d.ts +86 -0
  14. package/dist/builtins/alerts/runner-alert.d.ts +71 -0
  15. package/dist/builtins/autotrack/index.js +1 -1
  16. package/dist/builtins/autotrack/index.mjs +1 -1
  17. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  18. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  19. package/dist/builtins/calendars/calendars.addon.js +1 -1
  20. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  21. package/dist/builtins/camera-grid/index.js +1 -1
  22. package/dist/builtins/camera-grid/index.mjs +1 -1
  23. package/dist/builtins/composer/composer.addon.js +2 -2
  24. package/dist/builtins/composer/composer.addon.mjs +2 -2
  25. package/dist/builtins/console-logging/index.js +1 -1
  26. package/dist/builtins/console-logging/index.mjs +1 -1
  27. package/dist/builtins/core-blocks/block-package.d.ts +4 -2
  28. package/dist/builtins/core-blocks/block-settings-store.d.ts +65 -19
  29. package/dist/builtins/core-blocks/core-blocks.addon.js +365 -38
  30. package/dist/builtins/core-blocks/core-blocks.addon.mjs +365 -38
  31. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  32. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  33. package/dist/builtins/hub-forwarder/index.js +1 -1
  34. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  35. package/dist/builtins/keychain/index.js +3 -3
  36. package/dist/builtins/keychain/index.mjs +3 -3
  37. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  38. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  39. package/dist/builtins/local-auth/auth-schema.d.ts +1 -1
  40. package/dist/builtins/local-auth/local-auth.addon.js +226 -17
  41. package/dist/builtins/local-auth/local-auth.addon.mjs +226 -17
  42. package/dist/builtins/local-network/local-network.addon.js +2 -2
  43. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  44. package/dist/builtins/loki-logging/index.js +1 -1
  45. package/dist/builtins/loki-logging/index.mjs +1 -1
  46. package/dist/builtins/native-metrics/native-metrics.addon.js +2 -2
  47. package/dist/builtins/native-metrics/native-metrics.addon.mjs +2 -2
  48. package/dist/builtins/platform-probe/index.js +2 -2
  49. package/dist/builtins/platform-probe/index.mjs +2 -2
  50. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  51. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  52. package/dist/builtins/snapshot/index.js +1 -1
  53. package/dist/builtins/snapshot/index.mjs +1 -1
  54. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  55. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  56. package/dist/builtins/sqlite-storage/index.js +1 -1
  57. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  58. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  59. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  60. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  61. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  62. package/dist/builtins/system-config/system-config.addon.js +2 -2
  63. package/dist/builtins/system-config/system-config.addon.mjs +2 -2
  64. package/dist/builtins/winston-logging/index.js +1 -1
  65. package/dist/builtins/winston-logging/index.mjs +1 -1
  66. package/dist/{composition-sources-BG-W2U0d.js → composition-sources-BUXX1e8j.js} +1 -1
  67. package/dist/{composition-sources-ByNISOnW.mjs → composition-sources-C8tUG2uL.mjs} +1 -1
  68. package/dist/{constants-DJILnUSb.mjs → constants-CGwVaAV3.mjs} +1 -1
  69. package/dist/{constants-UojhAJcm.js → constants-DWmm7_of.js} +1 -1
  70. package/dist/{device-ca-D8Ri9TVz.mjs → device-ca-DBfiJ_SB.mjs} +1 -1
  71. package/dist/{device-ca-196DAEZT.js → device-ca-DGayRmC0.js} +1 -1
  72. package/dist/{dist-BWvkuc31.mjs → dist-Bxt_S-9a.mjs} +180 -13
  73. package/dist/{dist-BiTCcaf-.js → dist-D9qT3jHr.js} +203 -12
  74. package/dist/file-host-worker.js +1 -1
  75. package/dist/file-host-worker.mjs +1 -1
  76. package/dist/{hub-mdns-ciao-DOBTq8qr.js → hub-mdns-ciao-B-wk9nzx.js} +1 -1
  77. package/dist/{hub-mdns-ciao-Cnd0bTB9.mjs → hub-mdns-ciao-DpPcQDg-.mjs} +1 -1
  78. package/dist/index.js +145 -16
  79. package/dist/index.mjs +140 -17
  80. package/dist/kernel/addon-refused-error.d.ts +30 -0
  81. package/dist/kernel/index.d.ts +3 -0
  82. package/dist/kernel/legacy-blob-guard.d.ts +6 -1
  83. package/dist/kernel/moleculer/process-service.d.ts +16 -1
  84. package/dist/kernel/moleculer/runner-refusal.d.ts +27 -0
  85. package/dist/{restore-archive-4ziluTU3.mjs → restore-archive-9CGgeBzD.mjs} +1 -1
  86. package/dist/{restore-archive-CfSSjKnA.js → restore-archive-BMNXwWWD.js} +1 -1
  87. package/dist/{wal-maintenance-CgZTNWAz.js → wal-maintenance-cRHR4rUY.js} +0 -0
  88. package/dist/{wal-maintenance-B57SAp4a.mjs → wal-maintenance-sIB32ONp.mjs} +0 -0
  89. package/package.json +1 -1
  90. package/dist/{custom-action-registry-BKmoaqG0.js → custom-action-registry-COyb49zm.js} +1 -1
  91. package/dist/{custom-action-registry-CyUuhATc.mjs → custom-action-registry-stpC3Zy-.mjs} +1 -1
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { i as __require } from "./chunk-CNf5ZN-e.mjs";
2
- import { $n as splitTranslationRef, Ar as errMsg$1, B as METHOD_ACCESS_MAP, Dn as objectInputDeclaresAddonId, Hr as asNumber, Ir as RUNTIME_DEFAULTS, Jt as extractNestedAddonId, Kn as scopesAllowAddon, Lr as ReadinessRegistry, Mr as DATAPLANE_SECRET_HEADER$1, Nn as procedureAuthKey, Nr as DEVICE_SETTINGS_CONTRIBUTION_METHODS, On as objectInputDeclaresRequiredDeviceId, Pr as DEVICE_STATUS_METHOD, Qr as expandCapMethods, R as LOG_LEVEL_RANK, Rr as ReadinessTimeoutError, Si as EventCategory$1, Un as resolveMethodAuth, Ur as asString$1, Vr as asJsonObject$1, Xr as emitDownForOwnedCaps, _ as CatalogFileSchema, _n as logLevelAtMost, at as addonSettingsCapability, cn as kebabToCamel$1, d as CATALOG_LANGS, en as interpolate, fi as readinessKey, hi as scopeKey, li as parseJsonObject, n as AGENT_MDNS_TXT_KEYS, nn as isArrayOutputSchema, on as isObjectInput, pi as resolveCapMount, pn as lifecycleJobSchema, qn as scopesAllowDeviceCap, qr as createEvent$1, r as ALL_CAPABILITY_DEFINITIONS, rn as isCollectionArrayMethod, sn as isVoidInput, sr as supportedRuntimes, t as AGENT_MDNS_SERVICE_TYPE, ui as parseJsonUnknown, vn as looseSchema, xi as userError } from "./dist-BWvkuc31.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-D8Ri9TVz.mjs";
2
+ import { $n as splitTranslationRef, $r as expandCapMethods, Ar as errMsg$1, B as METHOD_ACCESS_MAP, Dn as objectInputDeclaresAddonId, Ei as EventCategory$1, Hr as asNumber, Ir as RUNTIME_DEFAULTS, Jr as createEvent$1, Jt as extractNestedAddonId, Kn as scopesAllowAddon, Lr as ReadinessRegistry, Mr as DATAPLANE_SECRET_HEADER$1, Nn as procedureAuthKey, Nr as DEVICE_SETTINGS_CONTRIBUTION_METHODS, On as objectInputDeclaresRequiredDeviceId, Pr as DEVICE_STATUS_METHOD, R as LOG_LEVEL_RANK, Rr as ReadinessTimeoutError, Ti as userError, Un as resolveMethodAuth, Ur as asString$1, Vr as asJsonObject$1, Zr as emitDownForOwnedCaps, _ as CatalogFileSchema, _n as logLevelAtMost, at as addonSettingsCapability, cn as kebabToCamel$1, d as CATALOG_LANGS, en as interpolate, fi as parseJsonObject, gi as resolveCapMount, hi as readinessKey, n as AGENT_MDNS_TXT_KEYS, nn as isArrayOutputSchema, on as isObjectInput, pi as parseJsonUnknown, pn as lifecycleJobSchema, qn as scopesAllowDeviceCap, r as ALL_CAPABILITY_DEFINITIONS, rn as isCollectionArrayMethod, sn as isVoidInput, sr as supportedRuntimes, t as AGENT_MDNS_SERVICE_TYPE, vi as scopeKey, vn as looseSchema } from "./dist-Bxt_S-9a.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-DBfiJ_SB.mjs";
4
4
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
5
5
  import "./builtins/alerts/index.mjs";
6
6
  import { CalendarsAddon } from "./builtins/calendars/calendars.addon.mjs";
@@ -24,21 +24,21 @@ import "./builtins/local-auth/index.mjs";
24
24
  import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index.mjs";
25
25
  import NativeMetricsAddon, { a as NativeMetricsProvider, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
26
26
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
27
- import { c as SqliteSettingsBackend } from "./wal-maintenance-B57SAp4a.mjs";
27
+ import { c as SqliteSettingsBackend } from "./wal-maintenance-sIB32ONp.mjs";
28
28
  import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
29
29
  import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
30
30
  import { StorageOrchestratorAddon, a as stripForwardedCaller, i as createHubCapForwardService, 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";
31
31
  import "./builtins/storage-orchestrator/index.mjs";
32
32
  import { A as isConstrainedCa, C as MAX_LEAF_VALIDITY_DAYS, D as PERMITTED_DNS_SUFFIXES, F as AGENT_HTTPS_NAMES_COLLECTION, I as AGENT_HTTPS_NAMES_COLUMNS, L as AgentHttpsNames, M as permitsIdentity, N as permitsName, O as PERMITTED_IP_RANGES, P as readNameConstraints, R as getProcessAgentHttpsNames, S as LEAF_RENEWAL_WINDOW_DAYS, T as evaluateExistingCert, a as collectAgentNames, b as systemHostFacts, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isLocalOnlyHostname, k as buildNameConstraintSet, 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 SERVER_AUTH_OID, x as CA_VALIDITY_DAYS, y as collectCertIdentity, z as setProcessAgentHttpsNames } from "./agent-https-U0d4uvn2.mjs";
33
- 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-DJILnUSb.mjs";
33
+ 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-CGwVaAV3.mjs";
34
34
  import { $ as generateMeshKeyPair, A as setProcessMeshPeerTransportLookup, B as describeMeshLeaf, C as setProcessMeshTlsEnabler, D as getProcessPeerLeaf, E as getProcessNodeMeshTransport, F as setProcessMeshTlsListenerState, G as MeshCaKeeper, H as setProcessMeshCertificateRegistry, I as MESH_NODE_CERTIFICATES_COLLECTION, J as caFingerprint, K as getProcessMeshCaState, L as MESH_NODE_CERTIFICATES_COLUMNS, M as revokeMeshCertificate, N as getProcessMeshTlsListenerState, O as isProcessVerifiedMeshPeer, P as openMeshTlsWhenRevocationsLoaded, Q as generateMeshCa, R as MeshCertificateRegistry, S as ServiceBroker, SystemConfigAddon, T as emitProcessNodeRegistered, U as MeshCrl, V as getProcessMeshCertificateRegistry, W as processMeshCrl, X as createMeshCsrPem, Y as caFingerprintCompact, Z as exportMeshPrivateKeyPem, _ as signPairingProof, _t as readCidrSetting, a as hubHostFromMeshAddress, at as AGENT_UI_UNLOCK_TTL_MS, b as TlsTcpTransporter, c as PAIRING_MAX_SESSIONS, ct as AGENT_UI_UNLOCK_VERSION, d as PAIRING_PROTOCOL, dt as mintAgentUiUnlockTicket, et as isValidAgentNodeId, f as PAIRING_TTL_MS, ft as parseAgentDashboardOrigins, g as keyFingerprintShort, gt as parseCidrList, h as describeCsr, ht as normalizeIp, i as AgentPairing, it as AGENT_DASHBOARD_ORIGINS_FIELD, j as renewMeshCertificate, k as onProcessNodeRegistered, l as PAIRING_PATHS, lt as UnlockTicketJtiStore, m as computePairingSas, mt as createCidrMatcher, n as HubPairing, nt as issueMeshLeafFromCsr, o as PAIRING_CODE_DIGITS, ot as AGENT_UI_UNLOCK_TYP, p as computePairingCommitment, pt as verifyAgentUiUnlockTicket, q as requireProcessMeshCa, r as PairingHttpError, rt as loadMeshCa, s as PAIRING_MAX_CODE_ATTEMPTS, st as AGENT_UI_UNLOCK_USE, tt as issueMeshLeafForNode, u as PAIRING_PIN_DIGITS, ut as isAllowedAgentDashboardReturnTo, v as verifyPairingProof, w as dropProcessPeer, x as Errors, y as MESH_TLS_PORT_HELLO_FIELD, z as RENEWAL_ABANDONED } from "./builtins/system-config/system-config.addon.mjs";
35
35
  import "./builtins/system-config/index.mjs";
36
36
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
37
- import { C as isModelDownloaded, 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-CyUuhATc.mjs";
38
- import { A as allFamiliesListenHost, C as caReplacementMarkerFile, D as replaceUnconstrainedLocalCa, E as reissueTlsLeaf, F as registerLanHttpHandler, M as bindPendingLanHttp, N as closeLanHttp, O as retirePreviousLocalCa, P as readLanHttpState, S as validateUploadedTls, T as loadTlsCert, _ as splitPemCertificates, a as storeUploadedCertificate, b as chainsToPublicRoot, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, 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 writeExtraSans, w as ensureTlsCert, x as checkUploadedCa, y as writeTlsMode } from "./hub-mdns-ciao-Cnd0bTB9.mjs";
37
+ import { C as isModelDownloaded, 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-stpC3Zy-.mjs";
38
+ import { A as allFamiliesListenHost, C as caReplacementMarkerFile, D as replaceUnconstrainedLocalCa, E as reissueTlsLeaf, F as registerLanHttpHandler, M as bindPendingLanHttp, N as closeLanHttp, O as retirePreviousLocalCa, P as readLanHttpState, S as validateUploadedTls, T as loadTlsCert, _ as splitPemCertificates, a as storeUploadedCertificate, b as chainsToPublicRoot, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, 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 writeExtraSans, w as ensureTlsCert, x as checkUploadedCa, y as writeTlsMode } from "./hub-mdns-ciao-DpPcQDg-.mjs";
39
39
  import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
40
40
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
41
- import { c as BackupDecryptError, f as generateBackupKeyPair, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-4ziluTU3.mjs";
41
+ import { c as BackupDecryptError, f as generateBackupKeyPair, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-9CGgeBzD.mjs";
42
42
  import { z } from "zod";
43
43
  import * as crypto$1 from "node:crypto";
44
44
  import { createHash, randomBytes, randomUUID } from "node:crypto";
@@ -47,6 +47,8 @@ import { connect, createConnection, createServer } from "node:net";
47
47
  import { mkdir, rm, stat, unlink } from "node:fs/promises";
48
48
  import * as path$1 from "node:path";
49
49
  import { dirname, isAbsolute, join, resolve } from "node:path";
50
+ import * as util from "node:util";
51
+ import { promisify } from "node:util";
50
52
  import * as os$1 from "node:os";
51
53
  import { tmpdir } from "node:os";
52
54
  import { pathToFileURL } from "node:url";
@@ -54,8 +56,6 @@ import { BOOT_RECOVERY_BACKOFF_MS, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATC
54
56
  import * as fs from "node:fs";
55
57
  import { accessSync, constants, createReadStream, createWriteStream, existsSync, readFileSync, readdirSync } from "node:fs";
56
58
  import { execFile, spawn } from "node:child_process";
57
- import * as util from "node:util";
58
- import { promisify } from "node:util";
59
59
  import { once } from "node:events";
60
60
  import { createServer as createServer$1, request } from "node:http";
61
61
  import * as v8 from "node:v8";
@@ -23017,6 +23017,50 @@ function createRunnerAddonSettings(client, addonId, before = async () => {}) {
23017
23017
  };
23018
23018
  }
23019
23019
  //#endregion
23020
+ //#region src/kernel/addon-refused-error.ts
23021
+ /**
23022
+ * A deterministic Init refusal (D877): an addon that says, in a typed way,
23023
+ * "I will not start, and here is why" - as opposed to a crash.
23024
+ *
23025
+ * The difference matters to the supervisor. A crash may be transient (a camera
23026
+ * dropping mid-handshake) and is bounded by the D6 circuit-breaker; a refusal
23027
+ * repeats identically until somebody changes the world (runs a migration,
23028
+ * fixes a setting), so counting it toward the breaker only turns "waiting for
23029
+ * the operator" into a terminal `failed` with a stack trace nobody needed.
23030
+ * On 2026-10-17 twenty-eight addons refused on an unmigrated store, exited five
23031
+ * times in ten seconds and were marked `failed` as if they had crashed.
23032
+ *
23033
+ * The runner reports a refusal to its parent (see `runner-refusal.ts`); the
23034
+ * process service parks the runner in `refused` with the reason and retries it
23035
+ * only when an operator acts.
23036
+ */
23037
+ var AddonRefusedError = class extends Error {
23038
+ /** Stable, greppable cause, e.g. `unmigrated-settings`. */
23039
+ code;
23040
+ /** What the operator does about it. */
23041
+ remedy;
23042
+ constructor(code, message, remedy, options) {
23043
+ super(message, options);
23044
+ this.name = "AddonRefusedError";
23045
+ this.code = code;
23046
+ this.remedy = remedy;
23047
+ }
23048
+ };
23049
+ /**
23050
+ * The refusal in `err`'s cause chain, if any. An addon that wraps the error it
23051
+ * got from the kernel (`new Error('init failed', { cause })`) is still refusing.
23052
+ */
23053
+ function findAddonRefusal(err) {
23054
+ const seen = /* @__PURE__ */ new Set();
23055
+ let current = err;
23056
+ while (current !== null && current !== void 0 && !seen.has(current)) {
23057
+ if (current instanceof AddonRefusedError) return current;
23058
+ seen.add(current);
23059
+ current = current instanceof Error ? current.cause : void 0;
23060
+ }
23061
+ return null;
23062
+ }
23063
+ //#endregion
23020
23064
  //#region src/kernel/legacy-blob-guard.ts
23021
23065
  /** Root keys retired long before D870: they never count as "settings still to migrate". */
23022
23066
  var OWN_RETIRED_ROOT_KEYS = new Set([
@@ -23032,9 +23076,13 @@ function isRetiredRootKey(addonId, key) {
23032
23076
  if (OWN_RETIRED_ROOT_KEYS.has(key)) return true;
23033
23077
  return RETIRED_SETTINGS_KEYS.some((spec) => spec.namespace === addonId && (spec.keys.includes(key) || spec.perNodeKeys.some((k) => key === k || key.startsWith(`${k}@`))));
23034
23078
  }
23035
- var UnmigratedSettingsError = class extends Error {
23079
+ /** Stable `code` of the D870 refusal. */
23080
+ var UNMIGRATED_SETTINGS_CODE = "unmigrated-settings";
23081
+ /** The remedy the refusal (and the update pre-flight) names. */
23082
+ var UNMIGRATED_SETTINGS_REMEDY = "Run scripts/hub/migrate-device-store.ts --copy --apply (D870), then restart the addon.";
23083
+ var UnmigratedSettingsError = class extends AddonRefusedError {
23036
23084
  constructor(addonId, what) {
23037
- super(`addon "${addonId}" refuses to start: ${what} - the settings it had are still in the per-addon tables and the standard store holds none. Run scripts/hub/migrate-device-store.ts --copy --apply (D870) before starting it.`);
23085
+ super(UNMIGRATED_SETTINGS_CODE, `addon "${addonId}" refuses to start: ${what} - the settings it had are still in the per-addon tables and the standard store holds none. Run scripts/hub/migrate-device-store.ts --copy --apply (D870) before starting it.`, UNMIGRATED_SETTINGS_REMEDY);
23038
23086
  this.name = "UnmigratedSettingsError";
23039
23087
  }
23040
23088
  };
@@ -25007,6 +25055,27 @@ var AddonHealthMonitor = class {
25007
25055
  }
25008
25056
  };
25009
25057
  //#endregion
25058
+ //#region src/kernel/moleculer/runner-refusal.ts
25059
+ var REFUSED_PREFIX = "REFUSED:";
25060
+ function isReport(value) {
25061
+ if (typeof value !== "object" || value === null) return false;
25062
+ const rec = value;
25063
+ return typeof rec["addonId"] === "string" && typeof rec["code"] === "string" && typeof rec["reason"] === "string" && typeof rec["remedy"] === "string";
25064
+ }
25065
+ /** The refusals announced in a chunk of runner stdout; lines that are not one are ignored. */
25066
+ function parseRunnerRefusals(nodeId, chunk) {
25067
+ const prefix = `${REFUSED_PREFIX}${nodeId}:`;
25068
+ const out = [];
25069
+ for (const line of chunk.split("\n")) {
25070
+ if (!line.startsWith(prefix)) continue;
25071
+ try {
25072
+ const parsed = JSON.parse(line.slice(prefix.length));
25073
+ if (isReport(parsed)) out.push(parsed);
25074
+ } catch {}
25075
+ }
25076
+ return out;
25077
+ }
25078
+ //#endregion
25010
25079
  //#region src/kernel/moleculer/crash-supervisor.ts
25011
25080
  /** Per-runner crash circuit-breaker. Replaces the old infinite-respawn loop. */
25012
25081
  var CrashSupervisor = class {
@@ -25645,6 +25714,7 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25645
25714
  const groupOps = deps?.processGroups ?? defaultProcessGroupOps;
25646
25715
  const runnersOwnGroups = runnerOwnsProcessGroup(deps?.platform ?? process.platform);
25647
25716
  const processes = /* @__PURE__ */ new Map();
25717
+ const backingOff = /* @__PURE__ */ new Map();
25648
25718
  const pendingGroupReaps = /* @__PURE__ */ new Map();
25649
25719
  const runnerLocks = /* @__PURE__ */ new Map();
25650
25720
  function withRunnerLock(runnerId, fn) {
@@ -25685,6 +25755,19 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25685
25755
  }, data));
25686
25756
  }
25687
25757
  /**
25758
+ * Every transition a supervisor or a boot check can settle on (D877):
25759
+ * `running` (READY), `crashed`, `failed`, `refused`. In-process telemetry - the
25760
+ * boot check re-evaluates on it and the alert centre closes a recovered runner.
25761
+ */
25762
+ function emitStateChange(entry) {
25763
+ emitRunnerEvent(EventCategory$1.ProcessStateChanged, entry.name, {
25764
+ runnerId: entry.name,
25765
+ nodeId: parentNodeId,
25766
+ addonIds: entry.runnerAddons.map((addon) => addon.addonId),
25767
+ state: entry.state
25768
+ });
25769
+ }
25770
+ /**
25688
25771
  * One line per reap that found something, or that failed. An empty group is the
25689
25772
  * normal case after a clean stop and stays quiet at debug. The kernel cannot say
25690
25773
  * which device a child served — the runner id is the finest attribution it has.
@@ -25749,6 +25832,7 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25749
25832
  */
25750
25833
  function spawnRunner(runnerId, addons, env) {
25751
25834
  const nodeId = buildNodeId(runnerId);
25835
+ backingOff.delete(runnerId);
25752
25836
  const runnerPath = path$1.resolve(__dirname, "addon-runner.js");
25753
25837
  const heavy = isHeavyRunner(addons);
25754
25838
  const rssBudgetMb = runnerRssBudgetMb(addons);
@@ -25789,6 +25873,8 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25789
25873
  startedAt: Date.now(),
25790
25874
  restartCount: 0,
25791
25875
  state: "starting",
25876
+ refusal: null,
25877
+ announcedRefusal: null,
25792
25878
  child,
25793
25879
  ownsGroup,
25794
25880
  groupReap: null
@@ -25798,7 +25884,13 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25798
25884
  kill: groupOps.kill
25799
25885
  });
25800
25886
  child.stdout?.on("data", (data) => {
25801
- if (data.toString().includes(`READY:${nodeId}`) && entry.state === "starting") entry.state = "running";
25887
+ const text = data.toString();
25888
+ const refusals = parseRunnerRefusals(nodeId, text);
25889
+ if (refusals[0] !== void 0) entry.announcedRefusal = refusals[0];
25890
+ if (text.includes(`READY:${nodeId}`) && entry.state === "starting") {
25891
+ entry.state = "running";
25892
+ emitStateChange(entry);
25893
+ }
25802
25894
  });
25803
25895
  child.stderr?.on("data", (data) => {
25804
25896
  process.stderr.write(`[${runnerId}] ${data.toString()}`);
@@ -25807,7 +25899,33 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25807
25899
  console.error(`[process-service EXIT] runner=${runnerId} code=${String(code)} signal=${String(signal)} state=${entry.state}`);
25808
25900
  const groupReap = reapRunnerGroup(entry);
25809
25901
  if (entry.state === "stopped") return;
25902
+ const announced = entry.announcedRefusal;
25903
+ entry.announcedRefusal = null;
25904
+ if (code === 78) {
25905
+ const refusal = announced ?? {
25906
+ addonId: entry.runnerAddons[0]?.addonId ?? runnerId,
25907
+ code: "unknown",
25908
+ reason: "the runner exited with the refusal code without saying why",
25909
+ remedy: "Read the runner log, fix the cause, then restart the addon."
25910
+ };
25911
+ entry.refusal = refusal;
25912
+ entry.state = "refused";
25913
+ capturedBroker?.logger.error(`[${runnerId}] Addon refused to start (${refusal.code}): ${refusal.reason} Not respawning; ${refusal.remedy}`, { tags: { runnerId } });
25914
+ processes.set(runnerId, entry);
25915
+ if (capturedBroker) forceMoleculerDisconnect(capturedBroker, entry.nodeId);
25916
+ emitRunnerEvent(EventCategory$1.AddonRunnerRefused, runnerId, {
25917
+ runnerId,
25918
+ nodeId: parentNodeId,
25919
+ addonIds: entry.runnerAddons.map((addon) => addon.addonId),
25920
+ code: refusal.code,
25921
+ reason: refusal.reason,
25922
+ remedy: refusal.remedy
25923
+ });
25924
+ emitStateChange(entry);
25925
+ return;
25926
+ }
25810
25927
  entry.state = "crashed";
25928
+ emitStateChange(entry);
25811
25929
  capturedBroker?.logger.error(`[${runnerId}] Process exited (code=${code}, signal=${signal})`);
25812
25930
  const decision = crashSupervisor.recordCrash(runnerId);
25813
25931
  emitRunnerEvent(EventCategory$1.ProcessCrashed, runnerId, {
@@ -25817,6 +25935,7 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25817
25935
  });
25818
25936
  if (decision.action === "failed") {
25819
25937
  entry.state = "failed";
25938
+ emitStateChange(entry);
25820
25939
  capturedBroker?.logger.error(`[${runnerId}] Crash circuit-breaker tripped — ${decision.crashesInWindow} crashes in ${CRASH_WINDOW_MS}ms. Not respawning.`);
25821
25940
  processes.set(runnerId, entry);
25822
25941
  if (capturedBroker) forceMoleculerDisconnect(capturedBroker, entry.nodeId);
@@ -25841,10 +25960,12 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25841
25960
  delayMs: decision.backoffMs
25842
25961
  });
25843
25962
  processes.delete(runnerId);
25963
+ backingOff.set(runnerId, entry);
25844
25964
  if (capturedBroker) forceMoleculerDisconnect(capturedBroker, entry.nodeId);
25845
25965
  setTimeout(() => {
25846
25966
  withRunnerLock(runnerId, async () => {
25847
25967
  await groupReap;
25968
+ backingOff.delete(runnerId);
25848
25969
  if (processes.has(runnerId)) return;
25849
25970
  const restarted = spawnRunner(runnerId, addons, env);
25850
25971
  restarted.restartCount = entry.restartCount + 1;
@@ -25884,7 +26005,7 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25884
26005
  reason: "not found"
25885
26006
  };
25886
26007
  const deadNodeId = target.nodeId;
25887
- const alreadyDead = target.state === "failed" || target.child.exitCode !== null || target.child.signalCode !== null;
26008
+ const alreadyDead = target.state === "failed" || target.state === "refused" || target.child.exitCode !== null || target.child.signalCode !== null;
25888
26009
  target.state = "stopped";
25889
26010
  if (!alreadyDead) {
25890
26011
  target.child.kill("SIGTERM");
@@ -25921,7 +26042,7 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25921
26042
  const { runnerAddons } = target;
25922
26043
  const deadNodeId = target.nodeId;
25923
26044
  const prevRestartCount = target.restartCount;
25924
- const alreadyDead = target.state === "failed" || target.child.exitCode !== null || target.child.signalCode !== null;
26045
+ const alreadyDead = target.state === "failed" || target.state === "refused" || target.child.exitCode !== null || target.child.signalCode !== null;
25925
26046
  target.state = "stopped";
25926
26047
  if (!alreadyDead) {
25927
26048
  target.child.kill("SIGTERM");
@@ -25950,7 +26071,7 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25950
26071
  });
25951
26072
  } },
25952
26073
  list: { async handler() {
25953
- const entries = [...processes.values()];
26074
+ const entries = [...processes.values(), ...backingOff.values()];
25954
26075
  const stats = await getPidStats$1(entries.filter((p) => p.pid > 0).map((p) => p.pid));
25955
26076
  return entries.map((p) => {
25956
26077
  const s = stats.get(p.pid);
@@ -25966,6 +26087,7 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25966
26087
  startedAt: p.startedAt,
25967
26088
  restartCount: p.restartCount,
25968
26089
  state: p.state,
26090
+ ...p.refusal !== null ? { refusal: p.refusal } : {},
25969
26091
  cpuPercent: s?.cpu ?? 0,
25970
26092
  memoryRss: s?.memoryRss ?? 0,
25971
26093
  uptimeSeconds: Math.floor((Date.now() - p.startedAt) / 1e3)
@@ -25982,7 +26104,7 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
25982
26104
  if (!entry) return;
25983
26105
  const { runnerAddons } = entry;
25984
26106
  const prevRestartCount = entry.restartCount;
25985
- if (!(entry.state === "failed" || entry.child.exitCode !== null || entry.child.signalCode !== null)) {
26107
+ if (!(entry.state === "failed" || entry.state === "refused" || entry.child.exitCode !== null || entry.child.signalCode !== null)) {
25986
26108
  entry.state = "stopped";
25987
26109
  entry.child.kill("SIGTERM");
25988
26110
  await new Promise((resolve) => {
@@ -26037,6 +26159,7 @@ function createProcessService(parentNodeId, dataDir, deps, parentTcpPort, parent
26037
26159
  startedAt: p.startedAt,
26038
26160
  restartCount: p.restartCount,
26039
26161
  state: p.state,
26162
+ ...p.refusal !== null ? { refusal: p.refusal } : {},
26040
26163
  cpuPercent: s?.cpu ?? 0,
26041
26164
  memoryRss: s?.memoryRss ?? 0,
26042
26165
  uptimeSeconds: Math.floor((Date.now() - p.startedAt) / 1e3)
@@ -27149,4 +27272,4 @@ function resetCatalogRegistryForTests() {
27149
27272
  shared = null;
27150
27273
  }
27151
27274
  //#endregion
27152
- export { ADMIN_TOKEN_MAX_LIFETIME_MS, ADMIN_TOKEN_PREFIX, AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, AGENT_READINESS_SERVICE_NAME, AGENT_UI_UNLOCK_TTL_MS, AGENT_UI_UNLOCK_TYP, AGENT_UI_UNLOCK_USE, AGENT_UI_UNLOCK_VERSION, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AdminTokenManager, AgentHttpsInstallError, AgentHttpsNames, AgentMdnsAdvertiser, AgentMeshIdentityGate, AgentPairing, AlertCenterAddon, ApiKeyManager, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_HUB_TLS_TCP_PORT, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_CA_KEY_REF, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceCaStore, DeviceCredentialManager, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FIRST_BOOT_ADMIN_PASSWORD, FIRST_BOOT_ADMIN_USERNAME, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, GET_STATUS_METHOD, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, IntegrationRegistry, JWT_SIGNING_KEY_REF, JobJournal, JwtSigningKeyUnavailableError, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LoginSessionManager, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MESH_ACTION_FORBIDDEN_TYPE, MESH_CA_FIELD, MESH_CA_KEY_REF, MESH_CA_SETTINGS_KEY, MESH_NODE_CERTIFICATES_COLLECTION, MESH_NODE_CERTIFICATES_COLUMNS, MESH_NODE_UNAUTHENTICATED_TYPE, MESH_QUEUE_TOP_N, MESH_TLS_PORT_HELLO_FIELD, METHOD_ACCESS_MAP, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PAIRING_CODE_DIGITS, PAIRING_MAX_CODE_ATTEMPTS, PAIRING_MAX_SESSIONS, PAIRING_PATHS, PAIRING_PIN_DIGITS, PAIRING_PROTOCOL, PAIRING_TTL_MS, PARENT_ROUTED_PROVIDER_ADDON_ID, PERMITTED_DNS_SUFFIXES, PERMITTED_IP_RANGES, PREVIOUS_LEAF_GRACE_MS, PYTHON_VERSION, PairingHttpError, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, REFRESH_TOKEN_PREFIX, RENEWAL_ABANDONED, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORE_READABLE_BOOTSTRAP_KEYS, SYSTEM_SECRET_OWNER, ScopedLogger, ScopedTokenManager, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemBackupService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, TlsTcpTransporter, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, acceptAgentSans, adaptBrokerToCluster, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, applyCertificateToListener, applyLanHttp, attachUserManagementInternal, attributeStall, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildAgentAnnouncement, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNameConstraintSet, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildTransporter, builderMountedCapNames, caFingerprint, caFingerprintCompact, caReplacementMarkerFile, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, catalogNamespaceOf, certificateNames, chainsToPublicRoot, checkUploadedCa, classifyAddonDir, classifyCapRoute, clearHttpsListener, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterEventTopic, collectAgentNames, collectCertIdentity, collectModelFiles, computePairingCommitment, computePairingSas, connectBrokerTransport, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createAgentEventScope, createAgentHttpsRequest, createAgentTransport, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCiaoPublisher, createCidrMatcher, createCoreCapService, createCoreCatalogRegistry, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createKernelInferenceEngine, createLocalTransport, createLoopDelayMeter, createMeshAccessMiddleware, createMeshCsrPem, createMeshQueueReader, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, exportMeshPrivateKeyPem, fetchJson, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, generateBackupKeyPair, generateDeviceCa, generateMeshCa, generateMeshKeyPair, getBrokerEventBus, getBrokerTlsTransporter, getCapUsageRegistry, getCatalogRegistry, getFfmpegDownloadUrl, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPlatformKeychainKey, getProcessAgentHttpsNames, getProcessJwtSigningKeyState, getProcessMeshCaState, getProcessMeshCertificateRegistry, getProcessMeshTlsListenerState, getProcessNodeMeshTransport, getProcessPeerLeaf, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getUserManagementInternal, getWorkerDeviceRegistry, hasDotNode, heapSpaceField, hostNodeIdOf, hubHostFromMeshAddress, hubMainRssBudget, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, loadAgentHttps, loadDeviceCa, loadMeshCa, loadTlsCert, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readBackupEncryptionHeader, readCidrSetting, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, signPairingProof, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, stampCallerAddonId, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, staticJwtSigningKey, storeMayAnswer, storeUploadedCertificate, strandedMb, stripCamstackDeps, stripForgedIdentity, stripForwardedCaller, subscribePassthrough, systemHostFacts, udsChildLogToWorkerEntry, useStoredUploadedCertificate, validateProviderRegistrations, validateUploadedTls, verifyAgentUiUnlockTicket, verifyDeviceLeaf, verifyDeviceSignature, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
27275
+ export { ADMIN_TOKEN_MAX_LIFETIME_MS, ADMIN_TOKEN_PREFIX, AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, AGENT_READINESS_SERVICE_NAME, AGENT_UI_UNLOCK_TTL_MS, AGENT_UI_UNLOCK_TYP, AGENT_UI_UNLOCK_USE, AGENT_UI_UNLOCK_VERSION, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRefusedError, AddonRouteRegistry, AdminTokenManager, AgentHttpsInstallError, AgentHttpsNames, AgentMdnsAdvertiser, AgentMeshIdentityGate, AgentPairing, AlertCenterAddon, ApiKeyManager, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_HUB_TLS_TCP_PORT, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_CA_KEY_REF, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceCaStore, DeviceCredentialManager, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FIRST_BOOT_ADMIN_PASSWORD, FIRST_BOOT_ADMIN_USERNAME, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, GET_STATUS_METHOD, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, IntegrationRegistry, JWT_SIGNING_KEY_REF, JobJournal, JwtSigningKeyUnavailableError, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LoginSessionManager, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MESH_ACTION_FORBIDDEN_TYPE, MESH_CA_FIELD, MESH_CA_KEY_REF, MESH_CA_SETTINGS_KEY, MESH_NODE_CERTIFICATES_COLLECTION, MESH_NODE_CERTIFICATES_COLUMNS, MESH_NODE_UNAUTHENTICATED_TYPE, MESH_QUEUE_TOP_N, MESH_TLS_PORT_HELLO_FIELD, METHOD_ACCESS_MAP, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PAIRING_CODE_DIGITS, PAIRING_MAX_CODE_ATTEMPTS, PAIRING_MAX_SESSIONS, PAIRING_PATHS, PAIRING_PIN_DIGITS, PAIRING_PROTOCOL, PAIRING_TTL_MS, PARENT_ROUTED_PROVIDER_ADDON_ID, PERMITTED_DNS_SUFFIXES, PERMITTED_IP_RANGES, PREVIOUS_LEAF_GRACE_MS, PYTHON_VERSION, PairingHttpError, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, REFRESH_TOKEN_PREFIX, RENEWAL_ABANDONED, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORE_READABLE_BOOTSTRAP_KEYS, SYSTEM_SECRET_OWNER, ScopedLogger, ScopedTokenManager, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemBackupService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, TlsTcpTransporter, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UNMIGRATED_SETTINGS_CODE, UNMIGRATED_SETTINGS_REMEDY, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UnmigratedSettingsError, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, acceptAgentSans, adaptBrokerToCluster, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, applyCertificateToListener, applyLanHttp, assertLegacyBlobsMigrated, attachUserManagementInternal, attributeStall, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildAgentAnnouncement, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNameConstraintSet, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildTransporter, builderMountedCapNames, caFingerprint, caFingerprintCompact, caReplacementMarkerFile, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, catalogNamespaceOf, certificateNames, chainsToPublicRoot, checkUploadedCa, classifyAddonDir, classifyCapRoute, clearHttpsListener, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterEventTopic, collectAgentNames, collectCertIdentity, collectModelFiles, computePairingCommitment, computePairingSas, connectBrokerTransport, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createAgentEventScope, createAgentHttpsRequest, createAgentTransport, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCiaoPublisher, createCidrMatcher, createCoreCapService, createCoreCatalogRegistry, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createKernelInferenceEngine, createLocalTransport, createLoopDelayMeter, createMeshAccessMiddleware, createMeshCsrPem, createMeshQueueReader, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, exportMeshPrivateKeyPem, fetchJson, findAddonRefusal, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, generateBackupKeyPair, generateDeviceCa, generateMeshCa, generateMeshKeyPair, getBrokerEventBus, getBrokerTlsTransporter, getCapUsageRegistry, getCatalogRegistry, getFfmpegDownloadUrl, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPlatformKeychainKey, getProcessAgentHttpsNames, getProcessJwtSigningKeyState, getProcessMeshCaState, getProcessMeshCertificateRegistry, getProcessMeshTlsListenerState, getProcessNodeMeshTransport, getProcessPeerLeaf, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getUserManagementInternal, getWorkerDeviceRegistry, hasDotNode, heapSpaceField, hostNodeIdOf, hubHostFromMeshAddress, hubMainRssBudget, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, loadAgentHttps, loadDeviceCa, loadMeshCa, loadTlsCert, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readBackupEncryptionHeader, readCidrSetting, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, signPairingProof, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, stampCallerAddonId, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, staticJwtSigningKey, storeMayAnswer, storeUploadedCertificate, strandedMb, stripCamstackDeps, stripForgedIdentity, stripForwardedCaller, subscribePassthrough, systemHostFacts, udsChildLogToWorkerEntry, useStoredUploadedCertificate, validateProviderRegistrations, validateUploadedTls, verifyAgentUiUnlockTicket, verifyDeviceLeaf, verifyDeviceSignature, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * A deterministic Init refusal (D877): an addon that says, in a typed way,
3
+ * "I will not start, and here is why" - as opposed to a crash.
4
+ *
5
+ * The difference matters to the supervisor. A crash may be transient (a camera
6
+ * dropping mid-handshake) and is bounded by the D6 circuit-breaker; a refusal
7
+ * repeats identically until somebody changes the world (runs a migration,
8
+ * fixes a setting), so counting it toward the breaker only turns "waiting for
9
+ * the operator" into a terminal `failed` with a stack trace nobody needed.
10
+ * On 2026-10-17 twenty-eight addons refused on an unmigrated store, exited five
11
+ * times in ten seconds and were marked `failed` as if they had crashed.
12
+ *
13
+ * The runner reports a refusal to its parent (see `runner-refusal.ts`); the
14
+ * process service parks the runner in `refused` with the reason and retries it
15
+ * only when an operator acts.
16
+ */
17
+ export declare class AddonRefusedError extends Error {
18
+ /** Stable, greppable cause, e.g. `unmigrated-settings`. */
19
+ readonly code: string;
20
+ /** What the operator does about it. */
21
+ readonly remedy: string;
22
+ constructor(code: string, message: string, remedy: string, options?: {
23
+ cause?: unknown;
24
+ });
25
+ }
26
+ /**
27
+ * The refusal in `err`'s cause chain, if any. An addon that wraps the error it
28
+ * got from the kernel (`new Error('init failed', { cause })`) is still refusing.
29
+ */
30
+ export declare function findAddonRefusal(err: unknown): AddonRefusedError | null;
@@ -91,6 +91,9 @@ export { localProviderLink, brokerTransportLink, deviceCapResolverLink, ipcParen
91
91
  export type { LocalProviderResolver, BrokerCapCallOpts } from "./moleculer/trpc-links.js";
92
92
  export { createProcessService } from "./moleculer/process-service.js";
93
93
  export type { ProcessInfo } from "./moleculer/process-service.js";
94
+ export { AddonRefusedError, findAddonRefusal } from "./addon-refused-error.js";
95
+ export { UNMIGRATED_SETTINGS_CODE, UNMIGRATED_SETTINGS_REMEDY, UnmigratedSettingsError, assertLegacyBlobsMigrated, type LegacyGuardClient } from "./legacy-blob-guard.js";
96
+ export type { RunnerRefusalReport } from "./moleculer/runner-refusal.js";
94
97
  export { signalAllRunnerGroups } from "./moleculer/runner-process-group.js";
95
98
  export { CapUsageRegistry, getCapUsageRegistry, PARENT_ROUTED_PROVIDER_ADDON_ID, __resetCapUsageRegistryForTests } from "./moleculer/cap-usage-registry.js";
96
99
  export type { CapUsageCallRecord, CapUsageEdge, CapUsageRegistryOptions, CapUsageStats } from "./moleculer/cap-usage-registry.js";
@@ -13,6 +13,7 @@
13
13
  * quiet by itself once `--drop` removed the old tables.
14
14
  */
15
15
  import type { IScopedLogger } from "@camstack/types";
16
+ import { AddonRefusedError } from "./addon-refused-error.js";
16
17
  /** Is `key` of `addonId` a root key that was retired (and must not be migrated)? */
17
18
  export declare function isRetiredRootKey(addonId: string, key: string): boolean;
18
19
  /** The client calls the guard uses. */
@@ -48,7 +49,11 @@ export interface LegacyGuardClient {
48
49
  }): Promise<unknown>;
49
50
  };
50
51
  }
51
- export declare class UnmigratedSettingsError extends Error {
52
+ /** Stable `code` of the D870 refusal. */
53
+ export declare const UNMIGRATED_SETTINGS_CODE = "unmigrated-settings";
54
+ /** The remedy the refusal (and the update pre-flight) names. */
55
+ export declare const UNMIGRATED_SETTINGS_REMEDY = "Run scripts/hub/migrate-device-store.ts --copy --apply (D870), then restart the addon.";
56
+ export declare class UnmigratedSettingsError extends AddonRefusedError {
52
57
  constructor(addonId: string, what: string);
53
58
  }
54
59
  /**
@@ -1,3 +1,4 @@
1
+ import { type RunnerRefusalReport } from "./runner-refusal.js";
1
2
  import { type ChildProcess, type SpawnOptions } from "node:child_process";
2
3
  import type { ServiceSchema } from "moleculer";
3
4
  import { type RunnerAddonSpec } from "./runner-heap-flags.js";
@@ -24,7 +25,19 @@ interface SpawnedProcess {
24
25
  * and the runner will NOT be respawned. `crashed` is transient — the
25
26
  * window between an exit and the next backoff respawn.
26
27
  */
27
- state: "starting" | "running" | "stopping" | "stopped" | "crashed" | "failed";
28
+ state: "starting" | "running" | "stopping" | "stopped" | "crashed" | "failed" | "refused";
29
+ /**
30
+ * `refused` (D877): the hosted addon said, in a typed way, that it will not
31
+ * start. Terminal like `failed`, but NOT a crash - the D6 breaker never saw
32
+ * it - and an operator restart retries it. The reason is the addon's own.
33
+ */
34
+ refusal: RunnerRefusalReport | null;
35
+ /**
36
+ * The `REFUSED:` line the runner wrote. It is honoured ONLY together with
37
+ * exit code 78 and is dropped on any other exit (a runner that announced a
38
+ * refusal and then died of something else did not refuse).
39
+ */
40
+ announcedRefusal: RunnerRefusalReport | null;
28
41
  child: ChildProcess;
29
42
  /** The runner leads its own process group (POSIX, D668); its pgid is its `pid`. */
30
43
  readonly ownsGroup: boolean;
@@ -50,6 +63,8 @@ interface ProcessInfo {
50
63
  readonly startedAt: number;
51
64
  readonly restartCount: number;
52
65
  readonly state: string;
66
+ /** Why the runner is `refused` (D877); absent otherwise. */
67
+ readonly refusal?: RunnerRefusalReport;
53
68
  readonly cpuPercent: number;
54
69
  readonly memoryRss: number;
55
70
  readonly uptimeSeconds: number;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The runner -> parent half of the Init-refusal protocol (D877).
3
+ *
4
+ * A runner whose addon refused to start writes ONE line to stdout and exits
5
+ * with {@link RUNNER_REFUSED_EXIT_CODE}:
6
+ *
7
+ * REFUSED:<nodeId>:<json {addonId, code, reason, remedy}>
8
+ *
9
+ * The parent reads the line to learn the reason; the exit code alone is enough
10
+ * to know it was a refusal (so a line lost to a closed pipe still classifies
11
+ * correctly, with an unknown reason). Neither is a crash: the process service
12
+ * does not hand the exit to the D6 breaker.
13
+ */
14
+ import { AddonRefusedError } from "../addon-refused-error.js";
15
+ /** sysexits EX_CONFIG: "something was found in an unconfigured or misconfigured state". */
16
+ export declare const RUNNER_REFUSED_EXIT_CODE = 78;
17
+ export interface RunnerRefusalReport {
18
+ readonly addonId: string;
19
+ readonly code: string;
20
+ readonly reason: string;
21
+ readonly remedy: string;
22
+ }
23
+ /** The stdout line for a refusal. Always one line: JSON has no raw newline. */
24
+ export declare function formatRunnerRefusalLine(nodeId: string, report: RunnerRefusalReport): string;
25
+ export declare function refusalReportOf(addonId: string, err: AddonRefusedError): RunnerRefusalReport;
26
+ /** The refusals announced in a chunk of runner stdout; lines that are not one are ignored. */
27
+ export declare function parseRunnerRefusals(nodeId: string, chunk: string): readonly RunnerRefusalReport[];
@@ -1,4 +1,4 @@
1
- import { b as DATABASE_SNAPSHOT_SUFFIX } from "./dist-BWvkuc31.mjs";
1
+ import { b as DATABASE_SNAPSHOT_SUFFIX } from "./dist-Bxt_S-9a.mjs";
2
2
  import { createCipheriv, createDecipheriv, createHash, createPrivateKey, createPublicKey, diffieHellman, generateKeyPairSync, hkdfSync, randomBytes } from "node:crypto";
3
3
  import { Buffer as Buffer$1 } from "buffer";
4
4
  import * as fsp from "node:fs/promises";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-BiTCcaf-.js");
2
+ const require_dist = require("./dist-D9qT3jHr.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let buffer = require("buffer");
5
5
  let node_fs_promises = require("node:fs/promises");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.441",
3
+ "version": "1.2.443",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",
@@ -2,10 +2,10 @@ const require_chunk = require("./chunk-Cek0wNdY.js");
2
2
  let node_crypto = require("node:crypto");
3
3
  let node_path = require("node:path");
4
4
  node_path = require_chunk.__toESM(node_path);
5
+ let node_util = require("node:util");
5
6
  let _camstack_types_addon = require("@camstack/types/addon");
6
7
  let node_fs = require("node:fs");
7
8
  node_fs = require_chunk.__toESM(node_fs);
8
- let node_util = require("node:util");
9
9
  let node_http = require("node:http");
10
10
  let node_zlib = require("node:zlib");
11
11
  let node_perf_hooks = require("node:perf_hooks");
@@ -1,10 +1,10 @@
1
1
  import { createHash } from "node:crypto";
2
2
  import * as path$1 from "node:path";
3
3
  import path from "node:path";
4
+ import { promisify } from "node:util";
4
5
  import { HF_REPO, MODEL_FORMATS, describeCustomActions, hfModelUrl } from "@camstack/types/addon";
5
6
  import * as fs from "node:fs";
6
7
  import { createReadStream, promises } from "node:fs";
7
- import { promisify } from "node:util";
8
8
  import { createServer } from "node:http";
9
9
  import { brotliCompress, constants as constants$1, gzip } from "node:zlib";
10
10
  import { PerformanceObserver } from "node:perf_hooks";