@camstack/server 1.2.730 → 1.2.732
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/api/core/cap-providers.js +1 -0
- package/dist/api/core/logging-settings.js +88 -1
- package/dist/api/core/server-management.provider.js +10 -3
- package/dist/api/trpc/generated-cap-mounts.js +2 -1
- package/dist/api/trpc/generated-cap-routers.js +1850 -1777
- package/dist/boot/boot-config.js +2 -46
- package/dist/core/addon/addon-registry.service.js +61 -59
- package/dist/launch-args.js +72 -34
- package/dist/main.js +2 -1
- package/package.json +14 -19
- package/system/dist/addon-runner.js +82911 -12
- package/system/dist/addon-runner.mjs +82910 -11
- package/system/dist/{agent-https-DZq8uf8L.mjs → agent-https-CDtAIEne.mjs} +1 -1
- package/system/dist/{agent-https-C8Gz2jjS.js → agent-https-DKMO-__h.js} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +220 -16
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +220 -16
- package/system/dist/builtins/device-manager/discovery-proposal-service.d.ts +38 -0
- package/system/dist/builtins/device-manager/discovery-proposal-store.d.ts +28 -0
- package/system/dist/builtins/device-manager/record-kinds.d.ts +2 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.d.ts +10 -0
- package/system/dist/builtins/local-network/local-network.addon.js +250 -181
- package/system/dist/builtins/local-network/local-network.addon.mjs +244 -175
- package/system/dist/builtins/local-network/passive/discovery-watcher.d.ts +60 -0
- package/system/dist/builtins/local-network/passive/passive-io-node.d.ts +2 -0
- package/system/dist/builtins/local-network/passive/passive-packets.d.ts +10 -0
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{composition-sources-4M_NnTnV.mjs → composition-sources-Ca7JEbmu.mjs} +1 -1
- package/system/dist/{composition-sources-hokiaS3J.js → composition-sources-UQohOHgd.js} +1 -1
- package/system/dist/{constants-B0L3suFC.js → constants-CLA4ogvA.js} +1 -1
- package/system/dist/{constants-DTVU00LZ.mjs → constants-iG57sUNp.mjs} +1 -1
- package/system/dist/{device-ca-C_y2GrU5.mjs → device-ca--iHw76cR.mjs} +1 -1
- package/system/dist/{device-ca-DaTT1Y9v.js → device-ca-BUcHAAew.js} +1 -1
- package/system/dist/{dist-9lvgpcnm.mjs → dist-C_cZ9rGK.mjs} +404 -18
- package/system/dist/{dist-B3S0ruBa.js → dist-qO48FNMZ.js} +427 -17
- package/system/dist/dns-wire-CHXO1qSl.js +199 -0
- package/system/dist/dns-wire-DcL6a0L-.mjs +170 -0
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-xgLfZIVx.mjs → hub-mdns-ciao-9wPOmsXd.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Dkw38L-g.js → hub-mdns-ciao-DDmMPZCN.js} +2 -2
- package/system/dist/index.d.ts +1 -1
- package/system/dist/index.js +36 -9
- package/system/dist/index.mjs +36 -10
- package/system/dist/kernel/heap-watch.d.ts +7 -2
- package/system/dist/{restore-archive-cxnuWxQM.mjs → restore-archive-BHVjOlza.mjs} +1 -1
- package/system/dist/{restore-archive-orP6eHBd.js → restore-archive-Cravj5LG.js} +1 -1
- package/system/dist/{retention-CB2cyW9k.js → retention-B_eloRtb.js} +1 -1
- package/system/dist/{retention-Me4u6zMp.mjs → retention-C_9dxCQn.mjs} +1 -1
- package/system/dist/{wal-maintenance-_PXj626-.js → wal-maintenance-CfKeIQAG.js} +0 -0
- package/system/dist/{wal-maintenance-De7Ifvph.mjs → wal-maintenance-Dw7rplkv.mjs} +0 -0
- package/system/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.732] - 2026-11-02
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- New devices on the network are proposed on the Integrations page without a manual scan, and dismissed proposals stay dismissed across restarts
|
|
15
|
+
- The hub holds debug watches and pushes the interest to every node; a debug channel cannot be armed from the Levels page.
|
|
16
|
+
|
|
17
|
+
## [1.2.731] - 2026-11-02
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Serves the new do-not-disturb capability for Echo devices.
|
|
22
|
+
- AI generate calls accept a per-call reasoning effort
|
|
23
|
+
- Heap ceiling and the hub RSS budget are now set per node under Cluster > node > General; CAMSTACK_HUB_HEAP_MB, CAMSTACK_AGENT_HEAP_MB and the retired secret and CORS variables are ignored, and only the heap ones are named in the boot log
|
|
24
|
+
|
|
10
25
|
## [1.2.730] - 2026-11-01
|
|
11
26
|
|
|
12
27
|
### Added
|
|
@@ -167,6 +167,7 @@ function buildSystemProvider(feature, registry, logger, census = (0, http_reques
|
|
|
167
167
|
getRequestCensus: async () => requestCensus.status(),
|
|
168
168
|
getLoggingSettings: async (input) => loggingSettings.get(input.scopeNodeId, input.scopeComponent),
|
|
169
169
|
setLoggingSettings: async (input) => loggingSettings.set(input.patch, input.scopeNodeId, input.scopeComponent),
|
|
170
|
+
debugWatch: async (input) => loggingSettings.debugWatch(input),
|
|
170
171
|
};
|
|
171
172
|
}
|
|
172
173
|
/**
|
|
@@ -151,6 +151,8 @@ function buildLogChannelPlane(source, onProviderError) {
|
|
|
151
151
|
* for the same reason: a diagnostic you can leave on becomes a tax nobody
|
|
152
152
|
* remembers enabling.
|
|
153
153
|
*/
|
|
154
|
+
/** How often the hub sweeps lapsed debug watches. */
|
|
155
|
+
const WATCH_SWEEP_MS = 5_000;
|
|
154
156
|
exports.MAX_CHANNEL_WINDOW_MS = 30 * 60_000;
|
|
155
157
|
class LoggingSettingsService {
|
|
156
158
|
store;
|
|
@@ -160,6 +162,10 @@ class LoggingSettingsService {
|
|
|
160
162
|
logger;
|
|
161
163
|
now;
|
|
162
164
|
channels;
|
|
165
|
+
/** The live debug watches. Memory only: a restart is a stop. */
|
|
166
|
+
watches = new types_1.DebugWatchTable();
|
|
167
|
+
watchTimer = null;
|
|
168
|
+
lastRecord = {};
|
|
163
169
|
constructor(deps) {
|
|
164
170
|
this.store = deps.store;
|
|
165
171
|
this.gate = deps.gate;
|
|
@@ -244,6 +250,74 @@ class LoggingSettingsService {
|
|
|
244
250
|
}
|
|
245
251
|
return this.describe(stored, scope, component);
|
|
246
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* Start, re-arm, stop or list debug watches, then push the interest to every
|
|
255
|
+
* node. A refusal (an undeclared channel, no device) changes nothing.
|
|
256
|
+
*/
|
|
257
|
+
async debugWatch(input) {
|
|
258
|
+
const nowMs = this.now();
|
|
259
|
+
const lapsed = [];
|
|
260
|
+
if (input.action === 'start') {
|
|
261
|
+
if (input.deviceIds.length === 0) {
|
|
262
|
+
throw new Error('debug watch refused: name at least one device');
|
|
263
|
+
}
|
|
264
|
+
const declared = await this.channels.declarations();
|
|
265
|
+
const debugNames = new Set(declared.filter((d) => d.kind === 'debug').map((d) => d.name));
|
|
266
|
+
const unknown = input.channels.filter((name) => !debugNames.has(name));
|
|
267
|
+
if (unknown.length > 0) {
|
|
268
|
+
throw new Error(`debug watch refused: not a declared debug channel: ${unknown.join(', ')}`);
|
|
269
|
+
}
|
|
270
|
+
for (const channel of input.channels)
|
|
271
|
+
this.watches.start(channel, input.deviceIds, nowMs);
|
|
272
|
+
}
|
|
273
|
+
else if (input.action === 'rearm') {
|
|
274
|
+
for (const channel of input.channels) {
|
|
275
|
+
if (this.watches.rearm(channel, nowMs) === 'lapsed')
|
|
276
|
+
lapsed.push(channel);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
else if (input.action === 'stop') {
|
|
280
|
+
for (const channel of input.channels)
|
|
281
|
+
this.watches.stop(channel);
|
|
282
|
+
}
|
|
283
|
+
if (input.action !== 'list') {
|
|
284
|
+
// The push is the FULL set, so it carries the document's windows too: read
|
|
285
|
+
// them, and on a failed read fall back to the last value that was read (D49).
|
|
286
|
+
await this.pushChannels((await this.read()) ?? this.lastRecord);
|
|
287
|
+
this.logger?.info('debug watch changed', {
|
|
288
|
+
meta: {
|
|
289
|
+
action: input.action,
|
|
290
|
+
channels: input.channels,
|
|
291
|
+
deviceIds: input.deviceIds,
|
|
292
|
+
lapsed,
|
|
293
|
+
},
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
this.ensureWatchTimer();
|
|
297
|
+
return { nowMs, watches: this.watches.states(nowMs), lapsed };
|
|
298
|
+
}
|
|
299
|
+
/** Close lapsed watches here and push, so every node drops them even if its own timer is late. */
|
|
300
|
+
ensureWatchTimer() {
|
|
301
|
+
const live = this.watches.states(this.now()).length > 0;
|
|
302
|
+
if (!live) {
|
|
303
|
+
if (this.watchTimer !== null)
|
|
304
|
+
clearInterval(this.watchTimer);
|
|
305
|
+
this.watchTimer = null;
|
|
306
|
+
return;
|
|
307
|
+
}
|
|
308
|
+
if (this.watchTimer !== null)
|
|
309
|
+
return;
|
|
310
|
+
this.watchTimer = setInterval(() => {
|
|
311
|
+
const closed = this.watches.expire(this.now());
|
|
312
|
+
(0, types_1.getDebugInterest)().tick(this.now());
|
|
313
|
+
if (closed.length > 0) {
|
|
314
|
+
this.logger?.info('debug watch lapsed', { meta: { channels: closed } });
|
|
315
|
+
void this.pushChannels(this.lastRecord);
|
|
316
|
+
}
|
|
317
|
+
this.ensureWatchTimer();
|
|
318
|
+
}, WATCH_SWEEP_MS);
|
|
319
|
+
this.watchTimer.unref();
|
|
320
|
+
}
|
|
247
321
|
/**
|
|
248
322
|
* Re-establish the mirror and re-arm any diagnostic window that outlived the
|
|
249
323
|
* last shutdown. Called once at boot, before the socket opens.
|
|
@@ -288,8 +362,14 @@ class LoggingSettingsService {
|
|
|
288
362
|
* into a failed write for the whole cluster.
|
|
289
363
|
*/
|
|
290
364
|
async pushChannels(record) {
|
|
365
|
+
this.lastRecord = record;
|
|
366
|
+
const nowMs = this.now();
|
|
367
|
+
// The document's windows and the debug watches travel as ONE full set: an
|
|
368
|
+
// apply that left the watches out would disarm them.
|
|
369
|
+
const windows = [...liveChannelWindows(record, nowMs), ...this.watches.windows(nowMs)];
|
|
370
|
+
(0, types_1.getDebugInterest)().apply(windows, nowMs);
|
|
291
371
|
try {
|
|
292
|
-
await this.channels.apply(
|
|
372
|
+
await this.channels.apply(windows);
|
|
293
373
|
}
|
|
294
374
|
catch (err) {
|
|
295
375
|
this.logger?.warn('log channel windows written but NOT pushed to every gate', {
|
|
@@ -522,6 +602,13 @@ function validateChannelPatch(patches, declared) {
|
|
|
522
602
|
(known.length > 0 ? ` (declared: ${known})` : ''));
|
|
523
603
|
continue;
|
|
524
604
|
}
|
|
605
|
+
if (descriptor.kind === 'debug' && patch.armMs > 0) {
|
|
606
|
+
// A debug channel is watched, never armed: the watch carries the 10
|
|
607
|
+
// minute window and the 60 minute cap, and an armed window would carry
|
|
608
|
+
// neither.
|
|
609
|
+
reasons.push(`"${patch.channel}" is a debug channel — watch it from Logs → Watch`);
|
|
610
|
+
continue;
|
|
611
|
+
}
|
|
525
612
|
const ids = patch.deviceIds;
|
|
526
613
|
if (ids !== undefined && ids !== null && ids.length > 0 && !descriptor.perDevice) {
|
|
527
614
|
reasons.push(`"${patch.channel}" is declared perDevice: false — its lines carry no ` +
|
|
@@ -6,10 +6,17 @@ const launch_args_js_1 = require("../../launch-args.js");
|
|
|
6
6
|
/** The per-node launch override methods (ADR 0970), backed by the node's data dir. */
|
|
7
7
|
function buildLaunchOverrideMethods(dataDir) {
|
|
8
8
|
return {
|
|
9
|
-
getLaunchOverrides: () => Promise.resolve(
|
|
9
|
+
getLaunchOverrides: () => Promise.resolve((0, launch_args_js_1.readLaunchOverrides)(dataDir)),
|
|
10
10
|
setLaunchOverrides: (input) => {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const next = {
|
|
12
|
+
heapMb: input.heapMb,
|
|
13
|
+
// Omitted = keep what is stored; null = clear.
|
|
14
|
+
rssBudgetMb: input.rssBudgetMb === undefined
|
|
15
|
+
? (0, launch_args_js_1.readLaunchOverrides)(dataDir).rssBudgetMb
|
|
16
|
+
: input.rssBudgetMb,
|
|
17
|
+
};
|
|
18
|
+
(0, launch_args_js_1.writeLaunchOverrides)(dataDir, next);
|
|
19
|
+
return Promise.resolve({ ...next, restartRequired: true });
|
|
13
20
|
},
|
|
14
21
|
};
|
|
15
22
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// AUTO-GENERATED by scripts/generate-cap-mounts.ts — DO NOT EDIT
|
|
3
3
|
// Re-run: npx tsx scripts/generate-cap-mounts.ts
|
|
4
4
|
//
|
|
5
|
-
// Mounted:
|
|
5
|
+
// Mounted: 197 Skipped (legacy): 3
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.LEGACY_SHAPE_SKIP = void 0;
|
|
8
8
|
exports.mountAllCaps = mountAllCaps;
|
|
@@ -280,6 +280,7 @@ function mountAllCaps(services) {
|
|
|
280
280
|
dishwasher: (0, generated_cap_routers_js_1.createCapRouter_dishwasher)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'dishwasher'), remoteCapProxy),
|
|
281
281
|
displayPalette: (0, generated_cap_routers_js_1.createCapRouter_displayPalette)((_ctx) => reg?.getSingleton('display-palette') ??
|
|
282
282
|
null, remoteCapProxy),
|
|
283
|
+
doNotDisturb: (0, generated_cap_routers_js_1.createCapRouter_doNotDisturb)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'do-not-disturb'), remoteCapProxy),
|
|
283
284
|
doorbell: (0, generated_cap_routers_js_1.createCapRouter_doorbell)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'doorbell'), remoteCapProxy),
|
|
284
285
|
embeddingEncoder: (0, generated_cap_routers_js_1.createCapRouter_embeddingEncoder)((_ctx, addonId) => {
|
|
285
286
|
if (!reg)
|