@synopackageland/cli 0.50.0 → 0.51.0

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.
Files changed (48) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +9 -0
  3. package/dist/build-spk/generator.js +3 -3
  4. package/dist/build-spk/reproducible-archive.js +3 -1
  5. package/dist/build-spk/ui-texts.d.ts +3 -1
  6. package/dist/build-spk/ui-texts.js +17 -8
  7. package/dist/ctl/ai-tools.d.ts +2 -0
  8. package/dist/ctl/cli.js +14 -0
  9. package/dist/ctl/diagnostics.d.ts +16 -0
  10. package/dist/ctl/diagnostics.js +11 -0
  11. package/dist/ctl/native-auth-command.js +5 -0
  12. package/dist/ctl/native-paths.js +13 -2
  13. package/dist/ctl/native-store.d.ts +6 -0
  14. package/dist/ctl/native-store.js +20 -26
  15. package/dist/ctl/service.d.ts +2 -0
  16. package/dist/ctl/service.js +1 -1
  17. package/dist/ctl/windows-acl.d.ts +39 -0
  18. package/dist/ctl/windows-acl.js +80 -0
  19. package/dist/ctl/windows-prompt.d.ts +5 -0
  20. package/dist/ctl/windows-prompt.js +119 -0
  21. package/dist/ctl/windows-sddl.d.ts +20 -0
  22. package/dist/ctl/windows-sddl.js +162 -0
  23. package/dist/ctl/windows-security-helper.d.ts +7 -0
  24. package/dist/ctl/windows-security-helper.js +88 -0
  25. package/dist/ctl/windows-security.d.ts +10 -0
  26. package/dist/ctl/windows-security.js +95 -0
  27. package/dist/ctl/windows-tools.d.ts +11 -0
  28. package/dist/ctl/windows-tools.js +23 -0
  29. package/dist/error-registry.js +6 -1
  30. package/dist/native-http-schema/source.json +1 -1
  31. package/dist/skill.js +1 -0
  32. package/dist/spk/extract.d.ts +6 -0
  33. package/dist/spk/extract.js +39 -0
  34. package/dist/standalone/daemon.js +1 -0
  35. package/dist/standalone/dsm-texts.d.ts +17 -0
  36. package/dist/standalone/dsm-texts.js +102 -0
  37. package/dist/standalone/dsm-window.js +3 -0
  38. package/dist/standalone/inspect-spk.d.ts +2 -0
  39. package/dist/standalone/inspect-spk.js +46 -20
  40. package/dist/standalone/install-ports.js +2 -1
  41. package/dist/standalone/manifest.d.ts +3 -0
  42. package/dist/standalone/manifest.js +33 -20
  43. package/dist/standalone/native-layout.js +2 -0
  44. package/package.json +2 -1
  45. package/schema/dsm-package.schema.json +12 -1
  46. package/skills/SKILL.md +3 -0
  47. package/skills/reference/ctl.md +32 -1
  48. package/skills/reference/dsm-texts.md +95 -0
@@ -0,0 +1,95 @@
1
+ # Native DSM text sections and desktop notifications
2
+
3
+ Use this for schema 2 (`dsm-package.yaml`), independently of browser JSON message
4
+ keys. Add an explicit directory; no source is copied by convention alone:
5
+
6
+ ```yaml
7
+ i18n:
8
+ messages: i18n/messages # optional existing browser catalogs
9
+ dsm_texts: i18n/dsm-texts
10
+ info:
11
+ zh-TW: {description: NAS 健康助理}
12
+ ```
13
+
14
+ `i18n/dsm-texts/en/strings`:
15
+
16
+ ```ini
17
+ [notify]
18
+ title="NAS assistant"
19
+ new_warning="A new warning needs your attention; open the app for details"
20
+ ```
21
+
22
+ Provide the same sections and keys in `zh-TW/strings` and in every other locale
23
+ present in `i18n.messages` or declared under `i18n.info`. English is mandatory.
24
+ Native-only locales are also accepted and checked against English. The nine
25
+ supported source locales map to DSM directories as follows:
26
+
27
+ | Source | DSM |
28
+ | --- | --- |
29
+ | en | enu |
30
+ | zh-TW | cht |
31
+ | zh-CN | chs |
32
+ | ja | jpn |
33
+ | ko | krn |
34
+ | de | ger |
35
+ | fr | fre |
36
+ | es | spn |
37
+ | it | ita |
38
+
39
+ Each locale directory must contain exactly one regular UTF-8 `strings` file.
40
+ Symlinks and sources outside the project are refused. Blank lines and full-line
41
+ `#` / `;` comments are allowed. Section and key names start with an ASCII letter,
42
+ then contain only ASCII letters, digits and underscores. Each section needs at
43
+ least one key; duplicate sections/keys and empty values fail. Values must be
44
+ single-line double-quoted text without embedded double quotes, backslashes or
45
+ control characters. Escaping and multiline syntax are deliberately unsupported
46
+ until DSM parsing evidence is available. `[synopkgland]` is reserved (case
47
+ insensitive) and cannot be supplied by packages.
48
+
49
+ `check` reports `STANDALONE_DSM_TEXTS_INVALID` with file/line or locale/key context.
50
+ Every locale must have exactly the English section/key set. Placeholder tokens
51
+ `{name}`, `%NAME%` and printf conversions (including positional forms like `%1$s`)
52
+ must match English, including repeated occurrences. This is a translation lint;
53
+ it does not implement or promise substitution in DSM desktop key mode. Use fixed
54
+ text for desktop notifications and put variable details in the package UI.
55
+
56
+ `build` sorts sections and keys and writes LF-terminated files to
57
+ `ui/texts/<DSM language>/strings`, preserving the packager's title/description
58
+ section. It adds `texts: texts` and every native `section:key` to each generated
59
+ launcher/window's `preloadTexts`, including apps without INFO translations.
60
+ `inspect <SPK> --json` reads the archive and returns `nativeTexts`, mapping DSM
61
+ language to section to sorted key names. It reports malformed strings as a
62
+ finding. Inspect does not prove delivery, language selection or fallback on DSM.
63
+
64
+ A sender can invoke, with a validated recipient and fixed keys as argv:
65
+
66
+ ```text
67
+ /usr/syno/bin/synodsmnotify -c SYNO.SDS.MyPackage.Instance \
68
+ <user|@group> MyPackage:notify:title MyPackage:notify:new_warning
69
+ ```
70
+
71
+ `MyPackage` is `INFO.package`; use the actual app ID from `ui/config` (`.Console`
72
+ for packages whose SDK window is a separate console). The packager adds resources;
73
+ it grants no runtime privileges and provides no sender. Never shell-concatenate
74
+ recipients or accept arbitrary package/section/key references from callers.
75
+
76
+ ## Evidence and limits
77
+
78
+ The Home Keeper t-1442 research (2026-11-06, SA3400 DSM 7.3.2-86009 Update 3)
79
+ recorded one fixed-key desktop send as a non-root package user, with an existing
80
+ installed package's preloaded title/description keys. Its source index references
81
+ `developer-guide` commit `eeeffb04af21f14a5928e93c03b1f9e71a0bb15d`,
82
+ `synology_package/show_massage.md` L88-101 and `integrate_dsm/i18n.md` L7-43:
83
+ UI texts are `texts/<DSM language>/strings`, using `[section]` and `key="value"`;
84
+ config declares `texts` and `preloadTexts`. `libsynosysnotify/lib/utils/string.c`
85
+ DSM7-3 commit `99131ab07c4fc7c9c5980db475bd46c61e25316a` L362-390 validates
86
+ `package:section:key`. These are research references, not bundled internal source.
87
+
88
+ Home Keeper t-1448 (2026-11-07) separately recorded an unsigned SPK rejected with
89
+ 4539 for the Synology-only `sysnotify` worker. This extension adds no `sysnotify`
90
+ resource, `mails` event definitions, JSON-variable mode or email/push/webhook
91
+ forwarding. Those are different mechanisms. Exact `[notify]` resources generated
92
+ here, all nine runtime language selections, missing-language fallback, escaped
93
+ text syntax and cross-model/DSM-version behavior have not been tested on a NAS
94
+ in this change. The evidence establishes the native format and existing-key
95
+ mechanism; local archive inspection establishes packaging, not device acceptance.