@camstack/system 1.2.118 → 1.2.119
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 +1 -1
- package/dist/addon-runner.mjs +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- 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 +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.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/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 +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- 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/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.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -2
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- 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 +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-C2_1HCpW.js → dist-CX9qXYC4.js} +114 -11
- package/dist/{dist-DCTpBXm4.mjs → dist-DNbsZxNv.mjs} +114 -11
- package/dist/index.js +170 -9
- package/dist/index.mjs +169 -11
- package/dist/kernel/config-manager.d.ts +8 -1
- package/dist/kernel/index.d.ts +3 -0
- package/dist/kernel/isolated-builtin-phase.d.ts +21 -0
- package/dist/kernel/settings-door-view.d.ts +7 -0
- package/dist/{manifest-python-deps-CwBbX4Ut.js → manifest-python-deps-76dZLxD0.js} +11 -3
- package/dist/{manifest-python-deps-SGdbr9D5.mjs → manifest-python-deps-DZSNlHjU.mjs} +12 -4
- package/dist/{retired-settings-keys-DHRXLMPn.js → retired-settings-keys-DlIuGG4o.js} +1 -1
- package/dist/{retired-settings-keys-Czd76yLZ.mjs → retired-settings-keys-Dt0-obcq.mjs} +1 -1
- package/package.json +6 -2
|
@@ -1850,6 +1850,10 @@ function callDeviceManager(api, method, input) {
|
|
|
1850
1850
|
}
|
|
1851
1851
|
function createBrokerDeviceManagerApi(opts) {
|
|
1852
1852
|
const { api, addonId, nodeId, eventBus, registry } = opts;
|
|
1853
|
+
const deviceSliceSource = (0, _camstack_types_addon.createEventBusSliceSource)({
|
|
1854
|
+
eventBus,
|
|
1855
|
+
api
|
|
1856
|
+
});
|
|
1853
1857
|
let selfApi;
|
|
1854
1858
|
const deviceRebuildFactories = /* @__PURE__ */ new Map();
|
|
1855
1859
|
const buildContext = (stableId, id, parentDeviceId = null, initialRuntimeState = {}, persistedConfig = {}, deviceMeta = null) => {
|
|
@@ -1894,7 +1898,7 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
1894
1898
|
metadata: null
|
|
1895
1899
|
},
|
|
1896
1900
|
fetchDevice: async (deviceId) => {
|
|
1897
|
-
return (0, _camstack_types_addon.createDeviceProxy)(api, await api.deviceManager.getBindings.query({ deviceId }));
|
|
1901
|
+
return (0, _camstack_types_addon.createDeviceProxy)(api, await api.deviceManager.getBindings.query({ deviceId }), { stateSource: deviceSliceSource });
|
|
1898
1902
|
},
|
|
1899
1903
|
get devices() {
|
|
1900
1904
|
return selfApi;
|
|
@@ -7743,6 +7747,10 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
|
|
|
7743
7747
|
const api = (0, _trpc_client.createTRPCClient)({ links });
|
|
7744
7748
|
const scopedLogger = options?.createLogger?.(addonId) ?? (runtime.mode === "broker" ? createRemoteLogger(runtime.broker, addonId) : createUdsLogger(runtime.client, addonId, nodeId));
|
|
7745
7749
|
const scopedEventBus = runtime.mode === "broker" ? createBrokerEventBus(runtime.broker, addonId) : createUdsEventBus(runtime.client, addonId);
|
|
7750
|
+
const deviceSliceSource = (0, _camstack_types_addon.createEventBusSliceSource)({
|
|
7751
|
+
eventBus: scopedEventBus,
|
|
7752
|
+
api
|
|
7753
|
+
});
|
|
7746
7754
|
const workerDisposerChain = new _camstack_types_addon.DisposerChain({ onError: (err, index) => {
|
|
7747
7755
|
scopedLogger.error(`Disposer #${index} threw during teardown`, { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7748
7756
|
} });
|
|
@@ -7994,10 +8002,10 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
|
|
|
7994
8002
|
},
|
|
7995
8003
|
fetchDevice: async (deviceId) => {
|
|
7996
8004
|
const cached = bindingCache.get(deviceId);
|
|
7997
|
-
if (cached) return (0, _camstack_types_addon.createDeviceProxy)(api, cached);
|
|
8005
|
+
if (cached) return (0, _camstack_types_addon.createDeviceProxy)(api, cached, { stateSource: deviceSliceSource });
|
|
7998
8006
|
const binding = await api.deviceManager.getBindings.query({ deviceId });
|
|
7999
8007
|
bindingCache.set(deviceId, binding);
|
|
8000
|
-
return (0, _camstack_types_addon.createDeviceProxy)(api, binding);
|
|
8008
|
+
return (0, _camstack_types_addon.createDeviceProxy)(api, binding, { stateSource: deviceSliceSource });
|
|
8001
8009
|
},
|
|
8002
8010
|
useCapability(capName, scope = { type: "global" }) {
|
|
8003
8011
|
return getOrCreateHandle(capName, scope, Number.POSITIVE_INFINITY);
|
|
@@ -12,7 +12,7 @@ import * as fs from "node:fs";
|
|
|
12
12
|
import { createServer } from "node:http";
|
|
13
13
|
import * as v8 from "node:v8";
|
|
14
14
|
import * as vm from "node:vm";
|
|
15
|
-
import { BOOT_RECOVERY_BACKOFF_MS, DATAPLANE_SECRET_HEADER, DeviceType, DisposerChain, EventCategory, ReadinessRegistry, asJsonObject, asString, createDeviceProxy, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, readNodePin, scopeKey, sleep, withCapInputDefaults } from "@camstack/types/addon";
|
|
15
|
+
import { BOOT_RECOVERY_BACKOFF_MS, DATAPLANE_SECRET_HEADER, DeviceType, DisposerChain, EventCategory, ReadinessRegistry, asJsonObject, asString, createDeviceProxy, createEventBusSliceSource, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, readNodePin, scopeKey, sleep, withCapInputDefaults } from "@camstack/types/addon";
|
|
16
16
|
import { connect, createServer as createServer$1 } from "node:net";
|
|
17
17
|
import { TRPCClientError, createTRPCClient } from "@trpc/client";
|
|
18
18
|
//#region src/kernel/heap-watch.ts
|
|
@@ -1846,6 +1846,10 @@ function callDeviceManager(api, method, input) {
|
|
|
1846
1846
|
}
|
|
1847
1847
|
function createBrokerDeviceManagerApi(opts) {
|
|
1848
1848
|
const { api, addonId, nodeId, eventBus, registry } = opts;
|
|
1849
|
+
const deviceSliceSource = createEventBusSliceSource({
|
|
1850
|
+
eventBus,
|
|
1851
|
+
api
|
|
1852
|
+
});
|
|
1849
1853
|
let selfApi;
|
|
1850
1854
|
const deviceRebuildFactories = /* @__PURE__ */ new Map();
|
|
1851
1855
|
const buildContext = (stableId, id, parentDeviceId = null, initialRuntimeState = {}, persistedConfig = {}, deviceMeta = null) => {
|
|
@@ -1890,7 +1894,7 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
1890
1894
|
metadata: null
|
|
1891
1895
|
},
|
|
1892
1896
|
fetchDevice: async (deviceId) => {
|
|
1893
|
-
return createDeviceProxy(api, await api.deviceManager.getBindings.query({ deviceId }));
|
|
1897
|
+
return createDeviceProxy(api, await api.deviceManager.getBindings.query({ deviceId }), { stateSource: deviceSliceSource });
|
|
1894
1898
|
},
|
|
1895
1899
|
get devices() {
|
|
1896
1900
|
return selfApi;
|
|
@@ -7739,6 +7743,10 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
|
|
|
7739
7743
|
const api = createTRPCClient({ links });
|
|
7740
7744
|
const scopedLogger = options?.createLogger?.(addonId) ?? (runtime.mode === "broker" ? createRemoteLogger(runtime.broker, addonId) : createUdsLogger(runtime.client, addonId, nodeId));
|
|
7741
7745
|
const scopedEventBus = runtime.mode === "broker" ? createBrokerEventBus(runtime.broker, addonId) : createUdsEventBus(runtime.client, addonId);
|
|
7746
|
+
const deviceSliceSource = createEventBusSliceSource({
|
|
7747
|
+
eventBus: scopedEventBus,
|
|
7748
|
+
api
|
|
7749
|
+
});
|
|
7742
7750
|
const workerDisposerChain = new DisposerChain({ onError: (err, index) => {
|
|
7743
7751
|
scopedLogger.error(`Disposer #${index} threw during teardown`, { meta: { error: err instanceof Error ? err.message : String(err) } });
|
|
7744
7752
|
} });
|
|
@@ -7990,10 +7998,10 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
|
|
|
7990
7998
|
},
|
|
7991
7999
|
fetchDevice: async (deviceId) => {
|
|
7992
8000
|
const cached = bindingCache.get(deviceId);
|
|
7993
|
-
if (cached) return createDeviceProxy(api, cached);
|
|
8001
|
+
if (cached) return createDeviceProxy(api, cached, { stateSource: deviceSliceSource });
|
|
7994
8002
|
const binding = await api.deviceManager.getBindings.query({ deviceId });
|
|
7995
8003
|
bindingCache.set(deviceId, binding);
|
|
7996
|
-
return createDeviceProxy(api, binding);
|
|
8004
|
+
return createDeviceProxy(api, binding, { stateSource: deviceSliceSource });
|
|
7997
8005
|
},
|
|
7998
8006
|
useCapability(capName, scope = { type: "global" }) {
|
|
7999
8007
|
return getOrCreateHandle(capName, scope, Number.POSITIVE_INFINITY);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/system",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.119",
|
|
4
4
|
"description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -53,7 +53,11 @@
|
|
|
53
53
|
"category": "system",
|
|
54
54
|
"name": "SQLite Settings",
|
|
55
55
|
"entry": "./dist/builtins/sqlite-storage/sqlite-settings.addon.js",
|
|
56
|
-
"description": "The relational ENGINE behind the data door (SQLite WAL). Registers `data-store-provider`, an internal collection cap; the public `settings-store` door is owned by `storage-orchestrator`, which dispatches here. Callers never reach this addon directly — that is what makes the engine replaceable. It ALSO registers `vector-store` (sqlite-vec) from the same database file and the same open handle.",
|
|
56
|
+
"description": "The relational ENGINE behind the data door (SQLite WAL). Registers `data-store-provider`, an internal collection cap; the public `settings-store` door is owned by `storage-orchestrator`, which dispatches here. Callers never reach this addon directly — that is what makes the engine replaceable. It ALSO registers `vector-store` (sqlite-vec) from the same database file and the same open handle. Runs in its OWN process (`execution.isolate`) — `better-sqlite3` `Statement.run` does not belong on the event loop that serves the API ([D181]).",
|
|
57
|
+
"execution": {
|
|
58
|
+
"isolate": true,
|
|
59
|
+
"heapProfile": "heavy"
|
|
60
|
+
},
|
|
57
61
|
"capabilities": [
|
|
58
62
|
{
|
|
59
63
|
"name": "data-store-provider"
|