@camstack/system 1.2.453 → 1.2.455
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/dist/{agent-https-DL2cFOQv.js → agent-https-CCvlRQKV.js} +2 -2
- package/dist/{agent-https-XAZFJjOS.mjs → agent-https-CLWrOO3o.mjs} +2 -2
- package/dist/auth/auth-audit-log.d.ts +1 -1
- package/dist/auth/auth-manager.d.ts +7 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alert-episode-policy.d.ts +39 -0
- package/dist/builtins/alerts/alerts.addon.d.ts +25 -38
- package/dist/builtins/alerts/alerts.addon.js +178 -423
- package/dist/builtins/alerts/alerts.addon.mjs +178 -423
- package/dist/builtins/alerts/emit-alert-policy.d.ts +3 -16
- package/dist/builtins/alerts/runner-alert.d.ts +0 -13
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/dist/builtins/calendars/calendars.addon.js +1 -1
- package/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/dist/builtins/device-history/device-history.addon.js +1 -1
- package/dist/builtins/device-history/device-history.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +4 -4
- package/dist/builtins/keychain/index.mjs +4 -4
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +14 -4
- package/dist/builtins/local-auth/local-auth.addon.mjs +14 -4
- package/dist/builtins/local-network/local-network.addon.js +2 -2
- package/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/record-entries/index.js +22 -2
- package/dist/builtins/record-entries/index.mjs +22 -2
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/records/records-engine.d.ts +13 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/dist/builtins/storage-orchestrator/location-class-paths.d.ts +13 -0
- package/dist/builtins/storage-orchestrator/location-repoint-move.d.ts +6 -1
- package/dist/builtins/storage-orchestrator/location-repointer.d.ts +97 -0
- package/dist/builtins/storage-orchestrator/location-store.d.ts +13 -2
- package/dist/builtins/storage-orchestrator/record-kinds.d.ts +5 -0
- package/dist/builtins/storage-orchestrator/storage-location-band-monitor.d.ts +38 -4
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +8 -2
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +486 -143
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +486 -143
- package/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +26 -1
- package/dist/builtins/system-config/system-config.addon.js +3 -3
- package/dist/builtins/system-config/system-config.addon.mjs +3 -3
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-DwEvAg5Z.js → composition-sources-BxUkLNSo.js} +1 -1
- package/dist/{composition-sources-jYNpYEhS.mjs → composition-sources-CSzD5_qX.mjs} +1 -1
- package/dist/{constants-DGBB3tNi.mjs → constants-DOlYt1t1.mjs} +1 -1
- package/dist/{constants-B3fDUnJt.js → constants-DruwCkfp.js} +1 -1
- package/dist/{device-ca-njpTMpJC.js → device-ca-QPBgfqVY.js} +1 -1
- package/dist/{device-ca-Dpkxg7px.mjs → device-ca-uFbTyY_o.mjs} +1 -1
- package/dist/{dist-B9C2v4SG.mjs → dist-BpSENkRJ.mjs} +550 -240
- package/dist/{dist-DyjNaeIj.js → dist-DjQ8C-ku.js} +579 -239
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-DpdFaLz-.js → hub-mdns-ciao-Bkrvgnma.js} +2 -2
- package/dist/{hub-mdns-ciao-B4wHDMvk.mjs → hub-mdns-ciao-DlgkFJVY.mjs} +2 -2
- package/dist/index.js +7 -7
- package/dist/index.mjs +7 -7
- package/dist/{phase6-declare-gate-BlTDMI3t.js → phase6-declare-gate-DrmTtz7F.js} +1 -1
- package/dist/{phase6-declare-gate-CNxKbsvm.mjs → phase6-declare-gate-JQUqgQgq.mjs} +1 -1
- package/dist/{restore-archive-BeGP9IYs.js → restore-archive-4OP0EYg6.js} +1 -1
- package/dist/{restore-archive-D7HwsszI.mjs → restore-archive-YFSJRtKy.mjs} +1 -1
- package/dist/{wal-maintenance-i3GRvmQW.js → wal-maintenance-Bl0ZKjVR.js} +0 -0
- package/dist/{wal-maintenance-HEmw2Fik.mjs → wal-maintenance-TyuOEVy1.mjs} +0 -0
- package/package.json +1 -1
- package/dist/builtins/alerts/critical-push.d.ts +0 -90
|
@@ -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-DjQ8C-ku.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-C4cOo48M.js");
|
|
4
|
-
const require_constants = require("./constants-
|
|
4
|
+
const require_constants = require("./constants-DruwCkfp.js");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
let node_crypto = require("node:crypto");
|
|
7
7
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Li as defineRecordKinds } from "./dist-BpSENkRJ.mjs";
|
|
2
2
|
import { S as backdatedNotBefore, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-DK__ETIe.mjs";
|
|
3
|
-
import { c as SERVER_AUTH_OID$1, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "./constants-
|
|
3
|
+
import { c as SERVER_AUTH_OID$1, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "./constants-DOlYt1t1.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
6
6
|
import { writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
@@ -8,7 +8,7 @@ import type { AuthAuditBody } from "../builtins/local-auth/record-kinds.js";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const AUTH_AUDIT_COLLECTION = "auth_audit";
|
|
10
10
|
export declare const AUTH_AUDIT_COLUMNS: readonly CollectionColumn[];
|
|
11
|
-
export declare const AUTH_AUDIT_ACTIONS: readonly ["second-factor-skipped", "admin-token-created", "admin-token-used", "admin-token-revoked", "credentials-revoked", "agent-addon-update", "agent-addon-update-refused", "device-credential-enrolled", "device-credential-revoked", "device-credential-login", "device-credential-login-refused"];
|
|
11
|
+
export declare const AUTH_AUDIT_ACTIONS: readonly ["second-factor-skipped", "admin-token-created", "admin-token-used", "admin-token-revoked", "credentials-revoked", "agent-addon-update", "agent-addon-update-refused", "device-credential-enrolled", "device-credential-revoked", "device-credential-login", "device-credential-login-refused", "token-minted", "token-revoked"];
|
|
12
12
|
export type AuthAuditAction = (typeof AUTH_AUDIT_ACTIONS)[number];
|
|
13
13
|
export interface AuthAuditEvent {
|
|
14
14
|
readonly action: AuthAuditAction;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IScopedLogger, TokenPayload } from "@camstack/types";
|
|
1
|
+
import type { CredentialTokenClaims, IScopedLogger, TokenPayload } from "@camstack/types";
|
|
2
2
|
import { SsoBridgeClaimsSchema } from "@camstack/types";
|
|
3
3
|
import type { z } from "zod";
|
|
4
4
|
import { type JwtSigningKeySource } from "./jwt-signing-key.js";
|
|
@@ -53,6 +53,12 @@ export declare class AuthManager {
|
|
|
53
53
|
* already had once.
|
|
54
54
|
*/
|
|
55
55
|
private readConfiguredExpiry;
|
|
56
|
+
/**
|
|
57
|
+
* Sign a unified token (D892). No `exp`: the token's row — read by `jti` on
|
|
58
|
+
* every verify for revocation — holds its one expiry. The claims are parsed
|
|
59
|
+
* before signing, so nothing outside the schema is ever signed.
|
|
60
|
+
*/
|
|
61
|
+
signCredentialToken(claims: CredentialTokenClaims): string;
|
|
56
62
|
verifyToken(token: string): TokenPayload;
|
|
57
63
|
hashPassword(password: string): Promise<string>;
|
|
58
64
|
comparePassword(password: string, hash: string): Promise<boolean>;
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DjQ8C-ku.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Kr as errMsg, dt as addonPagesCapability, qr as BaseAddon, ya as EventCategory } from "../../dist-BpSENkRJ.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DjQ8C-ku.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Kr as errMsg, pt as addonWidgetsCapability, qr as BaseAddon, ya as EventCategory } from "../../dist-BpSENkRJ.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* When does an alert open a new EPISODE, and which edge of it is announced?
|
|
3
|
+
*
|
|
4
|
+
* The alert centre sends no notification. It stamps every alert it stores with
|
|
5
|
+
* an `episodeId` (`metadata.episodeId`) and announces the opening and the
|
|
6
|
+
* closing of critical and error episodes on the bus; Notification Center turns
|
|
7
|
+
* those into notifications (`alert-critical`, `alert-error`,
|
|
8
|
+
* `alert-critical-resolved`). The identity is what makes a notification
|
|
9
|
+
* once-per-episode: any number of re-emits of an open alert keep the id, a new
|
|
10
|
+
* episode after completion gets a new one.
|
|
11
|
+
*/
|
|
12
|
+
import { type AlertSeverity, type AlertStatus } from "@camstack/types";
|
|
13
|
+
/** What the policy needs of a stored alert. */
|
|
14
|
+
export interface EpisodeView {
|
|
15
|
+
readonly status: AlertStatus;
|
|
16
|
+
readonly severity: AlertSeverity;
|
|
17
|
+
readonly episodeId: string;
|
|
18
|
+
/** The emitter's own episode marker (`metadata.episodeKey`), when it has one. */
|
|
19
|
+
readonly episodeKey?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface NextEpisodeIdInput {
|
|
22
|
+
readonly alertId: string;
|
|
23
|
+
readonly previous: EpisodeView | null;
|
|
24
|
+
readonly incomingKey: string | undefined;
|
|
25
|
+
readonly now: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The previous episode continues while its alert is still open and the emitter
|
|
29
|
+
* did not mark a new one; anything else opens `<alertId>@<now>`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function nextEpisodeId(input: NextEpisodeIdInput): string;
|
|
32
|
+
export type EpisodeEdge = "raised" | "resolved";
|
|
33
|
+
/**
|
|
34
|
+
* The edge to announce for a write that took `previous` to `next`, or `null`.
|
|
35
|
+
* A re-emit that changes nothing about the episode announces nothing; an
|
|
36
|
+
* escalation from `error` to `critical` inside one episode is announced again
|
|
37
|
+
* (it is a different kind, and the operator opted into it separately).
|
|
38
|
+
*/
|
|
39
|
+
export declare function episodeEdge(previous: EpisodeView | null, next: EpisodeView): EpisodeEdge | null;
|
|
@@ -3,23 +3,11 @@ import { BaseAddon, type ProviderRegistration } from "@camstack/types";
|
|
|
3
3
|
interface AlertCenterConfig {
|
|
4
4
|
readonly maxAlerts: number;
|
|
5
5
|
readonly retentionDays: number;
|
|
6
|
-
/** Push critical system alerts (runner failed/refused, runners degraded) straight to the notifiers (D877). */
|
|
7
|
-
readonly criticalPushEnabled: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Notifier target ids for that push (`notification-target-multiselect`).
|
|
10
|
-
* Empty = every enabled operator-level (shared) target. A legacy CSV string
|
|
11
|
-
* still stored in the addon store is accepted at read time.
|
|
12
|
-
*/
|
|
13
|
-
readonly criticalPushTargetIds: readonly string[];
|
|
14
6
|
}
|
|
15
7
|
export declare class AlertCenterAddon extends BaseAddon<AlertCenterConfig> {
|
|
16
8
|
private alertStore;
|
|
17
9
|
private unsubscribers;
|
|
18
|
-
|
|
19
|
-
private readonly pushCoalesceMs;
|
|
20
|
-
constructor(options?: {
|
|
21
|
-
readonly pushCoalesceMs?: number;
|
|
22
|
-
});
|
|
10
|
+
constructor();
|
|
23
11
|
/**
|
|
24
12
|
* Per `(category, source.id)` counter used to rate-limit chatty
|
|
25
13
|
* events. Entries are pruned lazily when they age out of
|
|
@@ -37,41 +25,25 @@ export declare class AlertCenterAddon extends BaseAddon<AlertCenterConfig> {
|
|
|
37
25
|
markRead(alertId: string): Promise<void>;
|
|
38
26
|
markAllRead(): Promise<void>;
|
|
39
27
|
dismiss(alertId: string): Promise<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Events are handled one at a time: every handler is a read-modify-write of
|
|
30
|
+
* an alert, and two concurrent events about one runner would both read "no
|
|
31
|
+
* alert yet" and open two episodes for it.
|
|
32
|
+
*/
|
|
33
|
+
private eventChain;
|
|
40
34
|
private handleEvent;
|
|
35
|
+
private processEvent;
|
|
41
36
|
private readRunnerRecord;
|
|
42
37
|
private handleRunnerEvent;
|
|
43
38
|
/**
|
|
44
39
|
* A runner reached `running`: its episode is over. Close the runner alert so a
|
|
45
|
-
* later failure opens a NEW episode
|
|
46
|
-
*
|
|
40
|
+
* later failure opens a NEW episode, instead of folding into a stale
|
|
41
|
+
* `refused` record whose notification was already sent.
|
|
47
42
|
*/
|
|
48
43
|
private handleRunnerStateChanged;
|
|
49
44
|
/** The node's one-shot runner boot check: one alert, dismissed when the node is clean. */
|
|
50
45
|
private handleRunnerCheck;
|
|
51
46
|
private readAlertRaw;
|
|
52
|
-
/** Pushes run one at a time so a burst can never send the same state twice. */
|
|
53
|
-
private pushChain;
|
|
54
|
-
/** Findings waiting for the next digest, by alert id. */
|
|
55
|
-
private readonly pushQueue;
|
|
56
|
-
private pushTimer;
|
|
57
|
-
private pushPolicy;
|
|
58
|
-
/** Rewrite a legacy CSV `criticalPushTargetIds` string into `string[]`. */
|
|
59
|
-
private migrateCriticalPushTargetIds;
|
|
60
|
-
private pushPorts;
|
|
61
|
-
/**
|
|
62
|
-
* Queue a critical finding for the next digest. A burst (every runner of a boot)
|
|
63
|
-
* arrives within the coalesce window and leaves as ONE message per target.
|
|
64
|
-
*/
|
|
65
|
-
private queuePush;
|
|
66
|
-
/** Send the queued findings now (also the reconcile path). */
|
|
67
|
-
private flushPushes;
|
|
68
|
-
private storePushState;
|
|
69
|
-
/**
|
|
70
|
-
* Retry every critical alert whose push is still pending - at boot and when
|
|
71
|
-
* the notifiers or notification-center start. An alert whose state was already
|
|
72
|
-
* delivered is skipped by its key, so reconciling never sends twice.
|
|
73
|
-
*/
|
|
74
|
-
private reconcilePendingPushes;
|
|
75
47
|
private handleModelDownload;
|
|
76
48
|
/**
|
|
77
49
|
* `[ALERT-CENTER-EVENTS]` — rate limit a `(category, source.id)`
|
|
@@ -138,8 +110,23 @@ export declare class AlertCenterAddon extends BaseAddon<AlertCenterConfig> {
|
|
|
138
110
|
* Read-merge-write: SettingsBackend.update() replaces the entire `data` blob,
|
|
139
111
|
* so we must read the existing record, merge the patch, and write back.
|
|
140
112
|
*/
|
|
113
|
+
/** Alert writes (stamp + store + announce) from any caller, one at a time. */
|
|
114
|
+
private writeChain;
|
|
115
|
+
private serializedWrite;
|
|
141
116
|
private mergeUpdate;
|
|
117
|
+
private mergeUpdateNow;
|
|
118
|
+
/**
|
|
119
|
+
* Store an alert, stamping its episode identity. The stored alert is what a
|
|
120
|
+
* caller must use afterwards, and the opening or closing of a critical/error
|
|
121
|
+
* episode is announced here, in the one place every write passes through.
|
|
122
|
+
*/
|
|
142
123
|
private persistAlert;
|
|
124
|
+
private persistAlertNow;
|
|
125
|
+
/**
|
|
126
|
+
* Announce an episode edge on the bus. Telemetry, and it may be dropped
|
|
127
|
+
* (D8): Notification Center reconciles from the alerts store (D11, D49).
|
|
128
|
+
*/
|
|
129
|
+
private announceEpisode;
|
|
143
130
|
private emitAlertCreatedEvent;
|
|
144
131
|
private emitAlertUpdatedEvent;
|
|
145
132
|
private enforceMaxAlerts;
|