@camstack/server 1.2.71 → 1.2.72

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.
@@ -44,37 +44,37 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
44
44
  };
45
45
  Object.defineProperty(exports, "__esModule", { value: true });
46
46
  exports.bootManual = bootManual;
47
- const path = __importStar(require("node:path"));
48
47
  const node_crypto_1 = require("node:crypto");
49
- const fastify_1 = __importDefault(require("fastify"));
48
+ const path = __importStar(require("node:path"));
50
49
  const types_1 = require("@camstack/types");
51
- const lifecycle_runner_singleton_1 = require("./core/lifecycle/lifecycle-runner.singleton");
50
+ const fastify_1 = __importDefault(require("fastify"));
51
+ const addon_upload_1 = require("./api/addon-upload");
52
+ const cap_providers_1 = require("./api/core/cap-providers");
53
+ const post_boot_service_1 = require("./boot/post-boot.service");
54
+ const addon_package_service_1 = require("./core/addon/addon-package.service");
55
+ const addon_registry_service_1 = require("./core/addon/addon-registry.service");
56
+ const addon_search_service_1 = require("./core/addon/addon-search.service");
57
+ const addon_bridge_service_1 = require("./core/addon-bridge/addon-bridge.service");
58
+ const addon_pages_service_1 = require("./core/addon-pages/addon-pages.service");
59
+ const addon_widgets_service_1 = require("./core/addon-widgets/addon-widgets.service");
60
+ const agent_registry_service_1 = require("./core/agent/agent-registry.service");
61
+ const cluster_node_history_store_1 = require("./core/agent/cluster-node-history-store");
62
+ const auth_service_1 = require("./core/auth/auth.service");
63
+ const capability_service_1 = require("./core/capability/capability.service");
52
64
  const config_service_1 = require("./core/config/config.service");
53
- const logging_service_1 = require("./core/logging/logging.service");
54
65
  const event_bus_service_1 = require("./core/events/event-bus.service");
55
- const storage_service_1 = require("./core/storage/storage.service");
56
- const capability_service_1 = require("./core/capability/capability.service");
57
66
  const feature_service_1 = require("./core/feature/feature.service");
58
- const auth_service_1 = require("./core/auth/auth.service");
59
- const stream_probe_service_1 = require("./core/streaming/stream-probe.service");
67
+ const lifecycle_runner_singleton_1 = require("./core/lifecycle/lifecycle-runner.singleton");
68
+ const logging_service_1 = require("./core/logging/logging.service");
69
+ const moleculer_service_1 = require("./core/moleculer/moleculer.service");
60
70
  const network_quality_service_1 = require("./core/network/network-quality.service");
61
- const toast_wrapper_service_1 = require("./core/notification/toast-wrapper.service");
62
71
  const notification_wrapper_service_1 = require("./core/notification/notification-wrapper.service");
63
- const addon_pages_service_1 = require("./core/addon-pages/addon-pages.service");
64
- const addon_widgets_service_1 = require("./core/addon-widgets/addon-widgets.service");
65
- const addon_bridge_service_1 = require("./core/addon-bridge/addon-bridge.service");
66
- const moleculer_service_1 = require("./core/moleculer/moleculer.service");
67
- const agent_registry_service_1 = require("./core/agent/agent-registry.service");
68
- const cluster_node_history_store_1 = require("./core/agent/cluster-node-history-store");
69
- const addon_upload_1 = require("./api/addon-upload");
70
- const addon_registry_service_1 = require("./core/addon/addon-registry.service");
71
- const addon_search_service_1 = require("./core/addon/addon-search.service");
72
- const addon_package_service_1 = require("./core/addon/addon-package.service");
72
+ const toast_wrapper_service_1 = require("./core/notification/toast-wrapper.service");
73
73
  const repl_engine_service_1 = require("./core/repl/repl-engine.service");
74
74
  const server_update_service_1 = require("./core/server-update/server-update.service");
75
+ const storage_service_1 = require("./core/storage/storage.service");
76
+ const stream_probe_service_1 = require("./core/streaming/stream-probe.service");
75
77
  const topology_emitter_service_1 = require("./core/topology/topology-emitter.service");
76
- const cap_providers_1 = require("./api/core/cap-providers");
77
- const post_boot_service_1 = require("./boot/post-boot.service");
78
78
  // ---------------------------------------------------------------------------
79
79
  // Service container — narrowing via `instanceof`, no casts.
80
80
  // ---------------------------------------------------------------------------
@@ -147,11 +147,30 @@ async function bootManual(opts) {
147
147
  const addonPackageService = new addon_package_service_1.AddonPackageService(loggingService, eventBusService, configService, addonRegistryService, notificationWrapper, toastWrapper);
148
148
  // Addon back-fill delivery seam. Wired here (not in the AgentRegistryService
149
149
  // constructor) because it needs AddonPackageService, which is a later layer.
150
- // Bytes come from the hub's own resolution of the package the agent needs no
151
- // registry reachability of its own, and every node in the cluster lands on the
152
- // same version. Delivery is an RPC pair, never an event (D8/D11).
150
+ // Bytes come from THE HUB'S OWN INSTALLED COPY whenever it has one, and only
151
+ // from the registry when it does not. This line used to claim that while
152
+ // calling `packPackage` `npm pack <name>@<version>` so the back-fill
153
+ // repaired a node by installing the REGISTRY's build of a version over the
154
+ // one an operator had just deployed. Same name, same version, different
155
+ // bundle: every `camstack deploy … -n little-unraid` on 2026-08-07 was
156
+ // reverted ~1.5s later and read as a stale dist. See `packInstalledPackage`.
157
+ // Delivery is an RPC pair, never an event (D8/D11).
158
+ const backfillLogger = loggingService.createLogger('agent-backfill');
153
159
  agentRegistryService.setAddonBackfill({
154
- pack: async (name, version) => (await addonPackageService.packPackage(name, version)).buffer,
160
+ pack: async (name, version) => {
161
+ const installed = await addonPackageService.packInstalledPackage(name);
162
+ // Name the SOURCE. This delivery overwrites whatever the node has, so
163
+ // "which build did we just push" is the first question every time it goes
164
+ // wrong — and for a whole day it was answered nowhere at all.
165
+ backfillLogger.info('back-fill packing', {
166
+ meta: {
167
+ packageName: name,
168
+ source: installed ? 'hub-installed' : 'npm-registry',
169
+ version: installed?.version ?? version,
170
+ },
171
+ });
172
+ return (installed ?? (await addonPackageService.packPackage(name, version))).buffer;
173
+ },
155
174
  deploy: async (nodeId, packageName, bundle) => {
156
175
  await moleculerService.broker.call('$agent.deploy', { addonId: packageName, source: (0, addon_upload_1.buildHubHttpSource)(bundle, (0, addon_upload_1.hubBundleBaseUrl)()) }, { nodeID: nodeId, timeout: agent_registry_service_1.AGENT_BACKFILL_RPC_TIMEOUT_MS });
157
176
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.2.71",
3
+ "version": "1.2.72",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -33,19 +33,19 @@
33
33
  ]
34
34
  },
35
35
  "dependencies": {
36
- "@camstack/addon-admin-ui": "1.2.32",
36
+ "@camstack/addon-admin-ui": "1.2.33",
37
37
  "@camstack/addon-agent-ui": "1.2.10",
38
38
  "@camstack/addon-auth": "1.2.11",
39
39
  "@camstack/addon-decoder-nodeav": "1.2.9",
40
40
  "@camstack/addon-notifiers": "1.2.13",
41
- "@camstack/addon-pipeline": "1.2.43",
42
- "@camstack/addon-pipeline-orchestrator": "1.2.26",
43
- "@camstack/addon-post-analysis": "1.2.48",
41
+ "@camstack/addon-pipeline": "1.2.44",
42
+ "@camstack/addon-pipeline-orchestrator": "1.2.27",
43
+ "@camstack/addon-post-analysis": "1.2.49",
44
44
  "@camstack/sdk": "1.2.10",
45
45
  "@camstack/shm-ring": "1.1.9",
46
- "@camstack/system": "1.2.58",
47
- "@camstack/types": "1.2.42",
48
- "@camstack/ui-library": "1.2.30",
46
+ "@camstack/system": "1.2.59",
47
+ "@camstack/types": "1.2.43",
48
+ "@camstack/ui-library": "1.2.31",
49
49
  "@fastify/compress": "^9.0.0",
50
50
  "@fastify/cookie": "^11.0.2",
51
51
  "@fastify/cors": "^11.2.0",