@camstack/system 1.2.457 → 1.2.459
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon-runner.js +163 -27
- package/dist/addon-runner.mjs +193 -57
- package/dist/{agent-https-CoyOZ3pC.js → agent-https-Dnr_nIVx.js} +3 -723
- package/dist/{agent-https-CK9Z4sSR.mjs → agent-https-Iw3RSQup.mjs} +4 -616
- 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 +5 -7
- package/dist/builtins/alerts/alerts.addon.mjs +5 -7
- package/dist/builtins/alerts/record-kinds.d.ts +1 -1
- 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 +242 -4
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +240 -2
- package/dist/builtins/calendars/calendars.addon.js +2 -10
- package/dist/builtins/calendars/calendars.addon.mjs +2 -3
- package/dist/builtins/calendars/record-kinds.d.ts +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 +4 -6
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +4 -6
- package/dist/builtins/device-history/device-history.addon.d.ts +13 -0
- package/dist/builtins/device-history/device-history.addon.js +296 -233
- package/dist/builtins/device-history/device-history.addon.mjs +296 -233
- package/dist/builtins/device-history/ingest/producer-ingest.d.ts +11 -1
- package/dist/builtins/device-manager/device-manager.addon.js +2 -4
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -4
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/keychain/index.js +41 -43
- package/dist/builtins/keychain/index.mjs +41 -43
- 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 +24 -40
- package/dist/builtins/local-auth/local-auth.addon.mjs +24 -40
- 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/native-metrics/node-metrics-history-recorder.d.ts +1 -2
- package/dist/builtins/platform-probe/coral-accelerators.d.ts +26 -9
- package/dist/builtins/platform-probe/index.js +11 -68
- package/dist/builtins/platform-probe/index.mjs +11 -68
- 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/file-host-protocol.d.ts +0 -15
- 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/owned-sqlite-file.d.ts +0 -44
- package/dist/builtins/sqlite-storage/records/records-catalog.d.ts +0 -2
- package/dist/builtins/sqlite-storage/records/records-engine-types.d.ts +0 -21
- package/dist/builtins/sqlite-storage/records/records-engine.d.ts +3 -20
- package/dist/builtins/sqlite-storage/records/records-provider.d.ts +4 -18
- package/dist/builtins/sqlite-storage/records/records-sql.d.ts +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +0 -17
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +21 -196
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +21 -196
- package/dist/builtins/sqlite-storage/storage-admin-provider.d.ts +6 -14
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +2 -2
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +7 -9
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +7 -9
- package/dist/builtins/system-config/system-config.addon.js +667 -40
- package/dist/builtins/system-config/system-config.addon.mjs +625 -15
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{composition-sources-B_jeZDRJ.mjs → composition-sources-DNRZWR1j.mjs} +1 -1
- package/dist/{composition-sources-qKyvMAvc.js → composition-sources-b0e_2I-D.js} +1 -1
- package/dist/{constants-B_X9cWEK.js → constants-6OeJiZgi.js} +1 -1
- package/dist/{constants-cxKcZRMi.mjs → constants-BnkOdj9Q.mjs} +1 -1
- package/dist/coral-accelerators-Bi_c3Rft.js +175 -0
- package/dist/coral-accelerators-DcnZvctM.mjs +162 -0
- package/dist/{device-ca-BB6nHAL5.mjs → device-ca-Bnkw8GyU.mjs} +1 -1
- package/dist/{device-ca-CVK3YcR_.js → device-ca-CPTDs--d.js} +1 -1
- package/dist/{dist-C89nqNnn.js → dist-Bn-RNanh.js} +84 -140
- package/dist/{dist-Dhux90yB.mjs → dist-Wy8cTxg6.mjs} +85 -123
- package/dist/file-host-worker.js +1 -1
- package/dist/file-host-worker.mjs +1 -1
- package/dist/{hub-mdns-ciao-B8olZqqd.mjs → hub-mdns-ciao-CJu0nhla.mjs} +2 -2
- package/dist/{hub-mdns-ciao-DB1Y9agt.js → hub-mdns-ciao-CTBTlia4.js} +2 -2
- package/dist/index.js +32 -58
- package/dist/index.mjs +16 -42
- package/dist/kernel/hwaccel/hwaccel-resolver.d.ts +7 -3
- package/dist/{restore-archive-DyOaPeAr.mjs → restore-archive-CmP-iiG9.mjs} +84 -331
- package/dist/{restore-archive-4DOUR5Gu.js → restore-archive-DM1OBYq4.js} +89 -342
- package/dist/{wal-maintenance-DVN-DiVP.js → wal-maintenance-DUHEp_09.js} +0 -0
- package/dist/{wal-maintenance-BMiX6UIa.mjs → wal-maintenance-NKbwWovZ.mjs} +0 -0
- package/package.json +1 -1
- package/dist/builtins/records/legacy-table-row-count.d.ts +0 -5
- package/dist/builtins/records/phase6-declare-gate.d.ts +0 -28
- package/dist/builtins/sqlite-storage/records/count-settings-array-legacy.d.ts +0 -5
- package/dist/builtins/sqlite-storage/records/count-settings-brokers-legacy.d.ts +0 -6
- package/dist/phase6-declare-gate-BO-_jLh_.js +0 -98
- package/dist/phase6-declare-gate-x9ZCbQJP.mjs +0 -93
|
@@ -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-Bn-RNanh.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 { ni as BaseAddon, zn as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { ni as BaseAddon, zn as logDestinationCapability } from "../../dist-Wy8cTxg6.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-Bn-RNanh.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 { Gn as metricsProviderCapability, Hi as createEvent,
|
|
1
|
+
import { Gn as metricsProviderCapability, Hi as createEvent, Ta as EventCategory, _t as UNATTRIBUTED_BUCKET_KEY, gn as foldSnapshotByFunction, lr as resolveBucketMs, ni as BaseAddon, or as reducePoints, rt as ROOT_BUCKET_KEY, ti as errMsg } from "../../dist-Wy8cTxg6.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";
|
|
@@ -35,8 +35,7 @@ export declare const NODE_GPU_TEMPERATURE_KEY: MetricsKey<"node-gpu-temperature"
|
|
|
35
35
|
export declare const NODE_CONTAINER_CURRENT_KEY: MetricsKey<"container-current-mib">;
|
|
36
36
|
/**
|
|
37
37
|
* The PID-scoped keys of the earlier build. NOT written any more; kept only so
|
|
38
|
-
*
|
|
39
|
-
* names what it once wrote.
|
|
38
|
+
* a spec can pin that nothing writes them again.
|
|
40
39
|
*/
|
|
41
40
|
export declare const NODE_PROCESS_CPU_KEY: MetricsKey<"process-cpu-percent">;
|
|
42
41
|
export declare const NODE_PROCESS_RSS_KEY: MetricsKey<"process-rss-mib">;
|
|
@@ -1,22 +1,39 @@
|
|
|
1
1
|
import type { CoralInfo } from "@camstack/types";
|
|
2
2
|
/**
|
|
3
|
-
* Filesystem seam for Coral
|
|
4
|
-
* `AcceleratorFs` pattern in `intel-accelerators.ts` so the classifier
|
|
5
|
-
* pure, unit-testable function over injected reads.
|
|
3
|
+
* Filesystem seam for Coral Edge TPU detection (USB and PCIe/M.2) — mirrors
|
|
4
|
+
* the `AcceleratorFs` pattern in `intel-accelerators.ts` so the classifier
|
|
5
|
+
* stays a pure, unit-testable function over injected reads.
|
|
6
6
|
*/
|
|
7
7
|
export interface CoralFs {
|
|
8
8
|
/** USB device directory names under `/sys/bus/usb/devices` (e.g. `2-4`). */
|
|
9
9
|
listUsbDevices(): readonly string[];
|
|
10
10
|
/** Read a `<sysfsNode>/<attr>` value (idVendor / idProduct), trimmed. */
|
|
11
11
|
readUsbAttr(device: string, attr: string): string;
|
|
12
|
-
/**
|
|
12
|
+
/** PCI function names under `/sys/bus/pci/devices` (e.g. `0000:03:00.0`). */
|
|
13
|
+
listPciDevices(): readonly string[];
|
|
14
|
+
/** Read a PCI function's `vendor` / `device` attribute (e.g. `0x1ac1`), trimmed. */
|
|
15
|
+
readPciAttr(device: string, attr: string): string;
|
|
16
|
+
/** Entry names under `/sys/class/apex` (the gasket/apex driver: `apex_0`, …). */
|
|
17
|
+
listApexClass(): readonly string[];
|
|
18
|
+
/** Whether this process can open a device node for read AND write. */
|
|
19
|
+
canOpen(path: string): boolean;
|
|
20
|
+
/** Whether a filesystem path exists (the libedgetpu delegate, `/dev/apex_N`). */
|
|
13
21
|
exists(path: string): boolean;
|
|
14
22
|
}
|
|
15
23
|
/**
|
|
16
|
-
* Detect
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
24
|
+
* Detect Coral Edge TPUs on USB and PCIe/M.2.
|
|
25
|
+
*
|
|
26
|
+
* - USB: every matching USB device counts (multiple Corals run concurrently).
|
|
27
|
+
* - PCIe: the apex driver's units, each usable only if its device node opens;
|
|
28
|
+
* a Coral PCI function the driver did not bind is `driver-missing`.
|
|
29
|
+
* - Fallback: when NO Coral signal of either bus is visible but the libedgetpu
|
|
30
|
+
* delegate is installed (a container whose `/sys` USB view is limited), one
|
|
31
|
+
* USB Coral is assumed — never when a PCI Coral was seen, since the delegate
|
|
32
|
+
* then says nothing about USB.
|
|
33
|
+
*
|
|
34
|
+
* Returns `null` only when no Coral was found at all; a present-but-unusable
|
|
35
|
+
* Coral is reported with its typed reason, never as absent (D393/D315).
|
|
21
36
|
*/
|
|
22
37
|
export declare function classifyCoralAccelerator(fsx: CoralFs): CoralInfo | null;
|
|
38
|
+
/** The real filesystem view: `/sys` for enumeration, `/dev` for access. */
|
|
39
|
+
export declare const nodeCoralFs: CoralFs;
|
|
@@ -3,62 +3,14 @@ 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-Bn-RNanh.js");
|
|
7
|
+
const require_coral_accelerators = require("../../coral-accelerators-Bi_c3Rft.js");
|
|
7
8
|
let node_util = require("node:util");
|
|
8
9
|
let node_os = require("node:os");
|
|
9
10
|
node_os = require_chunk.__toESM(node_os);
|
|
10
11
|
let node_fs = require("node:fs");
|
|
11
12
|
node_fs = require_chunk.__toESM(node_fs);
|
|
12
13
|
let node_child_process = require("node:child_process");
|
|
13
|
-
//#region src/builtins/platform-probe/coral-accelerators.ts
|
|
14
|
-
/**
|
|
15
|
-
* Coral USB Edge TPU USB identifiers.
|
|
16
|
-
*
|
|
17
|
-
* The device enumerates as `1a6e:089a` (Global Unichip) BEFORE the libedgetpu
|
|
18
|
-
* firmware loads, then re-enumerates as `18d1:9302` (Google) AFTER. Either id
|
|
19
|
-
* means a Coral is physically attached, so both count as a positive signal.
|
|
20
|
-
*/
|
|
21
|
-
var CORAL_USB_IDS = [{
|
|
22
|
-
vendor: "1a6e",
|
|
23
|
-
product: "089a"
|
|
24
|
-
}, {
|
|
25
|
-
vendor: "18d1",
|
|
26
|
-
product: "9302"
|
|
27
|
-
}];
|
|
28
|
-
/**
|
|
29
|
-
* Default install path of the libedgetpu delegate on the hub, provisioned
|
|
30
|
-
* out-of-band by `/data/deps/edgetpu-install.sh` (it is a system shared
|
|
31
|
-
* library, not a pip package). Overridable via `CAMSTACK_EDGETPU_LIB` — kept in
|
|
32
|
-
* sync with the Python pool's own default in `inference_pool.py`.
|
|
33
|
-
*/
|
|
34
|
-
var DEFAULT_EDGETPU_LIB = "/data/deps/edgetpu/lib/libedgetpu.so.1";
|
|
35
|
-
/**
|
|
36
|
-
* Detect a Coral USB Edge TPU. Present when EITHER a matching USB device is
|
|
37
|
-
* enumerated OR the libedgetpu delegate is installed (the delegate is the
|
|
38
|
-
* hub-provisioned runtime prerequisite; on a container whose `/sys` USB view is
|
|
39
|
-
* limited, its presence is a reliable operator-intent signal that the Coral is
|
|
40
|
-
* wired through). Returns `null` when neither signal is found.
|
|
41
|
-
*/
|
|
42
|
-
function classifyCoralAccelerator(fsx) {
|
|
43
|
-
let count = 0;
|
|
44
|
-
for (const device of fsx.listUsbDevices()) {
|
|
45
|
-
const vendor = fsx.readUsbAttr(device, "idVendor").toLowerCase();
|
|
46
|
-
const product = fsx.readUsbAttr(device, "idProduct").toLowerCase();
|
|
47
|
-
if (CORAL_USB_IDS.some((id) => id.vendor === vendor && id.product === product)) count++;
|
|
48
|
-
}
|
|
49
|
-
if (count > 0) return {
|
|
50
|
-
type: "coral-edgetpu",
|
|
51
|
-
bus: "usb",
|
|
52
|
-
count
|
|
53
|
-
};
|
|
54
|
-
const libPath = process.env["CAMSTACK_EDGETPU_LIB"] ?? DEFAULT_EDGETPU_LIB;
|
|
55
|
-
if (fsx.exists(libPath)) return {
|
|
56
|
-
type: "coral-edgetpu",
|
|
57
|
-
bus: "usb"
|
|
58
|
-
};
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
14
|
//#region src/builtins/platform-probe/amd-npu.ts
|
|
63
15
|
var amd_npu_exports = /* @__PURE__ */ require_chunk.__exportAll({
|
|
64
16
|
classifyAmdNpu: () => classifyAmdNpu,
|
|
@@ -462,24 +414,15 @@ var PlatformScorer = class {
|
|
|
462
414
|
} });
|
|
463
415
|
let gpu = null;
|
|
464
416
|
let npu = null;
|
|
465
|
-
const coral = classifyCoralAccelerator(
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
try {
|
|
475
|
-
return node_fs.readFileSync(`/sys/bus/usb/devices/${device}/${attr}`, "utf8").trim();
|
|
476
|
-
} catch {
|
|
477
|
-
return "";
|
|
478
|
-
}
|
|
479
|
-
},
|
|
480
|
-
exists: (p) => node_fs.existsSync(p)
|
|
481
|
-
});
|
|
482
|
-
if (coral) this.logger.info("Coral USB Edge TPU detected", { meta: { bus: coral.bus } });
|
|
417
|
+
const coral = require_coral_accelerators.classifyCoralAccelerator(require_coral_accelerators.nodeCoralFs);
|
|
418
|
+
if (coral) {
|
|
419
|
+
if ((coral.units ?? []).length > 0) this.logger.info("Coral Edge TPU detected", { meta: { units: coral.units } });
|
|
420
|
+
for (const unavailable of coral.unavailable ?? []) this.logger.warn("Coral Edge TPU present but unusable", { meta: {
|
|
421
|
+
bus: unavailable.bus,
|
|
422
|
+
count: unavailable.count,
|
|
423
|
+
reason: unavailable.reason
|
|
424
|
+
} });
|
|
425
|
+
}
|
|
483
426
|
if (platform === "darwin" && arch === "arm64") {
|
|
484
427
|
gpu = {
|
|
485
428
|
type: "apple",
|
|
@@ -1,58 +1,10 @@
|
|
|
1
1
|
import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { Ta as EventCategory, ni as BaseAddon, qi as emitReadiness, sn as enumerateInferenceDevices, ti as errMsg, tr as platformProbeCapability, yr as scoreRuntimes } from "../../dist-Wy8cTxg6.mjs";
|
|
3
|
+
import { n as nodeCoralFs, t as classifyCoralAccelerator } from "../../coral-accelerators-DcnZvctM.mjs";
|
|
3
4
|
import { promisify } from "node:util";
|
|
4
5
|
import * as os$1 from "node:os";
|
|
5
6
|
import * as fs from "node:fs";
|
|
6
7
|
import { execFile } from "node:child_process";
|
|
7
|
-
//#region src/builtins/platform-probe/coral-accelerators.ts
|
|
8
|
-
/**
|
|
9
|
-
* Coral USB Edge TPU USB identifiers.
|
|
10
|
-
*
|
|
11
|
-
* The device enumerates as `1a6e:089a` (Global Unichip) BEFORE the libedgetpu
|
|
12
|
-
* firmware loads, then re-enumerates as `18d1:9302` (Google) AFTER. Either id
|
|
13
|
-
* means a Coral is physically attached, so both count as a positive signal.
|
|
14
|
-
*/
|
|
15
|
-
var CORAL_USB_IDS = [{
|
|
16
|
-
vendor: "1a6e",
|
|
17
|
-
product: "089a"
|
|
18
|
-
}, {
|
|
19
|
-
vendor: "18d1",
|
|
20
|
-
product: "9302"
|
|
21
|
-
}];
|
|
22
|
-
/**
|
|
23
|
-
* Default install path of the libedgetpu delegate on the hub, provisioned
|
|
24
|
-
* out-of-band by `/data/deps/edgetpu-install.sh` (it is a system shared
|
|
25
|
-
* library, not a pip package). Overridable via `CAMSTACK_EDGETPU_LIB` — kept in
|
|
26
|
-
* sync with the Python pool's own default in `inference_pool.py`.
|
|
27
|
-
*/
|
|
28
|
-
var DEFAULT_EDGETPU_LIB = "/data/deps/edgetpu/lib/libedgetpu.so.1";
|
|
29
|
-
/**
|
|
30
|
-
* Detect a Coral USB Edge TPU. Present when EITHER a matching USB device is
|
|
31
|
-
* enumerated OR the libedgetpu delegate is installed (the delegate is the
|
|
32
|
-
* hub-provisioned runtime prerequisite; on a container whose `/sys` USB view is
|
|
33
|
-
* limited, its presence is a reliable operator-intent signal that the Coral is
|
|
34
|
-
* wired through). Returns `null` when neither signal is found.
|
|
35
|
-
*/
|
|
36
|
-
function classifyCoralAccelerator(fsx) {
|
|
37
|
-
let count = 0;
|
|
38
|
-
for (const device of fsx.listUsbDevices()) {
|
|
39
|
-
const vendor = fsx.readUsbAttr(device, "idVendor").toLowerCase();
|
|
40
|
-
const product = fsx.readUsbAttr(device, "idProduct").toLowerCase();
|
|
41
|
-
if (CORAL_USB_IDS.some((id) => id.vendor === vendor && id.product === product)) count++;
|
|
42
|
-
}
|
|
43
|
-
if (count > 0) return {
|
|
44
|
-
type: "coral-edgetpu",
|
|
45
|
-
bus: "usb",
|
|
46
|
-
count
|
|
47
|
-
};
|
|
48
|
-
const libPath = process.env["CAMSTACK_EDGETPU_LIB"] ?? DEFAULT_EDGETPU_LIB;
|
|
49
|
-
if (fsx.exists(libPath)) return {
|
|
50
|
-
type: "coral-edgetpu",
|
|
51
|
-
bus: "usb"
|
|
52
|
-
};
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
//#endregion
|
|
56
8
|
//#region src/builtins/platform-probe/amd-npu.ts
|
|
57
9
|
var amd_npu_exports = /* @__PURE__ */ __exportAll({
|
|
58
10
|
classifyAmdNpu: () => classifyAmdNpu,
|
|
@@ -456,24 +408,15 @@ var PlatformScorer = class {
|
|
|
456
408
|
} });
|
|
457
409
|
let gpu = null;
|
|
458
410
|
let npu = null;
|
|
459
|
-
const coral = classifyCoralAccelerator(
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
try {
|
|
469
|
-
return fs.readFileSync(`/sys/bus/usb/devices/${device}/${attr}`, "utf8").trim();
|
|
470
|
-
} catch {
|
|
471
|
-
return "";
|
|
472
|
-
}
|
|
473
|
-
},
|
|
474
|
-
exists: (p) => fs.existsSync(p)
|
|
475
|
-
});
|
|
476
|
-
if (coral) this.logger.info("Coral USB Edge TPU detected", { meta: { bus: coral.bus } });
|
|
411
|
+
const coral = classifyCoralAccelerator(nodeCoralFs);
|
|
412
|
+
if (coral) {
|
|
413
|
+
if ((coral.units ?? []).length > 0) this.logger.info("Coral Edge TPU detected", { meta: { units: coral.units } });
|
|
414
|
+
for (const unavailable of coral.unavailable ?? []) this.logger.warn("Coral Edge TPU present but unusable", { meta: {
|
|
415
|
+
bus: unavailable.bus,
|
|
416
|
+
count: unavailable.count,
|
|
417
|
+
reason: unavailable.reason
|
|
418
|
+
} });
|
|
419
|
+
}
|
|
477
420
|
if (platform === "darwin" && arch === "arm64") {
|
|
478
421
|
gpu = {
|
|
479
422
|
type: "apple",
|
|
@@ -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-Bn-RNanh.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 { aa as mapSecretLeaves, fi as InvalidRecordError, ir as recordEntriesCapability, ji as UnknownRecordKindError, ni as BaseAddon, pa as recordSecretRef } from "../../dist-Wy8cTxg6.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-Bn-RNanh.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 { Ta as EventCategory, ni as BaseAddon } from "../../dist-Wy8cTxg6.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-Bn-RNanh.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 { Cr as snapshotCapability,
|
|
1
|
+
import { Cr as snapshotCapability, Ot as bareAddonId, Qr as DeviceFeature, Qt as deriveBatteryPresence, Ta as EventCategory, Wn as memoizePinnedFfmpeg, ei as DeviceType, jr as streamQualityLabel, kt as batteryCapability, ni as BaseAddon, oa as nodePin, s as BatteryStatusSchema, ti as errMsg } from "../../dist-Wy8cTxg6.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";
|
|
@@ -67,21 +67,6 @@ export interface ControlOps {
|
|
|
67
67
|
readonly declaredThisBoot: boolean;
|
|
68
68
|
}[];
|
|
69
69
|
};
|
|
70
|
-
/** Paginated `(id, data)` read of a legacy table in this file. */
|
|
71
|
-
readonly readLegacyCollection: {
|
|
72
|
-
readonly input: {
|
|
73
|
-
readonly collection: string;
|
|
74
|
-
readonly cursor?: string | undefined;
|
|
75
|
-
readonly limit?: number | undefined;
|
|
76
|
-
};
|
|
77
|
-
readonly output: {
|
|
78
|
-
readonly rows: readonly {
|
|
79
|
-
readonly id: string;
|
|
80
|
-
readonly data: Record<string, unknown>;
|
|
81
|
-
}[];
|
|
82
|
-
readonly nextCursor: string | null;
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
70
|
}
|
|
86
71
|
export type ControlOp = keyof ControlOps;
|
|
87
72
|
/** At most this many calls in flight per worker; beyond it a call is refused, never queued. */
|
|
@@ -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-Bn-RNanh.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 { hn as filesystemBrowseCapability, kr as storageProviderCapability, ni as BaseAddon } from "../../dist-
|
|
1
|
+
import { hn as filesystemBrowseCapability, kr as storageProviderCapability, ni as BaseAddon } from "../../dist-Wy8cTxg6.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-DUHEp_09.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 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-
|
|
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-NKbwWovZ.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 {
|
|
@@ -43,17 +43,6 @@ export interface OwnedSqliteFile {
|
|
|
43
43
|
readonly bytes: number | null;
|
|
44
44
|
readonly declaredThisBoot: boolean;
|
|
45
45
|
}[]>;
|
|
46
|
-
readLegacyCollection(input: {
|
|
47
|
-
readonly collection: string;
|
|
48
|
-
readonly cursor?: string | undefined;
|
|
49
|
-
readonly limit?: number | undefined;
|
|
50
|
-
}): Promise<{
|
|
51
|
-
readonly rows: readonly {
|
|
52
|
-
readonly id: string;
|
|
53
|
-
readonly data: Record<string, unknown>;
|
|
54
|
-
}[];
|
|
55
|
-
readonly nextCursor: string | null;
|
|
56
|
-
}>;
|
|
57
46
|
dropRetiredTable(name: string): Promise<DroppedRetiredTable | null>;
|
|
58
47
|
/** Which thread serves this file: 0 is the engine's main thread. */
|
|
59
48
|
servingThreadId(): Promise<number>;
|
|
@@ -117,17 +106,6 @@ declare abstract class OwnedFileBase implements OwnedSqliteFile {
|
|
|
117
106
|
readonly bytes: number | null;
|
|
118
107
|
readonly declaredThisBoot: boolean;
|
|
119
108
|
}[]>;
|
|
120
|
-
abstract readLegacyCollection(input: {
|
|
121
|
-
readonly collection: string;
|
|
122
|
-
readonly cursor?: string | undefined;
|
|
123
|
-
readonly limit?: number | undefined;
|
|
124
|
-
}): Promise<{
|
|
125
|
-
readonly rows: readonly {
|
|
126
|
-
readonly id: string;
|
|
127
|
-
readonly data: Record<string, unknown>;
|
|
128
|
-
}[];
|
|
129
|
-
readonly nextCursor: string | null;
|
|
130
|
-
}>;
|
|
131
109
|
abstract dropRetiredTable(name: string): Promise<DroppedRetiredTable | null>;
|
|
132
110
|
abstract servingThreadId(): Promise<number>;
|
|
133
111
|
protected abstract stopConnection(): Promise<void>;
|
|
@@ -163,17 +141,6 @@ export declare class InlineOwnedFile extends OwnedFileBase {
|
|
|
163
141
|
readonly bytes: number | null;
|
|
164
142
|
readonly declaredThisBoot: boolean;
|
|
165
143
|
}[]>;
|
|
166
|
-
readLegacyCollection(input: {
|
|
167
|
-
readonly collection: string;
|
|
168
|
-
readonly cursor?: string | undefined;
|
|
169
|
-
readonly limit?: number | undefined;
|
|
170
|
-
}): Promise<{
|
|
171
|
-
readonly rows: readonly {
|
|
172
|
-
readonly id: string;
|
|
173
|
-
readonly data: Record<string, unknown>;
|
|
174
|
-
}[];
|
|
175
|
-
readonly nextCursor: string | null;
|
|
176
|
-
}>;
|
|
177
144
|
dropRetiredTable(name: string): Promise<DroppedRetiredTable | null>;
|
|
178
145
|
servingThreadId(): Promise<number>;
|
|
179
146
|
protected stopMaintenance(): void;
|
|
@@ -196,17 +163,6 @@ export declare class WorkerOwnedFile extends OwnedFileBase {
|
|
|
196
163
|
readonly bytes: number | null;
|
|
197
164
|
readonly declaredThisBoot: boolean;
|
|
198
165
|
}[]>;
|
|
199
|
-
readLegacyCollection(input: {
|
|
200
|
-
readonly collection: string;
|
|
201
|
-
readonly cursor?: string | undefined;
|
|
202
|
-
readonly limit?: number | undefined;
|
|
203
|
-
}): Promise<{
|
|
204
|
-
readonly rows: readonly {
|
|
205
|
-
readonly id: string;
|
|
206
|
-
readonly data: Record<string, unknown>;
|
|
207
|
-
}[];
|
|
208
|
-
readonly nextCursor: string | null;
|
|
209
|
-
}>;
|
|
210
166
|
dropRetiredTable(name: string): Promise<DroppedRetiredTable | null>;
|
|
211
167
|
servingThreadId(): Promise<number>;
|
|
212
168
|
protected stopMaintenance(): void;
|
|
@@ -9,8 +9,6 @@ export interface KindRow {
|
|
|
9
9
|
readonly hash: string;
|
|
10
10
|
readonly state: "declared" | "orphaned" | "dropped";
|
|
11
11
|
readonly declaration: RecordKindDeclaration;
|
|
12
|
-
/** When `adoptRecords` finished copying the legacy table into this kind; the boot guard reads it. */
|
|
13
|
-
readonly adoptedAt: number | null;
|
|
14
12
|
}
|
|
15
13
|
/** The hash a declaration is known by; two spellings of the same declaration agree. */
|
|
16
14
|
export declare function declarationHash(decl: RecordKindDeclaration): string;
|
|
@@ -22,27 +22,6 @@ export interface RecordsEngineOps extends OwnedOps {
|
|
|
22
22
|
}): Promise<{
|
|
23
23
|
readonly deleted: number;
|
|
24
24
|
}>;
|
|
25
|
-
/** Rows of a legacy table in THIS file; `null` when the table is not there. */
|
|
26
|
-
legacyRowCount(input: {
|
|
27
|
-
readonly table: string;
|
|
28
|
-
}): Promise<number | null>;
|
|
29
|
-
/** Has `adoptRecords` finished copying the legacy table into this kind? (the boot guard) */
|
|
30
|
-
adoptionState(input: {
|
|
31
|
-
readonly owner: string;
|
|
32
|
-
readonly kind: string;
|
|
33
|
-
}): Promise<{
|
|
34
|
-
readonly adoptedAt: number | null;
|
|
35
|
-
}>;
|
|
36
|
-
/** Record that the copy is complete. Idempotent. */
|
|
37
|
-
markAdopted(input: {
|
|
38
|
-
readonly owner: string;
|
|
39
|
-
readonly kind: string;
|
|
40
|
-
}): Promise<void>;
|
|
41
|
-
/** Undo a false `complete` when the legacy table still holds rows. */
|
|
42
|
-
revokeAdopted(input: {
|
|
43
|
-
readonly owner: string;
|
|
44
|
-
readonly kind: string;
|
|
45
|
-
}): Promise<void>;
|
|
46
25
|
}
|
|
47
26
|
export type RecordsOp = keyof RecordsEngineOps;
|
|
48
27
|
export type RecordsInput<K extends RecordsOp> = Parameters<RecordsEngineOps[K]>[0];
|
|
@@ -29,8 +29,8 @@ export declare class RecordsEngine implements RecordsEngineOps {
|
|
|
29
29
|
constructor(db: Database.Database, options: RecordsEngineOptions);
|
|
30
30
|
/**
|
|
31
31
|
* Boot correction: every kind that ever allocated an id has its counter raised
|
|
32
|
-
* above the highest numeric id it holds.
|
|
33
|
-
* chosen numeric id) kept ids far above a counter that started at 1, and the
|
|
32
|
+
* above the highest numeric id it holds. Rows the records migration copied
|
|
33
|
+
* (or any caller chosen numeric id) kept ids far above a counter that started at 1, and the
|
|
34
34
|
* upsert would have overwritten another device's row on the first collision.
|
|
35
35
|
* Runs on the engine's own connection, over the (kind_id, id) unique index.
|
|
36
36
|
*/
|
|
@@ -38,7 +38,7 @@ export declare class RecordsEngine implements RecordsEngineOps {
|
|
|
38
38
|
/** Ids handed out by allocateId and not yet written: their first write is insert-only. */
|
|
39
39
|
private readonly pendingAllocated;
|
|
40
40
|
private static readonly PENDING_ALLOCATED_MAX;
|
|
41
|
-
/** Raise a kind's counter above the numeric ids of a caller-supplied batch
|
|
41
|
+
/** Raise a kind's counter above the numeric ids of a caller-supplied batch. */
|
|
42
42
|
private raiseSequenceFor;
|
|
43
43
|
private schemaReady;
|
|
44
44
|
private kindOf;
|
|
@@ -87,21 +87,4 @@ export declare class RecordsEngine implements RecordsEngineOps {
|
|
|
87
87
|
private countRows;
|
|
88
88
|
/** The declarations this file holds, for the router's placement map and the entries service. */
|
|
89
89
|
declarations(): readonly KindRow[];
|
|
90
|
-
legacyRowCount(input: {
|
|
91
|
-
readonly table: string;
|
|
92
|
-
}): Promise<number | null>;
|
|
93
|
-
adoptionState(input: {
|
|
94
|
-
readonly owner: string;
|
|
95
|
-
readonly kind: string;
|
|
96
|
-
}): Promise<{
|
|
97
|
-
readonly adoptedAt: number | null;
|
|
98
|
-
}>;
|
|
99
|
-
markAdopted(input: {
|
|
100
|
-
readonly owner: string;
|
|
101
|
-
readonly kind: string;
|
|
102
|
-
}): Promise<void>;
|
|
103
|
-
revokeAdopted(input: {
|
|
104
|
-
readonly owner: string;
|
|
105
|
-
readonly kind: string;
|
|
106
|
-
}): Promise<void>;
|
|
107
90
|
}
|
|
@@ -9,17 +9,15 @@
|
|
|
9
9
|
* rebuilt from each open file's own `_record_kinds` at boot and updated on
|
|
10
10
|
* declaration. A kind declared for another file than the one it lives in is
|
|
11
11
|
* refused (the engine never moves data, D853).
|
|
12
|
-
* - **
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* - **No adoption** (D900): the records migration is closed. A declaration
|
|
13
|
+
* reads no legacy table, and a retired `adoptsFrom` an older addon still
|
|
14
|
+
* sends is dropped before the catalog stores the declaration.
|
|
15
15
|
*/
|
|
16
16
|
import { type IRecordsProvider, type IScopedLogger, type IStorageAdminProvider, type StorageKind } from "@camstack/types";
|
|
17
17
|
import type { PlacementRouter } from "../placement-router.js";
|
|
18
18
|
/** The caller the transport stamped, or a refusal. */
|
|
19
19
|
export declare function recordsCallerOf(input: unknown): string;
|
|
20
|
-
type AdminRecords = Pick<IStorageAdminProvider, "listKinds" | "readRecords"
|
|
21
|
-
isAdoptedLegacyTable(collection: string): Promise<boolean>;
|
|
22
|
-
};
|
|
20
|
+
type AdminRecords = Pick<IStorageAdminProvider, "listKinds" | "readRecords">;
|
|
23
21
|
export declare class RecordsProvider implements IRecordsProvider, AdminRecords {
|
|
24
22
|
private readonly router;
|
|
25
23
|
private readonly logger;
|
|
@@ -30,20 +28,11 @@ export declare class RecordsProvider implements IRecordsProvider, AdminRecords {
|
|
|
30
28
|
private fileOf;
|
|
31
29
|
declareKinds(input: Parameters<IRecordsProvider["declareKinds"]>[0]): ReturnType<IRecordsProvider["declareKinds"]>;
|
|
32
30
|
/**
|
|
33
|
-
* Rows of a legacy table in EVERY open records-capable file. A legacy table lives
|
|
34
|
-
* in one file, but which one is the layout's business: the phase-3 NC ledgers moved
|
|
35
|
-
* to `events.db` with the P5 split, and a guard that asked `camstack.db` alone
|
|
36
|
-
* answered "no legacy rows" for 522 outbox rows (2026-10-20 audit).
|
|
37
|
-
*/
|
|
38
|
-
private legacyRowsAnywhere;
|
|
39
|
-
/**
|
|
40
31
|
* `transactFamily` (plan risk 8): kinds that must agree through one `transact` sit
|
|
41
32
|
* in ONE file. A family split across files is refused whole, whether the split is
|
|
42
33
|
* inside this declaration or against a kind of the same owner declared before.
|
|
43
34
|
*/
|
|
44
35
|
private assertFamiliesInOneFile;
|
|
45
|
-
/** The boot guard: empty kind + a legacy table that still has rows = adoption pending. */
|
|
46
|
-
private withAdoption;
|
|
47
36
|
get(input: Parameters<IRecordsProvider["get"]>[0]): ReturnType<IRecordsProvider["get"]>;
|
|
48
37
|
getMany(input: Parameters<IRecordsProvider["getMany"]>[0]): ReturnType<IRecordsProvider["getMany"]>;
|
|
49
38
|
secretRefs(input: Parameters<IRecordsProvider["secretRefs"]>[0]): ReturnType<IRecordsProvider["secretRefs"]>;
|
|
@@ -67,9 +56,6 @@ export declare class RecordsProvider implements IRecordsProvider, AdminRecords {
|
|
|
67
56
|
kinds: StorageKind[];
|
|
68
57
|
}>;
|
|
69
58
|
readRecords(input: Parameters<IStorageAdminProvider["readRecords"]>[0]): ReturnType<IStorageAdminProvider["readRecords"]>;
|
|
70
|
-
/** True when a declared kind lists `collection` as `adoptsFrom` and adoption finished. */
|
|
71
|
-
isAdoptedLegacyTable(collection: string): Promise<boolean>;
|
|
72
|
-
adoptRecords(input: Parameters<IStorageAdminProvider["adoptRecords"]>[0]): ReturnType<IStorageAdminProvider["adoptRecords"]>;
|
|
73
59
|
/** Housekeeping: delete rows past `expires_at` in every file that hosts kinds. */
|
|
74
60
|
sweepExpired(): Promise<number>;
|
|
75
61
|
}
|
|
@@ -17,7 +17,7 @@ export declare const RECORD_KINDS_TABLE = "_record_kinds";
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const RECORD_SEQUENCES_TABLE = "_record_sequences";
|
|
19
19
|
/** The statements that create the shared tables. Idempotent. */
|
|
20
|
-
export declare const RECORDS_SCHEMA_SQL = "\nCREATE TABLE IF NOT EXISTS records (\n rid INTEGER PRIMARY KEY,\n kind_id INTEGER NOT NULL,\n id TEXT NOT NULL,\n device_id INTEGER,\n at INTEGER,\n expires_at INTEGER,\n rev INTEGER NOT NULL DEFAULT 1,\n updated_at INTEGER NOT NULL,\n data BLOB NOT NULL,\n UNIQUE (kind_id, id)\n);\nCREATE INDEX IF NOT EXISTS records_kind_device_at ON records(kind_id, device_id, at);\nCREATE INDEX IF NOT EXISTS records_kind_at ON records(kind_id, at);\nCREATE INDEX IF NOT EXISTS records_expires ON records(expires_at) WHERE expires_at IS NOT NULL;\nCREATE TABLE IF NOT EXISTS _record_kinds (\n kind_id INTEGER PRIMARY KEY AUTOINCREMENT,\n owner TEXT NOT NULL,\n kind TEXT NOT NULL,\n database TEXT NOT NULL,\n manifest_hash TEXT NOT NULL,\n declaration TEXT NOT NULL,\n state TEXT NOT NULL,\n orphaned_at INTEGER,\n adopted_at INTEGER,\n UNIQUE (owner, kind)\n);\nCREATE TABLE IF NOT EXISTS _record_sequences (\n kind_id INTEGER PRIMARY KEY,\n next INTEGER NOT NULL\n);\n";
|
|
20
|
+
export declare const RECORDS_SCHEMA_SQL = "\nCREATE TABLE IF NOT EXISTS records (\n rid INTEGER PRIMARY KEY,\n kind_id INTEGER NOT NULL,\n id TEXT NOT NULL,\n device_id INTEGER,\n at INTEGER,\n expires_at INTEGER,\n rev INTEGER NOT NULL DEFAULT 1,\n updated_at INTEGER NOT NULL,\n data BLOB NOT NULL,\n UNIQUE (kind_id, id)\n);\nCREATE INDEX IF NOT EXISTS records_kind_device_at ON records(kind_id, device_id, at);\nCREATE INDEX IF NOT EXISTS records_kind_at ON records(kind_id, at);\nCREATE INDEX IF NOT EXISTS records_expires ON records(expires_at) WHERE expires_at IS NOT NULL;\nCREATE TABLE IF NOT EXISTS _record_kinds (\n kind_id INTEGER PRIMARY KEY AUTOINCREMENT,\n owner TEXT NOT NULL,\n kind TEXT NOT NULL,\n database TEXT NOT NULL,\n manifest_hash TEXT NOT NULL,\n declaration TEXT NOT NULL,\n state TEXT NOT NULL,\n orphaned_at INTEGER,\n -- RETIRED (D900): the records-migration boot guard's flag. Nothing reads it;\n -- the column stays so an older build can still open a file this one created.\n adopted_at INTEGER,\n UNIQUE (owner, kind)\n);\nCREATE TABLE IF NOT EXISTS _record_sequences (\n kind_id INTEGER PRIMARY KEY,\n next INTEGER NOT NULL\n);\n";
|
|
21
21
|
/** The tables the records engine owns: never droppable through `dropCollection`. */
|
|
22
22
|
export declare const RECORDS_ENGINE_TABLES: readonly string[];
|
|
23
23
|
/** The built-in indexes. */
|