@camstack/server 1.2.14 → 1.2.16

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.
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.getDeployStageRegistry = getDeployStageRegistry;
37
37
  exports.registerDeployBundleRoute = registerDeployBundleRoute;
38
+ exports.hubBundleBaseUrl = hubBundleBaseUrl;
38
39
  exports.buildHubHttpSource = buildHubHttpSource;
39
40
  exports.registerAddonUploadRoute = registerAddonUploadRoute;
40
41
  const fs = __importStar(require("node:fs"));
@@ -81,6 +82,7 @@ function registerDeployBundleRoute(fastify) {
81
82
  const MAX_UPLOAD_BYTES = 50 * 1024 * 1024;
82
83
  const AGENT_DEPLOY_TIMEOUT_MS = 60_000;
83
84
  const AGENT_DEPLOY_CONTROL_TIMEOUT_MS = 30_000;
85
+ /** Base URL agents pull staged deploy bundles from. */
84
86
  function hubBundleBaseUrl() {
85
87
  return process.env['CAMSTACK_HUB_PUBLIC_URL'] ?? 'https://127.0.0.1:4443';
86
88
  }
@@ -370,6 +370,12 @@ function buildNodesProvider(agentRegistry, moleculer, addonRegistry, getNodeRoot
370
370
  await broker.call('$agent.undeploy', {
371
371
  addonId: input.addonId,
372
372
  }, { nodeID: input.nodeId, timeout: 30_000 });
373
+ // Drop it from the node's intended set. Without this the addon back-fill
374
+ // would put the package straight back on the next reconnect — the
375
+ // reconcile converges a node to the roster it last declared, so a
376
+ // deliberate per-node removal has to be recorded as such. This is the
377
+ // operator gesture that shrinks the record; nothing else does.
378
+ await agentRegistry.noteAddonUndeployed(input.nodeId, input.addonId);
373
379
  return { success: true };
374
380
  },
375
381
  restartAddon: async (input) => {
@@ -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: 139 Skipped (legacy): 3
5
+ // Mounted: 140 Skipped (legacy): 3
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.LEGACY_SHAPE_SKIP = void 0;
8
8
  exports.mountAllCaps = mountAllCaps;
@@ -401,6 +401,8 @@ function mountAllCaps(services) {
401
401
  system: (0, generated_cap_routers_js_1.createCapRouter_system)((_ctx) => reg?.getSingleton('system') ?? null, remoteCapProxy),
402
402
  tamper: (0, generated_cap_routers_js_1.createCapRouter_tamper)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'tamper'), remoteCapProxy),
403
403
  temperatureSensor: (0, generated_cap_routers_js_1.createCapRouter_temperatureSensor)((_ctx) => (0, cap_mount_helpers_js_1.requireDeviceScoped)(reg, 'temperature-sensor'), remoteCapProxy),
404
+ terminalSession: (0, generated_cap_routers_js_1.createCapRouter_terminalSession)((_ctx) => reg?.getSingleton('terminal-session') ??
405
+ null, remoteCapProxy),
404
406
  toast: (0, generated_cap_routers_js_1.createCapRouter_toast)((_ctx) => reg?.getSingleton('toast') ?? null, remoteCapProxy),
405
407
  turnProvider: (0, generated_cap_routers_js_1.createCapRouter_turnProvider)((_ctx, addonId) => {
406
408
  if (!reg)