@camstack/server 1.1.31 → 1.1.33

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.
@@ -359,9 +359,17 @@ function buildNodesProvider(agentRegistry, moleculer, addonRegistry) {
359
359
  return { success: true };
360
360
  }
361
361
  const agentNodeId = input.nodeId.includes('/') ? input.nodeId.split('/')[0] : input.nodeId;
362
- await broker.call('$agent.restart', {
362
+ // Propagate the agent's REAL result instead of a hardcoded success.
363
+ // `$agent.restart` throws on failure (surfaced as a rejected broker.call),
364
+ // but on the happy path it returns the agent's `{ success, addonId, pid }`
365
+ // — honour its `success` flag so a future non-throwing failure is not
366
+ // reported as a phantom success. Mirrors the hub-local branch above.
367
+ const result = await broker.call('$agent.restart', {
363
368
  addonId: input.addonId,
364
369
  }, { nodeID: agentNodeId, timeout: 30_000 });
370
+ if (typeof result === 'object' && result !== null && 'success' in result) {
371
+ return { success: result.success };
372
+ }
365
373
  return { success: true };
366
374
  },
367
375
  restartProcess: async (input) => {
@@ -5405,6 +5405,22 @@ function createCapRouter_pipelineOrchestrator(getProvider, _createRemoteProxy) {
5405
5405
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5406
5406
  return p.setAgentMaxCameras(input);
5407
5407
  }),
5408
+ setAgentDetectWeight: trpc_middleware_js_1.adminProcedure
5409
+ .input(types_75.pipelineOrchestratorCapability.methods.setAgentDetectWeight.input.loose())
5410
+ .output(types_75.pipelineOrchestratorCapability.methods.setAgentDetectWeight.output)
5411
+ .mutation(async ({ input, ctx }) => {
5412
+ const p = requireCapProvider('pipeline-orchestrator', () => getProvider(ctx));
5413
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5414
+ return p.setAgentDetectWeight(input);
5415
+ }),
5416
+ setAgentCapabilities: trpc_middleware_js_1.adminProcedure
5417
+ .input(types_75.pipelineOrchestratorCapability.methods.setAgentCapabilities.input.loose())
5418
+ .output(types_75.pipelineOrchestratorCapability.methods.setAgentCapabilities.output)
5419
+ .mutation(async ({ input, ctx }) => {
5420
+ const p = requireCapProvider('pipeline-orchestrator', () => getProvider(ctx));
5421
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
5422
+ return p.setAgentCapabilities(input);
5423
+ }),
5408
5424
  getCameraSettings: trpc_middleware_js_1.protectedProcedure
5409
5425
  .input(types_75.pipelineOrchestratorCapability.methods.getCameraSettings.input.loose())
5410
5426
  .output(types_75.pipelineOrchestratorCapability.methods.getCameraSettings.output)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.1.31",
3
+ "version": "1.1.33",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist",
@@ -24,6 +24,8 @@
24
24
  "dependencies": {
25
25
  "@camstack/addon-admin-ui": "*",
26
26
  "@camstack/addon-advanced-notifier": "*",
27
+ "@camstack/addon-decoder-ffmpeg": "*",
28
+ "@camstack/addon-decoder-nodeav": "*",
27
29
  "@camstack/addon-notifiers": "*",
28
30
  "@camstack/addon-pipeline": "*",
29
31
  "@camstack/addon-pipeline-orchestrator": "*",