@camstack/server 1.2.740 → 1.2.741
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 +6 -0
- package/dist/api/trpc/generated-cap-routers.js +9 -0
- package/package.json +14 -16
- package/system/dist/{agent-https-DcYKH3q_.mjs → agent-https-BtTMjLgk.mjs} +1 -1
- package/system/dist/{agent-https-DXWlu1kP.js → agent-https-CNf7_i1z.js} +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 +2 -2
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- 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 +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- 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 +127 -32
- package/system/dist/builtins/loki-logging/index.mjs +127 -32
- package/system/dist/builtins/loki-logging/loki-logging.addon.d.ts +8 -0
- package/system/dist/builtins/loki-logging/loki-record-kinds.d.ts +2 -0
- package/system/dist/builtins/loki-logging/migrations/index.d.ts +4 -1
- package/system/dist/builtins/loki-logging/migrations/registry-toggle-to-record.d.ts +26 -0
- 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 +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- 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/{composition-sources-BfWnLt2j.js → composition-sources-D9GBwT5d.js} +1 -1
- package/system/dist/{composition-sources-BNa_vU07.mjs → composition-sources-DUmnnLrw.mjs} +1 -1
- package/system/dist/{constants-DCYUT12P.mjs → constants-BkiDA8Cf.mjs} +1 -1
- package/system/dist/{constants-DugYIgQF.js → constants-Cy5svHxz.js} +1 -1
- package/system/dist/{device-ca-CFs0PY9S.js → device-ca-CxlqxrvG.js} +1 -1
- package/system/dist/{device-ca-BnBFt1ex.mjs → device-ca-Cxu7j6aY.mjs} +1 -1
- package/system/dist/{dist-BF9MiiHX.mjs → dist-C5sQPOZX.mjs} +100 -0
- package/system/dist/{dist-DwI4ifnv.js → dist-Cyc4oyGh.js} +100 -0
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-CnSqBHO9.mjs → hub-mdns-ciao-CTPWSgwo.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Dsk7HF0G.js → hub-mdns-ciao-YxQ97aHW.js} +2 -2
- package/system/dist/index.js +7 -7
- package/system/dist/index.mjs +7 -7
- package/system/dist/{restore-archive-CDgSTubW.mjs → restore-archive-08Uthry1.mjs} +1 -1
- package/system/dist/{restore-archive-CnG6nyar.js → restore-archive-b5rBXY1e.js} +1 -1
- package/system/dist/{retention-voCdtR4h.js → retention-DWCHp91p.js} +1 -1
- package/system/dist/{retention-csYEu0l3.mjs → retention-i8aZ6vE5.mjs} +1 -1
- package/system/dist/{wal-maintenance-CTsOr0e7.mjs → wal-maintenance-CEi8PqMh.mjs} +0 -0
- package/system/dist/{wal-maintenance-DrLnLCGO.js → wal-maintenance-DNE7RTcS.js} +0 -0
- package/system/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Dn as catalogueIssues, Gn as dataStoreProviderCapability, Ji as resolveRunnerId, Kn as databaseSnapshotCapability, Ko as UnknownRecordKindError, Lo as RecordKindDeclarationSchema, M as DATABASE_SNAPSHOT_SUFFIX, Ma as vectorStoreCapability, N as DATABASE_SNAPSHOT_TIMEOUT_MS, Ni as recordsCapability, Ns as normalizeSecretOwner, P as DATA_STORE_DATABASES, Po as RUNTIME_DEFAULTS, To as NoCallerError, Tt as MigrationMetaSchema, Wo as TransactRefusedError, as as customAction, bo as DeclarationRefusedError, ec as errMsg$1, fa as storageAdminCapability, hn as bareAddonId, j as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, jo as RECORD_SWEEP_INTERVAL_MS, mo as BaseAddon, ns as collectSecretMarkerRefs, si as migrationsCapability, ss as defineCustomActions, tc as EventCategory, wo as InvalidRecordError, yi as orderMigrations } from "../../dist-
|
|
1
|
+
import { Dn as catalogueIssues, Gn as dataStoreProviderCapability, Ji as resolveRunnerId, Kn as databaseSnapshotCapability, Ko as UnknownRecordKindError, Lo as RecordKindDeclarationSchema, M as DATABASE_SNAPSHOT_SUFFIX, Ma as vectorStoreCapability, N as DATABASE_SNAPSHOT_TIMEOUT_MS, Ni as recordsCapability, Ns as normalizeSecretOwner, P as DATA_STORE_DATABASES, Po as RUNTIME_DEFAULTS, To as NoCallerError, Tt as MigrationMetaSchema, Wo as TransactRefusedError, as as customAction, bo as DeclarationRefusedError, ec as errMsg$1, fa as storageAdminCapability, hn as bareAddonId, j as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, jo as RECORD_SWEEP_INTERVAL_MS, mo as BaseAddon, ns as collectSecretMarkerRefs, si as migrationsCapability, ss as defineCustomActions, tc as EventCategory, wo as InvalidRecordError, yi as orderMigrations } from "../../dist-C5sQPOZX.mjs";
|
|
2
2
|
import { r as retiredKeyStoreOf, t as purgeRetiredSettingsKeys } from "../../retired-settings-keys-u6xQA6r7.mjs";
|
|
3
|
-
import { A as callRecords, D as RecordsEngine, E as databaseOfStore, M as controlTargetOf, O as callControl, T as trustResult, _ as rehydrateError, a as WalMaintenance, b as collectTransferables, c as vectorProviderOfOwnedFile, d as callMigrate, f as migrateTargetOf, g as DuplicatePlacementError, h as DatabaseBusyError, j as callVector, k as callData, l as SqliteSettingsBackend, m as CrossDatabaseTransactError, o as createVectorIndex, p as CollectionPlacementError, s as vectorProviderOf, u as HUB_MIGRATIONS, x as isFileHostMessage } from "../../wal-maintenance-
|
|
3
|
+
import { A as callRecords, D as RecordsEngine, E as databaseOfStore, M as controlTargetOf, O as callControl, T as trustResult, _ as rehydrateError, a as WalMaintenance, b as collectTransferables, c as vectorProviderOfOwnedFile, d as callMigrate, f as migrateTargetOf, g as DuplicatePlacementError, h as DatabaseBusyError, j as callVector, k as callData, l as SqliteSettingsBackend, m as CrossDatabaseTransactError, o as createVectorIndex, p as CollectionPlacementError, s as vectorProviderOf, u as HUB_MIGRATIONS, x as isFileHostMessage } from "../../wal-maintenance-CEi8PqMh.mjs";
|
|
4
4
|
import { r as isSnapshotWorkerMessage } from "../../sqlite-snapshot-protocol-2QaTouWV.mjs";
|
|
5
5
|
import { a as isWorkerMessage, t as WAL_CHECKPOINT_LARGE_PASS_FRAMES } from "../../wal-checkpoint-policy-BahrTtyD.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -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-Cyc4oyGh.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bs as resolveSecretMarkers, Fa as withLocationMode, Gr as legacyModeOf, Hs as secretTreeFromPaths, Js as transformSecretWrite, Jt as StorageLocationTypeSchema, Kt as StorageCleanupJobSchema, Mo as REDACTED_SECRET, Ms as normalizeNodeId, Ps as parseJsonObject, Rr as isLocationEnabled, Ts as isSecretMarker, Wi as resolveLocationMode, Yt as StorageMigrationJobSchema, ci as modeMayWrite, es as collectSecretConfigKeys, fr as evictionPolicyOfLocation, ls as defineRecordKinds, ma as storageMigrationCapability, mo as BaseAddon, ni as mayWriteToLocation, pa as storageCapability, qt as StorageLocationModeSchema, ra as settingsStoreCapability, tc as EventCategory, ti as mayReadLocation, wr as gbToBytes, yt as LegacyStorageLocationDefaultSchema } from "../../dist-
|
|
1
|
+
import { Bs as resolveSecretMarkers, Fa as withLocationMode, Gr as legacyModeOf, Hs as secretTreeFromPaths, Js as transformSecretWrite, Jt as StorageLocationTypeSchema, Kt as StorageCleanupJobSchema, Mo as REDACTED_SECRET, Ms as normalizeNodeId, Ps as parseJsonObject, Rr as isLocationEnabled, Ts as isSecretMarker, Wi as resolveLocationMode, Yt as StorageMigrationJobSchema, ci as modeMayWrite, es as collectSecretConfigKeys, fr as evictionPolicyOfLocation, ls as defineRecordKinds, ma as storageMigrationCapability, mo as BaseAddon, ni as mayWriteToLocation, pa as storageCapability, qt as StorageLocationModeSchema, ra as settingsStoreCapability, tc as EventCategory, ti as mayReadLocation, wr as gbToBytes, yt as LegacyStorageLocationDefaultSchema } from "../../dist-C5sQPOZX.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,11 +3,11 @@ 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-Cyc4oyGh.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_x509_es = require("../../x509.es-WtnRNyYS.js");
|
|
9
|
-
const require_agent_https = require("../../agent-https-
|
|
10
|
-
const require_constants$8 = require("../../constants-
|
|
9
|
+
const require_agent_https = require("../../agent-https-CNf7_i1z.js");
|
|
10
|
+
const require_constants$8 = require("../../constants-Cy5svHxz.js");
|
|
11
11
|
const require_src$1 = require("../../src-CnAqG6EF.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Wt as ServerNameSchema, _s as hydrateSchema, as as customAction, ec as errMsg, mo as BaseAddon, sa as shortHostname, ss as defineCustomActions } from "../../dist-
|
|
2
|
+
import { Wt as ServerNameSchema, _s as hydrateSchema, as as customAction, ec as errMsg, mo as BaseAddon, sa as shortHostname, ss as defineCustomActions } from "../../dist-C5sQPOZX.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension } from "../../x509.es-BRiJgOvu.mjs";
|
|
5
|
-
import { B as setProcessAgentHttpsNames, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, R as AgentHttpsNames, V as systemConfigRecordKinds, u as isPrivateAddress, z as getProcessAgentHttpsNames } from "../../agent-https-
|
|
6
|
-
import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-
|
|
5
|
+
import { B as setProcessAgentHttpsNames, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, R as AgentHttpsNames, V as systemConfigRecordKinds, u as isPrivateAddress, z as getProcessAgentHttpsNames } from "../../agent-https-BtTMjLgk.mjs";
|
|
6
|
+
import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-BkiDA8Cf.mjs";
|
|
7
7
|
import { t as require_src } from "../../src-hG4grMU4.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, randomInt, sign, timingSafeEqual, verify, webcrypto } from "node:crypto";
|
|
@@ -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-Cyc4oyGh.js");
|
|
7
7
|
const require_formatter = require("../../formatter-xbxeV4GD.js");
|
|
8
8
|
const require_log_file_read_protocol = require("../../log-file-read-protocol-D0WcLbIV.js");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Qr as logDestinationCapability, mo as BaseAddon } from "../../dist-
|
|
1
|
+
import { Qr as logDestinationCapability, mo as BaseAddon } from "../../dist-C5sQPOZX.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
|
|
3
3
|
import { a as LogFileIndexStore, i as serveRead, n as isFromReader, t as CancelBook } from "../../log-file-read-protocol-B7M3X3bT.mjs";
|
|
4
4
|
import { createRequire } from "node:module";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Za as compositionSourceKey, ec as errMsg } from "./dist-
|
|
1
|
+
import { Za as compositionSourceKey, ec as errMsg } from "./dist-C5sQPOZX.mjs";
|
|
2
2
|
//#region src/builtins/shared/device-state-changed.ts
|
|
3
3
|
/** Structural narrowing helper for untrusted bus payloads. */
|
|
4
4
|
function isRecord(value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
|
|
2
|
-
var MESH_CA_KEY_REF = require("./dist-
|
|
2
|
+
var MESH_CA_KEY_REF = require("./dist-Cyc4oyGh.js").buildSecretRef({
|
|
3
3
|
owner: "system",
|
|
4
4
|
scope: { kind: "global" },
|
|
5
5
|
fieldPath: "meshCaKey"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $o as buildSecretRef, H as DEVICE_SAN_CREDENTIAL_PREFIX, U as DEVICE_SAN_USER_PREFIX } from "./dist-
|
|
1
|
+
import { $o as buildSecretRef, H as DEVICE_SAN_CREDENTIAL_PREFIX, U as DEVICE_SAN_USER_PREFIX } from "./dist-C5sQPOZX.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { X509Certificate, createPublicKey, randomBytes, verify, webcrypto } from "node:crypto";
|
|
4
4
|
//#region src/auth/jwt-signing-key.ts
|
|
@@ -10841,6 +10841,73 @@ var NodeColorIdSchema = z.enum([
|
|
|
10841
10841
|
"node-g",
|
|
10842
10842
|
"node-h"
|
|
10843
10843
|
]);
|
|
10844
|
+
//#endregion
|
|
10845
|
+
//#region ../types/dist/index.mjs
|
|
10846
|
+
var SMTP_INBOUND_DEFAULT_PORT = 2525;
|
|
10847
|
+
var SMTP_INBOUND_DEFAULT_DOMAIN = "camstack.local";
|
|
10848
|
+
var SMTP_INBOUND_DEFAULT_MAX_MESSAGE_BYTES = 25 * 1024 * 1024;
|
|
10849
|
+
/** The text excerpt a message carries on the bus. */
|
|
10850
|
+
var SMTP_INBOUND_TEXT_MAX_CHARS = 4096;
|
|
10851
|
+
var PortSchema = z.number().int().min(1).max(65535);
|
|
10852
|
+
/** A recipient local-part: what stands before the `@`. */
|
|
10853
|
+
var SmtpRecipientSchema = z.string().min(1).max(64).regex(/^[A-Za-z0-9._+-]+$/);
|
|
10854
|
+
z.object({
|
|
10855
|
+
port: PortSchema.default(SMTP_INBOUND_DEFAULT_PORT),
|
|
10856
|
+
bindHost: z.string().min(1).default("0.0.0.0"),
|
|
10857
|
+
domain: z.string().min(1).default(SMTP_INBOUND_DEFAULT_DOMAIN),
|
|
10858
|
+
requireAuth: z.boolean().default(true),
|
|
10859
|
+
username: z.string().default(""),
|
|
10860
|
+
password: z.string().default("").meta({ secret: true }),
|
|
10861
|
+
starttls: z.boolean().default(false),
|
|
10862
|
+
maxMessageBytes: z.number().int().positive().default(SMTP_INBOUND_DEFAULT_MAX_MESSAGE_BYTES)
|
|
10863
|
+
});
|
|
10864
|
+
z.object({
|
|
10865
|
+
host: z.string().min(1).nullable(),
|
|
10866
|
+
hostReason: z.string().nullable(),
|
|
10867
|
+
port: PortSchema,
|
|
10868
|
+
domain: z.string().min(1),
|
|
10869
|
+
requireAuth: z.boolean(),
|
|
10870
|
+
username: z.string(),
|
|
10871
|
+
password: z.string(),
|
|
10872
|
+
starttls: z.boolean()
|
|
10873
|
+
});
|
|
10874
|
+
z.object({
|
|
10875
|
+
recipients: z.array(SmtpRecipientSchema).min(1),
|
|
10876
|
+
/**
|
|
10877
|
+
* Who is subscribing. A second `subscribe` with the same id REPLACES that subscriber's
|
|
10878
|
+
* recipients (the way a consumer that restarted, or lost a device, declares its set again);
|
|
10879
|
+
* a recipient held by another subscriber is refused with `smtp-inbound/recipient-claimed`.
|
|
10880
|
+
* Absent, the subscriber is anonymous and unique.
|
|
10881
|
+
*/
|
|
10882
|
+
subscriberId: z.string().min(1).max(64).optional()
|
|
10883
|
+
});
|
|
10884
|
+
var SmtpInboundAttachmentSchema = z.object({
|
|
10885
|
+
filename: z.string(),
|
|
10886
|
+
contentType: z.string(),
|
|
10887
|
+
bytes: z.number().int().nonnegative()
|
|
10888
|
+
});
|
|
10889
|
+
/** The payload of one `broker.message` (the key is the recipient local-part). */
|
|
10890
|
+
var SmtpInboundMessageSchema = z.object({
|
|
10891
|
+
/** Monotonic per mailbox; a gap tells a consumer it missed an event. */
|
|
10892
|
+
seq: z.number().int().positive(),
|
|
10893
|
+
messageId: z.string(),
|
|
10894
|
+
receivedAt: z.number().int().nonnegative(),
|
|
10895
|
+
from: z.string(),
|
|
10896
|
+
to: z.string(),
|
|
10897
|
+
subject: z.string(),
|
|
10898
|
+
text: z.string().max(SMTP_INBOUND_TEXT_MAX_CHARS),
|
|
10899
|
+
attachments: z.array(SmtpInboundAttachmentSchema)
|
|
10900
|
+
});
|
|
10901
|
+
z.object({
|
|
10902
|
+
/** The newest seq issued so far (0 before any mail). */
|
|
10903
|
+
lastSeq: z.number().int().nonnegative(),
|
|
10904
|
+
/** The oldest seq still retained; messages below it are gone. */
|
|
10905
|
+
oldestSeq: z.number().int().nonnegative(),
|
|
10906
|
+
messages: z.array(z.object({
|
|
10907
|
+
key: z.string(),
|
|
10908
|
+
message: SmtpInboundMessageSchema
|
|
10909
|
+
}))
|
|
10910
|
+
});
|
|
10844
10911
|
new Set([
|
|
10845
10912
|
"track",
|
|
10846
10913
|
"face",
|
|
@@ -11004,6 +11071,7 @@ var RecordIntegrationInstances = class {
|
|
|
11004
11071
|
return record === null ? null : {
|
|
11005
11072
|
id,
|
|
11006
11073
|
body: record.data,
|
|
11074
|
+
enabled: record.data.enabled !== false,
|
|
11007
11075
|
secrets: "resolved"
|
|
11008
11076
|
};
|
|
11009
11077
|
} catch (err) {
|
|
@@ -11013,6 +11081,7 @@ var RecordIntegrationInstances = class {
|
|
|
11013
11081
|
return {
|
|
11014
11082
|
id,
|
|
11015
11083
|
body: Object.fromEntries(Object.entries(stored.data).filter(([key]) => !this.secretKeys.has(key))),
|
|
11084
|
+
enabled: stored.data.enabled !== false,
|
|
11016
11085
|
secrets: "unavailable"
|
|
11017
11086
|
};
|
|
11018
11087
|
}
|
|
@@ -11038,6 +11107,7 @@ var RecordIntegrationInstances = class {
|
|
|
11038
11107
|
id: record.id,
|
|
11039
11108
|
name: typeof rawName === "string" ? rawName : record.id,
|
|
11040
11109
|
configured: this.hooks.configured(record.data),
|
|
11110
|
+
enabled: record.data.enabled !== false,
|
|
11041
11111
|
formValues: shown
|
|
11042
11112
|
};
|
|
11043
11113
|
}
|
|
@@ -11072,6 +11142,12 @@ var RecordIntegrationInstances = class {
|
|
|
11072
11142
|
await this.hooks.onChanged?.(id);
|
|
11073
11143
|
return { ok: true };
|
|
11074
11144
|
};
|
|
11145
|
+
/** The switch lives in the record body; the addon is told so it applies it (D996). */
|
|
11146
|
+
setInstanceEnabled = async ({ id, enabled }) => {
|
|
11147
|
+
await this.handle.patch(id, { enabled });
|
|
11148
|
+
await this.hooks.onChanged?.(id);
|
|
11149
|
+
return { ok: true };
|
|
11150
|
+
};
|
|
11075
11151
|
/** The row and its keychain refs go together (the records door). */
|
|
11076
11152
|
deleteInstance = async ({ id }) => {
|
|
11077
11153
|
await this.handle.delete(id);
|
|
@@ -11095,6 +11171,7 @@ var RecordIntegrationInstances = class {
|
|
|
11095
11171
|
getInstance: this.getInstance,
|
|
11096
11172
|
createInstance: this.createInstance,
|
|
11097
11173
|
updateInstance: this.updateInstance,
|
|
11174
|
+
setInstanceEnabled: this.setInstanceEnabled,
|
|
11098
11175
|
deleteInstance: this.deleteInstance,
|
|
11099
11176
|
testInstance: this.testInstance
|
|
11100
11177
|
};
|
|
@@ -61788,6 +61865,11 @@ var IntegrationInstanceSchema = z.object({
|
|
|
61788
61865
|
name: z.string(),
|
|
61789
61866
|
/** The addon's own rule (an URL is present, a client id is present...). */
|
|
61790
61867
|
configured: z.boolean(),
|
|
61868
|
+
/**
|
|
61869
|
+
* The instance's own on/off switch (D996): always present, derived from the record body
|
|
61870
|
+
* (`enabled !== false`, so a row written before the field existed is on).
|
|
61871
|
+
*/
|
|
61872
|
+
enabled: z.boolean(),
|
|
61791
61873
|
/** Values for the instance form; a secret is a `SecretFieldView`, never text. */
|
|
61792
61874
|
formValues: z.record(z.string(), z.unknown()),
|
|
61793
61875
|
status: IntegrationInstanceStatusSchema.optional()
|
|
@@ -61820,6 +61902,17 @@ var integrationInstancesCapability = {
|
|
|
61820
61902
|
kind: "mutation",
|
|
61821
61903
|
auth: "admin"
|
|
61822
61904
|
}),
|
|
61905
|
+
/**
|
|
61906
|
+
* Switch ONE instance on or off. A row control, not a form field: `updateInstance.values` is the
|
|
61907
|
+
* form patch (D62, D996). An off instance keeps its record and secrets and does no work.
|
|
61908
|
+
*/
|
|
61909
|
+
setInstanceEnabled: method(z.object({
|
|
61910
|
+
id: IntegrationInstanceIdSchema,
|
|
61911
|
+
enabled: z.boolean()
|
|
61912
|
+
}), z.object({ ok: z.literal(true) }), {
|
|
61913
|
+
kind: "mutation",
|
|
61914
|
+
auth: "admin"
|
|
61915
|
+
}),
|
|
61823
61916
|
/** Delete the record and its keychain refs together. */
|
|
61824
61917
|
deleteInstance: method(z.object({ id: IntegrationInstanceIdSchema }), z.object({ ok: z.literal(true) }), {
|
|
61825
61918
|
kind: "mutation",
|
|
@@ -97620,6 +97713,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
97620
97713
|
access: "view",
|
|
97621
97714
|
role: "admin"
|
|
97622
97715
|
},
|
|
97716
|
+
"integrationInstances.setInstanceEnabled": {
|
|
97717
|
+
capName: "integration-instances",
|
|
97718
|
+
capScope: "system",
|
|
97719
|
+
addonId: null,
|
|
97720
|
+
access: "create",
|
|
97721
|
+
role: "admin"
|
|
97722
|
+
},
|
|
97623
97723
|
"integrationInstances.testInstance": {
|
|
97624
97724
|
capName: "integration-instances",
|
|
97625
97725
|
capScope: "system",
|
|
@@ -10841,6 +10841,73 @@ var NodeColorIdSchema = zod.z.enum([
|
|
|
10841
10841
|
"node-g",
|
|
10842
10842
|
"node-h"
|
|
10843
10843
|
]);
|
|
10844
|
+
//#endregion
|
|
10845
|
+
//#region ../types/dist/index.mjs
|
|
10846
|
+
var SMTP_INBOUND_DEFAULT_PORT = 2525;
|
|
10847
|
+
var SMTP_INBOUND_DEFAULT_DOMAIN = "camstack.local";
|
|
10848
|
+
var SMTP_INBOUND_DEFAULT_MAX_MESSAGE_BYTES = 25 * 1024 * 1024;
|
|
10849
|
+
/** The text excerpt a message carries on the bus. */
|
|
10850
|
+
var SMTP_INBOUND_TEXT_MAX_CHARS = 4096;
|
|
10851
|
+
var PortSchema = zod.z.number().int().min(1).max(65535);
|
|
10852
|
+
/** A recipient local-part: what stands before the `@`. */
|
|
10853
|
+
var SmtpRecipientSchema = zod.z.string().min(1).max(64).regex(/^[A-Za-z0-9._+-]+$/);
|
|
10854
|
+
zod.z.object({
|
|
10855
|
+
port: PortSchema.default(SMTP_INBOUND_DEFAULT_PORT),
|
|
10856
|
+
bindHost: zod.z.string().min(1).default("0.0.0.0"),
|
|
10857
|
+
domain: zod.z.string().min(1).default(SMTP_INBOUND_DEFAULT_DOMAIN),
|
|
10858
|
+
requireAuth: zod.z.boolean().default(true),
|
|
10859
|
+
username: zod.z.string().default(""),
|
|
10860
|
+
password: zod.z.string().default("").meta({ secret: true }),
|
|
10861
|
+
starttls: zod.z.boolean().default(false),
|
|
10862
|
+
maxMessageBytes: zod.z.number().int().positive().default(SMTP_INBOUND_DEFAULT_MAX_MESSAGE_BYTES)
|
|
10863
|
+
});
|
|
10864
|
+
zod.z.object({
|
|
10865
|
+
host: zod.z.string().min(1).nullable(),
|
|
10866
|
+
hostReason: zod.z.string().nullable(),
|
|
10867
|
+
port: PortSchema,
|
|
10868
|
+
domain: zod.z.string().min(1),
|
|
10869
|
+
requireAuth: zod.z.boolean(),
|
|
10870
|
+
username: zod.z.string(),
|
|
10871
|
+
password: zod.z.string(),
|
|
10872
|
+
starttls: zod.z.boolean()
|
|
10873
|
+
});
|
|
10874
|
+
zod.z.object({
|
|
10875
|
+
recipients: zod.z.array(SmtpRecipientSchema).min(1),
|
|
10876
|
+
/**
|
|
10877
|
+
* Who is subscribing. A second `subscribe` with the same id REPLACES that subscriber's
|
|
10878
|
+
* recipients (the way a consumer that restarted, or lost a device, declares its set again);
|
|
10879
|
+
* a recipient held by another subscriber is refused with `smtp-inbound/recipient-claimed`.
|
|
10880
|
+
* Absent, the subscriber is anonymous and unique.
|
|
10881
|
+
*/
|
|
10882
|
+
subscriberId: zod.z.string().min(1).max(64).optional()
|
|
10883
|
+
});
|
|
10884
|
+
var SmtpInboundAttachmentSchema = zod.z.object({
|
|
10885
|
+
filename: zod.z.string(),
|
|
10886
|
+
contentType: zod.z.string(),
|
|
10887
|
+
bytes: zod.z.number().int().nonnegative()
|
|
10888
|
+
});
|
|
10889
|
+
/** The payload of one `broker.message` (the key is the recipient local-part). */
|
|
10890
|
+
var SmtpInboundMessageSchema = zod.z.object({
|
|
10891
|
+
/** Monotonic per mailbox; a gap tells a consumer it missed an event. */
|
|
10892
|
+
seq: zod.z.number().int().positive(),
|
|
10893
|
+
messageId: zod.z.string(),
|
|
10894
|
+
receivedAt: zod.z.number().int().nonnegative(),
|
|
10895
|
+
from: zod.z.string(),
|
|
10896
|
+
to: zod.z.string(),
|
|
10897
|
+
subject: zod.z.string(),
|
|
10898
|
+
text: zod.z.string().max(SMTP_INBOUND_TEXT_MAX_CHARS),
|
|
10899
|
+
attachments: zod.z.array(SmtpInboundAttachmentSchema)
|
|
10900
|
+
});
|
|
10901
|
+
zod.z.object({
|
|
10902
|
+
/** The newest seq issued so far (0 before any mail). */
|
|
10903
|
+
lastSeq: zod.z.number().int().nonnegative(),
|
|
10904
|
+
/** The oldest seq still retained; messages below it are gone. */
|
|
10905
|
+
oldestSeq: zod.z.number().int().nonnegative(),
|
|
10906
|
+
messages: zod.z.array(zod.z.object({
|
|
10907
|
+
key: zod.z.string(),
|
|
10908
|
+
message: SmtpInboundMessageSchema
|
|
10909
|
+
}))
|
|
10910
|
+
});
|
|
10844
10911
|
new Set([
|
|
10845
10912
|
"track",
|
|
10846
10913
|
"face",
|
|
@@ -11004,6 +11071,7 @@ var RecordIntegrationInstances = class {
|
|
|
11004
11071
|
return record === null ? null : {
|
|
11005
11072
|
id,
|
|
11006
11073
|
body: record.data,
|
|
11074
|
+
enabled: record.data.enabled !== false,
|
|
11007
11075
|
secrets: "resolved"
|
|
11008
11076
|
};
|
|
11009
11077
|
} catch (err) {
|
|
@@ -11013,6 +11081,7 @@ var RecordIntegrationInstances = class {
|
|
|
11013
11081
|
return {
|
|
11014
11082
|
id,
|
|
11015
11083
|
body: Object.fromEntries(Object.entries(stored.data).filter(([key]) => !this.secretKeys.has(key))),
|
|
11084
|
+
enabled: stored.data.enabled !== false,
|
|
11016
11085
|
secrets: "unavailable"
|
|
11017
11086
|
};
|
|
11018
11087
|
}
|
|
@@ -11038,6 +11107,7 @@ var RecordIntegrationInstances = class {
|
|
|
11038
11107
|
id: record.id,
|
|
11039
11108
|
name: typeof rawName === "string" ? rawName : record.id,
|
|
11040
11109
|
configured: this.hooks.configured(record.data),
|
|
11110
|
+
enabled: record.data.enabled !== false,
|
|
11041
11111
|
formValues: shown
|
|
11042
11112
|
};
|
|
11043
11113
|
}
|
|
@@ -11072,6 +11142,12 @@ var RecordIntegrationInstances = class {
|
|
|
11072
11142
|
await this.hooks.onChanged?.(id);
|
|
11073
11143
|
return { ok: true };
|
|
11074
11144
|
};
|
|
11145
|
+
/** The switch lives in the record body; the addon is told so it applies it (D996). */
|
|
11146
|
+
setInstanceEnabled = async ({ id, enabled }) => {
|
|
11147
|
+
await this.handle.patch(id, { enabled });
|
|
11148
|
+
await this.hooks.onChanged?.(id);
|
|
11149
|
+
return { ok: true };
|
|
11150
|
+
};
|
|
11075
11151
|
/** The row and its keychain refs go together (the records door). */
|
|
11076
11152
|
deleteInstance = async ({ id }) => {
|
|
11077
11153
|
await this.handle.delete(id);
|
|
@@ -11095,6 +11171,7 @@ var RecordIntegrationInstances = class {
|
|
|
11095
11171
|
getInstance: this.getInstance,
|
|
11096
11172
|
createInstance: this.createInstance,
|
|
11097
11173
|
updateInstance: this.updateInstance,
|
|
11174
|
+
setInstanceEnabled: this.setInstanceEnabled,
|
|
11098
11175
|
deleteInstance: this.deleteInstance,
|
|
11099
11176
|
testInstance: this.testInstance
|
|
11100
11177
|
};
|
|
@@ -61788,6 +61865,11 @@ var IntegrationInstanceSchema = zod.z.object({
|
|
|
61788
61865
|
name: zod.z.string(),
|
|
61789
61866
|
/** The addon's own rule (an URL is present, a client id is present...). */
|
|
61790
61867
|
configured: zod.z.boolean(),
|
|
61868
|
+
/**
|
|
61869
|
+
* The instance's own on/off switch (D996): always present, derived from the record body
|
|
61870
|
+
* (`enabled !== false`, so a row written before the field existed is on).
|
|
61871
|
+
*/
|
|
61872
|
+
enabled: zod.z.boolean(),
|
|
61791
61873
|
/** Values for the instance form; a secret is a `SecretFieldView`, never text. */
|
|
61792
61874
|
formValues: zod.z.record(zod.z.string(), zod.z.unknown()),
|
|
61793
61875
|
status: IntegrationInstanceStatusSchema.optional()
|
|
@@ -61820,6 +61902,17 @@ var integrationInstancesCapability = {
|
|
|
61820
61902
|
kind: "mutation",
|
|
61821
61903
|
auth: "admin"
|
|
61822
61904
|
}),
|
|
61905
|
+
/**
|
|
61906
|
+
* Switch ONE instance on or off. A row control, not a form field: `updateInstance.values` is the
|
|
61907
|
+
* form patch (D62, D996). An off instance keeps its record and secrets and does no work.
|
|
61908
|
+
*/
|
|
61909
|
+
setInstanceEnabled: method(zod.z.object({
|
|
61910
|
+
id: IntegrationInstanceIdSchema,
|
|
61911
|
+
enabled: zod.z.boolean()
|
|
61912
|
+
}), zod.z.object({ ok: zod.z.literal(true) }), {
|
|
61913
|
+
kind: "mutation",
|
|
61914
|
+
auth: "admin"
|
|
61915
|
+
}),
|
|
61823
61916
|
/** Delete the record and its keychain refs together. */
|
|
61824
61917
|
deleteInstance: method(zod.z.object({ id: IntegrationInstanceIdSchema }), zod.z.object({ ok: zod.z.literal(true) }), {
|
|
61825
61918
|
kind: "mutation",
|
|
@@ -97620,6 +97713,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
97620
97713
|
access: "view",
|
|
97621
97714
|
role: "admin"
|
|
97622
97715
|
},
|
|
97716
|
+
"integrationInstances.setInstanceEnabled": {
|
|
97717
|
+
capName: "integration-instances",
|
|
97718
|
+
capScope: "system",
|
|
97719
|
+
addonId: null,
|
|
97720
|
+
access: "create",
|
|
97721
|
+
role: "admin"
|
|
97722
|
+
},
|
|
97623
97723
|
"integrationInstances.testInstance": {
|
|
97624
97724
|
capName: "integration-instances",
|
|
97625
97725
|
capScope: "system",
|
|
@@ -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-DNE7RTcS.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-CEi8PqMh.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 { Ys as userError } from "./dist-
|
|
2
|
+
import { Ys as userError } from "./dist-C5sQPOZX.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-BtTMjLgk.mjs";
|
|
5
5
|
import { X509Certificate, createPrivateKey } from "node:crypto";
|
|
6
6
|
import { writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
7
7
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
@@ -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-Cyc4oyGh.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-CNf7_i1z.js");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
6
|
let _camstack_types_node = require("@camstack/types/node");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
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-Cyc4oyGh.js");
|
|
4
|
+
const require_device_ca = require("./device-ca-CxlqxrvG.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,21 +26,21 @@ 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-
|
|
29
|
+
const require_wal_maintenance = require("./wal-maintenance-DNE7RTcS.js");
|
|
30
30
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
|
|
31
31
|
const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
|
|
32
32
|
const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
|
|
33
33
|
require("./builtins/storage-orchestrator/index.js");
|
|
34
|
-
const require_agent_https = require("./agent-https-
|
|
35
|
-
const require_constants = require("./constants-
|
|
34
|
+
const require_agent_https = require("./agent-https-CNf7_i1z.js");
|
|
35
|
+
const require_constants = require("./constants-Cy5svHxz.js");
|
|
36
36
|
const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
|
|
37
37
|
require("./builtins/system-config/index.js");
|
|
38
38
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
39
39
|
const require_custom_action_registry = require("./custom-action-registry-JuMHGKEc.js");
|
|
40
|
-
const require_hub_mdns_ciao = require("./hub-mdns-ciao-
|
|
40
|
+
const require_hub_mdns_ciao = require("./hub-mdns-ciao-YxQ97aHW.js");
|
|
41
41
|
const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
|
|
42
42
|
const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
|
|
43
|
-
const require_restore_archive = require("./restore-archive-
|
|
43
|
+
const require_restore_archive = require("./restore-archive-b5rBXY1e.js");
|
|
44
44
|
const require_coral_accelerators = require("./coral-accelerators-BSVsBVzt.js");
|
|
45
45
|
let zod = require("zod");
|
|
46
46
|
let node_crypto = require("node:crypto");
|
package/system/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { $r as logLevelAtMost, Ai as procedureAuthKey, Br as isVoidInput, E as CatalogFileSchema, Fo as ReadinessRegistry, Fs as parseJsonUnknown, Gi as resolveMethodAuth, Io as ReadinessTimeoutError, Jo as asJsonObject$1, Kr as lifecycleJobSchema, Ls as readinessKey, Nr as isArrayOutputSchema, Po as RUNTIME_DEFAULTS, Pr as isCollectionArrayMethod, Ps as parseJsonObject, Vr as kebabToCamel$1, Vs as scopeKey, Xo as asString$1, Xs as withoutCallerStamp, Yo as asNumber, Ys as userError, _i as objectInputDeclaresRequiredDeviceId, _o as DATAPLANE_SECRET_HEADER$1, a as AGENT_MDNS_TXT_KEYS, bt as METHOD_ACCESS_MAP, da as splitTranslationRef, ea as scopesAllowAddon, ec as errMsg$1, ei as looseSchema, fs as expandCapMethods, gi as objectInputDeclaresAddonId, go as CALLER_STAMPED_CAPABILITIES$1, hr as extractNestedAddonId, i as AGENT_MDNS_SERVICE_TYPE, is as createEvent$1, kr as interpolate, ls as defineRecordKinds, ms as getDebugInterest, o as ALL_CAPABILITY_DEFINITIONS, on as addonSettingsCapability, ta as scopesAllowDeviceCap, tc as EventCategory$1, us as emitDownForOwnedCaps, vo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, vs as isDebugChannelName, vt as LOG_LEVEL_RANK, y as CATALOG_LANGS, ya as supportedRuntimes, yo as DEVICE_STATUS_METHOD, zr as isObjectInput, zs as resolveCapMount } 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 { $r as logLevelAtMost, Ai as procedureAuthKey, Br as isVoidInput, E as CatalogFileSchema, Fo as ReadinessRegistry, Fs as parseJsonUnknown, Gi as resolveMethodAuth, Io as ReadinessTimeoutError, Jo as asJsonObject$1, Kr as lifecycleJobSchema, Ls as readinessKey, Nr as isArrayOutputSchema, Po as RUNTIME_DEFAULTS, Pr as isCollectionArrayMethod, Ps as parseJsonObject, Vr as kebabToCamel$1, Vs as scopeKey, Xo as asString$1, Xs as withoutCallerStamp, Yo as asNumber, Ys as userError, _i as objectInputDeclaresRequiredDeviceId, _o as DATAPLANE_SECRET_HEADER$1, a as AGENT_MDNS_TXT_KEYS, bt as METHOD_ACCESS_MAP, da as splitTranslationRef, ea as scopesAllowAddon, ec as errMsg$1, ei as looseSchema, fs as expandCapMethods, gi as objectInputDeclaresAddonId, go as CALLER_STAMPED_CAPABILITIES$1, hr as extractNestedAddonId, i as AGENT_MDNS_SERVICE_TYPE, is as createEvent$1, kr as interpolate, ls as defineRecordKinds, ms as getDebugInterest, o as ALL_CAPABILITY_DEFINITIONS, on as addonSettingsCapability, ta as scopesAllowDeviceCap, tc as EventCategory$1, us as emitDownForOwnedCaps, vo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, vs as isDebugChannelName, vt as LOG_LEVEL_RANK, y as CATALOG_LANGS, ya as supportedRuntimes, yo as DEVICE_STATUS_METHOD, zr as isObjectInput, zs as resolveCapMount } from "./dist-C5sQPOZX.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-Cxu7j6aY.mjs";
|
|
4
4
|
import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
|
|
5
5
|
import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
|
|
6
6
|
import "./builtins/alerts/index.mjs";
|
|
@@ -25,21 +25,21 @@ 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-
|
|
28
|
+
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-CEi8PqMh.mjs";
|
|
29
29
|
import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
30
30
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
31
31
|
import { StorageOrchestratorAddon, a as stripForwardedCaller, i as createHubCapForwardService, l as STORAGE_DRAIN_STATE_LEGACY, n as HUB_CAP_FWD_ACTION, o as buildStorageLocationRegistry, r as HUB_CAP_FWD_SERVICE, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
32
32
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
33
|
-
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-
|
|
34
|
-
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-
|
|
33
|
+
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-BtTMjLgk.mjs";
|
|
34
|
+
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-BkiDA8Cf.mjs";
|
|
35
35
|
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";
|
|
36
36
|
import "./builtins/system-config/index.mjs";
|
|
37
37
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
38
38
|
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-BIJZBObd.mjs";
|
|
39
|
-
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-
|
|
39
|
+
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-CTPWSgwo.mjs";
|
|
40
40
|
import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
|
|
41
41
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
|
|
42
|
-
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-
|
|
42
|
+
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-08Uthry1.mjs";
|
|
43
43
|
import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-BW3OcrLD.mjs";
|
|
44
44
|
import { z } from "zod";
|
|
45
45
|
import * as crypto$1 from "node:crypto";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { G as DataStoreDatabaseSchema, M as DATABASE_SNAPSHOT_SUFFIX, ls as defineRecordKinds } from "./dist-
|
|
1
|
+
import { G as DataStoreDatabaseSchema, M as DATABASE_SNAPSHOT_SUFFIX, ls as defineRecordKinds } from "./dist-C5sQPOZX.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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_dist = require("./dist-
|
|
1
|
+
const require_dist = require("./dist-Cyc4oyGh.js");
|
|
2
2
|
//#region src/builtins/device-history/store/series-registry.ts
|
|
3
3
|
function subjectIdOf(subject) {
|
|
4
4
|
return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $s as DeviceType, Co as HISTORY_DEFAULT_MIN_INTERVAL_MS, hs as historyItemFieldPath } from "./dist-
|
|
1
|
+
import { $s as DeviceType, Co as HISTORY_DEFAULT_MIN_INTERVAL_MS, hs as historyItemFieldPath } from "./dist-C5sQPOZX.mjs";
|
|
2
2
|
//#region src/builtins/device-history/store/series-registry.ts
|
|
3
3
|
function subjectIdOf(subject) {
|
|
4
4
|
return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
|
|
Binary file
|
|
Binary file
|