@camstack/server 1.2.694 → 1.2.696
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 +12 -0
- package/dist/agent/agent-update-service.js +32 -0
- package/dist/agent/main.js +2 -0
- package/dist/api/trpc/generated-cap-mounts.js +17 -1
- package/dist/api/trpc/generated-cap-routers.js +565 -550
- package/dist/boot/post-boot.service.js +25 -0
- package/dist/core/server-update/server-update.service.js +19 -0
- package/dist/core/updates/node-update-announcement.js +129 -0
- package/dist/server-root/index.js +15 -0
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.696] - 2026-10-29
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- A node now announces a desktop-app self-update and a container booting on a new image as a node update notification, and node-restarting/node-updating can be picked in notification templates
|
|
15
|
+
|
|
16
|
+
## [1.2.695] - 2026-10-29
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Rebuilt against updated dependencies.
|
|
21
|
+
|
|
10
22
|
## [1.2.694] - 2026-10-29
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
@@ -71,6 +71,7 @@ const system_exec_npm_js_1 = require("../core/server-update/system-exec-npm.js")
|
|
|
71
71
|
const update_availability_emitter_js_1 = require("../core/update-availability-emitter.js");
|
|
72
72
|
const update_availability_store_js_1 = require("../core/update-availability-store.js");
|
|
73
73
|
const index_js_1 = require("../server-root/index.js");
|
|
74
|
+
const node_update_announcement_js_1 = require("../core/updates/node-update-announcement.js");
|
|
74
75
|
const restart_marker_js_1 = require("../core/updates/restart-marker.js");
|
|
75
76
|
/**
|
|
76
77
|
* The synthetic addonId the agent's OWN runtime registers infra providers
|
|
@@ -258,6 +259,17 @@ class AgentUpdateService extends index_js_1.RootUpdateService {
|
|
|
258
259
|
applyClosurePatches: options.applyClosurePatches ?? (0, system_apply_closure_patches_js_1.buildSystemApplyClosurePatches)(options.logger),
|
|
259
260
|
env: options.env,
|
|
260
261
|
now: options.now,
|
|
262
|
+
...(options.readWrapperProbes !== undefined
|
|
263
|
+
? { readWrapperProbes: options.readWrapperProbes }
|
|
264
|
+
: {}),
|
|
265
|
+
// The shell is about to replace itself, and this node with it: announce
|
|
266
|
+
// it through the same announcer a restart uses (D723), before the install.
|
|
267
|
+
onDesktopInstallRequested: (info) => restartAnnouncer.announce((0, node_update_announcement_js_1.buildNodeUpdateAnnouncement)({
|
|
268
|
+
what: 'desktop-shell',
|
|
269
|
+
fromVersion: info.fromVersion,
|
|
270
|
+
...(info.toVersion !== null ? { toVersion: info.toVersion } : {}),
|
|
271
|
+
requestedAt: Date.now(),
|
|
272
|
+
})),
|
|
261
273
|
...(options.runnerBootCheck !== undefined
|
|
262
274
|
? { runnerBootCheck: options.runnerBootCheck }
|
|
263
275
|
: {}),
|
|
@@ -300,6 +312,26 @@ class AgentUpdateService extends index_js_1.RootUpdateService {
|
|
|
300
312
|
: [], this.nodeId);
|
|
301
313
|
return result;
|
|
302
314
|
}
|
|
315
|
+
/**
|
|
316
|
+
* Boot-time: a container that came up on a different image than its previous
|
|
317
|
+
* boot announces it as a `node-updating` (see `node-update-announcement.ts`).
|
|
318
|
+
* A no-op until the bus is bound — the caller runs it from the first acked
|
|
319
|
+
* registration, where the bus is.
|
|
320
|
+
*/
|
|
321
|
+
announceImageChangeIfAny(productVersion, env) {
|
|
322
|
+
const bus = this.eventBus;
|
|
323
|
+
if (bus === null)
|
|
324
|
+
return;
|
|
325
|
+
(0, node_update_announcement_js_1.announceProductVersionChange)({
|
|
326
|
+
dataDir: this.agentDataDir,
|
|
327
|
+
productVersion,
|
|
328
|
+
underDesktopShell: (env[index_js_1.ELECTRON_APP_VERSION_ENV] ?? '').length > 0,
|
|
329
|
+
bus,
|
|
330
|
+
sourceId: 'agent-update-service',
|
|
331
|
+
nodeId: this.nodeId,
|
|
332
|
+
logger: this.agentLogger,
|
|
333
|
+
});
|
|
334
|
+
}
|
|
303
335
|
/** Consume `.restart-pending` and emit `system.restart-completed` if present. */
|
|
304
336
|
emitRestartCompletedIfPending() {
|
|
305
337
|
const bus = this.eventBus;
|
package/dist/agent/main.js
CHANGED
|
@@ -69,6 +69,7 @@ const agent_update_routes_js_1 = require("./agent-update-routes.js");
|
|
|
69
69
|
const agent_update_service_js_1 = require("./agent-update-service.js");
|
|
70
70
|
const derive_hub_url_js_1 = require("./derive-hub-url.js");
|
|
71
71
|
const infra_boot_guard_js_1 = require("./infra-boot-guard.js");
|
|
72
|
+
const release_identity_js_1 = require("../core/release-identity.js");
|
|
72
73
|
const infra_boot_plan_js_1 = require("./infra-boot-plan.js");
|
|
73
74
|
const register_agent_cap_dispatch_js_1 = require("./register-agent-cap-dispatch.js");
|
|
74
75
|
// ---------------------------------------------------------------------------
|
|
@@ -524,6 +525,7 @@ async function startAgent(configPath) {
|
|
|
524
525
|
try {
|
|
525
526
|
agentUpdateService.confirmBootHealthy();
|
|
526
527
|
agentUpdateService.emitRestartCompletedIfPending();
|
|
528
|
+
agentUpdateService.announceImageChangeIfAny((0, release_identity_js_1.blankToNull)(process.env[release_identity_js_1.PRODUCT_VERSION_ENV]), process.env);
|
|
527
529
|
}
|
|
528
530
|
catch (err) {
|
|
529
531
|
consoleLogger.warn(`agent root boot confirmation failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -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: 190 Skipped (legacy): 3
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.LEGACY_SHAPE_SKIP = void 0;
|
|
8
8
|
exports.mountAllCaps = mountAllCaps;
|
|
@@ -529,6 +529,22 @@ function mountAllCaps(services) {
|
|
|
529
529
|
recordingSignal: (0, generated_cap_routers_js_1.createCapRouter_recordingSignal)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'recording-signal'), remoteCapProxy),
|
|
530
530
|
records: (0, generated_cap_routers_js_1.createCapRouter_records)((_ctx) => reg?.getSingleton('records') ?? null, remoteCapProxy),
|
|
531
531
|
remote: (0, generated_cap_routers_js_1.createCapRouter_remote)((_ctx) => reg?.getSingleton('remote') ?? null, remoteCapProxy),
|
|
532
|
+
remoteLayoutComponents: (0, generated_cap_routers_js_1.createCapRouter_remoteLayoutComponents)((_ctx, addonId) => {
|
|
533
|
+
if (!reg)
|
|
534
|
+
return null;
|
|
535
|
+
if (addonId !== undefined) {
|
|
536
|
+
return reg.getProviderByAddonId('remote-layout-components', addonId);
|
|
537
|
+
}
|
|
538
|
+
const entries = reg.getCollectionEntries('remote-layout-components');
|
|
539
|
+
if (entries.length === 0)
|
|
540
|
+
return null;
|
|
541
|
+
const providers = entries.map(([, p]) => p);
|
|
542
|
+
const first = providers[0];
|
|
543
|
+
return {
|
|
544
|
+
...first,
|
|
545
|
+
listComponents: (0, cap_mount_helpers_js_1.concatCollection)(providers, 'listComponents'),
|
|
546
|
+
};
|
|
547
|
+
}, remoteCapProxy),
|
|
532
548
|
runningState: (0, generated_cap_routers_js_1.createCapRouter_runningState)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'running-state'), remoteCapProxy),
|
|
533
549
|
sceneMonitor: (0, generated_cap_routers_js_1.createCapRouter_sceneMonitor)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'scene-monitor'), remoteCapProxy),
|
|
534
550
|
scriptRunner: (0, generated_cap_routers_js_1.createCapRouter_scriptRunner)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'script-runner'), remoteCapProxy),
|