@synopackageland/cli 0.9.4 → 0.9.6

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 (73) hide show
  1. package/CHANGELOG.md +94 -0
  2. package/README.md +1 -1
  3. package/assets/licenses/MUSL-COPYRIGHT +193 -0
  4. package/assets/licenses/RUST-COPYRIGHT-library.html +5556 -0
  5. package/dist/add.js +29 -29
  6. package/dist/build-spk/dsm-version.d.ts +14 -4
  7. package/dist/build-spk/dsm-version.js +17 -5
  8. package/dist/build-spk/notices.d.ts +8 -1
  9. package/dist/build-spk/notices.js +13 -4
  10. package/dist/build-spk/uninstall-wizard.d.ts +11 -0
  11. package/dist/build-spk/uninstall-wizard.js +16 -3
  12. package/dist/build-spk/wizard-i18n.d.ts +1 -1
  13. package/dist/build-spk/wizard-i18n.js +1 -1
  14. package/dist/build-spk/wizard-messages.d.ts +44 -0
  15. package/dist/build-spk/wizard-messages.js +44 -0
  16. package/dist/capability-overlays.d.ts +10 -5
  17. package/dist/capability-overlays.js +32 -10
  18. package/dist/cli.js +5 -5
  19. package/dist/deploy/plan.d.ts +1 -1
  20. package/dist/deploy/plan.js +1 -1
  21. package/dist/error-registry.js +46 -4
  22. package/dist/info.js +4 -3
  23. package/dist/init.js +53 -28
  24. package/dist/portal/alias.d.ts +8 -0
  25. package/dist/portal/alias.js +16 -0
  26. package/dist/runtime/executor-build.d.ts +1 -1
  27. package/dist/runtime/executor-build.js +2 -1
  28. package/dist/runtime/executor-digests.json +22 -0
  29. package/dist/runtime/executor-policy.d.ts +15 -0
  30. package/dist/runtime/executor-policy.js +32 -6
  31. package/dist/runtime/sdk-source.d.ts +14 -2
  32. package/dist/runtime/sdk-source.js +39 -4
  33. package/dist/runtime/uninstall-cleanup.d.ts +5 -1
  34. package/dist/runtime/uninstall-cleanup.js +11 -1
  35. package/dist/standalone/api-permissions.d.ts +4 -2
  36. package/dist/standalone/api-permissions.js +6 -5
  37. package/dist/standalone/binary.d.ts +3 -2
  38. package/dist/standalone/binary.js +17 -5
  39. package/dist/standalone/build.js +16 -12
  40. package/dist/standalone/daemon.d.ts +6 -0
  41. package/dist/standalone/daemon.js +8 -4
  42. package/dist/standalone/dsm-window.js +16 -3
  43. package/dist/standalone/inspect-spk.d.ts +1 -1
  44. package/dist/standalone/inspect-spk.js +46 -13
  45. package/dist/standalone/lifecycle.js +38 -4
  46. package/dist/standalone/manifest.d.ts +12 -0
  47. package/dist/standalone/manifest.js +62 -20
  48. package/dist/standalone/native-layout.d.ts +4 -7
  49. package/dist/standalone/native-layout.js +41 -102
  50. package/dist/standalone/native-root-window.d.ts +2 -1
  51. package/dist/standalone/native-root-window.js +15 -5
  52. package/dist/standalone/portal-window.d.ts +4 -2
  53. package/dist/standalone/portal-window.js +54 -12
  54. package/dist/standalone/portal.d.ts +4 -1
  55. package/dist/standalone/portal.js +8 -2
  56. package/dist/standalone/root-ops.d.ts +2 -0
  57. package/dist/standalone/root-ops.js +2 -0
  58. package/dist/standalone/rust-build.d.ts +35 -0
  59. package/dist/standalone/rust-build.js +127 -0
  60. package/dist/standalone/sdk-check.d.ts +5 -3
  61. package/dist/standalone/sdk-check.js +21 -8
  62. package/dist/standalone/spk.js +15 -3
  63. package/dist/standalone/toolkit.d.ts +10 -0
  64. package/dist/standalone/toolkit.js +101 -0
  65. package/dist/standalone/uninstall-hook.d.ts +10 -0
  66. package/dist/standalone/uninstall-hook.js +71 -0
  67. package/dist/standalone/uninstall.d.ts +53 -0
  68. package/dist/standalone/uninstall.js +136 -0
  69. package/dist/types.d.ts +1 -1
  70. package/dist/yaml-edit.d.ts +6 -0
  71. package/dist/yaml-edit.js +31 -0
  72. package/package.json +2 -2
  73. package/skills/reference/portal.md +8 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,99 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.6 (2026-10-12)
4
+
5
+ Builds with SDK 0.9.7 and templates 0.9.6: `init` writes SDK v0.9.7 (Go
6
+ module and Rust crate tag), `@synopackageland/sdk` 0.9.7 and
7
+ `@synopackageland/ui` 0.9.2. The executor digest table records SDK 0.9.7,
8
+ whose executor and lifecycle binary changed, so a rebuilt App carries new
9
+ executor digests. SDK 0.9.7 adds `bg.jobs.pause` and `bg.jobs.resume` to the
10
+ policy, so the policy digest of every App changes: after the upgrade, every
11
+ App asks for approval again.
12
+
13
+ 繁中摘要:使用 SDK 0.9.7 與 templates 0.9.6(UI 0.9.2)。executor digest 表加入
14
+ SDK 0.9.7;executor 與 lifecycle 都有變更,重建的 App 會帶新的 executor digest。
15
+ SDK 0.9.7 的 policy 新增 `bg.jobs.pause`、`bg.jobs.resume`,所有 App 的 policy
16
+ digest 都會變,升級後都需要重新核准。新增解除安裝 hook(`uninstall.purge`)。
17
+
18
+ - Uninstall hook: `uninstall.purge` in dsm-package.yaml (`exec`, `args`,
19
+ `env`, `timeout` 2..120 s, optional `root`) names the App's own command,
20
+ and `uninstall.state.items` lists the state it can delete, each with an
21
+ `uninstall.state.<key>` text. On a real uninstall preuninst stops the
22
+ worker and the daemon, runs the hook as the package account with
23
+ `SYNOPKGLAND_DELETE_STATE` and `SYNOPKGLAND_REMOVE_DATA`, then asks the
24
+ executor to purge; a failing or timed-out hook is logged and never blocks
25
+ the uninstall, and an upgrade skips it. The wizard gains an unchecked
26
+ "delete state" box after the item texts. `purge.root` names a rootOps
27
+ script the executor runs as root only while its approval stands; the
28
+ policy's `purge` member records it, so such an App asks for approval
29
+ again. Build refuses a hook outside the package or one that tries to
30
+ become root. inspect checks an executor SPK's preuninst and wizard against
31
+ the hook recorded in sdk-package.json, and that record's root step against
32
+ the policy's `purge`.
33
+ - `init` and `add` change only the dsm-package.yaml keys they set
34
+ (`capabilities`, `portal`, `os_min_ver`); the template's comments, such as
35
+ the commented `uninstall` example, and its formatting stay as written.
36
+ - With `SYNOPKGLAND_SDK_DIR`, init also drops the released SDK from the
37
+ frontend's package-lock.json, so npm installs the local ts package.
38
+
39
+ ## 0.9.5 (2026-10-12)
40
+
41
+ Builds with SDK 0.9.6 and templates 0.9.5: `init` writes SDK v0.9.6,
42
+ `@synopackageland/sdk` 0.9.6 and `@synopackageland/ui` 0.9.2. The executor
43
+ digest table records SDK 0.9.6, whose executor registers the portal entry
44
+ and checks a grant's background work from the browser address it recorded,
45
+ so a rebuilt App carries new executor digests. The policy digest changes
46
+ only for an App whose executor registers its portal entry (a portal and
47
+ os_min_ver below 7.2): after the upgrade it asks for approval again. Other
48
+ Apps keep their policy digest.
49
+
50
+ 繁中摘要:使用 SDK 0.9.6 與 templates 0.9.5(UI 0.9.2)。executor digest 表加入
51
+ SDK 0.9.6,重建的 App 會帶新的 executor digest。只有由 executor 註冊入口的
52
+ portal App(宣告 portal 且 os_min_ver 低於 7.2)policy digest 會變,升級後需重新
53
+ 核准;其他 App 的 policy digest 不變。DSM 7.1 起可用 portal(executor 模式)。
54
+
55
+ - The generated DSM window stays inside the desktop: its width is at most the
56
+ viewport's and its height at most the viewport's less the DSM taskbar. This
57
+ applies to the default 960×640 and to the size DSM restores from
58
+ `restoreSizePos`, which may have been saved on a larger screen. Position and
59
+ maximized state are restored as before.
60
+ - Native root authorization (`createRootAccess` from
61
+ `@synopackageland/cli/authorization-sdk`): the first `run` after an `authorize`
62
+ runs the task that `authorize` just read back as exactly ours, instead of
63
+ reading the TaskScheduler list and task again. Any later run, a repair, and
64
+ a run after `remove` still read DSM first; `authorize` still reads the task
65
+ back after creating it and checks its identity and script.
66
+ - Native root authorization polls the task history every 0.5 s, then at most
67
+ once a second (was up to every 2 s), so a finished root task is seen up to
68
+ 1 s sooner.
69
+ - A portal works from DSM 7.1-42661 on. Below 7.2-64570 (executor mode) the
70
+ SPK carries no web-config resource, `etc/portal.*`, alias wizard step or
71
+ alias lifecycle; the executor policy carries `portal: {application, alias}`
72
+ and the `portal.register` / `portal.unregister` operations, and the CGI is
73
+ built with `-X main.portal=executor`. A package name or displayname the
74
+ executor would refuse fails with `STANDALONE_PORTAL_ENTRY_INVALID`; below
75
+ 7.1 `STANDALONE_PORTAL_MIN_DSM` still refuses the portal, and `add portal`
76
+ raises os_min_ver only to 7.1-42661. inspect reports the policy's entry
77
+ and flags an INFO os_min_ver below 7.1. Needs templates 0.9.5 and SDK 0.9.6.
78
+ - `ctx.portal` in executor mode: `status()` carries `entry`, administrators
79
+ get `register()` and `unregister()`, and the plain panel offers "Enable
80
+ entry", "Remove entry" or the alias form by entry state. New texts in nine
81
+ languages, including `PORTAL_FAILED`. The panel's Korean texts use the
82
+ formal -십시오 register.
83
+ - The uninstall wizard and the cleanup list of an executor-mode portal App
84
+ warn that a stopped or never-approved executor leaves the entry, and give
85
+ the root cleanup commands.
86
+ - native-layout: `portal: {}` or `{alias}` (DSM 7.1-42661+) writes
87
+ `synopkgland_portal_alias` into INFO for the product's own root helper;
88
+ inspect checks it against `native-layout.json`.
89
+ - DSM's web-config portal registration now needs `os_min_ver` 7.2-64570 or
90
+ later instead of 7.3.2-86009. DSM 7.1's package manager marks the web-config
91
+ worker Synology-only and refuses it in an unsigned SPK (error 320); synopkg
92
+ from DSM 7.2 on drops that mark, the only change to its worker table. The
93
+ 7.2 floor comes from that source and is not yet verified on a 7.2 NAS.
94
+ inspect flags a web-config portal SPK whose INFO os_min_ver is lower, with
95
+ this reason.
96
+
3
97
  ## 0.9.4 (2026-10-12)
4
98
 
5
99
  Builds with SDK 0.9.5 and templates 0.9.4: `init` writes SDK v0.9.5 and
package/README.md CHANGED
@@ -72,7 +72,7 @@ Add them with `init --with …` or later with `synopkgland add <capability…>`.
72
72
  | `login` | Sign users in with their DSM account, without the DSM desktop | Nobody; requires HTTPS for password sign-in |
73
73
  | `delegate` | Move files into a user's chosen folder while the user is offline | An administrator, once |
74
74
  | `root-ops` | Run fixed `root/*.sh` scripts for administrators | An administrator, once |
75
- | `portal` | Open the app from its own Application Portal alias | An administrator sets the alias; needs `root-ops` or `delegate` and DSM 7.3.2-86009+ |
75
+ | `portal` | Open the app from its own Application Portal alias | An administrator sets the alias; needs `root-ops` or `delegate` and DSM 7.1-42661+ (below 7.2-64570 the executor registers the entry) |
76
76
 
77
77
  Delegate is implemented; its default operation is `files.moveFromStaging`.
78
78
  Device lifecycle acceptance on real hardware is still pending for delegate and root operations.
@@ -0,0 +1,193 @@
1
+ musl as a whole is licensed under the following standard MIT license:
2
+
3
+ ----------------------------------------------------------------------
4
+ Copyright © 2005-2020 Rich Felker, et al.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining
7
+ a copy of this software and associated documentation files (the
8
+ "Software"), to deal in the Software without restriction, including
9
+ without limitation the rights to use, copy, modify, merge, publish,
10
+ distribute, sublicense, and/or sell copies of the Software, and to
11
+ permit persons to whom the Software is furnished to do so, subject to
12
+ the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be
15
+ included in all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
+ ----------------------------------------------------------------------
25
+
26
+ Authors/contributors include:
27
+
28
+ A. Wilcox
29
+ Ada Worcester
30
+ Alex Dowad
31
+ Alex Suykov
32
+ Alexander Monakov
33
+ Andre McCurdy
34
+ Andrew Kelley
35
+ Anthony G. Basile
36
+ Aric Belsito
37
+ Arvid Picciani
38
+ Bartosz Brachaczek
39
+ Benjamin Peterson
40
+ Bobby Bingham
41
+ Boris Brezillon
42
+ Brent Cook
43
+ Chris Spiegel
44
+ Clément Vasseur
45
+ Daniel Micay
46
+ Daniel Sabogal
47
+ Daurnimator
48
+ David Carlier
49
+ David Edelsohn
50
+ Denys Vlasenko
51
+ Dmitry Ivanov
52
+ Dmitry V. Levin
53
+ Drew DeVault
54
+ Emil Renner Berthing
55
+ Fangrui Song
56
+ Felix Fietkau
57
+ Felix Janda
58
+ Gianluca Anzolin
59
+ Hauke Mehrtens
60
+ He X
61
+ Hiltjo Posthuma
62
+ Isaac Dunham
63
+ Jaydeep Patil
64
+ Jens Gustedt
65
+ Jeremy Huntwork
66
+ Jo-Philipp Wich
67
+ Joakim Sindholt
68
+ John Spencer
69
+ Julien Ramseier
70
+ Justin Cormack
71
+ Kaarle Ritvanen
72
+ Khem Raj
73
+ Kylie McClain
74
+ Leah Neukirchen
75
+ Luca Barbato
76
+ Luka Perkov
77
+ M Farkas-Dyck (Strake)
78
+ Mahesh Bodapati
79
+ Markus Wichmann
80
+ Masanori Ogino
81
+ Michael Clark
82
+ Michael Forney
83
+ Mikhail Kremnyov
84
+ Natanael Copa
85
+ Nicholas J. Kain
86
+ orc
87
+ Pascal Cuoq
88
+ Patrick Oppenlander
89
+ Petr Hosek
90
+ Petr Skocik
91
+ Pierre Carrier
92
+ Reini Urban
93
+ Rich Felker
94
+ Richard Pennington
95
+ Ryan Fairfax
96
+ Samuel Holland
97
+ Segev Finer
98
+ Shiz
99
+ sin
100
+ Solar Designer
101
+ Stefan Kristiansson
102
+ Stefan O'Rear
103
+ Szabolcs Nagy
104
+ Timo Teräs
105
+ Trutz Behn
106
+ Valentin Ochs
107
+ Will Dietz
108
+ William Haddon
109
+ William Pitcock
110
+
111
+ Portions of this software are derived from third-party works licensed
112
+ under terms compatible with the above MIT license:
113
+
114
+ The TRE regular expression implementation (src/regex/reg* and
115
+ src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed
116
+ under a 2-clause BSD license (license text in the source files). The
117
+ included version has been heavily modified by Rich Felker in 2012, in
118
+ the interests of size, simplicity, and namespace cleanliness.
119
+
120
+ Much of the math library code (src/math/* and src/complex/*) is
121
+ Copyright © 1993,2004 Sun Microsystems or
122
+ Copyright © 2003-2011 David Schultz or
123
+ Copyright © 2003-2009 Steven G. Kargl or
124
+ Copyright © 2003-2009 Bruce D. Evans or
125
+ Copyright © 2008 Stephen L. Moshier or
126
+ Copyright © 2017-2018 Arm Limited
127
+ and labelled as such in comments in the individual source files. All
128
+ have been licensed under extremely permissive terms.
129
+
130
+ The ARM memcpy code (src/string/arm/memcpy.S) is Copyright © 2008
131
+ The Android Open Source Project and is licensed under a two-clause BSD
132
+ license. It was taken from Bionic libc, used on Android.
133
+
134
+ The AArch64 memcpy and memset code (src/string/aarch64/*) are
135
+ Copyright © 1999-2019, Arm Limited.
136
+
137
+ The implementation of DES for crypt (src/crypt/crypt_des.c) is
138
+ Copyright © 1994 David Burren. It is licensed under a BSD license.
139
+
140
+ The implementation of blowfish crypt (src/crypt/crypt_blowfish.c) was
141
+ originally written by Solar Designer and placed into the public
142
+ domain. The code also comes with a fallback permissive license for use
143
+ in jurisdictions that may not recognize the public domain.
144
+
145
+ The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011
146
+ Valentin Ochs and is licensed under an MIT-style license.
147
+
148
+ The x86_64 port was written by Nicholas J. Kain and is licensed under
149
+ the standard MIT terms.
150
+
151
+ The mips and microblaze ports were originally written by Richard
152
+ Pennington for use in the ellcc project. The original code was adapted
153
+ by Rich Felker for build system and code conventions during upstream
154
+ integration. It is licensed under the standard MIT terms.
155
+
156
+ The mips64 port was contributed by Imagination Technologies and is
157
+ licensed under the standard MIT terms.
158
+
159
+ The powerpc port was also originally written by Richard Pennington,
160
+ and later supplemented and integrated by John Spencer. It is licensed
161
+ under the standard MIT terms.
162
+
163
+ All other files which have no copyright comments are original works
164
+ produced specifically for use as part of this library, written either
165
+ by Rich Felker, the main author of the library, or by one or more
166
+ contibutors listed above. Details on authorship of individual files
167
+ can be found in the git version control history of the project. The
168
+ omission of copyright and license comments in each file is in the
169
+ interest of source tree size.
170
+
171
+ In addition, permission is hereby granted for all public header files
172
+ (include/* and arch/*/bits/*) and crt files intended to be linked into
173
+ applications (crt/*, ldso/dlstart.c, and arch/*/crt_arch.h) to omit
174
+ the copyright notice and permission notice otherwise required by the
175
+ license, and to use these files without any requirement of
176
+ attribution. These files include substantial contributions from:
177
+
178
+ Bobby Bingham
179
+ John Spencer
180
+ Nicholas J. Kain
181
+ Rich Felker
182
+ Richard Pennington
183
+ Stefan Kristiansson
184
+ Szabolcs Nagy
185
+
186
+ all of whom have explicitly granted such permission.
187
+
188
+ This file previously contained text expressing a belief that most of
189
+ the files covered by the above exception were sufficiently trivial not
190
+ to be subject to copyright, resulting in confusion over whether it
191
+ negated the permissions granted in the license. In the spirit of
192
+ permissive licensing, and of not having licensing issues being an
193
+ obstacle to adoption, that text has been removed.