Reduce uploader shutdown stalls and add bounded runtime profiling
CI / verify (push) Canceled after 0s

This commit is contained in:
Sucukdeluxe committed 2026-10-20 14:30:05 +02:00
1 parent 80eb878f1b
commit fe3797fd18
10 files changed
+121 -18

No files matched your search

+3 -1
View File
@@ -16,7 +16,7 @@ function page(items, args) {
}
function createMcpApp({ loadConfig, invoke, invokeGuarded = (_context, channel, ...args) => invoke(channel, ...args), renderer, collectors, getGrants, trashFile, canWrite,
getCapabilities, getProtectedPaths, getInstallationId, getDiagnosticSources, getRuntimeDiagnostics = () => null, getPerformance = () => null, getSystemMetrics = () => null, updates }) {
getCapabilities, getProtectedPaths, getInstallationId, getDiagnosticSources, getRuntimeDiagnostics = () => null, getPerformance = () => null, getSystemMetrics = () => null, profile, updates }) {
const transfers = createMcpTransfers({ getGrants, getCapabilities, getProtectedPaths, getInstallationId });
const sanitize = createMcpSanitizer(loadConfig);
const guard = context => {
@@ -78,6 +78,8 @@ function createMcpApp({ loadConfig, invoke, invokeGuarded = (_context, channel,
})), boundaries: ['Permissions and directory grants can only be changed locally.', 'Destructive actions require an exact local confirmation; MCP cannot approve it.', 'No arbitrary shell, SQL, mouse/keyboard or screen control.', 'Paused automation is resumed with mhu_automation_resume. A disabled monitor requires mhu_automation_start.'] };
},
mhu_performance_get: () => getPerformance(),
mhu_profile_start: args => profile.start(args.seconds),
mhu_profile_get: () => profile.snapshot(),
mhu_io_limits_get: () => getUploadReadSnapshot(),
mhu_io_limits_update: ({ readConcurrency }, context) => {
canWrite(); guard(context);