@camstack/server 1.2.789 → 1.2.791
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 +15 -0
- package/dist/agent/agent-child-manifest.js +39 -0
- package/dist/agent/agent-hub-registration.js +11 -1
- package/dist/agent/forward-to-hub.js +43 -0
- package/dist/agent/main.js +31 -81
- package/dist/agent/stale-addon-gate.js +70 -34
- package/dist/api/trpc/device-config-secret-redaction.js +14 -1
- package/dist/api/trpc/generated-cap-mounts.js +1 -6
- package/dist/api/trpc/generated-cap-routers.js +1245 -1417
- package/dist/api/trpc/localized-schema-paths.js +1 -0
- package/dist/core/addon/addon-registry.service.js +25 -33
- package/dist/core/addon/addon-settings-provider.js +57 -0
- package/dist/core/addon/boot-health-snapshot.js +0 -28
- package/dist/core/addon/{hub-spawn-gate.js → hub-addon-support.js} +12 -35
- package/dist/core/moleculer/moleculer.service.js +2 -13
- package/dist/core/moleculer/runner-hosted-on-node.js +23 -0
- package/dist/core/updates/required-addon-update.js +1 -1
- package/package.json +20 -11
- package/system/dist/addon-runner.js +22 -0
- package/system/dist/addon-runner.mjs +22 -0
- package/system/dist/{agent-https-szf2FU49.mjs → agent-https-BmVaVskH.mjs} +1 -1
- package/system/dist/{agent-https-jJDe-XNl.js → agent-https-DOs15BCJ.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.d.ts +8 -0
- package/system/dist/builtins/alerts/alerts.addon.js +72 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +72 -1
- package/system/dist/builtins/autotrack/autotrack.addon.d.ts +7 -7
- package/system/dist/builtins/autotrack/index.js +15 -8
- package/system/dist/builtins/autotrack/index.mjs +15 -8
- 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 +11 -5
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +11 -5
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.d.ts +4 -10
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +16 -9
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +16 -9
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/access-guards.d.ts +1 -1
- package/system/dist/builtins/storage-orchestrator/custom-actions.d.ts +11 -0
- package/system/dist/builtins/storage-orchestrator/index.d.ts +1 -0
- package/system/dist/builtins/storage-orchestrator/index.js +2 -0
- package/system/dist/builtins/storage-orchestrator/index.mjs +2 -2
- package/system/dist/builtins/storage-orchestrator/location-instances.d.ts +72 -0
- package/system/dist/builtins/storage-orchestrator/location-repoint-move.d.ts +1 -1
- package/system/dist/builtins/storage-orchestrator/location-secret-refs.d.ts +26 -0
- package/system/dist/builtins/storage-orchestrator/location-store.d.ts +28 -2
- package/system/dist/builtins/storage-orchestrator/migrations/index.d.ts +9 -2
- package/system/dist/builtins/storage-orchestrator/migrations/legacy-location-secret-refs.d.ts +13 -0
- package/system/dist/builtins/storage-orchestrator/migrations/location-secret-ports.d.ts +15 -0
- package/system/dist/builtins/storage-orchestrator/migrations/location-secrets-to-record.d.ts +57 -0
- package/system/dist/builtins/storage-orchestrator/provider-discovery.d.ts +10 -13
- package/system/dist/builtins/storage-orchestrator/record-kinds.d.ts +6 -0
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +39 -8
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +954 -131
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +954 -132
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.service.d.ts +8 -0
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
- package/system/dist/builtins/winston-logging/index.js +112 -3
- package/system/dist/builtins/winston-logging/index.mjs +112 -3
- package/system/dist/builtins/winston-logging/migrations/index.d.ts +8 -0
- package/system/dist/builtins/winston-logging/migrations/node-fields.d.ts +43 -0
- package/system/dist/builtins/winston-logging/winston-logging.addon.d.ts +10 -2
- package/system/dist/{capture-engine-DNHgjQot.js → capture-engine-BVpkq9Mv.js} +1 -1
- package/system/dist/{capture-engine-BsKY_3xa.mjs → capture-engine-D-oUDtX5.mjs} +1 -1
- package/system/dist/{composition-sources-BRdGsbVT.mjs → composition-sources-Br7JhpbD.mjs} +1 -1
- package/system/dist/{composition-sources-BgO0GQYW.js → composition-sources-DKCbVA67.js} +1 -1
- package/system/dist/{constants-CQeMrR4f.mjs → constants-Bl0Qxbek.mjs} +1 -1
- package/system/dist/{constants-C3jGKQSQ.js → constants-CJVY-mUq.js} +1 -1
- package/system/dist/{device-ca-ByVi5eUC.mjs → device-ca-BeDGy8NK.mjs} +1 -1
- package/system/dist/{device-ca-D3y6wGmn.js → device-ca-i8EbKp3q.js} +1 -1
- package/system/dist/{dist-BsQA6-0i.mjs → dist-CPUbgRkb.mjs} +395 -425
- package/system/dist/{dist-BRI-Mwx0.js → dist-Ddkk4Dqq.js} +412 -424
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-8dJTW2LI.mjs → hub-mdns-ciao-DgF4SifE.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Ry_Jpljx.js → hub-mdns-ciao-lHRHbXqV.js} +2 -2
- package/system/dist/index.js +151 -53
- package/system/dist/index.mjs +151 -55
- package/system/dist/kernel/addon-health-monitor.d.ts +0 -21
- package/system/dist/kernel/index.d.ts +2 -0
- package/system/dist/kernel/transport/child-cap-protocol.d.ts +1 -1
- package/system/dist/kernel/transport/runner-of-addon.d.ts +2 -0
- package/system/dist/kernel/unsupported-addon-tracker.d.ts +74 -0
- package/system/dist/{legacy-integration-rows-door-CjXTbmvH.mjs → legacy-integration-rows-door-9JSt493H.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-D5BdSNla.js → legacy-integration-rows-door-n9GIUxgq.js} +1 -1
- package/system/dist/{restore-archive-GoWJMdHy.js → restore-archive-BDvLSZtj.js} +1 -1
- package/system/dist/{restore-archive-vn4co_kf.mjs → restore-archive-Dh3XnCR1.mjs} +82 -82
- package/system/dist/{wal-maintenance-CadfiGWy.mjs → wal-maintenance-BQJAmAwS.mjs} +0 -0
- package/system/dist/{wal-maintenance-sSlXJm4k.js → wal-maintenance-CWlz_qRq.js} +0 -0
- package/system/package.json +4 -1
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
7
|
const require_formatter = require("../../formatter-xbxeV4GD.js");
|
|
8
8
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
9
9
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, pi as logDestinationCapability } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
|
|
3
3
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
4
4
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -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-
|
|
7
|
-
const require_device_ca = require("../../device-ca-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
|
+
const require_device_ca = require("../../device-ca-i8EbKp3q.js");
|
|
8
8
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
9
|
-
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-
|
|
10
|
-
const require_constants = require("../../constants-
|
|
9
|
+
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-n9GIUxgq.js");
|
|
10
|
+
const require_constants = require("../../constants-CJVY-mUq.js");
|
|
11
11
|
const require_platform_key_source = require("../../platform-key-source-Di7HrlGR.js");
|
|
12
12
|
let node_crypto = require("node:crypto");
|
|
13
13
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-
|
|
1
|
+
import { Bo as BaseAddon, Bs as formatSecretScope, Is as defineRecordKinds, _t as KEYCHAIN_RESET_TRIGGER_ACTOR, ii as keychainCapability, kc as EventCategory, ri as keychainAdminCapability, sc as normalizeSecretOwner, uc as parseSecretRef, vt as KeychainAuditEntrySchema, yt as KeychainResetRecordSchema } from "../../dist-CPUbgRkb.mjs";
|
|
2
|
+
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-BeDGy8NK.mjs";
|
|
3
3
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
4
|
-
import { t as LEGACY_INTEGRATION_ROWS_TABLE } from "../../legacy-integration-rows-door-
|
|
5
|
-
import { a as MESH_CA_KEY_REF } from "../../constants-
|
|
4
|
+
import { t as LEGACY_INTEGRATION_ROWS_TABLE } from "../../legacy-integration-rows-door-9JSt493H.mjs";
|
|
5
|
+
import { a as MESH_CA_KEY_REF } from "../../constants-Bl0Qxbek.mjs";
|
|
6
6
|
import { n as getPlatformKeychainKey } from "../../platform-key-source-BWlq0jjn.mjs";
|
|
7
7
|
import { createCipheriv, createDecipheriv, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
|
|
8
8
|
import { restrictDirToOwnerSync, restrictFileToOwnerSync, writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
let node_path = require("node:path");
|
|
6
6
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, Bt as RECORDING_SOURCE_CAMSTACK_ADDON, Oc as errMsg, Ut as RecordingStatusSchema, _i as mayWriteToLocation, js as createEvent, kc as EventCategory } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { constants } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import * as fsp from "node:fs/promises";
|
|
@@ -3,10 +3,10 @@ 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-Ddkk4Dqq.js");
|
|
7
7
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
8
8
|
const require_ms$1 = require("../../ms-LB3giGoU.js");
|
|
9
|
-
const require_device_ca = require("../../device-ca-
|
|
9
|
+
const require_device_ca = require("../../device-ca-i8EbKp3q.js");
|
|
10
10
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
11
11
|
let zod = require("zod");
|
|
12
12
|
let node_crypto = require("node:crypto");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { $s as
|
|
2
|
+
import { $s as isSecretMarker, An as buildDeviceEnrollmentLink, B as DEVICE_ENROLLMENT_TTL_MS, Bo as BaseAddon, Cc as userError, Cn as authProviderCapability, Ir as formatDeviceRevoker, Is as defineRecordKinds, It as PreferenceDeviceIdSchema, Ja as userManagementCapability, Lt as PreferenceNamespaceSchema, M as CredentialTokenClaimsSchema, Qt as ScopedTokenSchema, Rt as PreferenceValueSchema, T as CREDENTIAL_TOKEN_AUDIENCE, U as DEVICE_NONCE_TTL_MS, Yr as isCredentialTokenPayload, en as SsoBridgeClaimsSchema, jn as buildDeviceSignatureMessage, jt as PREFERENCES_MAX_VALUE_BYTES, ln as UserRecordSchema, nc as makeSecretMarker, pr as deviceCredentialsCapability, sn as TokenScopeSchema } from "../../dist-CPUbgRkb.mjs";
|
|
3
3
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
4
4
|
import { t as require_ms } from "../../ms-CgH2OFlD.mjs";
|
|
5
|
-
import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-
|
|
5
|
+
import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-BeDGy8NK.mjs";
|
|
6
6
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
import * as crypto$1 from "node:crypto";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
4
4
|
const require_dns_wire = require("../../dns-wire-B1BvF9Ao.js");
|
|
5
|
-
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-
|
|
5
|
+
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-lHRHbXqV.js");
|
|
6
6
|
let zod = require("zod");
|
|
7
7
|
let node_net = require("node:net");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, Hi as pickAppLinkHub, Kr as isAppLinkBase, Ns as defineAddonMigrations, Oa as shortHostname, Oc as errMsg, Rn as checkRoleAddress, Xa as validateCustomAddress, Xr as isDefaultAppConnectionEndpoint, ft as HUB_MDNS_SERVICE_TYPE, kc as EventCategory, kt as NetworkTunnelStartedDataSchema, li as localNetworkCapability, ma as resolveNotificationTapAddress, oa as resolveAppConnections, pt as HUB_MDNS_TXT_KEYS, qi as preconditionOf, ua as resolveHubAddressRoles, v as CAMSTACK_APP_LINK_ORIGIN } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { a as emptyMdnsRecords, c as parseMdnsMessage, i as buildRecordQuery, l as parseMdnsRecords, n as MDNS_PORT, o as mergeMdnsRecords, r as buildPtrQuery, s as normalizeServiceType, t as MDNS_GROUP } from "../../dns-wire-Dm3H_7ST.mjs";
|
|
3
|
-
import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-
|
|
3
|
+
import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-DgF4SifE.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { isIP } from "node:net";
|
|
6
6
|
import { readFileSync } from "node:fs";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
7
|
const require_log_read_filter = require("../../log-read-filter-Bi066jwU.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $s as isSecretMarker, Bo as BaseAddon, Fs as defineEntryKind, Js as isInstanceEnabled, Ns as defineAddonMigrations, Qs as isSecretFieldView, Tn as bareAddonId, Vr as integrationInstancesCapability, ei as isSameAddonId, ls as RecordIntegrationInstances, ms as RevConflictError, pi as logDestinationCapability, qi as preconditionOf } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { n as compileLogFilter, o as lineMatches } from "../../log-read-filter-D7Ev3zm-.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
@@ -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-Ddkk4Dqq.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
node_fs = require_chunk.__toESM(node_fs);
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, Fr as foldSnapshotByFunction, Ht as ROOT_BUCKET_KEY, Oc as errMsg, Si as metricsProviderCapability, cn as UNATTRIBUTED_BUCKET_KEY, js as createEvent, kc as EventCategory, sa as resolveBucketMs, ta as reducePoints } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import * as fs$1 from "node:fs";
|
|
3
3
|
import { constants, readFileSync } from "node:fs";
|
|
4
4
|
import { access, readFile, readdir } from "node:fs/promises";
|
|
@@ -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-Ddkk4Dqq.js");
|
|
7
7
|
const require_coral_accelerators = require("../../coral-accelerators-BSVsBVzt.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { Bo as BaseAddon, Ca as scoreRuntimes, Li as parseAcceleratorFactsJson, Oc as errMsg, Rs as emitReadiness, Wi as platformProbeCapability, kc as EventCategory, xr as enumerateInferenceDevices } from "../../dist-CPUbgRkb.mjs";
|
|
3
3
|
import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-DBlgWB8k.mjs";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
//#region src/builtins/record-entries/entries-service.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $i as recordEntriesCapability, Bo as BaseAddon, Xo as InvalidRecordError, vc as secretViewsOf, ys as UnknownRecordKindError } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/builtins/record-entries/entries-service.ts
|
package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* What it still owns — the load-bearing logic:
|
|
10
10
|
* The orchestrator owns the "operator wants this provider running"
|
|
11
11
|
* intent — an `enabledProviders: string[]` slice in its addon-store
|
|
12
|
-
* blob (
|
|
12
|
+
* blob (`state('enabledProviders')`). On boot we iterate the list and call
|
|
13
13
|
* `provider.start()` for each enabled entry, so a tunnel set up once
|
|
14
14
|
* stays up across hub restarts.
|
|
15
15
|
*
|
|
@@ -30,14 +30,8 @@
|
|
|
30
30
|
* it can only add already-connected providers, never evict.
|
|
31
31
|
*/
|
|
32
32
|
import { BaseAddon, type ProviderRegistration } from "@camstack/types";
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* addonIds the operator has explicitly Started. Auto-respawned on
|
|
36
|
-
* boot so a tunnel set up once stays up across hub restarts.
|
|
37
|
-
*/
|
|
38
|
-
readonly enabledProviders: readonly string[];
|
|
39
|
-
}
|
|
40
|
-
export declare class RemoteAccessOrchestratorAddon extends BaseAddon<RemoteAccessOrchestratorConfig> {
|
|
33
|
+
export declare class RemoteAccessOrchestratorAddon extends BaseAddon<Record<string, never>> {
|
|
34
|
+
private readonly enabledProviders;
|
|
41
35
|
constructor();
|
|
42
36
|
protected onInitialize(): Promise<ProviderRegistration[]>;
|
|
43
37
|
/**
|
|
@@ -65,7 +59,7 @@ export declare class RemoteAccessOrchestratorAddon extends BaseAddon<RemoteAcces
|
|
|
65
59
|
*/
|
|
66
60
|
private reconcileAndPersist;
|
|
67
61
|
private autoStartEnabledProviders;
|
|
68
|
-
|
|
62
|
+
protected markEnabled(addonId: string, enabled: boolean): Promise<void>;
|
|
69
63
|
private resolveImpl;
|
|
70
64
|
}
|
|
71
65
|
export default RemoteAccessOrchestratorAddon;
|
|
@@ -3,7 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
|
+
let zod = require("zod");
|
|
7
8
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
8
9
|
/**
|
|
9
10
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -47,7 +48,7 @@ function reconcileEnabledProviders(currentEnabled, probes) {
|
|
|
47
48
|
* What it still owns — the load-bearing logic:
|
|
48
49
|
* The orchestrator owns the "operator wants this provider running"
|
|
49
50
|
* intent — an `enabledProviders: string[]` slice in its addon-store
|
|
50
|
-
* blob (
|
|
51
|
+
* blob (`state('enabledProviders')`). On boot we iterate the list and call
|
|
51
52
|
* `provider.start()` for each enabled entry, so a tunnel set up once
|
|
52
53
|
* stays up across hub restarts.
|
|
53
54
|
*
|
|
@@ -67,12 +68,18 @@ function reconcileEnabledProviders(currentEnabled, probes) {
|
|
|
67
68
|
* stopped). Running before `autoStartEnabledProviders` is safe:
|
|
68
69
|
* it can only add already-connected providers, never evict.
|
|
69
70
|
*/
|
|
71
|
+
/**
|
|
72
|
+
* addonIds the operator has explicitly Started (store key `enabledProviders`). Auto-respawned on
|
|
73
|
+
* boot so a tunnel set up once stays up across hub restarts.
|
|
74
|
+
*/
|
|
75
|
+
var EnabledProvidersSchema = zod.z.array(zod.z.string());
|
|
70
76
|
var RemoteAccessOrchestratorAddon = class extends require_dist.BaseAddon {
|
|
77
|
+
enabledProviders = this.state("enabledProviders", EnabledProvidersSchema, []);
|
|
71
78
|
constructor() {
|
|
72
|
-
super({
|
|
79
|
+
super({});
|
|
73
80
|
}
|
|
74
81
|
async onInitialize() {
|
|
75
|
-
this.ctx.logger.info("Remote-access orchestrator initialized (backend-only)", { meta: { enabledCount: this.
|
|
82
|
+
this.ctx.logger.info("Remote-access orchestrator initialized (backend-only)", { meta: { enabledCount: (await this.enabledProviders.get()).length } });
|
|
76
83
|
this.ctx.eventBus?.subscribe({ category: require_dist.EventCategory.NetworkTunnelStarted }, (event) => {
|
|
77
84
|
this.onTunnelLifecycle(event.source, true);
|
|
78
85
|
});
|
|
@@ -148,17 +155,17 @@ var RemoteAccessOrchestratorAddon = class extends require_dist.BaseAddon {
|
|
|
148
155
|
};
|
|
149
156
|
}
|
|
150
157
|
}));
|
|
151
|
-
const result = reconcileEnabledProviders(this.
|
|
158
|
+
const result = reconcileEnabledProviders(await this.enabledProviders.get(), probes);
|
|
152
159
|
if (!result.changed) return;
|
|
153
160
|
this.ctx.logger.info("reconcile: corrected enabledProviders from RPC-pulled state", { meta: {
|
|
154
161
|
added: result.added,
|
|
155
162
|
removed: result.removed
|
|
156
163
|
} });
|
|
157
|
-
await this.
|
|
164
|
+
await this.enabledProviders.set([...result.nextEnabled]);
|
|
158
165
|
}
|
|
159
166
|
async autoStartEnabledProviders() {
|
|
160
167
|
await this.reconcileAndPersist();
|
|
161
|
-
const ids = this.
|
|
168
|
+
const ids = await this.enabledProviders.get();
|
|
162
169
|
if (ids.length === 0) return;
|
|
163
170
|
this.ctx.logger.info("Auto-starting enabled remote-access providers", { meta: { addonIds: [...ids] } });
|
|
164
171
|
for (const addonId of ids) try {
|
|
@@ -194,7 +201,7 @@ var RemoteAccessOrchestratorAddon = class extends require_dist.BaseAddon {
|
|
|
194
201
|
}
|
|
195
202
|
}
|
|
196
203
|
async markEnabled(addonId, enabled) {
|
|
197
|
-
const current = new Set(this.
|
|
204
|
+
const current = new Set(await this.enabledProviders.get());
|
|
198
205
|
const wasEnabled = current.has(addonId);
|
|
199
206
|
if (enabled) current.add(addonId);
|
|
200
207
|
else current.delete(addonId);
|
|
@@ -203,7 +210,7 @@ var RemoteAccessOrchestratorAddon = class extends require_dist.BaseAddon {
|
|
|
203
210
|
addonId,
|
|
204
211
|
enabled
|
|
205
212
|
} });
|
|
206
|
-
await this.
|
|
213
|
+
await this.enabledProviders.set([...current]);
|
|
207
214
|
}
|
|
208
215
|
resolveImpl(addonId) {
|
|
209
216
|
return (this.capabilities?.getCollectionEntries("network-access") ?? []).find(([id]) => id === addonId)?.[1] ?? null;
|
package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, kc as EventCategory } from "../../dist-CPUbgRkb.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
3
4
|
/**
|
|
4
5
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -42,7 +43,7 @@ function reconcileEnabledProviders(currentEnabled, probes) {
|
|
|
42
43
|
* What it still owns — the load-bearing logic:
|
|
43
44
|
* The orchestrator owns the "operator wants this provider running"
|
|
44
45
|
* intent — an `enabledProviders: string[]` slice in its addon-store
|
|
45
|
-
* blob (
|
|
46
|
+
* blob (`state('enabledProviders')`). On boot we iterate the list and call
|
|
46
47
|
* `provider.start()` for each enabled entry, so a tunnel set up once
|
|
47
48
|
* stays up across hub restarts.
|
|
48
49
|
*
|
|
@@ -62,12 +63,18 @@ function reconcileEnabledProviders(currentEnabled, probes) {
|
|
|
62
63
|
* stopped). Running before `autoStartEnabledProviders` is safe:
|
|
63
64
|
* it can only add already-connected providers, never evict.
|
|
64
65
|
*/
|
|
66
|
+
/**
|
|
67
|
+
* addonIds the operator has explicitly Started (store key `enabledProviders`). Auto-respawned on
|
|
68
|
+
* boot so a tunnel set up once stays up across hub restarts.
|
|
69
|
+
*/
|
|
70
|
+
var EnabledProvidersSchema = z.array(z.string());
|
|
65
71
|
var RemoteAccessOrchestratorAddon = class extends BaseAddon {
|
|
72
|
+
enabledProviders = this.state("enabledProviders", EnabledProvidersSchema, []);
|
|
66
73
|
constructor() {
|
|
67
|
-
super({
|
|
74
|
+
super({});
|
|
68
75
|
}
|
|
69
76
|
async onInitialize() {
|
|
70
|
-
this.ctx.logger.info("Remote-access orchestrator initialized (backend-only)", { meta: { enabledCount: this.
|
|
77
|
+
this.ctx.logger.info("Remote-access orchestrator initialized (backend-only)", { meta: { enabledCount: (await this.enabledProviders.get()).length } });
|
|
71
78
|
this.ctx.eventBus?.subscribe({ category: EventCategory.NetworkTunnelStarted }, (event) => {
|
|
72
79
|
this.onTunnelLifecycle(event.source, true);
|
|
73
80
|
});
|
|
@@ -143,17 +150,17 @@ var RemoteAccessOrchestratorAddon = class extends BaseAddon {
|
|
|
143
150
|
};
|
|
144
151
|
}
|
|
145
152
|
}));
|
|
146
|
-
const result = reconcileEnabledProviders(this.
|
|
153
|
+
const result = reconcileEnabledProviders(await this.enabledProviders.get(), probes);
|
|
147
154
|
if (!result.changed) return;
|
|
148
155
|
this.ctx.logger.info("reconcile: corrected enabledProviders from RPC-pulled state", { meta: {
|
|
149
156
|
added: result.added,
|
|
150
157
|
removed: result.removed
|
|
151
158
|
} });
|
|
152
|
-
await this.
|
|
159
|
+
await this.enabledProviders.set([...result.nextEnabled]);
|
|
153
160
|
}
|
|
154
161
|
async autoStartEnabledProviders() {
|
|
155
162
|
await this.reconcileAndPersist();
|
|
156
|
-
const ids = this.
|
|
163
|
+
const ids = await this.enabledProviders.get();
|
|
157
164
|
if (ids.length === 0) return;
|
|
158
165
|
this.ctx.logger.info("Auto-starting enabled remote-access providers", { meta: { addonIds: [...ids] } });
|
|
159
166
|
for (const addonId of ids) try {
|
|
@@ -189,7 +196,7 @@ var RemoteAccessOrchestratorAddon = class extends BaseAddon {
|
|
|
189
196
|
}
|
|
190
197
|
}
|
|
191
198
|
async markEnabled(addonId, enabled) {
|
|
192
|
-
const current = new Set(this.
|
|
199
|
+
const current = new Set(await this.enabledProviders.get());
|
|
193
200
|
const wasEnabled = current.has(addonId);
|
|
194
201
|
if (enabled) current.add(addonId);
|
|
195
202
|
else current.delete(addonId);
|
|
@@ -198,7 +205,7 @@ var RemoteAccessOrchestratorAddon = class extends BaseAddon {
|
|
|
198
205
|
addonId,
|
|
199
206
|
enabled
|
|
200
207
|
} });
|
|
201
|
-
await this.
|
|
208
|
+
await this.enabledProviders.set([...current]);
|
|
202
209
|
}
|
|
203
210
|
resolveImpl(addonId) {
|
|
204
211
|
return (this.capabilities?.getCollectionEntries("network-access") ?? []).find(([id]) => id === addonId)?.[1] ?? null;
|
|
@@ -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-Ddkk4Dqq.js");
|
|
7
7
|
const require_snapshot_courtesy = require("../../snapshot-courtesy-D_C5-nC0.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, Dc as DeviceType, En as batteryCapability, Oc as errMsg, Tc as DeviceFeature, Tn as bareAddonId, ac as nodePin, bi as memoizePinnedFfmpeg, g as BatteryStatusSchema, ja as snapshotCapability, kc as EventCategory, ur as deriveBatteryPresence, za as streamQualityLabel } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CyFs1M3I.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { randomUUID } 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-Ddkk4Dqq.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, La as storageProviderCapability, Pr as filesystemBrowseCapability } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import * as fs$1 from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
|
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
6
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./filesystem-storage.addon.js");
|
|
7
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
7
|
+
const require_wal_maintenance = require("../../wal-maintenance-CWlz_qRq.js");
|
|
8
8
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./sqlite-settings.addon.js");
|
|
9
9
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
10
10
|
var ConfigStore = class {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./filesystem-storage.addon.mjs";
|
|
2
|
-
import { B as SQLITE_ENGINE_STORM_WALL_SHARE, F as SQLITE_MMAP_FLOOR_BYTES, G as SqliteOpProfiler, H as SQLITE_PROFILE_REPORT_INTERVAL_MS, I as SQLITE_PAGE_CACHE_CEILING_KIB, K as sqliteEngineStorm, L as SQLITE_PAGE_CACHE_FLOOR_KIB, N as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as SQLITE_MMAP_CEILING_BYTES, R as sqliteMmapSizeFor, U as SQLITE_PROFILE_TOP_N, V as SQLITE_PROFILE_REPORT_FLOOR_MS, W as SQLITE_SLOW_CALL_MS, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as sqlitePageCacheKibFor } from "../../wal-maintenance-
|
|
2
|
+
import { B as SQLITE_ENGINE_STORM_WALL_SHARE, F as SQLITE_MMAP_FLOOR_BYTES, G as SqliteOpProfiler, H as SQLITE_PROFILE_REPORT_INTERVAL_MS, I as SQLITE_PAGE_CACHE_CEILING_KIB, K as sqliteEngineStorm, L as SQLITE_PAGE_CACHE_FLOOR_KIB, N as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, P as SQLITE_MMAP_CEILING_BYTES, R as sqliteMmapSizeFor, U as SQLITE_PROFILE_TOP_N, V as SQLITE_PROFILE_REPORT_FLOOR_MS, W as SQLITE_SLOW_CALL_MS, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as sqlitePageCacheKibFor } from "../../wal-maintenance-BQJAmAwS.mjs";
|
|
3
3
|
import { SqliteSettingsAddon } from "./sqlite-settings.addon.mjs";
|
|
4
4
|
//#region src/builtins/sqlite-storage/config-store.ts
|
|
5
5
|
var ConfigStore = class {
|
|
@@ -3,12 +3,12 @@ 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-Ddkk4Dqq.js");
|
|
7
7
|
const require_retired_settings_keys = require("../../retired-settings-keys-C8nOOr5H.js");
|
|
8
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
8
|
+
const require_wal_maintenance = require("../../wal-maintenance-CWlz_qRq.js");
|
|
9
9
|
const require_sqlite_snapshot_protocol = require("../../sqlite-snapshot-protocol-B9OndqZv.js");
|
|
10
10
|
const require_wal_checkpoint_policy = require("../../wal-checkpoint-policy-d2z2qPqx.js");
|
|
11
|
-
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-
|
|
11
|
+
const require_legacy_integration_rows_door = require("../../legacy-integration-rows-door-n9GIUxgq.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
14
14
|
let node_fs = require("node:fs");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bo as BaseAddon, Ci as migrationsCapability, Ct as MIGRATION_API_V1_METHODS, F as DATABASE_SNAPSHOT_TIMEOUT_MS, I as DATA_STORE_DATABASES, Ii as orderMigrations, Ko as DeclarationRefusedError, Ln as catalogueIssues, Ms as customAction, N as DATABASE_SNAPSHOT_PARTIAL_SUFFIX, Na as storageAdminCapability, Oc as errMsg$1, Ot as MigrationMetaSchema, P as DATABASE_SNAPSHOT_SUFFIX, Ps as defineCustomActions, Tn as bareAddonId, Xo as InvalidRecordError, Zo as NoCallerError, _s as TransactRefusedError, ar as databaseSnapshotCapability, ea as recordsCapability, ha as resolveRunnerId, ir as dataStoreProviderCapability, kc as EventCategory, ks as collectSecretMarkerRefs, os as RUNTIME_DEFAULTS, rs as RECORD_SWEEP_INTERVAL_MS, sc as normalizeSecretOwner, to as vectorStoreCapability, us as RecordKindDeclarationSchema, ys as UnknownRecordKindError } from "../../dist-CPUbgRkb.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-BQJAmAwS.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
|
-
import { a as patchLegacyIntegrationRows, i as legacyIntegrationAddonId, n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows, r as deleteLegacyIntegrationRowKeys } from "../../legacy-integration-rows-door-
|
|
6
|
+
import { a as patchLegacyIntegrationRows, i as legacyIntegrationAddonId, n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows, r as deleteLegacyIntegrationRowKeys } from "../../legacy-integration-rows-door-9JSt493H.mjs";
|
|
7
7
|
import { createRequire } from "node:module";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { randomUUID } from "node:crypto";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* up an addon.
|
|
5
5
|
*
|
|
6
6
|
* They are the second and third locks of D296. The first is
|
|
7
|
-
*
|
|
7
|
+
* the create-time refusal, which stops the configuration from existing.
|
|
8
8
|
* These two hold for a row that predates the guard, for one written by a
|
|
9
9
|
* future code path, and for a provider that changes its own `nodeLocal`
|
|
10
10
|
* answer after a location was made.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type CustomActionsSpec } from "@camstack/types";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/**
|
|
4
|
+
* The forced delete of a storage location (D49). `deleteInstance` keeps the occupancy refusal;
|
|
5
|
+
* this is the separate, explicit action for a location the check could not read (a removed disk,
|
|
6
|
+
* another node, a remote provider). The caller states it after a second confirmation.
|
|
7
|
+
*/
|
|
8
|
+
export declare const forceDeleteLocationInput: z.ZodType<{
|
|
9
|
+
id: string;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const storageOrchestratorActions: CustomActionsSpec;
|
|
@@ -5,3 +5,4 @@ export { StorageMigrationCoordinator } from "./storage-migration-coordinator.js"
|
|
|
5
5
|
export { StorageOrchestratorAddon, StorageOrchestratorAddon as default } from "./storage-orchestrator.addon.js";
|
|
6
6
|
export type { ListLocationsFilter, StorageProviderLookup } from "./storage-orchestrator.service.js";
|
|
7
7
|
export { StorageOrchestratorService } from "./storage-orchestrator.service.js";
|
|
8
|
+
export { storageOrchestratorActions, storageOrchestratorActions as customActions } from "./custom-actions.js";
|
|
@@ -8,4 +8,6 @@ exports.SqliteLocationStore = require_builtins_storage_orchestrator_storage_orch
|
|
|
8
8
|
exports.StorageMigrationCoordinator = require_builtins_storage_orchestrator_storage_orchestrator_addon.StorageMigrationCoordinator;
|
|
9
9
|
exports.StorageOrchestratorAddon = require_builtins_storage_orchestrator_storage_orchestrator_addon.StorageOrchestratorAddon;
|
|
10
10
|
exports.StorageOrchestratorService = require_builtins_storage_orchestrator_storage_orchestrator_addon.StorageOrchestratorService;
|
|
11
|
+
exports.customActions = require_builtins_storage_orchestrator_storage_orchestrator_addon.storageOrchestratorActions;
|
|
11
12
|
exports.default = require_builtins_storage_orchestrator_storage_orchestrator_addon.StorageOrchestratorAddon;
|
|
13
|
+
exports.storageOrchestratorActions = require_builtins_storage_orchestrator_storage_orchestrator_addon.storageOrchestratorActions;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { StorageOrchestratorAddon, c as SqliteLocationStore,
|
|
2
|
-
export { SqliteLocationStore, StorageMigrationCoordinator, StorageOrchestratorAddon, StorageOrchestratorAddon as default, StorageOrchestratorService };
|
|
1
|
+
import { StorageOrchestratorAddon, c as StorageMigrationCoordinator, l as SqliteLocationStore, n as storageOrchestratorActions, t as StorageOrchestratorService } from "./storage-orchestrator.addon.mjs";
|
|
2
|
+
export { SqliteLocationStore, StorageMigrationCoordinator, StorageOrchestratorAddon, StorageOrchestratorAddon as default, StorageOrchestratorService, storageOrchestratorActions as customActions, storageOrchestratorActions };
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The storage locations as `integration-instances` (planning#440 step 6, D985, D986): one
|
|
3
|
+
* instance per location, one KIND per declared location type (`recordings`, `backups`, ...).
|
|
4
|
+
* The form is the provider select, the provider's own fields and the location's state; the
|
|
5
|
+
* credentials the provider declares go to the keychain bound to the location's record
|
|
6
|
+
* (`location-secret-refs.ts`, D879).
|
|
7
|
+
*
|
|
8
|
+
* A location keeps ONE typed state (`mode`, D385) and only `storage-location-mode.ts` reads it.
|
|
9
|
+
* The row switch maps to it: on is `active`; off is `readonly` (the write switch, D383), and a
|
|
10
|
+
* location that is already `drain` or `disabled` stays as it is. Delete keeps the occupancy
|
|
11
|
+
* refusal; the forced delete is NOT a flag here, it is the separate `forceDeleteLocation`
|
|
12
|
+
* action (D49: destructive, confirmed by a second read).
|
|
13
|
+
*
|
|
14
|
+
* The edit form is the provider's schema as it is. The create form offers every provider, so
|
|
15
|
+
* each provider's fields are namespaced `<providerId>.<key>` and shown for that provider; a
|
|
16
|
+
* `notEquals` / `notIn` condition on a select is rewritten to the options it leaves, because the
|
|
17
|
+
* selector of another provider is unset and an unset value would satisfy a negation.
|
|
18
|
+
*/
|
|
19
|
+
import { type ConfigSection, type IIntegrationInstancesProvider, type StorageLocation, type StorageLocationDeclaration } from "@camstack/types";
|
|
20
|
+
import type { StorageProviderListEntry } from "./provider-discovery.js";
|
|
21
|
+
export declare const STORAGE_INSTANCE_KIND = "storage-location";
|
|
22
|
+
export declare const STORAGE_FUNCTION_CAP = "storage";
|
|
23
|
+
/** The generic widget id the admin UI maps to its path browser. */
|
|
24
|
+
export declare const STORAGE_PATH_WIDGET = "storage/path-browser";
|
|
25
|
+
/** A probe of a remote provider waits this long; a hung host must not hang the form. */
|
|
26
|
+
export declare const LOCATION_TEST_TIMEOUT_MS = 2e4;
|
|
27
|
+
export type LocationSaveInput = Omit<StorageLocation, "createdAt" | "updatedAt">;
|
|
28
|
+
export interface LocationInstancesDeps {
|
|
29
|
+
readonly locations: () => readonly StorageLocation[];
|
|
30
|
+
readonly declarations: () => readonly StorageLocationDeclaration[];
|
|
31
|
+
readonly providers: () => Promise<readonly StorageProviderListEntry[]>;
|
|
32
|
+
/** The one save every door goes through; `clearSecrets` names the credentials to remove. */
|
|
33
|
+
readonly save: (input: LocationSaveInput, clearSecrets: readonly string[]) => Promise<StorageLocation>;
|
|
34
|
+
/** Delete with the occupancy refusal; `force` is never passed from this provider. */
|
|
35
|
+
readonly remove: (id: string) => Promise<void>;
|
|
36
|
+
/** Probe a config (markers allowed) against a provider; the addon resolves the markers. */
|
|
37
|
+
readonly probe: (providerId: string, config: Readonly<Record<string, unknown>>) => Promise<{
|
|
38
|
+
readonly ok: boolean;
|
|
39
|
+
readonly error?: string;
|
|
40
|
+
}>;
|
|
41
|
+
/** The config keys that are credentials; fails closed for an unregistered provider. */
|
|
42
|
+
readonly secretKeys: (providerId: string, config: Readonly<Record<string, unknown>>) => ReadonlySet<string>;
|
|
43
|
+
readonly testTimeoutMs?: number;
|
|
44
|
+
}
|
|
45
|
+
/** The sections a provider's `configSchema` carries; anything else is no form. */
|
|
46
|
+
export declare function providerSections(schema: unknown): readonly ConfigSection[];
|
|
47
|
+
export declare class StorageLocationInstances {
|
|
48
|
+
private readonly deps;
|
|
49
|
+
constructor(deps: LocationInstancesDeps);
|
|
50
|
+
private kinds;
|
|
51
|
+
private viewOf;
|
|
52
|
+
describe: IIntegrationInstancesProvider["describe"];
|
|
53
|
+
instanceFormSchema: IIntegrationInstancesProvider["instanceFormSchema"];
|
|
54
|
+
listInstances: IIntegrationInstancesProvider["listInstances"];
|
|
55
|
+
getInstance: IIntegrationInstancesProvider["getInstance"];
|
|
56
|
+
/**
|
|
57
|
+
* The config and credentials a form `values` object means for a provider: its own namespaced
|
|
58
|
+
* keys (create form) or plain keys (edit form), the framework numbers, nothing of another
|
|
59
|
+
* provider. `base` is the stored config; a credential kept stays as stored.
|
|
60
|
+
*/
|
|
61
|
+
private configFrom;
|
|
62
|
+
private mintId;
|
|
63
|
+
createInstance: IIntegrationInstancesProvider["createInstance"];
|
|
64
|
+
/** The whole location again, from the stored row, with `patch` on top (the save REPLACES). */
|
|
65
|
+
private rebuilt;
|
|
66
|
+
updateInstance: IIntegrationInstancesProvider["updateInstance"];
|
|
67
|
+
setInstanceEnabled: IIntegrationInstancesProvider["setInstanceEnabled"];
|
|
68
|
+
/** The occupancy refusal stays; the forced delete is the separate action. */
|
|
69
|
+
deleteInstance: IIntegrationInstancesProvider["deleteInstance"];
|
|
70
|
+
testInstance: NonNullable<IIntegrationInstancesProvider["testInstance"]>;
|
|
71
|
+
toProvider(): IIntegrationInstancesProvider;
|
|
72
|
+
}
|