@camstack/system 1.2.447 → 1.2.449
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/assets/device-history/icon.svg +4 -0
- package/dist/{agent-https-5DYAOJMO.js → agent-https-CMz4S56_.js} +2 -2
- package/dist/{agent-https-BWUEf6ev.mjs → agent-https-D6lRxHma.mjs} +2 -2
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +2 -2
- package/dist/builtins/alerts/alerts.addon.mjs +2 -2
- package/dist/builtins/autotrack/index.js +1 -1
- package/dist/builtins/autotrack/index.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/dist/builtins/calendars/calendars.addon.js +1 -1
- package/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/dist/builtins/camera-grid/index.js +1 -1
- package/dist/builtins/camera-grid/index.mjs +1 -1
- package/dist/builtins/composer/composer.addon.js +2 -2
- package/dist/builtins/composer/composer.addon.mjs +2 -2
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/dist/builtins/device-history/capture/capture-engine.d.ts +87 -0
- package/dist/builtins/device-history/capture/capture-filter.d.ts +37 -0
- package/dist/builtins/device-history/capture/device-directory.d.ts +47 -0
- package/dist/builtins/device-history/capture/field-path.d.ts +10 -0
- package/dist/builtins/device-history/capture/point-writer.d.ts +63 -0
- package/dist/builtins/device-history/device-history.addon.d.ts +38 -0
- package/dist/builtins/device-history/device-history.addon.js +2823 -0
- package/dist/builtins/device-history/device-history.addon.mjs +2816 -0
- package/dist/builtins/device-history/index.d.ts +3 -0
- package/dist/builtins/device-history/ingest/producer-ingest.d.ts +89 -0
- package/dist/builtins/device-history/query/history-query.d.ts +69 -0
- package/dist/builtins/device-history/retention/departure-tracker.d.ts +33 -0
- package/dist/builtins/device-history/retention/retention.d.ts +67 -0
- package/dist/builtins/device-history/rollup/rollup-engine.d.ts +72 -0
- package/dist/builtins/device-history/rollup/rollup-math.d.ts +44 -0
- package/dist/builtins/device-history/runtime/history-runtime.d.ts +93 -0
- package/dist/builtins/device-history/status/counters.d.ts +55 -0
- package/dist/builtins/device-history/store/history-door.d.ts +7 -0
- package/dist/builtins/device-history/store/history-schema.d.ts +26 -0
- package/dist/builtins/device-history/store/history-store.d.ts +86 -0
- package/dist/builtins/device-history/store/row-readers.d.ts +11 -0
- package/dist/builtins/device-history/store/series-registry.d.ts +39 -0
- package/dist/builtins/device-history/time/bucket-time.d.ts +25 -0
- package/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +4 -4
- package/dist/builtins/keychain/index.mjs +4 -4
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +3 -3
- package/dist/builtins/local-auth/local-auth.addon.mjs +3 -3
- package/dist/builtins/local-network/local-network.addon.js +2 -2
- package/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/record-entries/index.js +1 -1
- package/dist/builtins/record-entries/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/index.js +1 -1
- package/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +4 -6
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +12 -15
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +12 -15
- package/dist/builtins/sqlite-storage/vector-provider.d.ts +6 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +3 -3
- package/dist/builtins/system-config/system-config.addon.mjs +3 -3
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-BwIIltnZ.js → composition-sources-BQmhc3se.js} +1 -1
- package/dist/{composition-sources-BmC5jAUv.mjs → composition-sources-DzuruDVY.mjs} +1 -1
- package/dist/{constants-DA_tjzIk.js → constants-BPWA-r-Y.js} +1 -1
- package/dist/{constants-6XHGmEUF.mjs → constants-gzGZbnwO.mjs} +1 -1
- package/dist/{device-ca-CnbrgfmW.js → device-ca-75rt3U_U.js} +1 -1
- package/dist/{device-ca-Bh_ClxMO.mjs → device-ca-D05nqNXE.mjs} +1 -1
- package/dist/{dist-BkNfEJKa.js → dist-Ct88catN.js} +385 -1
- package/dist/{dist-CkZIrsAP.mjs → dist-DV2ll9Hi.mjs} +356 -2
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-CoyIUWHC.mjs → hub-mdns-ciao-BPOg2iyc.mjs} +2 -2
- package/dist/{hub-mdns-ciao-m5LIr4oA.js → hub-mdns-ciao-DAU1WttG.js} +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -7
- package/dist/index.mjs +9 -8
- package/dist/{phase6-declare-gate-BDWZuB2n.mjs → phase6-declare-gate-BJplW6tX.mjs} +1 -1
- package/dist/{phase6-declare-gate-Bl7KocEs.js → phase6-declare-gate-C6WqagkC.js} +1 -1
- package/dist/{restore-archive-B57xI5Ue.js → restore-archive-Cprdh3P9.js} +1 -1
- package/dist/{restore-archive-CMr4V7Fi.mjs → restore-archive-Jiz63mVB.mjs} +1 -1
- package/dist/{wal-maintenance-Bqm4zrNA.mjs → wal-maintenance-BineOch3.mjs} +0 -0
- package/dist/{wal-maintenance-CuG1DUca.js → wal-maintenance-mwCBe3Vr.js} +0 -0
- package/package.json +24 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The in-memory index of metrics and series, loaded once and kept in step with
|
|
3
|
+
* the store. Series ids are assigned by the engine (`INTEGER PRIMARY KEY`, a
|
|
4
|
+
* rowid alias, D473); creating one is single-flight per identity so two
|
|
5
|
+
* concurrent first points of a series never insert it twice.
|
|
6
|
+
*/
|
|
7
|
+
import type { DeviceHistorySubject } from "@camstack/types";
|
|
8
|
+
import { HistoryStore, type MetricRecord, type SeriesRecord } from "./history-store.js";
|
|
9
|
+
export declare function subjectIdOf(subject: DeviceHistorySubject): string;
|
|
10
|
+
export declare function deviceIdOf(subject: DeviceHistorySubject): number | null;
|
|
11
|
+
export declare function identityOf(key: string, subjectId: string, scope: string): string;
|
|
12
|
+
export declare class SeriesRegistry {
|
|
13
|
+
private readonly store;
|
|
14
|
+
private readonly metrics;
|
|
15
|
+
private readonly byIdentity;
|
|
16
|
+
private readonly byId;
|
|
17
|
+
private readonly inflight;
|
|
18
|
+
private readonly removeListeners;
|
|
19
|
+
constructor(store: HistoryStore);
|
|
20
|
+
load(): Promise<void>;
|
|
21
|
+
private index;
|
|
22
|
+
metric(key: string): MetricRecord | undefined;
|
|
23
|
+
allMetrics(): readonly MetricRecord[];
|
|
24
|
+
/** Persist and remember a metric; idempotent. */
|
|
25
|
+
declareMetric(metric: MetricRecord): Promise<void>;
|
|
26
|
+
find(key: string, subjectId: string, scope: string): SeriesRecord | undefined;
|
|
27
|
+
byIdOf(id: number): SeriesRecord | undefined;
|
|
28
|
+
all(): readonly SeriesRecord[];
|
|
29
|
+
forSubject(subjectId: string): readonly SeriesRecord[];
|
|
30
|
+
forKeyAndSubject(key: string, subjectId: string): readonly SeriesRecord[];
|
|
31
|
+
/** The series, created on first sight. `ts` stamps `first_ts`/`last_ts` of a new one. */
|
|
32
|
+
ensure(key: string, subject: DeviceHistorySubject, scope: string, ts: number): Promise<SeriesRecord>;
|
|
33
|
+
private create;
|
|
34
|
+
/** Remember a widened span (the store write is the caller's). */
|
|
35
|
+
noteSpan(id: number, firstTs: number, lastTs: number): void;
|
|
36
|
+
remove(id: number): void;
|
|
37
|
+
/** Per-series state elsewhere (last recorded value, dirty marks, rate limits) is dropped through this. */
|
|
38
|
+
onRemove(listener: (series: SeriesRecord) => void): void;
|
|
39
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bucket arithmetic for the three rollup tiers (D850, plan §4/§5.5).
|
|
3
|
+
*
|
|
4
|
+
* 5m and 1h buckets are aligned to UTC; a 1d bucket starts at HUB-LOCAL
|
|
5
|
+
* midnight, so a day is 23, 24 or 25 hours long across a DST change (operator
|
|
6
|
+
* answer Q4). Pure: the zone is the process zone (`TZ`), nothing is read from
|
|
7
|
+
* the environment here.
|
|
8
|
+
*/
|
|
9
|
+
export declare const FIVE_MINUTES_MS: number;
|
|
10
|
+
export declare const HOUR_MS: number;
|
|
11
|
+
export declare const DAY_MS: number;
|
|
12
|
+
export type RollupTier = "5m" | "1h" | "1d";
|
|
13
|
+
export declare function floorTo(ts: number, widthMs: number): number;
|
|
14
|
+
/** Hub-local midnight at or before `ts`. */
|
|
15
|
+
export declare function startOfLocalDay(ts: number): number;
|
|
16
|
+
/** The local midnight following the local midnight `dayStart`. */
|
|
17
|
+
export declare function nextLocalDayStart(dayStart: number): number;
|
|
18
|
+
/** Start of the `tier` bucket containing `ts`. */
|
|
19
|
+
export declare function bucketStartOf(tier: RollupTier, ts: number): number;
|
|
20
|
+
/** Exclusive end of the `tier` bucket that starts at `start`. */
|
|
21
|
+
export declare function bucketEndOf(tier: RollupTier, start: number): number;
|
|
22
|
+
/** The tier a bucket of `tier` is built from. */
|
|
23
|
+
export declare function childTierOf(tier: "1h" | "1d"): RollupTier;
|
|
24
|
+
/** Quiet time after a bucket closes before it is rolled up (late writers). */
|
|
25
|
+
export declare const ROLLUP_GRACE_MS: Readonly<Record<RollupTier, number>>;
|
|
@@ -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-Ct88catN.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
9
9
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Bi as isKeychainStoredField, Br as DeviceType, Bt as defineExtensionSlotProvider, C as DAY_NAMES, Di as collectZodSecretPaths, F as FieldClaimModeSchema, Fn as normalizeUnit, Ft as createDeviceExtensionProvider, Hi as isSecretMarker, Hr as BaseAddon, I as FieldClaimSchema, Jt as deviceStateCapability, K as MINUTES_PER_DAY, Kt as deviceManagerCapability, M as DeviceStatusSchema, Mi as defineRecordKinds, N as DeviceTombstoneSchema, Qt as enumerateSchemaFields, Ri as isDeviceConfigCap, Rn as parseStreamParamsFormPatch, Rr as DeviceFeature, St as buildStreamParamsConfigSchema, Tt as canonicalIconKey, Ui as isSecretMarkerLike, Vi as isSecretClear, Vr as errMsg, Wt as deviceExtensionCapability, Yt as deviceStatusCapability, Zt as enumerateItemArrayFields, bn as legacyAutoLinkIds, c as CAMERA_SWITCH_ORDER, ca as sleep$1, cr as siteZoneKey, da as transformSecretWrite, et as STREAM_PROFILE_META, fa as userError, hi as SECRET_CLEAR, ia as resolveSecretMarkers, ma as EventCategory, nr as runtimeStatePolicyFor, oa as secretTreeFromPaths, r as ALL_CAPABILITY_DEFINITIONS, sn as formatMinutes, tn as expandContainer, u as CAP_NAMES_WITH_STATUS, ua as toSecretFieldView, vi as WELL_KNOWN_TAB_MAP, wn as locationIconKey, zr as DeviceRole } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
4
4
|
import { t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
@@ -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-Ct88catN.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.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 { Hr as BaseAddon, Tn as logDestinationCapability } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.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-
|
|
6
|
+
const require_dist = require("../../dist-Ct88catN.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
|
-
const require_device_ca = require("../../device-ca-
|
|
9
|
-
const require_phase6_declare_gate = require("../../phase6-declare-gate-
|
|
10
|
-
const require_constants = require("../../constants-
|
|
8
|
+
const require_device_ca = require("../../device-ca-75rt3U_U.js");
|
|
9
|
+
const require_phase6_declare_gate = require("../../phase6-declare-gate-C6WqagkC.js");
|
|
10
|
+
const require_constants = require("../../constants-BPWA-r-Y.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 { B as
|
|
1
|
+
import { B as KEYCHAIN_RESET_TRIGGER_ACTOR, H as KeychainResetRecordSchema, Hr as BaseAddon, Ii as formatSecretScope, Mi as defineRecordKinds, Qi as parseSecretRef, V as KeychainAuditEntrySchema, Yi as normalizeSecretOwner, ma as EventCategory, vn as keychainAdminCapability, yn as keychainCapability } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-
|
|
4
|
-
import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-
|
|
5
|
-
import { a as MESH_CA_KEY_REF } from "../../constants-
|
|
3
|
+
import { d as JWT_SIGNING_KEY_REF, n as DEVICE_CA_KEY_REF, p as SYSTEM_SECRET_OWNER } from "../../device-ca-D05nqNXE.mjs";
|
|
4
|
+
import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-BJplW6tX.mjs";
|
|
5
|
+
import { a as MESH_CA_KEY_REF } from "../../constants-gzGZbnwO.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
|
require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-Ct88catN.js");
|
|
4
4
|
//#region src/builtins/liveness-monitor/liveness-checks.ts
|
|
5
5
|
var NO_DEVICES = "liveness:no-devices";
|
|
6
6
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as BaseAddon, Oi as createEvent, Vr as errMsg, X as RecordingStatusSchema, Y as RECORDING_SOURCE_CAMSTACK_ADDON, ma as EventCategory } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
//#region src/builtins/liveness-monitor/liveness-checks.ts
|
|
3
3
|
var NO_DEVICES = "liveness:no-devices";
|
|
4
4
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
@@ -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-Ct88catN.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
|
|
9
9
|
const require_ms$1 = require("../../ms-LB3giGoU.js");
|
|
10
|
-
const require_device_ca = require("../../device-ca-
|
|
11
|
-
const require_phase6_declare_gate = require("../../phase6-declare-gate-
|
|
10
|
+
const require_device_ca = require("../../device-ca-75rt3U_U.js");
|
|
11
|
+
const require_phase6_declare_gate = require("../../phase6-declare-gate-C6WqagkC.js");
|
|
12
12
|
let zod = require("zod");
|
|
13
13
|
let node_crypto = require("node:crypto");
|
|
14
14
|
node_crypto = require_chunk.__toESM(node_crypto);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { E as DEVICE_NONCE_TTL_MS, Gi as makeSecretMarker, Hi as isSecretMarker, Hr as BaseAddon, Mi as defineRecordKinds, T as DEVICE_ENROLLMENT_TTL_MS, Ut as deviceCredentialsCapability, a as ApiKeyRecordSchema, bt as buildDeviceEnrollmentLink, ct as TokenScopeSchema, fa as userError, ht as authProviderCapability, lt as UserRecordSchema, on as formatDeviceRevoker, rt as SsoBridgeClaimsSchema, tt as ScopedTokenSchema, xt as buildDeviceSignatureMessage, yr as userManagementCapability } from "../../dist-DV2ll9Hi.mjs";
|
|
3
3
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
4
4
|
import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
|
|
5
5
|
import { t as require_ms } from "../../ms-CgH2OFlD.mjs";
|
|
6
|
-
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-
|
|
7
|
-
import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-
|
|
6
|
+
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-D05nqNXE.mjs";
|
|
7
|
+
import { t as resolvePhase6UseRecordsPathForHub } from "../../phase6-declare-gate-BJplW6tX.mjs";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import * as crypto$1 from "node:crypto";
|
|
10
10
|
import { X509Certificate, createHash, randomUUID, timingSafeEqual } from "node:crypto";
|
|
@@ -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_hub_mdns_ciao = require("../../hub-mdns-ciao-
|
|
3
|
+
const require_dist = require("../../dist-Ct88catN.js");
|
|
4
|
+
const require_hub_mdns_ciao = require("../../hub-mdns-ciao-DAU1WttG.js");
|
|
5
5
|
let zod = require("zod");
|
|
6
6
|
let node_net = require("node:net");
|
|
7
7
|
let node_os = require("node:os");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { P as readLanHttpState, a as storeUploadedCertificate, d as servedHttpsLeafFingerprint, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, v as writeExtraSans, w as ensureTlsCert } from "../../hub-mdns-ciao-
|
|
1
|
+
import { Cn as localNetworkCapability, Et as checkRoleAddress, Hr as BaseAddon, J as NetworkTunnelStartedDataSchema, Jn as resolveAppConnections, Qn as resolveHubAddressRoles, R as HUB_MDNS_SERVICE_TYPE, l as CAMSTACK_APP_LINK_ORIGIN, ma as EventCategory, pn as isDefaultAppConnectionEndpoint, tr as resolveNotificationTapAddress, un as isAppLinkBase, xr as validateCustomAddress, z as HUB_MDNS_TXT_KEYS, zn as pickAppLinkHub } from "../../dist-DV2ll9Hi.mjs";
|
|
2
|
+
import { P as readLanHttpState, a as storeUploadedCertificate, d as servedHttpsLeafFingerprint, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, v as writeExtraSans, w as ensureTlsCert } from "../../hub-mdns-ciao-BPOg2iyc.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { isIP } from "node:net";
|
|
5
5
|
import * as os$1 from "node:os";
|
|
@@ -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-Ct88catN.js");
|
|
7
7
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
8
8
|
/**
|
|
9
9
|
* Loki rejects a label name that is not a valid Prometheus label
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as BaseAddon, Tn as logDestinationCapability } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
3
3
|
/**
|
|
4
4
|
* Loki rejects a label name that is not a valid Prometheus label
|
|
@@ -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-Ct88catN.js");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
|
8
8
|
let node_util = require("node:util");
|
|
9
9
|
let node_os = require("node:os");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as BaseAddon, Kn as reducePoints, Oi as createEvent, Vr as errMsg, Yn as resolveBucketMs, an as foldSnapshotByFunction, jn as metricsProviderCapability, ma as EventCategory } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { access, readFile, readdir } from "node:fs/promises";
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import * as os$1 from "node:os";
|
|
@@ -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-Ct88catN.js");
|
|
7
7
|
let node_util = require("node:util");
|
|
8
8
|
let node_os = require("node:os");
|
|
9
9
|
node_os = require_chunk.__toESM(node_os);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { Hr as BaseAddon, Pi as emitReadiness, Vn as platformProbeCapability, Vr as errMsg, Xt as enumerateInferenceDevices, ar as scoreRuntimes, ma as EventCategory } from "../../dist-DV2ll9Hi.mjs";
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import * as os$1 from "node:os";
|
|
5
5
|
import * as fs 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-Ct88catN.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 { Hr as BaseAddon, Qr as InvalidRecordError, Wn as recordEntriesCapability, _i as UnknownRecordKindError } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/builtins/record-entries/entries-service.ts
|
|
@@ -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-Ct88catN.js");
|
|
7
7
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
8
8
|
/**
|
|
9
9
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as BaseAddon, ma as EventCategory } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
//#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
|
|
3
3
|
/**
|
|
4
4
|
* Reconcile the durable `enabledProviders` set against authoritative
|
|
@@ -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-Ct88catN.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 { An as memoizePinnedFfmpeg, Br as DeviceType, Hr as BaseAddon, Rr as DeviceFeature, Vr as errMsg, Vt as deriveBatteryPresence, _r as streamQualityLabel, _t as bareAddonId, lr as snapshotCapability, ma as EventCategory, qi as nodePin, s as BatteryStatusSchema, vt as batteryCapability } from "../../dist-DV2ll9Hi.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-Ct88catN.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let node_fs_promises = require("node:fs/promises");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hr as BaseAddon, hr as storageProviderCapability, in as filesystemBrowseCapability } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
|
|
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-mwCBe3Vr.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 { A as
|
|
2
|
+
import { A as SQLITE_MMAP_CEILING_BYTES, B as SQLITE_SLOW_CALL_MS, F as sqlitePageCacheKibFor, H as sqliteEngineStorm, I as SQLITE_ENGINE_STORM_WALL_SHARE, L as SQLITE_PROFILE_REPORT_FLOOR_MS, M as SQLITE_PAGE_CACHE_CEILING_KIB, N as SQLITE_PAGE_CACHE_FLOOR_KIB, P as sqliteMmapSizeFor, R as SQLITE_PROFILE_REPORT_INTERVAL_MS, V as SqliteOpProfiler, a as WalMaintenance, i as WAL_MAINTENANCE_INTERVAL_MS, j as SQLITE_MMAP_FLOOR_BYTES, k as SQLITE_JOURNAL_SIZE_LIMIT_BYTES, l as SqliteSettingsBackend, n as WAL_HIGH_WATER_BYTES, r as WAL_IDLE_QUIET_MS, t as WAL_CHECKPOINT_BUSY_TIMEOUT_MS, z as SQLITE_PROFILE_TOP_N } from "../../wal-maintenance-BineOch3.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 {
|
|
@@ -23,11 +23,9 @@ import type { SqliteVecVectorIndex } from "./vector-index-vec.js";
|
|
|
23
23
|
* of its database that the nightly backup archives in place of the live files
|
|
24
24
|
* (D693).
|
|
25
25
|
*
|
|
26
|
-
* It ALSO serves `vector-store` (singleton, internal), from the
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* runner process, to reach a database this addon already has open. The
|
|
30
|
-
* capability is what keeps the backend swappable; the package never was.
|
|
26
|
+
* It ALSO serves `vector-store` (singleton, internal), from the **events**
|
|
27
|
+
* file's worker thread (sqlite-vec loaded there). The capability is what keeps
|
|
28
|
+
* the backend swappable; the package never was.
|
|
31
29
|
*/
|
|
32
30
|
export declare class SqliteSettingsAddon extends BaseAddon {
|
|
33
31
|
private settingsFile;
|
|
@@ -62,7 +60,7 @@ export declare class SqliteSettingsAddon extends BaseAddon {
|
|
|
62
60
|
getBackend(): SqliteSettingsBackend | null;
|
|
63
61
|
/** The placement router; null before `onInitialize`. */
|
|
64
62
|
getRouter(): PlacementRouter | null;
|
|
65
|
-
/** Exposed for tests;
|
|
63
|
+
/** Exposed for tests; vectors are served from the events file (P5). */
|
|
66
64
|
getVectorIndex(): SqliteVecVectorIndex | null;
|
|
67
65
|
}
|
|
68
66
|
export default SqliteSettingsAddon;
|
|
@@ -3,9 +3,9 @@ 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-Ct88catN.js");
|
|
7
7
|
const require_retired_settings_keys = require("../../retired-settings-keys-D_VwZiDt.js");
|
|
8
|
-
const require_wal_maintenance = require("../../wal-maintenance-
|
|
8
|
+
const require_wal_maintenance = require("../../wal-maintenance-mwCBe3Vr.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
11
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1812,11 +1812,9 @@ var DATABASE_FILE_NAMES = {
|
|
|
1812
1812
|
* of its database that the nightly backup archives in place of the live files
|
|
1813
1813
|
* (D693).
|
|
1814
1814
|
*
|
|
1815
|
-
* It ALSO serves `vector-store` (singleton, internal), from the
|
|
1816
|
-
*
|
|
1817
|
-
*
|
|
1818
|
-
* runner process, to reach a database this addon already has open. The
|
|
1819
|
-
* capability is what keeps the backend swappable; the package never was.
|
|
1815
|
+
* It ALSO serves `vector-store` (singleton, internal), from the **events**
|
|
1816
|
+
* file's worker thread (sqlite-vec loaded there). The capability is what keeps
|
|
1817
|
+
* the backend swappable; the package never was.
|
|
1820
1818
|
*/
|
|
1821
1819
|
var SqliteSettingsAddon = class extends require_dist.BaseAddon {
|
|
1822
1820
|
settingsFile = null;
|
|
@@ -1864,7 +1862,7 @@ var SqliteSettingsAddon = class extends require_dist.BaseAddon {
|
|
|
1864
1862
|
livePath: settingsPath,
|
|
1865
1863
|
thread: "main",
|
|
1866
1864
|
autoVacuum: "none",
|
|
1867
|
-
loadVectorExtension:
|
|
1865
|
+
loadVectorExtension: false
|
|
1868
1866
|
}, deps);
|
|
1869
1867
|
if (!(settings instanceof InlineOwnedFile)) throw new Error("sqlite-settings: the settings file must be served on the main thread");
|
|
1870
1868
|
this.settingsFile = settings;
|
|
@@ -1877,8 +1875,7 @@ var SqliteSettingsAddon = class extends require_dist.BaseAddon {
|
|
|
1877
1875
|
logger: this.ctx.logger.child("Placement")
|
|
1878
1876
|
});
|
|
1879
1877
|
this.router = router;
|
|
1880
|
-
const
|
|
1881
|
-
if (vectorIndex === null) throw new Error("vector-store: the settings file has no vector index");
|
|
1878
|
+
const vectorProvider = require_wal_maintenance.vectorProviderOfOwnedFile(() => router.recordsFileFor("events"));
|
|
1882
1879
|
const records = new RecordsProvider(router, this.ctx.logger.child("Records"));
|
|
1883
1880
|
await records.init();
|
|
1884
1881
|
this.startRecordsSweep(records);
|
|
@@ -1894,7 +1891,7 @@ var SqliteSettingsAddon = class extends require_dist.BaseAddon {
|
|
|
1894
1891
|
},
|
|
1895
1892
|
{
|
|
1896
1893
|
capability: require_dist.vectorStoreCapability,
|
|
1897
|
-
provider:
|
|
1894
|
+
provider: vectorProvider
|
|
1898
1895
|
},
|
|
1899
1896
|
{
|
|
1900
1897
|
capability: require_dist.databaseSnapshotCapability,
|
|
@@ -1963,19 +1960,19 @@ var SqliteSettingsAddon = class extends require_dist.BaseAddon {
|
|
|
1963
1960
|
getRouter() {
|
|
1964
1961
|
return this.router;
|
|
1965
1962
|
}
|
|
1966
|
-
/** Exposed for tests;
|
|
1963
|
+
/** Exposed for tests; vectors are served from the events file (P5). */
|
|
1967
1964
|
getVectorIndex() {
|
|
1968
|
-
return
|
|
1965
|
+
return null;
|
|
1969
1966
|
}
|
|
1970
1967
|
};
|
|
1971
|
-
/** How a non-settings file is opened: its own worker; `events`
|
|
1968
|
+
/** How a non-settings file is opened: its own worker; `events` loads sqlite-vec. */
|
|
1972
1969
|
function workerSpec(databaseId, livePath) {
|
|
1973
1970
|
return {
|
|
1974
1971
|
databaseId,
|
|
1975
1972
|
livePath,
|
|
1976
1973
|
thread: "worker",
|
|
1977
1974
|
autoVacuum: "incremental",
|
|
1978
|
-
loadVectorExtension:
|
|
1975
|
+
loadVectorExtension: databaseId === "events"
|
|
1979
1976
|
};
|
|
1980
1977
|
}
|
|
1981
1978
|
//#endregion
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $ as STORAGE_ADMIN_SCOPED_BASES, $i as parseSettingsArrayAdoptsFrom, $r as NoCallerError, Gn as recordsCapability, Hr as BaseAddon, It as dataStoreProviderCapability, Jr as DeclarationRefusedError, Lt as databaseSnapshotCapability, Q as STORAGE_ADMIN_MOVED_COLLECTIONS, S as DATA_STORE_DATABASES, Vr as errMsg, Yi as normalizeSecretOwner, _i as UnknownRecordKindError, _t as bareAddonId, b as DATABASE_SNAPSHOT_SUFFIX, dr as storageAdminCapability, ea as parseSettingsBrokersAdoptsFrom, ii as RECORD_SWEEP_INTERVAL_MS, si as RUNTIME_DEFAULTS, ui as RecordKindDeclarationSchema, wr as vectorStoreCapability, x as DATABASE_SNAPSHOT_TIMEOUT_MS, y as DATABASE_SNAPSHOT_PARTIAL_SUFFIX } from "../../dist-DV2ll9Hi.mjs";
|
|
2
2
|
import { i as retiredKeyStoreOf, n as purgeRetiredSettingsKeys } from "../../retired-settings-keys-Bhwe4ymb.mjs";
|
|
3
|
-
import { C as
|
|
3
|
+
import { C as RecordsEngine, D as callVector, E as callRecords, O as controlTargetOf, S as trustResult, T as callData, _ as collectTransferables, a as WalMaintenance, c as vectorProviderOfOwnedFile, d as CrossDatabaseTransactError, f as DatabaseBusyError, l as SqliteSettingsBackend, m as rehydrateError, o as createVectorIndex, p as DuplicatePlacementError, s as vectorProviderOf, u as CollectionPlacementError, v as isFileHostMessage, w as callControl } from "../../wal-maintenance-BineOch3.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";
|
|
@@ -1806,11 +1806,9 @@ var DATABASE_FILE_NAMES = {
|
|
|
1806
1806
|
* of its database that the nightly backup archives in place of the live files
|
|
1807
1807
|
* (D693).
|
|
1808
1808
|
*
|
|
1809
|
-
* It ALSO serves `vector-store` (singleton, internal), from the
|
|
1810
|
-
*
|
|
1811
|
-
*
|
|
1812
|
-
* runner process, to reach a database this addon already has open. The
|
|
1813
|
-
* capability is what keeps the backend swappable; the package never was.
|
|
1809
|
+
* It ALSO serves `vector-store` (singleton, internal), from the **events**
|
|
1810
|
+
* file's worker thread (sqlite-vec loaded there). The capability is what keeps
|
|
1811
|
+
* the backend swappable; the package never was.
|
|
1814
1812
|
*/
|
|
1815
1813
|
var SqliteSettingsAddon = class extends BaseAddon {
|
|
1816
1814
|
settingsFile = null;
|
|
@@ -1858,7 +1856,7 @@ var SqliteSettingsAddon = class extends BaseAddon {
|
|
|
1858
1856
|
livePath: settingsPath,
|
|
1859
1857
|
thread: "main",
|
|
1860
1858
|
autoVacuum: "none",
|
|
1861
|
-
loadVectorExtension:
|
|
1859
|
+
loadVectorExtension: false
|
|
1862
1860
|
}, deps);
|
|
1863
1861
|
if (!(settings instanceof InlineOwnedFile)) throw new Error("sqlite-settings: the settings file must be served on the main thread");
|
|
1864
1862
|
this.settingsFile = settings;
|
|
@@ -1871,8 +1869,7 @@ var SqliteSettingsAddon = class extends BaseAddon {
|
|
|
1871
1869
|
logger: this.ctx.logger.child("Placement")
|
|
1872
1870
|
});
|
|
1873
1871
|
this.router = router;
|
|
1874
|
-
const
|
|
1875
|
-
if (vectorIndex === null) throw new Error("vector-store: the settings file has no vector index");
|
|
1872
|
+
const vectorProvider = vectorProviderOfOwnedFile(() => router.recordsFileFor("events"));
|
|
1876
1873
|
const records = new RecordsProvider(router, this.ctx.logger.child("Records"));
|
|
1877
1874
|
await records.init();
|
|
1878
1875
|
this.startRecordsSweep(records);
|
|
@@ -1888,7 +1885,7 @@ var SqliteSettingsAddon = class extends BaseAddon {
|
|
|
1888
1885
|
},
|
|
1889
1886
|
{
|
|
1890
1887
|
capability: vectorStoreCapability,
|
|
1891
|
-
provider:
|
|
1888
|
+
provider: vectorProvider
|
|
1892
1889
|
},
|
|
1893
1890
|
{
|
|
1894
1891
|
capability: databaseSnapshotCapability,
|
|
@@ -1957,19 +1954,19 @@ var SqliteSettingsAddon = class extends BaseAddon {
|
|
|
1957
1954
|
getRouter() {
|
|
1958
1955
|
return this.router;
|
|
1959
1956
|
}
|
|
1960
|
-
/** Exposed for tests;
|
|
1957
|
+
/** Exposed for tests; vectors are served from the events file (P5). */
|
|
1961
1958
|
getVectorIndex() {
|
|
1962
|
-
return
|
|
1959
|
+
return null;
|
|
1963
1960
|
}
|
|
1964
1961
|
};
|
|
1965
|
-
/** How a non-settings file is opened: its own worker; `events`
|
|
1962
|
+
/** How a non-settings file is opened: its own worker; `events` loads sqlite-vec. */
|
|
1966
1963
|
function workerSpec(databaseId, livePath) {
|
|
1967
1964
|
return {
|
|
1968
1965
|
databaseId,
|
|
1969
1966
|
livePath,
|
|
1970
1967
|
thread: "worker",
|
|
1971
1968
|
autoVacuum: "incremental",
|
|
1972
|
-
loadVectorExtension:
|
|
1969
|
+
loadVectorExtension: databaseId === "events"
|
|
1973
1970
|
};
|
|
1974
1971
|
}
|
|
1975
1972
|
//#endregion
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IScopedLogger, IVectorStoreProvider } from "@camstack/types";
|
|
2
|
+
import type { OwnedSqliteFile } from "./owned-sqlite-file.js";
|
|
2
3
|
import type { SqliteSettingsBackend } from "./sqlite-settings-backend.js";
|
|
3
4
|
import { SqliteVecVectorIndex } from "./vector-index-vec.js";
|
|
4
5
|
/**
|
|
@@ -17,6 +18,11 @@ import { SqliteVecVectorIndex } from "./vector-index-vec.js";
|
|
|
17
18
|
*/
|
|
18
19
|
export declare function createVectorIndex(backend: SqliteSettingsBackend, logger: IScopedLogger): SqliteVecVectorIndex;
|
|
19
20
|
/**
|
|
21
|
+
* `vector-store` served from the events worker (P5): every call opens or reuses
|
|
22
|
+
* `events.db` with sqlite-vec loaded there, not on the settings thread.
|
|
23
|
+
*/
|
|
24
|
+
export declare function vectorProviderOfOwnedFile(openEvents: () => Promise<OwnedSqliteFile>): IVectorStoreProvider;
|
|
25
|
+
/**
|
|
20
26
|
* The `vector-store` provider surface over one sqlite-vec index. Extracted
|
|
21
27
|
* from the addon so the main thread (settings) and the file-host worker
|
|
22
28
|
* (events) serve the SAME mapping.
|
|
@@ -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-Ct88catN.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 { $
|
|
1
|
+
import { $n as resolveLocationMode, Hi as isSecretMarker, Hr as BaseAddon, Ji as normalizeNodeId, Mi as defineRecordKinds, Mn as modeMayWrite, On as mayReadLocation, Tr as withLocationMode, W as LegacyStorageLocationDefaultSchema, Xi as parseJsonObject, ai as REDACTED_SECRET, at as StorageLocationModeSchema, cn as gbToBytes, da as transformSecretWrite, en as evictionPolicyOfLocation, fr as storageCapability, ia as resolveSecretMarkers, it as StorageCleanupJobSchema, kn as mayWriteToLocation, ma as EventCategory, mn as isLocationEnabled, oa as secretTreeFromPaths, or as settingsStoreCapability, ot as StorageLocationTypeSchema, pr as storageMigrationCapability, st as StorageMigrationJobSchema, wi as collectSecretConfigKeys, xn as legacyModeOf } from "../../dist-DV2ll9Hi.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";
|