@synopackageland/cli 0.52.17 → 0.52.18

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.52.18 (2026-11-10)
4
+
5
+ - Add `install.recommended_memory_mb`: below it, the install wizard shows a warning page the administrator can continue past, with the NAS memory, the recommendation and the App's optional `install.recommended_memory_message` catalog text in each wizard language. Preinst, upgrades and CLI installations never check it.
6
+ - Report `recommendedMemoryMb` in `inspect --json` and verify the generated install wizards against the packaged declaration.
7
+ - Add the `INSTALL_RECOMMENDED_MEMORY_INVALID` explanation.
8
+
3
9
  ## 0.52.17 (2026-11-09)
4
10
 
5
11
  - Use SDK 0.53.26 by default.
@@ -1,5 +1,6 @@
1
1
  import { type Locale } from "../standalone/i18n.js";
2
2
  import { type Translate } from "./wizard-i18n.js";
3
+ import { type MemoryAdvice } from "../standalone/install-memory.js";
3
4
  /** One step of a DSM install wizard; `items` are rendered verbatim as JSON. */
4
5
  export interface InstallWizardStep {
5
6
  step_title: string;
@@ -18,9 +19,13 @@ export interface InstallWizardFiles {
18
19
  * versions and flows that do not run the dynamic script; both carry the same
19
20
  * items, and only the dynamic one adds the reuse notice when data exists.
20
21
  */
21
- export declare function renderInstallWizardFiles(packageName: string, render: (t: Translate) => InstallWizardStep[], minMemoryMb?: number): InstallWizardFiles;
22
- /** Prepend to an existing dynamic wizard; retain its normal pages when memory is sufficient. */
23
- export declare function renderMemoryWizardCheck(minMemoryMb: number | undefined, locale: Locale): string;
22
+ export declare function renderInstallWizardFiles(packageName: string, render: (t: Translate) => InstallWizardStep[], minMemoryMb?: number, advice?: MemoryAdvice): InstallWizardFiles;
23
+ /**
24
+ * Prepend to an existing dynamic wizard; retain its normal pages when memory is sufficient.
25
+ * With `advice`, it also defines the filter that puts a warning page before
26
+ * those pages; the warning has no validator, so Next stays available.
27
+ */
28
+ export declare function renderMemoryWizardCheck(minMemoryMb: number | undefined, locale: Locale, advice?: MemoryAdvice): string;
24
29
  /** Lists the App's unauthenticated service callbacks for the administrator. */
25
30
  export declare function integrationWizardSteps(t: Translate, methods?: readonly string[]): InstallWizardStep[];
26
31
  /** The native-go install step: no parameters, only the app-space consent. */
@@ -1,6 +1,6 @@
1
1
  import { DSM_LANGS, LOCALES } from "../standalone/i18n.js";
2
2
  import { renderWizardFiles, translator } from "./wizard-i18n.js";
3
- import { memoryReason, renderMemoryProbe } from "../standalone/install-memory.js";
3
+ import { memoryAdviceTexts, memoryReason, renderMemoryProbe } from "../standalone/install-memory.js";
4
4
  const BASE = "install_uifile";
5
5
  function shellQuote(value) {
6
6
  return `'${value.replaceAll("'", "'\\''")}'`;
@@ -27,7 +27,7 @@ function withReuseNotice(steps, packageName, t) {
27
27
  * is chosen after the wizard on some flows). The wizard JSON is written to
28
28
  * `SYNOPKG_TEMP_LOGFILE`, DSM's documented channel, or stdout without it.
29
29
  */
30
- function renderDynamicScript(packageName, withData, withoutData, memoryCheck = "") {
30
+ function renderDynamicScript(packageName, withData, withoutData, memoryCheck = "", advice = false) {
31
31
  return `#!/bin/sh
32
32
  # Generated by synopkgland. Read-only: it checks whether this package already
33
33
  # has App Data on a volume, then prints the install wizard for this language.
@@ -42,7 +42,7 @@ done
42
42
  if [ -n "\${SYNOPKG_TEMP_LOGFILE:-}" ]; then
43
43
  exec > "$SYNOPKG_TEMP_LOGFILE"
44
44
  fi
45
- if [ -n "$existing" ]; then
45
+ ${advice ? "{\n" : ""}if [ -n "$existing" ]; then
46
46
  cat <<'SYNOPKGLAND_WIZARD'
47
47
  ${withData}
48
48
  SYNOPKGLAND_WIZARD
@@ -51,7 +51,7 @@ else
51
51
  ${withoutData}
52
52
  SYNOPKGLAND_WIZARD
53
53
  fi
54
- `;
54
+ ${advice ? "} | synopkgland_memory_advice_page\n" : ""}`;
55
55
  }
56
56
  /**
57
57
  * Builds the static `<base>` wizard files and one dynamic `<base>.sh` script
@@ -59,7 +59,7 @@ fi
59
59
  * versions and flows that do not run the dynamic script; both carry the same
60
60
  * items, and only the dynamic one adds the reuse notice when data exists.
61
61
  */
62
- export function renderInstallWizardFiles(packageName, render, minMemoryMb) {
62
+ export function renderInstallWizardFiles(packageName, render, minMemoryMb, advice) {
63
63
  const staticFiles = renderWizardFiles(BASE, render);
64
64
  const dynamic = {};
65
65
  for (const locale of LOCALES) {
@@ -67,14 +67,18 @@ export function renderInstallWizardFiles(packageName, render, minMemoryMb) {
67
67
  const steps = render(t);
68
68
  const withData = JSON.stringify(withReuseNotice(steps, packageName, t), null, 2);
69
69
  const withoutData = JSON.stringify(steps, null, 2);
70
- dynamic[localeName(locale, ".sh")] = renderDynamicScript(packageName, withData, withoutData, renderMemoryWizardCheck(minMemoryMb, locale));
70
+ dynamic[localeName(locale, ".sh")] = renderDynamicScript(packageName, withData, withoutData, renderMemoryWizardCheck(minMemoryMb, locale, advice), Boolean(advice));
71
71
  }
72
72
  return { static: staticFiles, dynamic };
73
73
  }
74
- /** Prepend to an existing dynamic wizard; retain its normal pages when memory is sufficient. */
75
- export function renderMemoryWizardCheck(minMemoryMb, locale) {
74
+ /**
75
+ * Prepend to an existing dynamic wizard; retain its normal pages when memory is sufficient.
76
+ * With `advice`, it also defines the filter that puts a warning page before
77
+ * those pages; the warning has no validator, so Next stays available.
78
+ */
79
+ export function renderMemoryWizardCheck(minMemoryMb, locale, advice) {
76
80
  if (minMemoryMb === undefined)
77
- return "";
81
+ return advice ? renderMemoryProbe(undefined, advice.mb) + renderMemoryAdvicePage(advice, locale) : "";
78
82
  const reason = memoryReason(minMemoryMb, locale, "__SYNOPKGLAND_MEMORY_GB__");
79
83
  const page = [{
80
84
  step_title: translator(locale)("memory.title"),
@@ -86,7 +90,7 @@ export function renderMemoryWizardCheck(minMemoryMb, locale) {
86
90
  }];
87
91
  // Only a formatted numeric value enters JSON, never shell or meminfo text.
88
92
  const json = JSON.stringify(page, null, 2);
89
- return `${renderMemoryProbe(minMemoryMb)}if [ -n "$synopkgland_memory_low" ]; then
93
+ return `${renderMemoryProbe(minMemoryMb, advice?.mb)}if [ -n "$synopkgland_memory_low" ]; then
90
94
  if [ -n "\${SYNOPKG_TEMP_LOGFILE:-}" ]; then
91
95
  exec > "$SYNOPKG_TEMP_LOGFILE"
92
96
  fi
@@ -95,6 +99,30 @@ ${json}
95
99
  SYNOPKGLAND_MEMORY_WIZARD
96
100
  exit 0
97
101
  fi
102
+ ${advice ? renderMemoryAdvicePage(advice, locale) : ""}`;
103
+ }
104
+ /**
105
+ * A shell filter over the wizard's JSON array (pretty-printed, so its first
106
+ * line is \`[\` or \`[]\`): below the recommendation it emits the warning
107
+ * page first; otherwise it passes the wizard through unchanged.
108
+ */
109
+ function renderMemoryAdvicePage(advice, locale) {
110
+ const page = {
111
+ step_title: translator(locale)("memory.recommendedTitle"),
112
+ items: memoryAdviceTexts(advice, locale, "__SYNOPKGLAND_MEMORY_GB__").map(desc => ({ desc })),
113
+ };
114
+ // Only a formatted numeric value enters JSON, never shell or meminfo text.
115
+ return `synopkgland_memory_advice_page() {
116
+ if [ -z "$synopkgland_memory_advice" ]; then
117
+ cat
118
+ return
119
+ fi
120
+ printf '[\\n'
121
+ sed "s/__SYNOPKGLAND_MEMORY_GB__/$synopkgland_memory_gb/g" <<'SYNOPKGLAND_MEMORY_ADVICE'
122
+ ${JSON.stringify(page, null, 2)}
123
+ SYNOPKGLAND_MEMORY_ADVICE
124
+ sed -e '1s/^\\[\\]$/]/' -e '1s/^\\[$/,/'
125
+ }
98
126
  `;
99
127
  }
100
128
  /** Lists the App's unauthenticated service callbacks for the administrator. */
@@ -21,6 +21,28 @@ export declare const WIZARD_MESSAGES: {
21
21
  es: string;
22
22
  it: string;
23
23
  };
24
+ "memory.recommendedTitle": {
25
+ en: string;
26
+ "zh-TW": string;
27
+ "zh-CN": string;
28
+ ja: string;
29
+ ko: string;
30
+ de: string;
31
+ fr: string;
32
+ es: string;
33
+ it: string;
34
+ };
35
+ "memory.recommended": {
36
+ en: string;
37
+ "zh-TW": string;
38
+ "zh-CN": string;
39
+ ja: string;
40
+ ko: string;
41
+ de: string;
42
+ fr: string;
43
+ es: string;
44
+ it: string;
45
+ };
24
46
  "ports.http": {
25
47
  en: string;
26
48
  "zh-TW": string;
@@ -21,6 +21,28 @@ export const WIZARD_MESSAGES = {
21
21
  "es": "Esta aplicación requiere al menos {required} GB de RAM; este NAS tiene {actual} GB",
22
22
  "it": "Questa app richiede almeno {required} GB di RAM; questo NAS dispone di {actual} GB"
23
23
  },
24
+ "memory.recommendedTitle": {
25
+ "en": "Memory recommendation",
26
+ "zh-TW": "記憶體建議",
27
+ "zh-CN": "内存建议",
28
+ "ja": "推奨メモリ",
29
+ "ko": "권장 메모리",
30
+ "de": "Arbeitsspeicherempfehlung",
31
+ "fr": "Mémoire recommandée",
32
+ "es": "Memoria recomendada",
33
+ "it": "Memoria consigliata"
34
+ },
35
+ "memory.recommended": {
36
+ "en": "This App recommends at least {recommended} GB of RAM; this NAS has {actual} GB. Installation can continue, but the App may run slowly",
37
+ "zh-TW": "此應用程式建議至少 {recommended} GB 記憶體,此 NAS 有 {actual} GB。仍可繼續安裝,但應用程式可能執行緩慢",
38
+ "zh-CN": "此应用程序建议至少 {recommended} GB 内存,此 NAS 有 {actual} GB。仍可继续安装,但应用程序可能运行缓慢",
39
+ "ja": "このアプリには {recommended} GB 以上の RAM を推奨します。この NAS のメモリは {actual} GB です。インストールは続行できますが、アプリの動作が遅くなる場合があります",
40
+ "ko": "이 앱에는 {recommended} GB 이상의 RAM을 권장합니다. 이 NAS의 메모리는 {actual} GB입니다. 설치는 계속할 수 있지만 앱이 느리게 실행될 수 있습니다",
41
+ "de": "Diese App empfiehlt mindestens {recommended} GB RAM; dieses NAS verfügt über {actual} GB. Die Installation kann fortgesetzt werden, aber die App läuft möglicherweise langsam",
42
+ "fr": "Cette application recommande au moins {recommended} Go de RAM ; ce NAS dispose de {actual} Go. L'installation peut continuer, mais l'application risque d'être lente",
43
+ "es": "Esta aplicación recomienda al menos {recommended} GB de RAM; este NAS tiene {actual} GB. La instalación puede continuar, pero la aplicación podría funcionar con lentitud",
44
+ "it": "Questa app consiglia almeno {recommended} GB di RAM; questo NAS dispone di {actual} GB. L'installazione può continuare, ma l'app potrebbe essere lenta"
45
+ },
24
46
  "ports.http": {
25
47
  "en": "HTTP port",
26
48
  "zh-TW": "HTTP 連接埠",
@@ -51,6 +51,7 @@ export const ERROR_REGISTRY = {
51
51
  STANDALONE_IDENTITY_WITHOUT_PORTAL: { code: 'STANDALONE_IDENTITY_WITHOUT_PORTAL', description: 'Standalone identity is enabled without an Application Portal declaration', suggestion: 'Use HTTPS-only standalone login outside DSM windows; declare portal only when an alias is needed' },
52
52
  INSTALL_SETTINGS_INVALID: { "code": "INSTALL_SETTINGS_INVALID", "description": "The installation setting declaration is invalid.", "suggestion": "Declare 1–32 lowercase identifier keys in install.settings, each with type https-origin, a plain label and an explicit boolean required; omit defaults and values." },
53
53
  INSTALL_MIN_MEMORY_INVALID: { code: "INSTALL_MIN_MEMORY_INVALID", description: "The physical memory requirement or its packaged check is invalid.", suggestion: "Set install.min_memory_mb to a positive integer in MiB, at most 2147483647, and rebuild with the generated package-account hooks and wizards." },
54
+ INSTALL_RECOMMENDED_MEMORY_INVALID: { code: "INSTALL_RECOMMENDED_MEMORY_INVALID", description: "The recommended physical memory, its App message or its packaged install wizard warning is invalid.", suggestion: "Set install.recommended_memory_mb to a positive integer in MiB above install.min_memory_mb, keep the App's install.recommended_memory_message catalog text plain and single-line (1-300 characters, without <, > or &) with an English entry, and rebuild with the generated wizards." },
54
55
  INSTALL_PORT_INVALID: { code: "INSTALL_PORT_INVALID", description: "The installation port declaration or selected value is invalid", suggestion: "Enable install.ports for a declared identity gateway and choose distinct available non-reserved ports between 1024 and 65535" },
55
56
  SDK_PORT_SETTINGS_UNSUPPORTED: { code: "SDK_PORT_SETTINGS_UNSUPPORTED", description: "The selected SDK does not provide installer-selected ports", suggestion: "Pin SDK 0.38.2 or a matching supported release and rebuild with the matching CLI" },
56
57
  SDK_INSTALL_SETTINGS_UNSUPPORTED: { "code": "SDK_INSTALL_SETTINGS_UNSUPPORTED", "description": "The selected SDK does not provide native installation settings.", "suggestion": "Pin SDK 0.24.0 or a matching supported release with installsettings/cmd/control, then rebuild with the matching CLI." },
@@ -1 +1 @@
1
- {"module":"github.com/synopackageland/syno-pkg-land-sdk","version":"development","local":true}
1
+ {"module":"github.com/synopackageland/syno-pkg-land-sdk","version":"0.53.26","local":false}
@@ -21,6 +21,8 @@ export interface SpkInspection {
21
21
  dependencies?: PackageDependencies;
22
22
  installSettings?: InstallSettings;
23
23
  minMemoryMb?: number;
24
+ /** `install.recommended_memory_mb`: the non-blocking install wizard warning threshold. */
25
+ recommendedMemoryMb?: number;
24
26
  /** Hyper Backup application backup, as sdk-package.json records it. */
25
27
  hyperBackup?: HyperBackup;
26
28
  identityGateway?: GatewayAdmissionReport;
@@ -6,7 +6,7 @@ import { DAEMON_NOFILE_UNSUPPORTED, DAEMON_NOFILE_ACTIVATION_PROBLEM, readNoFile
6
6
  import { gatewayIngressPathProblem, gatewayIngressOwnershipSupported } from './gateway-ingress.js';
7
7
  import { renderGatewayIngressCheck } from './native-gateway.js';
8
8
  import { portDefaults, portInstallSteps } from "./install-ports.js";
9
- import { readMinMemoryMb, renderMemoryHook } from "./install-memory.js";
9
+ import { readMemoryAdviceRecord, readMinMemoryMb, renderMemoryHook } from "./install-memory.js";
10
10
  import { inspectPackageDependencies, dependencyInfo } from "./package-dependencies.js";
11
11
  import { readInstallSettings, settingsInstallSteps, settingsConfig, renderSettingsHook, renderNativeFolderHook, nativeFolderConfig } from './install-settings.js';
12
12
  import { MODULE_UI_ENTRY, uiTreeDigest } from "./ui-assets.js";
@@ -189,6 +189,7 @@ export async function inspectSpk(spkPath, expectedKind, options = {}) {
189
189
  const { identityGateway, gateway } = await inspectGatewayAdmission(dir, paths, metadata.provider_only_oidc, findings);
190
190
  await inspectExternalGateway(dir, paths, payload, metadata.gateway_external, findings);
191
191
  const minMemoryMb = inspectMemoryRequirement(dir, metadata.minMemoryMb, findings);
192
+ const memoryAdvice = readMemoryAdviceRecord(metadata.recommendedMemory, minMemoryMb, e => findings.push(`${e.code} ${e.message}`));
192
193
  const installSettings = await inspectInstallSettings(dir, payload, metadata, findings);
193
194
  const hyperBackup = metadataText === undefined ? undefined : await inspectHyperBackup(dir, async () => {
194
195
  const root = join(dir, "backup-inspection");
@@ -202,7 +203,7 @@ export async function inspectSpk(spkPath, expectedKind, options = {}) {
202
203
  const integrations = metadata.integrations ?? [];
203
204
  await inspectCtlArtifacts(dir, paths, metadata.ctl, metadata.entry, findings);
204
205
  if (metadata.compose !== undefined) {
205
- const result = await inspectUnifiedCompose(dir, payload, { ...metadata, installSettings, minMemoryMb }, findings, options.baseline);
206
+ const result = await inspectUnifiedCompose(dir, payload, { ...metadata, installSettings, minMemoryMb, memoryAdvice }, findings, options.baseline);
206
207
  if (dependencies) {
207
208
  result.dependencies = dependencies;
208
209
  }
@@ -210,6 +211,8 @@ export async function inspectSpk(spkPath, expectedKind, options = {}) {
210
211
  result.installSettings = installSettings;
211
212
  if (minMemoryMb !== undefined)
212
213
  result.minMemoryMb = minMemoryMb;
214
+ if (memoryAdvice)
215
+ result.recommendedMemoryMb = memoryAdvice.mb;
213
216
  if (hyperBackup)
214
217
  result.hyperBackup = hyperBackup;
215
218
  if (identityGateway)
@@ -351,7 +354,7 @@ export async function inspectSpk(spkPath, expectedKind, options = {}) {
351
354
  ? await inspectLoginStyle(dir, info.package, Boolean(portal || executor?.policy.portal), findings)
352
355
  : undefined;
353
356
  if (standalone)
354
- checkSharedFolder(dir, findings, info.package, sharedFolder, executor?.policy.scope === "install-selected", portal, hasExecutor, nativeGateway, info.os_min_ver, installSettings, integrations, metadata.installPorts, minMemoryMb, options.baseline);
357
+ checkSharedFolder(dir, findings, info.package, sharedFolder, executor?.policy.scope === "install-selected", portal, hasExecutor, nativeGateway, info.os_min_ver, installSettings, integrations, metadata.installPorts, minMemoryMb, memoryAdvice, options.baseline);
355
358
  const icon = inspectPackageIcons(dir, findings);
356
359
  const cgiEntry = payload.find((entry) => entry.path === CGI_PAYLOAD_PATH);
357
360
  if (standalone && !cgiEntry) {
@@ -369,6 +372,7 @@ export async function inspectSpk(spkPath, expectedKind, options = {}) {
369
372
  ...(gateway ? { gateway } : {}),
370
373
  ...(installSettings ? { installSettings } : {}),
371
374
  ...(minMemoryMb !== undefined ? { minMemoryMb } : {}),
375
+ ...(memoryAdvice ? { recommendedMemoryMb: memoryAdvice.mb } : {}),
372
376
  ...(hyperBackup ? { hyperBackup } : {}),
373
377
  ...(launch ? { launch } : {}),
374
378
  icon,
@@ -860,8 +864,8 @@ async function inspectUnifiedCompose(dir, payload, metadata, findings, baseline
860
864
  throw new Error("gateway configuration differs from the declared package contract");
861
865
  if (readOptional(join(dir, "conf/privilege")) !== renderNativePrivilege())
862
866
  throw new Error("Compose hooks must run as the package account");
863
- if (!baseline && (manifest.sharedFolder || metadata.installSettings || metadata.installPorts || metadata.minMemoryMb !== undefined)) {
864
- for (const [name, text] of Object.entries(expectedWizardFiles(info.package, manifest.sharedFolder, false, undefined, metadata.installSettings, [], manifest.identityGateway?.listen.https, metadata.installPorts, metadata.minMemoryMb)))
867
+ if (!baseline && (manifest.sharedFolder || metadata.installSettings || metadata.installPorts || metadata.minMemoryMb !== undefined || metadata.memoryAdvice)) {
868
+ for (const [name, text] of Object.entries(expectedWizardFiles(info.package, manifest.sharedFolder, false, undefined, metadata.installSettings, [], manifest.identityGateway?.listen.https, metadata.installPorts, metadata.minMemoryMb, metadata.memoryAdvice)))
865
869
  if (readOptional(join(dir, "WIZARD_UIFILES", name)) !== text)
866
870
  throw new Error(`unexpected WIZARD_UIFILES/${name}; native share selection must match the declaration`);
867
871
  }
@@ -1522,7 +1526,7 @@ function checkBackground(dir, info, payload, findings, executor, daemon, bridge
1522
1526
  * declaration (without one, any present file must be the default native
1523
1527
  * install wizard), and no other install/upgrade wizard file may exist.
1524
1528
  */
1525
- function checkSharedFolder(dir, findings, pkg, folder, selected = false, portal, executor = false, nativeGateway, osMinVer, installSettings, integrations = [], installPortDefinitions = {}, minMemoryMb, baseline = false) {
1529
+ function checkSharedFolder(dir, findings, pkg, folder, selected = false, portal, executor = false, nativeGateway, osMinVer, installSettings, integrations = [], installPortDefinitions = {}, minMemoryMb, memoryAdvice, baseline = false) {
1526
1530
  const wizardDir = join(dir, "WIZARD_UIFILES");
1527
1531
  const present = (existsSync(wizardDir) ? readdirSync(wizardDir) : [])
1528
1532
  .filter((name) => /^(install|upgrade)_uifile(_|\.|$)/.test(name))
@@ -1549,7 +1553,7 @@ function checkSharedFolder(dir, findings, pkg, folder, selected = false, portal,
1549
1553
  : {}),
1550
1554
  ...portalManifest(portal),
1551
1555
  };
1552
- const wizards = expectedWizardFiles(pkg, folder, selected, portal, installSettings, integrations, nativeGateway?.listen.https, installPortDefinitions, minMemoryMb);
1556
+ const wizards = expectedWizardFiles(pkg, folder, selected, portal, installSettings, integrations, nativeGateway?.listen.https, installPortDefinitions, minMemoryMb, memoryAdvice);
1553
1557
  const source = selected
1554
1558
  ? "the install-selected policy"
1555
1559
  : folder
@@ -1560,7 +1564,7 @@ function checkSharedFolder(dir, findings, pkg, folder, selected = false, portal,
1560
1564
  ? "the integrations declaration"
1561
1565
  : "the native-go default install wizard";
1562
1566
  // The default native wizard is optional; a declared shared folder or portal needs all of its files.
1563
- for (const name of baseline ? [] : folder || selected || portal || installSettings || Object.keys(installPortDefinitions).length || integrations.length || minMemoryMb !== undefined
1567
+ for (const name of baseline ? [] : folder || selected || portal || installSettings || Object.keys(installPortDefinitions).length || integrations.length || minMemoryMb !== undefined || memoryAdvice
1564
1568
  ? Object.keys(wizards)
1565
1569
  : present.filter((n) => n in wizards)) {
1566
1570
  if (readOptional(join(wizardDir, name)) !== wizards[name])
@@ -1668,7 +1672,7 @@ async function inspectInstallSettings(dir, payload, metadata, findings) {
1668
1672
  }
1669
1673
  return settings;
1670
1674
  }
1671
- function expectedWizardFiles(pkg, folder, selected = false, portal, installSettings, integrations = [], settingsPort = 0, installPortDefinitions = {}, minMemoryMb) {
1675
+ function expectedWizardFiles(pkg, folder, selected = false, portal, installSettings, integrations = [], settingsPort = 0, installPortDefinitions = {}, minMemoryMb, memoryAdvice) {
1672
1676
  const steps = selected
1673
1677
  ? (t) => [
1674
1678
  ...renderDelegateScopeSteps(t),
@@ -1677,7 +1681,7 @@ function expectedWizardFiles(pkg, folder, selected = false, portal, installSetti
1677
1681
  : folder
1678
1682
  ? sharedFolderInstallSteps(pkg, folder)
1679
1683
  : renderNativeInstallWizard;
1680
- const install = renderInstallWizardFiles(pkg, t => [...steps(t), ...portInstallSteps({ package: pkg, ...(Object.keys(installPortDefinitions).length ? { installPorts: true } : {}) }, installPortDefinitions)(t), ...settingsInstallSteps(installSettings, settingsPort, Object.keys(installPortDefinitions).length ? pkg : undefined)(t), ...(portal ? [renderPortalWizardStep(t, portal.alias)] : []), ...integrationWizardSteps(t, integrations)], minMemoryMb);
1684
+ const install = renderInstallWizardFiles(pkg, t => [...steps(t), ...portInstallSteps({ package: pkg, ...(Object.keys(installPortDefinitions).length ? { installPorts: true } : {}) }, installPortDefinitions)(t), ...settingsInstallSteps(installSettings, settingsPort, Object.keys(installPortDefinitions).length ? pkg : undefined)(t), ...(portal ? [renderPortalWizardStep(t, portal.alias)] : []), ...integrationWizardSteps(t, integrations)], minMemoryMb, memoryAdvice);
1681
1685
  return folderPickerWizardFiles(pkg, folder, {
1682
1686
  ...install.static,
1683
1687
  ...install.dynamic,
@@ -1,9 +1,32 @@
1
1
  import type { StandaloneError } from "./manifest.js";
2
- import { type Locale } from "./i18n.js";
2
+ import { type Catalogs, type Locale } from "./i18n.js";
3
3
  /** MiB of physical MemTotal, not free/available memory or a model allowlist. */
4
4
  export declare function readMinMemoryMb(value: unknown, fail: (error: StandaloneError) => void): number | undefined;
5
+ /** The App's optional catalog text shown under the recommended-memory warning. */
6
+ export declare const RECOMMENDED_MEMORY_MESSAGE_KEY = "install.recommended_memory_message";
7
+ /**
8
+ * `install.recommended_memory_mb`: below it the install wizard shows a
9
+ * warning page the administrator can continue past; nothing is enforced.
10
+ * `messages` are the App's own localized text, English as the fallback.
11
+ */
12
+ export interface MemoryAdvice {
13
+ mb: number;
14
+ messages?: {
15
+ en: string;
16
+ } & Partial<Record<Locale, string>>;
17
+ }
18
+ /** MiB of physical MemTotal, above `install.min_memory_mb` when both are declared. */
19
+ export declare function readRecommendedMemoryMb(value: unknown, minMemoryMb: number | undefined, fail: (error: StandaloneError) => void): number | undefined;
20
+ /** The App message from its catalogs (or a packaged record); undefined when absent, null after reporting. */
21
+ export declare function readMemoryAdviceMessages(catalogs: Partial<Record<string, Record<string, unknown>>> | undefined, fail: (error: StandaloneError) => void): MemoryAdvice["messages"] | undefined | null;
22
+ /** Reads `install.recommended_memory_mb` with the App message from its catalogs. */
23
+ export declare function readMemoryAdvice(value: unknown, minMemoryMb: number | undefined, catalogs: Catalogs | undefined, fail: (error: StandaloneError) => void): MemoryAdvice | undefined;
24
+ /** The `sdk-package.json` record read back for inspect; undefined after reporting. */
25
+ export declare function readMemoryAdviceRecord(value: unknown, minMemoryMb: number | undefined, fail: (error: StandaloneError) => void): MemoryAdvice | undefined;
5
26
  /** Shared by wizard and preinst. A missing, malformed or unreadable read allows installation. */
6
- export declare function renderMemoryProbe(minMemoryMb: number): string;
27
+ export declare function renderMemoryProbe(minMemoryMb: number | undefined, recommendedMemoryMb?: number): string;
28
+ /** The SDK warning, then the App's own text in the same language when it has one. */
29
+ export declare function memoryAdviceTexts(advice: MemoryAdvice, locale: Locale, actual: string): string[];
7
30
  export declare function memoryReason(minMemoryMb: number, locale: Locale, actual: string): string;
8
31
  /** Runs in preinst for both install and upgrade, before other SDK or App work, as the package account. */
9
32
  export declare function renderMemoryHook(minMemoryMb?: number): string;
@@ -11,23 +11,107 @@ export function readMinMemoryMb(value, fail) {
11
11
  }
12
12
  return value;
13
13
  }
14
+ /** The App's optional catalog text shown under the recommended-memory warning. */
15
+ export const RECOMMENDED_MEMORY_MESSAGE_KEY = "install.recommended_memory_message";
16
+ const invalidRecommendation = (message) => ({ code: "INSTALL_RECOMMENDED_MEMORY_INVALID", message });
17
+ /** MiB of physical MemTotal, above `install.min_memory_mb` when both are declared. */
18
+ export function readRecommendedMemoryMb(value, minMemoryMb, fail) {
19
+ if (value === undefined)
20
+ return undefined;
21
+ if (typeof value !== "number" || !Number.isSafeInteger(value) || value < 1 || value > 2147483647) {
22
+ fail(invalidRecommendation("install.recommended_memory_mb must be a positive integer in MiB, at most 2147483647"));
23
+ return undefined;
24
+ }
25
+ if (minMemoryMb !== undefined && value <= minMemoryMb) {
26
+ fail(invalidRecommendation("install.recommended_memory_mb must be greater than install.min_memory_mb"));
27
+ return undefined;
28
+ }
29
+ return value;
30
+ }
31
+ /** Plain single-line wizard text: DSM renders `desc` as markup, so no tags or entities. */
32
+ function adviceText(text) {
33
+ return typeof text === "string" && text.trim() !== "" && text.length <= 300 && !/[\x00-\x1f\x7f<>&]/.test(text);
34
+ }
35
+ /** The App message from its catalogs (or a packaged record); undefined when absent, null after reporting. */
36
+ export function readMemoryAdviceMessages(catalogs, fail) {
37
+ const found = LOCALES.flatMap(locale => catalogs?.[locale]?.[RECOMMENDED_MEMORY_MESSAGE_KEY] === undefined ? [] : [[locale, catalogs[locale][RECOMMENDED_MEMORY_MESSAGE_KEY]]]);
38
+ if (!found.length)
39
+ return undefined;
40
+ const bad = found.filter(([, text]) => !adviceText(text)).map(([locale]) => locale);
41
+ if (bad.length || !found.some(([locale]) => locale === "en")) {
42
+ fail(invalidRecommendation(`${RECOMMENDED_MEMORY_MESSAGE_KEY} must be plain single-line text (1-300 characters, without <, > or &) with an English text${bad.length ? `; invalid in ${bad.join(", ")}` : ""}`));
43
+ return null;
44
+ }
45
+ return Object.fromEntries(found);
46
+ }
47
+ /** Reads `install.recommended_memory_mb` with the App message from its catalogs. */
48
+ export function readMemoryAdvice(value, minMemoryMb, catalogs, fail) {
49
+ const mb = readRecommendedMemoryMb(value, minMemoryMb, fail);
50
+ if (mb === undefined)
51
+ return undefined;
52
+ const messages = readMemoryAdviceMessages(catalogs, fail);
53
+ if (messages === null)
54
+ return undefined;
55
+ return { mb, ...(messages ? { messages } : {}) };
56
+ }
57
+ /** The `sdk-package.json` record read back for inspect; undefined after reporting. */
58
+ export function readMemoryAdviceRecord(value, minMemoryMb, fail) {
59
+ if (value === undefined)
60
+ return undefined;
61
+ if (typeof value !== "object" || value === null || Array.isArray(value) || Object.keys(value).some(key => key !== "mb" && key !== "messages")) {
62
+ fail(invalidRecommendation("the recommended memory record is malformed"));
63
+ return undefined;
64
+ }
65
+ const record = value;
66
+ const mb = readRecommendedMemoryMb(record.mb, minMemoryMb, fail);
67
+ if (mb === undefined) {
68
+ if (record.mb === undefined)
69
+ fail(invalidRecommendation("the recommended memory record has no threshold"));
70
+ return undefined;
71
+ }
72
+ if (record.messages === undefined)
73
+ return { mb };
74
+ const messages = record.messages;
75
+ if (typeof messages !== "object" || messages === null || Array.isArray(messages) || Object.keys(messages).some(locale => !LOCALES.includes(locale))) {
76
+ fail(invalidRecommendation("the recommended memory messages are malformed"));
77
+ return undefined;
78
+ }
79
+ const read = readMemoryAdviceMessages(Object.fromEntries(Object.entries(messages).map(([locale, text]) => [locale, { [RECOMMENDED_MEMORY_MESSAGE_KEY]: text }])), fail);
80
+ if (read === null)
81
+ return undefined;
82
+ if (read === undefined) {
83
+ fail(invalidRecommendation("the recommended memory messages are empty"));
84
+ return undefined;
85
+ }
86
+ return { mb, messages: read };
87
+ }
14
88
  /** Shared by wizard and preinst. A missing, malformed or unreadable read allows installation. */
15
- export function renderMemoryProbe(minMemoryMb) {
89
+ export function renderMemoryProbe(minMemoryMb, recommendedMemoryMb) {
90
+ const low = minMemoryMb === undefined ? "" : ` if LC_ALL=C awk -v kb="$synopkgland_memory_kb" 'BEGIN { exit !(kb < ${minMemoryMb * 1024}) }'; then
91
+ synopkgland_memory_low=1
92
+ fi
93
+ `;
94
+ const advice = recommendedMemoryMb === undefined ? "" : ` if [ -z "$synopkgland_memory_low" ] && LC_ALL=C awk -v kb="$synopkgland_memory_kb" 'BEGIN { exit !(kb < ${recommendedMemoryMb * 1024}) }'; then
95
+ synopkgland_memory_advice=1
96
+ fi
97
+ `;
16
98
  return `synopkgland_memory_kb=$(LC_ALL=C awk '
17
99
  $1 == "MemTotal:" { count++; if (NF == 3 && $2 ~ /^[0-9]+$/ && $2 > 0 && $3 == "kB") total = $2 }
18
100
  END { if (count == 1 && total > 0) printf "%.0f", total; else exit 1 }
19
101
  ' /proc/meminfo 2>/dev/null) || synopkgland_memory_kb=
20
102
  synopkgland_memory_low=
21
- if [ -n "$synopkgland_memory_kb" ]; then
103
+ ${recommendedMemoryMb === undefined ? "" : "synopkgland_memory_advice=\n"}if [ -n "$synopkgland_memory_kb" ]; then
22
104
  synopkgland_memory_gb=$(LC_ALL=C awk -v kb="$synopkgland_memory_kb" 'BEGIN { printf "%.2f", kb / 1048576 }')
23
- if LC_ALL=C awk -v kb="$synopkgland_memory_kb" 'BEGIN { exit !(kb < ${minMemoryMb * 1024}) }'; then
24
- synopkgland_memory_low=1
25
- fi
26
- else
105
+ ${low}${advice}else
27
106
  printf '%s\\n' '[INSTALL_MEMORY_READ_WARNING] Cannot read physical MemTotal; continuing installation' >&2
28
107
  fi
29
108
  `;
30
109
  }
110
+ /** The SDK warning, then the App's own text in the same language when it has one. */
111
+ export function memoryAdviceTexts(advice, locale, actual) {
112
+ const app = advice.messages?.[locale] ?? advice.messages?.en;
113
+ return [translator(locale)("memory.recommended", { recommended: String(Math.ceil(advice.mb / 1024)), actual }), ...(app ? [app] : [])];
114
+ }
31
115
  export function memoryReason(minMemoryMb, locale, actual) {
32
116
  return translator(locale)("memory.required", { required: String(Math.ceil(minMemoryMb / 1024)), actual });
33
117
  }
@@ -1,6 +1,7 @@
1
1
  import { type NativeTexts } from "./dsm-texts.js";
2
2
  import { type TCPListeners } from "./tcp-listeners.js";
3
3
  import { type MobileDeclaration } from './mobile.js';
4
+ import { type MemoryAdvice } from "./install-memory.js";
4
5
  import { type PackageDependencies } from "./package-dependencies.js";
5
6
  import { type InstallSettings } from './install-settings.js';
6
7
  import { type WebLaunchMode } from "../contract/web-launch.js";
@@ -118,6 +119,8 @@ export interface StandaloneManifest {
118
119
  installPorts?: true;
119
120
  /** `install.min_memory_mb`: minimum physical MemTotal in MiB at install and upgrade. */
120
121
  minMemoryMb?: number;
122
+ /** `install.recommended_memory_mb` and the App message: a non-blocking install wizard warning. */
123
+ memoryAdvice?: MemoryAdvice;
121
124
  /** `backup`: Hyper Backup application backup; on by default for native Apps, absent when opted out. */
122
125
  hyperBackup?: HyperBackup;
123
126
  /** Who may use the app at all; absent keeps the route policy alone. */
@@ -9,7 +9,7 @@ import { readRegistry, registryFile } from '../ctl/registry.js';
9
9
  import { gatewayIngressPathProblem, gatewayIngressOwnershipSupported } from './gateway-ingress.js';
10
10
  import { nativeGatewaySdk } from "./native-gateway.js";
11
11
  import { portDefaults } from "./install-ports.js";
12
- import { readMinMemoryMb } from "./install-memory.js";
12
+ import { readMemoryAdvice, readMinMemoryMb } from "./install-memory.js";
13
13
  import { readPackageDependencies, packageDependencies, dependencyError } from "./package-dependencies.js";
14
14
  import { readInstallSettings } from './install-settings.js';
15
15
  import { auditGoRoutes } from './route-audit.js';
@@ -537,6 +537,7 @@ function readManifest(raw, c) {
537
537
  c.fail(problem.code, problem.message);
538
538
  }
539
539
  const i18n = raw.i18n === undefined ? undefined : readI18n(raw.i18n, c);
540
+ const memoryAdvice = readMemoryAdvice(isRecord(raw.install) ? raw.install.recommended_memory_mb : undefined, minMemoryMb, i18n?.catalogs, e => c.fail(e.code, e.message));
540
541
  const icon = raw.icon === undefined ? undefined : readIcon(raw.icon, c);
541
542
  let mobile;
542
543
  if (raw.mobile !== undefined) {
@@ -691,6 +692,7 @@ function readManifest(raw, c) {
691
692
  ...(installSettings ? { installSettings } : {}),
692
693
  ...(installPorts ? { installPorts } : {}),
693
694
  ...(minMemoryMb !== undefined ? { minMemoryMb } : {}),
695
+ ...(memoryAdvice ? { memoryAdvice } : {}),
694
696
  ...(hyperBackup ? { hyperBackup } : {}),
695
697
  ...(entry ? { entry } : {}),
696
698
  ...(integrations?.length ? { integrations } : {}),
@@ -17,10 +17,10 @@ export function readSharedFolder(value, fail) {
17
17
  fail({ code: "STANDALONE_SHARED_FOLDER_INVALID", message: `install.sharedFolder ${why}` });
18
18
  return undefined;
19
19
  };
20
- if (!isRecord(value) || Object.keys(value).some((key) => !["sharedFolder", "settings", "ports", "min_memory_mb"].includes(key))) {
21
- return refuse(": only sharedFolder, settings, ports and min_memory_mb are allowed.");
20
+ if (!isRecord(value) || Object.keys(value).some((key) => !["sharedFolder", "settings", "ports", "min_memory_mb", "recommended_memory_mb"].includes(key))) {
21
+ return refuse(": only sharedFolder, settings, ports, min_memory_mb and recommended_memory_mb are allowed.");
22
22
  }
23
- if (value.sharedFolder === undefined && (value.settings !== undefined || value.ports !== undefined || value.min_memory_mb !== undefined))
23
+ if (value.sharedFolder === undefined && (value.settings !== undefined || value.ports !== undefined || value.min_memory_mb !== undefined || value.recommended_memory_mb !== undefined))
24
24
  return undefined;
25
25
  const folder = value.sharedFolder;
26
26
  if (!isRecord(folder) || Object.keys(folder).some((key) => !FIELDS.has(key))) {
@@ -307,6 +307,7 @@ export async function assembleStandaloneSpk(options) {
307
307
  ...(manifest.installSettings ? { installSettings: manifest.installSettings } : {}),
308
308
  ...(manifest.installPorts ? { installPorts: portDefaults(manifest) } : {}),
309
309
  ...(manifest.minMemoryMb !== undefined ? { minMemoryMb: manifest.minMemoryMb } : {}),
310
+ ...(manifest.memoryAdvice ? { recommendedMemory: manifest.memoryAdvice } : {}),
310
311
  ...(backup ? { hyperBackup: backupRecord(backup) } : {}),
311
312
  ...(manifest.integrations ? { integrations: manifest.integrations } : {}),
312
313
  ...(manifest.lifecycleTimeouts ? { lifecycleTimeouts: manifest.lifecycleTimeouts } : {}),
@@ -378,7 +379,7 @@ export async function assembleStandaloneSpk(options) {
378
379
  : folder
379
380
  ? sharedFolderInstallSteps(manifest.package, folder)
380
381
  : renderNativeInstallWizard;
381
- const install = renderInstallWizardFiles(manifest.package, (t) => [...steps(t), ...portInstallSteps(manifest)(t), ...settingsInstallSteps(manifest.installSettings, manifest.identityGateway?.listen.https, manifest.installPorts ? manifest.package : undefined)(t), ...(portal ? [renderPortalWizardStep(t, portal.alias)] : []), ...integrationWizardSteps(t, manifest.integrations)], manifest.minMemoryMb);
382
+ const install = renderInstallWizardFiles(manifest.package, (t) => [...steps(t), ...portInstallSteps(manifest)(t), ...settingsInstallSteps(manifest.installSettings, manifest.identityGateway?.listen.https, manifest.installPorts ? manifest.package : undefined)(t), ...(portal ? [renderPortalWizardStep(t, portal.alias)] : []), ...integrationWizardSteps(t, manifest.integrations)], manifest.minMemoryMb, manifest.memoryAdvice);
382
383
  writeWizardUiFiles(staging, {
383
384
  ...folderPickerWizardFiles(manifest.package, folder, {
384
385
  ...install.static,
@@ -1,4 +1,4 @@
1
- # Minimum physical memory
1
+ # Minimum and recommended physical memory
2
2
 
3
3
  Declare a physical RAM requirement in `dsm-package.yaml`:
4
4
 
@@ -18,3 +18,31 @@ The generated **package-account preinst** checks the same threshold before other
18
18
  An unreadable, missing or malformed MemTotal emits `INSTALL_MEMORY_READ_WARNING` to stderr and **allows installation**. This requirement stops clearly undersized machines; it does not reject an unfamiliar memory-reporting environment. Omitting the field preserves the existing installation behavior. `synopkgland inspect <spk> --json` reports `minMemoryMb` and verifies the generated memory check and wizard files against the packaged declaration.
19
19
 
20
20
  See Synology's [wizard contract](https://help.synology.com/developer-guide/synology_package/wizard/WIZARD_UIFILES_v2.html) for dynamic wizard scripts and the `SYNOPKG_TEMP_LOGFILE` output channel.
21
+
22
+ ## Recommended memory
23
+
24
+ Declare a softer threshold with `recommended_memory_mb`, either alone or above `min_memory_mb`:
25
+
26
+ ```yaml
27
+ install:
28
+ min_memory_mb: 1700
29
+ recommended_memory_mb: 3400
30
+ ```
31
+
32
+ `recommended_memory_mb` is also a positive integer in **MiB** of MemTotal (1–2147483647), and it must be greater than `min_memory_mb` when both are declared. It never blocks anything: below it the dynamic **install** wizard adds a warning page before its usual pages, without a validator, so the administrator can continue. The page states the recommendation (rounded up to a whole GB, as for the minimum) and the NAS's detected capacity with two decimals, both in DSM's 1024-based GB. Below `min_memory_mb` the blocking memory page is shown instead; at or above the recommendation, or when MemTotal is unreadable, the wizard is unchanged.
33
+
34
+ Upgrade wizards, preinst, CLI installations and silent upgrades do not check the recommendation and cannot fail on it. Static fallback wizards cannot know the NAS memory and show no warning.
35
+
36
+ Pick the value with the same allowance for firmware and kernel reservations as the minimum: MemTotal is below the nominal size (a 2 GB model reports about 1.75 GB, a 4 GB model about 3.7–3.8 GB). Use about **85% of the nominal capacity** that should not see the warning: **3400 MiB means 4 GB machines and larger install without a warning**, while 2 GB and 3 GB machines see it. 4096 MiB would warn on every real 4 GB NAS.
37
+
38
+ ### App message
39
+
40
+ The warning page can show the App's own text under the SDK's sentence, for example where to run heavy work instead. Put it in the App's message catalogs (`i18n.messages`) under the key `install.recommended_memory_message`:
41
+
42
+ ```json
43
+ { "install.recommended_memory_message": "Run heavy jobs on another computer instead" }
44
+ ```
45
+
46
+ Each language uses its catalog's text, and languages without one use English. The text is plain single-line text of 1–300 characters, without `<`, `>` or `&` (the DSM wizard renders markup); like other wizard strings, it has no trailing period. Invalid values and messages are reported as `INSTALL_RECOMMENDED_MEMORY_INVALID`. Without the key, only the SDK's sentence is shown.
47
+
48
+ `synopkgland inspect <spk> --json` reports `recommendedMemoryMb` and verifies the install wizard files, including the App message, against the declaration recorded in the package.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synopackageland/cli",
3
- "version": "0.52.17",
3
+ "version": "0.52.18",
4
4
  "description": "Syno Package Land Developer Kit CLI",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,6 +16,12 @@
16
16
  "maximum": 2147483647,
17
17
  "description": "Minimum physical /proc/meminfo MemTotal in MiB, checked dynamically on install and upgrade as the package account. Allow for firmware reservations: use about 85% of nominal RAM (1700 for a 2 GB NAS). Read failures warn and allow installation. No runtime check."
18
18
  },
19
+ "recommended_memory_mb": {
20
+ "type": "integer",
21
+ "minimum": 1,
22
+ "maximum": 2147483647,
23
+ "description": "Recommended physical /proc/meminfo MemTotal in MiB, above min_memory_mb. Below it the install wizard shows a warning the administrator can continue past, with the App's optional install.recommended_memory_message catalog text. Never blocks installation, upgrade or preinst. Use about 85% of nominal RAM (3400 for a 4 GB NAS)."
24
+ },
19
25
  "sharedFolder": {"type": "object"},
20
26
  "settings": {"type": "object"},
21
27
  "ports": {"const": true}
package/skills/SKILL.md CHANGED
@@ -40,7 +40,7 @@ Query published releases with `npm view @synopackageland/cli version`,
40
40
  `npm view @synopackageland/templates version` and `npm view @synopackageland/sdk version`;
41
41
  keep the installed dependency tree and generated pins consistent.
42
42
 
43
- For Apps with a physical RAM requirement, set `install.min_memory_mb` (MemTotal in MiB; use 1700 for 2 GB machines). The generated install/upgrade wizards and package-account preinst check it dynamically; read failures warn and allow installation, with no runtime check. See [minimum physical memory](../docs/install-memory.md).
43
+ For Apps with a physical RAM requirement, set `install.min_memory_mb` (MemTotal in MiB; use 1700 for 2 GB machines). The generated install/upgrade wizards and package-account preinst check it dynamically; read failures warn and allow installation, with no runtime check. For a softer threshold, set `install.recommended_memory_mb` (3400 for 4 GB machines): the install wizard warns but never blocks, with the App's optional `install.recommended_memory_message` catalog text. See [minimum and recommended physical memory](../docs/install-memory.md).
44
44
 
45
45
  For Apps with data folders or gateway listeners, read [reference/install.md](reference/install.md). Native Go/Node/Python Apps may use `picker: folder` (matching current CLI/SDK releases (see the changelog)) and must obtain the selected path through the SDK shared-folder API. Default to an App-named dedicated DSM data share and installer-selected ports. Existing-folder access, port number format/range and required HTTPS origins use localized wizard validation before Next; detected port conflicts are nonblocking inline warnings, and an unavailable DSM port inventory does not block installation; upgrades retain port selections.
46
46
 
@@ -7,6 +7,7 @@ Use matching CLI, SDK/App and templates releases, preserving the pins generated
7
7
  ```yaml
8
8
  install:
9
9
  min_memory_mb: 1700
10
+ recommended_memory_mb: 3400
10
11
  ports: true
11
12
  sharedFolder:
12
13
  mode: dedicated
@@ -18,7 +19,7 @@ identity_gateway:
18
19
  listen: {https: 28443}
19
20
  ```
20
21
 
21
- Use `install.min_memory_mb` for a physical RAM requirement checked dynamically on the NAS during install and upgrade. The value is MemTotal in MiB, so allow for firmware reservations: 1700 MiB admits 2 GB machines. All wizard locales show a low-memory page; package-account preinst enforces the same threshold through Package Center. Unreadable MemTotal warns and allows installation; no runtime check is added. See [minimum physical memory](../../docs/install-memory.md).
22
+ Use `install.min_memory_mb` for a physical RAM requirement checked dynamically on the NAS during install and upgrade. The value is MemTotal in MiB, so allow for firmware reservations: 1700 MiB admits 2 GB machines. All wizard locales show a low-memory page; package-account preinst enforces the same threshold through Package Center. Unreadable MemTotal warns and allows installation; no runtime check is added. Add `install.recommended_memory_mb` (above the minimum, or alone) for a non-blocking install wizard warning: 3400 MiB warns 2–3 GB machines but not 4 GB ones. The App's `install.recommended_memory_message` catalog key adds its own localized advice under the warning; preinst, upgrades and CLI installs never check the recommendation. See [minimum and recommended physical memory](../../docs/install-memory.md).
22
23
 
23
24
  For every App needing shared data, name the dedicated share after the package. The wizard defaults to that name, keeps it when the share list loads, and reuses the matching share if it exists. It also accepts a supported existing share. `mode: select` starts empty and requires an explicit choice; `mode: create` has no picker. Selecting a folder authorizes DSM's `data-share` worker to grant the declared RO/RW to the package account on install, upgrade/repair and starts. No pre-existing account or permission grant is required. Validation checks the name, existence and supported local mounted folder type, never package-account access. Local tiered/S2S shares are accepted; remote/C2, tiering buckets, WORM, unmounted, unavailable, moving, external and forced-read-only shares are refused. Runtime kernel checks still report the share, required access and recovery action when permission is revoked. No App root or ACL writer is generated.
24
25