@camstack/server 1.1.30 → 1.1.32
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
|
-
|
|
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/dist/manual-boot.js
CHANGED
|
@@ -181,7 +181,13 @@ async function bootManual(opts) {
|
|
|
181
181
|
stagingDir: path.join(lifecycleDataDir, 'lifecycle', 'staging'),
|
|
182
182
|
fetchTarball: (name, version, sig) => addonPackageService.fetchAddonTarball(name, version, sig),
|
|
183
183
|
extract: (tgz, destDir) => addonPackageService.extractTarball(tgz, destDir),
|
|
184
|
-
|
|
184
|
+
// Called only for the lockstep COMPANIONS (types/sdk/shm-ring) — the
|
|
185
|
+
// primary (@camstack/system) uses `task.toVersion` directly inside
|
|
186
|
+
// stageFrameworkLockstep. Companions are versioned independently on npm
|
|
187
|
+
// (system's package.json declares them as `*`), so resolve each to its
|
|
188
|
+
// own latest — pinning to `task.toVersion` fetches a non-existent
|
|
189
|
+
// `@camstack/types@<system-version>` tarball and fails the swap.
|
|
190
|
+
resolveVersion: (name) => addonPackageService.resolveFrameworkVersion(name, 'latest'),
|
|
185
191
|
currentVersionOf: (name) => addonPackageService.currentFrameworkVersionOf(name),
|
|
186
192
|
signal,
|
|
187
193
|
}),
|