@synopackageland/cli 0.8.0 → 0.9.1

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 (946) hide show
  1. package/CHANGELOG.md +267 -0
  2. package/README.md +27 -5
  3. package/dist/add.js +16 -17
  4. package/dist/authorization-sdk.d.ts +0 -1
  5. package/dist/authorization-sdk.js +0 -1
  6. package/dist/build-spk/dsm-version.d.ts +0 -2
  7. package/dist/build-spk/dsm-version.js +0 -6
  8. package/dist/build-spk/gateway.js +2 -2
  9. package/dist/build-spk/generator.js +4 -23
  10. package/dist/build-spk/notices.js +12 -8
  11. package/dist/build-spk/resource-worker.js +0 -3
  12. package/dist/build-spk/uninstall-wizard.d.ts +8 -3
  13. package/dist/build-spk/uninstall-wizard.js +4 -2
  14. package/dist/build-spk/wizard-messages.d.ts +33 -0
  15. package/dist/build-spk/wizard-messages.js +33 -0
  16. package/dist/capability-overlays.d.ts +15 -0
  17. package/dist/capability-overlays.js +18 -0
  18. package/dist/cli-version.d.ts +2 -0
  19. package/dist/cli-version.js +3 -0
  20. package/dist/cli.js +6 -4
  21. package/dist/contract/validate.js +4 -21
  22. package/dist/error-registry.js +22 -15
  23. package/dist/host/dsm-client.js +51 -30
  24. package/dist/host/types.d.ts +5 -0
  25. package/dist/info.js +16 -2
  26. package/dist/init.js +53 -59
  27. package/dist/portal/alias.d.ts +6 -4
  28. package/dist/portal/alias.js +6 -11
  29. package/dist/portal/package.d.ts +0 -3
  30. package/dist/portal/package.js +1 -7
  31. package/dist/reproducible.js +1 -1
  32. package/dist/runtime/delegate-contract.d.ts +15 -0
  33. package/dist/runtime/delegate-contract.js +2 -0
  34. package/dist/runtime/executor-build.d.ts +15 -1
  35. package/dist/runtime/executor-build.js +42 -11
  36. package/dist/runtime/executor-digests.json +24 -0
  37. package/dist/runtime/executor-inspect.d.ts +1 -0
  38. package/dist/runtime/executor-inspect.js +5 -2
  39. package/dist/runtime/executor-policy.d.ts +3 -1
  40. package/dist/runtime/executor-policy.js +7 -2
  41. package/dist/runtime/executor-source.d.ts +21 -0
  42. package/dist/runtime/executor-source.js +35 -0
  43. package/dist/runtime/executor-tasks.d.ts +5 -2
  44. package/dist/runtime/executor-tasks.js +6 -4
  45. package/dist/runtime/sdk-source.d.ts +31 -0
  46. package/dist/runtime/sdk-source.js +92 -0
  47. package/dist/runtime/uninstall-cleanup.d.ts +7 -1
  48. package/dist/runtime/uninstall-cleanup.js +7 -1
  49. package/dist/standalone/api-permissions.d.ts +4 -1
  50. package/dist/standalone/api-permissions.js +10 -18
  51. package/dist/standalone/build.d.ts +1 -0
  52. package/dist/standalone/build.js +11 -4
  53. package/dist/standalone/daemon.js +2 -2
  54. package/dist/standalone/dsm-window.js +9 -12
  55. package/dist/standalone/inspect-spk.js +8 -7
  56. package/dist/standalone/manifest.d.ts +5 -2
  57. package/dist/standalone/manifest.js +20 -5
  58. package/dist/standalone/root-window.d.ts +11 -4
  59. package/dist/standalone/root-window.js +54 -30
  60. package/dist/standalone/sdk-check.d.ts +9 -0
  61. package/dist/standalone/sdk-check.js +43 -0
  62. package/dist/standalone/spk.js +2 -2
  63. package/dist/template-paths.d.ts +7 -2
  64. package/dist/template-paths.js +18 -6
  65. package/dist/validate.js +2 -1
  66. package/package.json +13 -3
  67. package/schema/synology-app.schema.json +1 -10
  68. package/skills/SKILL.md +1 -1
  69. package/skills/reference/create.md +7 -2
  70. package/skills/reference/deploy.md +1 -1
  71. package/skills/reference/identity.md +1 -1
  72. package/skills/reference/portal.md +7 -3
  73. package/dist/templates/_executor/README.md +0 -318
  74. package/dist/templates/_executor/anchor.go +0 -156
  75. package/dist/templates/_executor/anchor_test.go +0 -161
  76. package/dist/templates/_executor/apppriv_review_test.go +0 -28
  77. package/dist/templates/_executor/auth_presence_review_test.go +0 -38
  78. package/dist/templates/_executor/cancel_contract_test.go +0 -236
  79. package/dist/templates/_executor/cmd/lifecycle/main.go +0 -42
  80. package/dist/templates/_executor/cookie_review_test.go +0 -27
  81. package/dist/templates/_executor/copy.go +0 -64
  82. package/dist/templates/_executor/copy_test.go +0 -88
  83. package/dist/templates/_executor/digest_review_test.go +0 -120
  84. package/dist/templates/_executor/directories.go +0 -40
  85. package/dist/templates/_executor/dsm.go +0 -369
  86. package/dist/templates/_executor/dsm_test.go +0 -290
  87. package/dist/templates/_executor/executor.go +0 -735
  88. package/dist/templates/_executor/executor_test.go +0 -314
  89. package/dist/templates/_executor/go.mod +0 -5
  90. package/dist/templates/_executor/identity.go +0 -74
  91. package/dist/templates/_executor/identity_kernel_linux_test.go +0 -60
  92. package/dist/templates/_executor/identity_linux.go +0 -82
  93. package/dist/templates/_executor/identity_security_test.go +0 -43
  94. package/dist/templates/_executor/internal/lifecycle/lifecycle.go +0 -95
  95. package/dist/templates/_executor/internal/lifecycle/lifecycle_test.go +0 -232
  96. package/dist/templates/_executor/internal/taskscript/boot.sh +0 -31
  97. package/dist/templates/_executor/internal/taskscript/cmd/main.go +0 -19
  98. package/dist/templates/_executor/internal/taskscript/control.sh +0 -31
  99. package/dist/templates/_executor/internal/taskscript/tasks.go +0 -44
  100. package/dist/templates/_executor/json_review_test.go +0 -40
  101. package/dist/templates/_executor/lifecycle_test.go +0 -97
  102. package/dist/templates/_executor/link_linux.go +0 -28
  103. package/dist/templates/_executor/long_running_test.go +0 -530
  104. package/dist/templates/_executor/main.go +0 -576
  105. package/dist/templates/_executor/managed.go +0 -117
  106. package/dist/templates/_executor/managed_test.go +0 -137
  107. package/dist/templates/_executor/move_linux.go +0 -490
  108. package/dist/templates/_executor/move_linux_test.go +0 -460
  109. package/dist/templates/_executor/move_validation.go +0 -46
  110. package/dist/templates/_executor/move_validation_test.go +0 -187
  111. package/dist/templates/_executor/operations.go +0 -926
  112. package/dist/templates/_executor/path_test.go +0 -35
  113. package/dist/templates/_executor/pid.go +0 -37
  114. package/dist/templates/_executor/pid_test.go +0 -113
  115. package/dist/templates/_executor/platform_linux.go +0 -187
  116. package/dist/templates/_executor/platform_linux_test.go +0 -191
  117. package/dist/templates/_executor/platform_other.go +0 -76
  118. package/dist/templates/_executor/process.go +0 -142
  119. package/dist/templates/_executor/purge_log.go +0 -18
  120. package/dist/templates/_executor/records.go +0 -242
  121. package/dist/templates/_executor/scope_cancel_contract_test.go +0 -91
  122. package/dist/templates/_executor/scope_client.go +0 -37
  123. package/dist/templates/_executor/scope_contract.go +0 -12
  124. package/dist/templates/_executor/selected_scope.go +0 -146
  125. package/dist/templates/_executor/selected_scope_test.go +0 -186
  126. package/dist/templates/_executor/socket_linux_test.go +0 -46
  127. package/dist/templates/_executor/status_disabled_test.go +0 -33
  128. package/dist/templates/_executor/store.go +0 -91
  129. package/dist/templates/_executor/supervise.go +0 -109
  130. package/dist/templates/_executor/supervise_test.go +0 -130
  131. package/dist/templates/_executor/task_race_review_test.go +0 -47
  132. package/dist/templates/_executor/tasks.go +0 -320
  133. package/dist/templates/_executor/tasks_dsm71_test.go +0 -114
  134. package/dist/templates/_executor/tasks_review_test.go +0 -43
  135. package/dist/templates/_executor/tasks_test.go +0 -223
  136. package/dist/templates/_executor/testdata/evidence/cleanup.json +0 -24
  137. package/dist/templates/_executor/testdata/evidence/final-smoke.jsonl +0 -9
  138. package/dist/templates/_executor/testdata/evidence/kernel-acl.json +0 -6
  139. package/dist/templates/_executor/testdata/evidence/linux-tests.log +0 -123
  140. package/dist/templates/_executor/testdata/evidence/live.jsonl +0 -23
  141. package/dist/templates/_executor/testdata/evidence/storage.json +0 -90
  142. package/dist/templates/_executor/testdata/evidence/validation.json +0 -55
  143. package/dist/templates/_executor/testdata/live_probe.py +0 -98
  144. package/dist/templates/_executor/upgrade_watch_test.go +0 -244
  145. package/dist/templates/_executor/watch.go +0 -164
  146. package/dist/templates/_executor/watch_test.go +0 -291
  147. package/dist/templates/_executor/write_review_linux_test.go +0 -87
  148. package/dist/templates/_shared/AGENTS.md +0 -146
  149. package/dist/templates/_shared/CLAUDE.md +0 -1
  150. package/dist/templates/_shared/third-party-notices.mjs +0 -51
  151. package/dist/templates/binary/LICENSES/GO-LICENSE +0 -27
  152. package/dist/templates/binary/LICENSES/GO-PATENTS +0 -22
  153. package/dist/templates/binary/dsm-package.yaml +0 -46
  154. package/dist/templates/binary/example/main.go +0 -16
  155. package/dist/templates/binary/gitignore +0 -2
  156. package/dist/templates/binary/i18n/messages/de.json +0 -4
  157. package/dist/templates/binary/i18n/messages/en.json +0 -4
  158. package/dist/templates/binary/i18n/messages/es.json +0 -4
  159. package/dist/templates/binary/i18n/messages/fr.json +0 -4
  160. package/dist/templates/binary/i18n/messages/it.json +0 -4
  161. package/dist/templates/binary/i18n/messages/ja.json +0 -4
  162. package/dist/templates/binary/i18n/messages/ko.json +0 -4
  163. package/dist/templates/binary/i18n/messages/zh-CN.json +0 -4
  164. package/dist/templates/binary/i18n/messages/zh-TW.json +0 -4
  165. package/dist/templates/binary/ui/app.css +0 -4
  166. package/dist/templates/binary/ui/app.js +0 -32
  167. package/dist/templates/compose/compose.yaml +0 -8
  168. package/dist/templates/compose/synology-app.yaml +0 -16
  169. package/dist/templates/native-authorization/AuthorizationGate.vue +0 -91
  170. package/dist/templates/native-authorization/i18n/de.json +0 -37
  171. package/dist/templates/native-authorization/i18n/en.json +0 -37
  172. package/dist/templates/native-authorization/i18n/es.json +0 -37
  173. package/dist/templates/native-authorization/i18n/fr.json +0 -37
  174. package/dist/templates/native-authorization/i18n/index.ts +0 -15
  175. package/dist/templates/native-authorization/i18n/it.json +0 -37
  176. package/dist/templates/native-authorization/i18n/ja.json +0 -37
  177. package/dist/templates/native-authorization/i18n/ko.json +0 -37
  178. package/dist/templates/native-authorization/i18n/zh-CN.json +0 -37
  179. package/dist/templates/native-authorization/i18n/zh-TW.json +0 -37
  180. package/dist/templates/native-go/README.md +0 -459
  181. package/dist/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +0 -61
  182. package/dist/templates/native-go/backend/cmd/app/main.go +0 -95
  183. package/dist/templates/native-go/backend/cmd/background-worker/main.go +0 -38
  184. package/dist/templates/native-go/backend/go.mod +0 -9
  185. package/dist/templates/native-go/backend/go.sum +0 -4
  186. package/dist/templates/native-go/backend/internal/api/cgi_framing_test.go +0 -32
  187. package/dist/templates/native-go/backend/internal/api/cookie_review_test.go +0 -28
  188. package/dist/templates/native-go/backend/internal/api/deadline_test.go +0 -114
  189. package/dist/templates/native-go/backend/internal/api/dsm-session.go +0 -54
  190. package/dist/templates/native-go/backend/internal/api/dsm-session_test.go +0 -51
  191. package/dist/templates/native-go/backend/internal/api/entry_test.go +0 -47
  192. package/dist/templates/native-go/backend/internal/api/errors.go +0 -47
  193. package/dist/templates/native-go/backend/internal/api/permissions.go +0 -161
  194. package/dist/templates/native-go/backend/internal/api/permissions.json +0 -5
  195. package/dist/templates/native-go/backend/internal/api/permissions_test.go +0 -113
  196. package/dist/templates/native-go/backend/internal/api/policy_fixture_test.go +0 -8
  197. package/dist/templates/native-go/backend/internal/api/registry.go +0 -142
  198. package/dist/templates/native-go/backend/internal/api/registry_test.go +0 -344
  199. package/dist/templates/native-go/backend/internal/api/resource_limits_test.go +0 -87
  200. package/dist/templates/native-go/backend/internal/api/sdk-permissions.json +0 -59
  201. package/dist/templates/native-go/backend/internal/api/sdk_policy_test.go +0 -31
  202. package/dist/templates/native-go/backend/internal/api/server.go +0 -305
  203. package/dist/templates/native-go/backend/internal/api/testdata/permissions-cases.json +0 -172
  204. package/dist/templates/native-go/backend/internal/app/background.go +0 -249
  205. package/dist/templates/native-go/backend/internal/app/background_none.go +0 -8
  206. package/dist/templates/native-go/backend/internal/app/background_owner.go +0 -38
  207. package/dist/templates/native-go/backend/internal/app/background_owner_test.go +0 -163
  208. package/dist/templates/native-go/backend/internal/app/background_schedule.go +0 -69
  209. package/dist/templates/native-go/backend/internal/app/background_schedule_test.go +0 -62
  210. package/dist/templates/native-go/backend/internal/app/background_test.go +0 -320
  211. package/dist/templates/native-go/backend/internal/app/delegate_config.go +0 -57
  212. package/dist/templates/native-go/backend/internal/app/delegate_config_test.go +0 -28
  213. package/dist/templates/native-go/backend/internal/app/delegate_none.go +0 -5
  214. package/dist/templates/native-go/backend/internal/app/identity.go +0 -20
  215. package/dist/templates/native-go/backend/internal/app/identity_test.go +0 -15
  216. package/dist/templates/native-go/backend/internal/app/migrations.go +0 -41
  217. package/dist/templates/native-go/backend/internal/app/migrations_test.go +0 -41
  218. package/dist/templates/native-go/backend/internal/app/portal.go +0 -30
  219. package/dist/templates/native-go/backend/internal/app/portal_test.go +0 -55
  220. package/dist/templates/native-go/backend/internal/app/root_none.go +0 -9
  221. package/dist/templates/native-go/backend/internal/app/routes.go +0 -137
  222. package/dist/templates/native-go/backend/internal/app/routes_test.go +0 -165
  223. package/dist/templates/native-go/backend/internal/app/session_files.go +0 -9
  224. package/dist/templates/native-go/backend/internal/app/session_files_test.go +0 -14
  225. package/dist/templates/native-go/backend/internal/app/shared_folder.go +0 -144
  226. package/dist/templates/native-go/backend/internal/app/shared_folder_test.go +0 -158
  227. package/dist/templates/native-go/backend/internal/background/access.go +0 -57
  228. package/dist/templates/native-go/backend/internal/background/lock_test.go +0 -131
  229. package/dist/templates/native-go/backend/internal/background/owner_test.go +0 -118
  230. package/dist/templates/native-go/backend/internal/background/runner.go +0 -185
  231. package/dist/templates/native-go/backend/internal/background/runner_test.go +0 -209
  232. package/dist/templates/native-go/backend/internal/background/schedule.go +0 -336
  233. package/dist/templates/native-go/backend/internal/background/schedule_test.go +0 -368
  234. package/dist/templates/native-go/backend/internal/background/store.go +0 -825
  235. package/dist/templates/native-go/backend/internal/background/store_test.go +0 -365
  236. package/dist/templates/native-go/backend/internal/datamigrate/migrate.go +0 -191
  237. package/dist/templates/native-go/backend/internal/datamigrate/migrate_test.go +0 -177
  238. package/dist/templates/native-go/backend/internal/dsm/admin.go +0 -76
  239. package/dist/templates/native-go/backend/internal/dsm/admin_linux.go +0 -110
  240. package/dist/templates/native-go/backend/internal/dsm/admin_linux_test.go +0 -105
  241. package/dist/templates/native-go/backend/internal/dsm/admin_other.go +0 -15
  242. package/dist/templates/native-go/backend/internal/dsm/admin_test.go +0 -67
  243. package/dist/templates/native-go/backend/internal/dsm/apppriv.go +0 -30
  244. package/dist/templates/native-go/backend/internal/dsm/auth.go +0 -94
  245. package/dist/templates/native-go/backend/internal/dsm/auth_test.go +0 -159
  246. package/dist/templates/native-go/backend/internal/dsm/bridge_file.go +0 -75
  247. package/dist/templates/native-go/backend/internal/dsm/bridge_file_test.go +0 -57
  248. package/dist/templates/native-go/backend/internal/dsm/entry.go +0 -177
  249. package/dist/templates/native-go/backend/internal/dsm/entry_test.go +0 -315
  250. package/dist/templates/native-go/backend/internal/dsm/native/admin-aarch64.elf +0 -0
  251. package/dist/templates/native-go/backend/internal/dsm/native/admin-armv7.elf +0 -0
  252. package/dist/templates/native-go/backend/internal/dsm/native/admin-x86_64.elf +0 -0
  253. package/dist/templates/native-go/backend/internal/dsm/native/admin_check.c +0 -28
  254. package/dist/templates/native-go/backend/internal/dsm/native/apppriv-aarch64.elf +0 -0
  255. package/dist/templates/native-go/backend/internal/dsm/native/apppriv-armv7.elf +0 -0
  256. package/dist/templates/native-go/backend/internal/dsm/native/apppriv-x86_64.elf +0 -0
  257. package/dist/templates/native-go/backend/internal/dsm/native/apppriv_check.c +0 -33
  258. package/dist/templates/native-go/backend/internal/dsm/native/build.sh +0 -18
  259. package/dist/templates/native-go/backend/internal/dsm/native/licenses/GLIBC-NOTICES.txt +0 -400
  260. package/dist/templates/native-go/backend/internal/dsm/native/licenses/LGPL-2.1.txt +0 -501
  261. package/dist/templates/native-go/backend/internal/dsm/native/licenses/SOURCE.txt +0 -5
  262. package/dist/templates/native-go/backend/internal/dsm/native/licenses/ZIG-MIT.txt +0 -21
  263. package/dist/templates/native-go/backend/internal/dsm/native/provenance.json +0 -18
  264. package/dist/templates/native-go/backend/internal/filestation/browse_test.go +0 -67
  265. package/dist/templates/native-go/backend/internal/filestation/check_permission.go +0 -71
  266. package/dist/templates/native-go/backend/internal/filestation/check_permission_test.go +0 -77
  267. package/dist/templates/native-go/backend/internal/filestation/client.go +0 -337
  268. package/dist/templates/native-go/backend/internal/filestation/client_test.go +0 -155
  269. package/dist/templates/native-go/backend/internal/filestation/doc.go +0 -4
  270. package/dist/templates/native-go/backend/internal/filestation/download_dsm71_test.go +0 -82
  271. package/dist/templates/native-go/backend/internal/filestation/http.go +0 -70
  272. package/dist/templates/native-go/backend/internal/filestation/http_test.go +0 -188
  273. package/dist/templates/native-go/backend/internal/filestation/operations_test.go +0 -206
  274. package/dist/templates/native-go/backend/internal/filestation/read_file_test.go +0 -89
  275. package/dist/templates/native-go/backend/internal/filestation/sdk_policy_test.go +0 -39
  276. package/dist/templates/native-go/backend/internal/filestation/service.go +0 -254
  277. package/dist/templates/native-go/backend/internal/filestation/service_test.go +0 -74
  278. package/dist/templates/native-go/backend/internal/filestation/upload_stream.go +0 -76
  279. package/dist/templates/native-go/backend/internal/filestation/upload_stream_test.go +0 -77
  280. package/dist/templates/native-go/backend/internal/filestation/write.go +0 -32
  281. package/dist/templates/native-go/backend/internal/filestation/write_test.go +0 -124
  282. package/dist/templates/native-go/backend/internal/identity/README.md +0 -59
  283. package/dist/templates/native-go/backend/internal/identity/dsm.go +0 -115
  284. package/dist/templates/native-go/backend/internal/identity/http.go +0 -291
  285. package/dist/templates/native-go/backend/internal/identity/identity_test.go +0 -530
  286. package/dist/templates/native-go/backend/internal/identity/service.go +0 -159
  287. package/dist/templates/native-go/backend/internal/identity/store.go +0 -109
  288. package/dist/templates/native-go/backend/internal/jsonlimits/limits.go +0 -48
  289. package/dist/templates/native-go/backend/internal/jsonlimits/limits_test.go +0 -52
  290. package/dist/templates/native-go/backend/internal/portal/portal.go +0 -138
  291. package/dist/templates/native-go/backend/internal/portal/portal_test.go +0 -89
  292. package/dist/templates/native-go/dsm-package.yaml +0 -71
  293. package/dist/templates/native-go/gitignore +0 -1
  294. package/dist/templates/native-go/i18n/glossary.json +0 -663
  295. package/dist/templates/native-go/i18n/messages/de.json +0 -29
  296. package/dist/templates/native-go/i18n/messages/en.json +0 -29
  297. package/dist/templates/native-go/i18n/messages/es.json +0 -29
  298. package/dist/templates/native-go/i18n/messages/fr.json +0 -29
  299. package/dist/templates/native-go/i18n/messages/it.json +0 -29
  300. package/dist/templates/native-go/i18n/messages/ja.json +0 -29
  301. package/dist/templates/native-go/i18n/messages/ko.json +0 -29
  302. package/dist/templates/native-go/i18n/messages/zh-CN.json +0 -29
  303. package/dist/templates/native-go/i18n/messages/zh-TW.json +0 -29
  304. package/dist/templates/native-go/ui/app.css +0 -45
  305. package/dist/templates/native-go/ui/app.js +0 -111
  306. package/dist/templates/native-go-delegate/DELEGATE.md +0 -263
  307. package/dist/templates/native-go-delegate/backend/cmd/background-worker/main.go +0 -48
  308. package/dist/templates/native-go-delegate/backend/internal/app/delegate.go +0 -25
  309. package/dist/templates/native-go-delegate/backend/internal/app/delegate_on.go +0 -5
  310. package/dist/templates/native-go-delegate/backend/internal/app/delegate_routes_test.go +0 -31
  311. package/dist/templates/native-go-delegate/backend/internal/background/delegate_review_test.go +0 -174
  312. package/dist/templates/native-go-delegate/backend/internal/background/delegated.go +0 -277
  313. package/dist/templates/native-go-delegate/backend/internal/background/delegated_moves.go +0 -270
  314. package/dist/templates/native-go-delegate/backend/internal/background/delegated_test.go +0 -34
  315. package/dist/templates/native-go-delegate/backend/internal/delegate/admission_recovery_test.go +0 -410
  316. package/dist/templates/native-go-delegate/backend/internal/delegate/busy_review_test.go +0 -15
  317. package/dist/templates/native-go-delegate/backend/internal/delegate/cancel_contract_test.go +0 -95
  318. package/dist/templates/native-go-delegate/backend/internal/delegate/client.go +0 -151
  319. package/dist/templates/native-go-delegate/backend/internal/delegate/client_test.go +0 -214
  320. package/dist/templates/native-go-delegate/backend/internal/delegate/destination.go +0 -110
  321. package/dist/templates/native-go-delegate/backend/internal/delegate/destination_state.go +0 -117
  322. package/dist/templates/native-go-delegate/backend/internal/delegate/destination_state_test.go +0 -60
  323. package/dist/templates/native-go-delegate/backend/internal/delegate/destination_test.go +0 -116
  324. package/dist/templates/native-go-delegate/backend/internal/delegate/example.go +0 -81
  325. package/dist/templates/native-go-delegate/backend/internal/delegate/example_test.go +0 -91
  326. package/dist/templates/native-go-delegate/backend/internal/delegate/executor_contract_test.go +0 -511
  327. package/dist/templates/native-go-delegate/backend/internal/delegate/files.go +0 -132
  328. package/dist/templates/native-go-delegate/backend/internal/delegate/long_running_routes.go +0 -92
  329. package/dist/templates/native-go-delegate/backend/internal/delegate/long_running_routes_test.go +0 -99
  330. package/dist/templates/native-go-delegate/backend/internal/delegate/move.go +0 -348
  331. package/dist/templates/native-go-delegate/backend/internal/delegate/move_test.go +0 -351
  332. package/dist/templates/native-go-delegate/backend/internal/delegate/operations_list.go +0 -65
  333. package/dist/templates/native-go-delegate/backend/internal/delegate/operations_list_test.go +0 -114
  334. package/dist/templates/native-go-delegate/backend/internal/delegate/retry.go +0 -106
  335. package/dist/templates/native-go-delegate/backend/internal/delegate/retry_test.go +0 -143
  336. package/dist/templates/native-go-delegate/backend/internal/delegate/service.go +0 -364
  337. package/dist/templates/native-go-delegate/backend/internal/delegate/service_test.go +0 -318
  338. package/dist/templates/native-go-delegate/backend/internal/delegate/staging.go +0 -121
  339. package/dist/templates/native-go-delegate/backend/internal/delegate/status_disabled_test.go +0 -51
  340. package/dist/templates/native-go-delegate/backend/internal/delegate/testdata/executor_contract.txt +0 -112
  341. package/dist/templates/native-go-delegate/backend/internal/delegate/transient_contract_test.go +0 -137
  342. package/dist/templates/native-go-delegate/backend/internal/delegate/wait_cancel_test.go +0 -101
  343. package/dist/templates/native-go-delegate/backend/internal/delegate/worker.go +0 -225
  344. package/dist/templates/native-go-delegate/backend/internal/filestation/files.go +0 -43
  345. package/dist/templates/native-go-delegate/backend/internal/filestation/files_test.go +0 -59
  346. package/dist/templates/native-go-delegate/frontend/src/CapabilityPanels.vue +0 -37
  347. package/dist/templates/native-go-delegate/frontend/src/delegate/BackgroundSavePanel.vue +0 -113
  348. package/dist/templates/native-go-delegate/frontend/src/delegate/DelegatePanel.vue +0 -70
  349. package/dist/templates/native-go-delegate/frontend/src/delegate/copy.ts +0 -8
  350. package/dist/templates/native-go-delegate/frontend/src/delegate/i18n/waiting.json +0 -11
  351. package/dist/templates/native-go-delegate/frontend/test/background-save.test.ts +0 -121
  352. package/dist/templates/native-go-delegate/frontend/test/delegate.test.ts +0 -145
  353. package/dist/templates/native-go-delegate/frontend/test/scope-settings.test.ts +0 -49
  354. package/dist/templates/native-go-delegate/test-frontend.sh +0 -12
  355. package/dist/templates/native-go-delegate/test.sh +0 -18
  356. package/dist/templates/native-go-jobs/BACKGROUND.md +0 -108
  357. package/dist/templates/native-go-jobs/backend/internal/app/background_on.go +0 -7
  358. package/dist/templates/native-go-jobs/backend/internal/app/background_routes_test.go +0 -90
  359. package/dist/templates/native-go-jobs/frontend/src/background/BackgroundPanel.vue +0 -170
  360. package/dist/templates/native-go-jobs/frontend/src/background/i18n/de.json +0 -75
  361. package/dist/templates/native-go-jobs/frontend/src/background/i18n/en.json +0 -75
  362. package/dist/templates/native-go-jobs/frontend/src/background/i18n/es.json +0 -75
  363. package/dist/templates/native-go-jobs/frontend/src/background/i18n/fr.json +0 -75
  364. package/dist/templates/native-go-jobs/frontend/src/background/i18n/it.json +0 -75
  365. package/dist/templates/native-go-jobs/frontend/src/background/i18n/ja.json +0 -75
  366. package/dist/templates/native-go-jobs/frontend/src/background/i18n/ko.json +0 -75
  367. package/dist/templates/native-go-jobs/frontend/src/background/i18n/zh-CN.json +0 -75
  368. package/dist/templates/native-go-jobs/frontend/src/background/i18n/zh-TW.json +0 -75
  369. package/dist/templates/native-go-jobs/frontend/src/background/i18n.ts +0 -19
  370. package/dist/templates/native-go-jobs/frontend/src/background/picker-provider.ts +0 -12
  371. package/dist/templates/native-go-jobs/frontend/src/background/request-key.ts +0 -5
  372. package/dist/templates/native-go-jobs/frontend/test/background.test.ts +0 -205
  373. package/dist/templates/native-go-root-ops/backend/internal/app/executor.go +0 -140
  374. package/dist/templates/native-go-root-ops/backend/internal/app/executor_test.go +0 -117
  375. package/dist/templates/native-go-root-ops/root/whoami.sh +0 -3
  376. package/dist/templates/native-go-vue/README.md +0 -47
  377. package/dist/templates/native-go-vue/frontend/DESIGN.md +0 -61
  378. package/dist/templates/native-go-vue/frontend/package-lock.json +0 -2530
  379. package/dist/templates/native-go-vue/frontend/package.json +0 -6
  380. package/dist/templates/native-go-vue/frontend/src/App.vue +0 -96
  381. package/dist/templates/native-go-vue/frontend/src/CapabilityPanels.vue +0 -6
  382. package/dist/templates/native-go-vue/frontend/src/context.ts +0 -78
  383. package/dist/templates/native-go-vue/frontend/src/delegate/ExecutorSettings.vue +0 -70
  384. package/dist/templates/native-go-vue/frontend/src/delegate/catalogs.ts +0 -11
  385. package/dist/templates/native-go-vue/frontend/src/delegate/copy.test.ts +0 -12
  386. package/dist/templates/native-go-vue/frontend/src/delegate/copy.ts +0 -4
  387. package/dist/templates/native-go-vue/frontend/src/delegate/executor-settings.test.ts +0 -23
  388. package/dist/templates/native-go-vue/frontend/src/delegate/executor-setup.ts +0 -24
  389. package/dist/templates/native-go-vue/frontend/src/delegate/facade.test.ts +0 -100
  390. package/dist/templates/native-go-vue/frontend/src/delegate/facade.ts +0 -85
  391. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/de.json +0 -47
  392. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/en.json +0 -47
  393. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/es.json +0 -47
  394. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/fr.json +0 -47
  395. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/it.json +0 -47
  396. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/ja.json +0 -47
  397. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/ko.json +0 -47
  398. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/de.json +0 -42
  399. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/en.json +0 -42
  400. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/es.json +0 -42
  401. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/fr.json +0 -42
  402. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/it.json +0 -42
  403. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/ja.json +0 -42
  404. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/ko.json +0 -42
  405. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/zh-CN.json +0 -42
  406. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/zh-TW.json +0 -42
  407. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/zh-CN.json +0 -47
  408. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/zh-TW.json +0 -47
  409. package/dist/templates/native-go-vue/frontend/src/delegate/long-running.ts +0 -57
  410. package/dist/templates/native-go-vue/frontend/src/delegate/save-copy.test.ts +0 -12
  411. package/dist/templates/native-go-vue/frontend/src/delegate/save-copy.ts +0 -24
  412. package/dist/templates/native-go-vue/frontend/src/delegate/scoped-picker.test.ts +0 -12
  413. package/dist/templates/native-go-vue/frontend/src/delegate/scoped-picker.ts +0 -21
  414. package/dist/templates/native-go-vue/frontend/src/files/FileBrowser.vue +0 -131
  415. package/dist/templates/native-go-vue/frontend/src/files/FilesPage.vue +0 -35
  416. package/dist/templates/native-go-vue/frontend/src/files/files.test.ts +0 -100
  417. package/dist/templates/native-go-vue/frontend/src/files/provider.test.ts +0 -48
  418. package/dist/templates/native-go-vue/frontend/src/files/transfers.test.ts +0 -27
  419. package/dist/templates/native-go-vue/frontend/src/files/transfers.ts +0 -25
  420. package/dist/templates/native-go-vue/frontend/src/i18n/de.json +0 -20
  421. package/dist/templates/native-go-vue/frontend/src/i18n/en.json +0 -20
  422. package/dist/templates/native-go-vue/frontend/src/i18n/es.json +0 -20
  423. package/dist/templates/native-go-vue/frontend/src/i18n/fr.json +0 -20
  424. package/dist/templates/native-go-vue/frontend/src/i18n/it.json +0 -20
  425. package/dist/templates/native-go-vue/frontend/src/i18n/ja.json +0 -20
  426. package/dist/templates/native-go-vue/frontend/src/i18n/ko.json +0 -20
  427. package/dist/templates/native-go-vue/frontend/src/i18n/zh-CN.json +0 -20
  428. package/dist/templates/native-go-vue/frontend/src/i18n/zh-TW.json +0 -20
  429. package/dist/templates/native-go-vue/frontend/src/i18n.ts +0 -13
  430. package/dist/templates/native-go-vue/frontend/src/identity/DESIGN.md +0 -46
  431. package/dist/templates/native-go-vue/frontend/src/identity/LoginPage.vue +0 -78
  432. package/dist/templates/native-go-vue/frontend/src/identity/i18n/de.json +0 -27
  433. package/dist/templates/native-go-vue/frontend/src/identity/i18n/en.json +0 -27
  434. package/dist/templates/native-go-vue/frontend/src/identity/i18n/es.json +0 -27
  435. package/dist/templates/native-go-vue/frontend/src/identity/i18n/fr.json +0 -27
  436. package/dist/templates/native-go-vue/frontend/src/identity/i18n/it.json +0 -27
  437. package/dist/templates/native-go-vue/frontend/src/identity/i18n/ja.json +0 -27
  438. package/dist/templates/native-go-vue/frontend/src/identity/i18n/ko.json +0 -27
  439. package/dist/templates/native-go-vue/frontend/src/identity/i18n/zh-CN.json +0 -27
  440. package/dist/templates/native-go-vue/frontend/src/identity/i18n/zh-TW.json +0 -27
  441. package/dist/templates/native-go-vue/frontend/src/identity/i18n.ts +0 -14
  442. package/dist/templates/native-go-vue/frontend/src/identity/login.test.ts +0 -32
  443. package/dist/templates/native-go-vue/frontend/src/identity/session.test.ts +0 -33
  444. package/dist/templates/native-go-vue/frontend/src/identity/session.ts +0 -74
  445. package/dist/templates/native-go-vue/frontend/src/main.ts +0 -32
  446. package/dist/templates/native-go-vue/frontend/src/nas/NasPicker.vue +0 -42
  447. package/dist/templates/native-go-vue/frontend/src/nas/contract.ts +0 -12
  448. package/dist/templates/native-go-vue/frontend/src/nas/destination.test.ts +0 -48
  449. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/de.json +0 -41
  450. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/en.json +0 -41
  451. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/es.json +0 -41
  452. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/fr.json +0 -41
  453. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/it.json +0 -41
  454. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/ja.json +0 -41
  455. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/ko.json +0 -41
  456. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/zh-CN.json +0 -41
  457. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/zh-TW.json +0 -41
  458. package/dist/templates/native-go-vue/frontend/src/nas/i18n.ts +0 -2
  459. package/dist/templates/native-go-vue/frontend/src/nas/locale.ts +0 -24
  460. package/dist/templates/native-go-vue/frontend/src/nas/provider.ts +0 -50
  461. package/dist/templates/native-go-vue/frontend/src/nas/use-request.ts +0 -18
  462. package/dist/templates/native-go-vue/frontend/src/portal/PortalSettings.vue +0 -39
  463. package/dist/templates/native-go-vue/frontend/src/shell/AppShell.vue +0 -48
  464. package/dist/templates/native-go-vue/frontend/src/shell/i18n/de.json +0 -4
  465. package/dist/templates/native-go-vue/frontend/src/shell/i18n/en.json +0 -4
  466. package/dist/templates/native-go-vue/frontend/src/shell/i18n/es.json +0 -4
  467. package/dist/templates/native-go-vue/frontend/src/shell/i18n/fr.json +0 -4
  468. package/dist/templates/native-go-vue/frontend/src/shell/i18n/it.json +0 -4
  469. package/dist/templates/native-go-vue/frontend/src/shell/i18n/ja.json +0 -4
  470. package/dist/templates/native-go-vue/frontend/src/shell/i18n/ko.json +0 -4
  471. package/dist/templates/native-go-vue/frontend/src/shell/i18n/zh-CN.json +0 -4
  472. package/dist/templates/native-go-vue/frontend/src/shell/i18n/zh-TW.json +0 -4
  473. package/dist/templates/native-go-vue/frontend/src/shell/i18n.ts +0 -17
  474. package/dist/templates/native-go-vue/frontend/src/shell/pages.ts +0 -15
  475. package/dist/templates/native-go-vue/frontend/src/style.css +0 -27
  476. package/dist/templates/native-go-vue/frontend/test/apps.test.ts +0 -57
  477. package/dist/templates/native-go-vue/frontend/test/native-controls.test.ts +0 -27
  478. package/dist/templates/native-go-vue/frontend/test/portal-settings.test.ts +0 -71
  479. package/dist/templates/native-go-vue/frontend/test/shell-i18n.test.ts +0 -50
  480. package/dist/templates/native-go-vue/frontend/test/shell-ui.test.ts +0 -20
  481. package/dist/templates/native-go-vue/frontend/test/shell.test.ts +0 -30
  482. package/dist/templates/native-go-vue/frontend/tsconfig.json +0 -1
  483. package/dist/templates/native-go-vue/frontend/vite.config.ts +0 -10
  484. package/dist/templates/native-go-vue/gitignore +0 -2
  485. package/templates/_daemon/fixture_linux_test.go +0 -15
  486. package/templates/_daemon/fixture_other_test.go +0 -7
  487. package/templates/_daemon/go.mod +0 -5
  488. package/templates/_daemon/main.go +0 -611
  489. package/templates/_daemon/main_test.go +0 -315
  490. package/templates/_daemon/process_linux.go +0 -55
  491. package/templates/_daemon/process_linux_test.go +0 -161
  492. package/templates/_daemon/process_other.go +0 -14
  493. package/templates/_daemon/testdata/child.go +0 -44
  494. package/templates/_executor/README.md +0 -318
  495. package/templates/_executor/anchor.go +0 -156
  496. package/templates/_executor/anchor_test.go +0 -161
  497. package/templates/_executor/apppriv_review_test.go +0 -28
  498. package/templates/_executor/auth_presence_review_test.go +0 -38
  499. package/templates/_executor/cancel_contract_test.go +0 -236
  500. package/templates/_executor/cmd/lifecycle/main.go +0 -42
  501. package/templates/_executor/cookie_review_test.go +0 -27
  502. package/templates/_executor/copy.go +0 -64
  503. package/templates/_executor/copy_test.go +0 -88
  504. package/templates/_executor/digest_review_test.go +0 -120
  505. package/templates/_executor/directories.go +0 -40
  506. package/templates/_executor/dsm.go +0 -369
  507. package/templates/_executor/dsm_test.go +0 -290
  508. package/templates/_executor/executor.go +0 -735
  509. package/templates/_executor/executor_test.go +0 -314
  510. package/templates/_executor/go.mod +0 -5
  511. package/templates/_executor/identity.go +0 -74
  512. package/templates/_executor/identity_kernel_linux_test.go +0 -60
  513. package/templates/_executor/identity_linux.go +0 -82
  514. package/templates/_executor/identity_security_test.go +0 -43
  515. package/templates/_executor/internal/lifecycle/lifecycle.go +0 -95
  516. package/templates/_executor/internal/lifecycle/lifecycle_test.go +0 -232
  517. package/templates/_executor/internal/taskscript/boot.sh +0 -31
  518. package/templates/_executor/internal/taskscript/cmd/main.go +0 -19
  519. package/templates/_executor/internal/taskscript/control.sh +0 -31
  520. package/templates/_executor/internal/taskscript/tasks.go +0 -44
  521. package/templates/_executor/json_review_test.go +0 -40
  522. package/templates/_executor/lifecycle_test.go +0 -97
  523. package/templates/_executor/link_linux.go +0 -28
  524. package/templates/_executor/long_running_test.go +0 -530
  525. package/templates/_executor/main.go +0 -576
  526. package/templates/_executor/managed.go +0 -117
  527. package/templates/_executor/managed_test.go +0 -137
  528. package/templates/_executor/move_linux.go +0 -490
  529. package/templates/_executor/move_linux_test.go +0 -460
  530. package/templates/_executor/move_validation.go +0 -46
  531. package/templates/_executor/move_validation_test.go +0 -187
  532. package/templates/_executor/operations.go +0 -926
  533. package/templates/_executor/path_test.go +0 -35
  534. package/templates/_executor/pid.go +0 -37
  535. package/templates/_executor/pid_test.go +0 -113
  536. package/templates/_executor/platform_linux.go +0 -187
  537. package/templates/_executor/platform_linux_test.go +0 -191
  538. package/templates/_executor/platform_other.go +0 -76
  539. package/templates/_executor/process.go +0 -142
  540. package/templates/_executor/purge_log.go +0 -18
  541. package/templates/_executor/records.go +0 -242
  542. package/templates/_executor/scope_cancel_contract_test.go +0 -91
  543. package/templates/_executor/scope_client.go +0 -37
  544. package/templates/_executor/scope_contract.go +0 -12
  545. package/templates/_executor/selected_scope.go +0 -146
  546. package/templates/_executor/selected_scope_test.go +0 -186
  547. package/templates/_executor/socket_linux_test.go +0 -46
  548. package/templates/_executor/status_disabled_test.go +0 -33
  549. package/templates/_executor/store.go +0 -91
  550. package/templates/_executor/supervise.go +0 -109
  551. package/templates/_executor/supervise_test.go +0 -130
  552. package/templates/_executor/task_race_review_test.go +0 -47
  553. package/templates/_executor/tasks.go +0 -320
  554. package/templates/_executor/tasks_dsm71_test.go +0 -114
  555. package/templates/_executor/tasks_review_test.go +0 -43
  556. package/templates/_executor/tasks_test.go +0 -223
  557. package/templates/_executor/testdata/evidence/cleanup.json +0 -24
  558. package/templates/_executor/testdata/evidence/final-smoke.jsonl +0 -9
  559. package/templates/_executor/testdata/evidence/kernel-acl.json +0 -6
  560. package/templates/_executor/testdata/evidence/linux-tests.log +0 -123
  561. package/templates/_executor/testdata/evidence/live.jsonl +0 -23
  562. package/templates/_executor/testdata/evidence/storage.json +0 -90
  563. package/templates/_executor/testdata/evidence/validation.json +0 -55
  564. package/templates/_executor/testdata/live_probe.py +0 -98
  565. package/templates/_executor/upgrade_watch_test.go +0 -244
  566. package/templates/_executor/watch.go +0 -164
  567. package/templates/_executor/watch_test.go +0 -291
  568. package/templates/_executor/write_review_linux_test.go +0 -87
  569. package/templates/_gateway/auth.go +0 -101
  570. package/templates/_gateway/auth_test.go +0 -216
  571. package/templates/_gateway/cgi.go +0 -133
  572. package/templates/_gateway/cgi_test.go +0 -156
  573. package/templates/_gateway/csrf.go +0 -73
  574. package/templates/_gateway/csrf_test.go +0 -155
  575. package/templates/_gateway/directory.go +0 -108
  576. package/templates/_gateway/directory_test.go +0 -202
  577. package/templates/_gateway/gateway.go +0 -412
  578. package/templates/_gateway/gateway_test.go +0 -676
  579. package/templates/_gateway/go.mod +0 -5
  580. package/templates/_gateway/groups.go +0 -66
  581. package/templates/_gateway/main.go +0 -45
  582. package/templates/_shared/AGENTS.md +0 -146
  583. package/templates/_shared/CLAUDE.md +0 -1
  584. package/templates/_shared/GO-LICENSE +0 -27
  585. package/templates/_shared/GO-PATENTS +0 -22
  586. package/templates/_shared/LICENSES/TEMPLATE.txt +0 -21
  587. package/templates/_shared/third-party-notices.mjs +0 -51
  588. package/templates/binary/LICENSES/GO-LICENSE +0 -27
  589. package/templates/binary/LICENSES/GO-PATENTS +0 -22
  590. package/templates/binary/dsm-package.yaml +0 -46
  591. package/templates/binary/example/main.go +0 -16
  592. package/templates/binary/gitignore +0 -2
  593. package/templates/binary/i18n/messages/de.json +0 -4
  594. package/templates/binary/i18n/messages/en.json +0 -4
  595. package/templates/binary/i18n/messages/es.json +0 -4
  596. package/templates/binary/i18n/messages/fr.json +0 -4
  597. package/templates/binary/i18n/messages/it.json +0 -4
  598. package/templates/binary/i18n/messages/ja.json +0 -4
  599. package/templates/binary/i18n/messages/ko.json +0 -4
  600. package/templates/binary/i18n/messages/zh-CN.json +0 -4
  601. package/templates/binary/i18n/messages/zh-TW.json +0 -4
  602. package/templates/binary/ui/app.css +0 -4
  603. package/templates/binary/ui/app.js +0 -32
  604. package/templates/compose/compose.yaml +0 -8
  605. package/templates/compose/synology-app.yaml +0 -16
  606. package/templates/native-authorization/AuthorizationGate.vue +0 -91
  607. package/templates/native-authorization/i18n/de.json +0 -37
  608. package/templates/native-authorization/i18n/en.json +0 -37
  609. package/templates/native-authorization/i18n/es.json +0 -37
  610. package/templates/native-authorization/i18n/fr.json +0 -37
  611. package/templates/native-authorization/i18n/index.ts +0 -15
  612. package/templates/native-authorization/i18n/it.json +0 -37
  613. package/templates/native-authorization/i18n/ja.json +0 -37
  614. package/templates/native-authorization/i18n/ko.json +0 -37
  615. package/templates/native-authorization/i18n/zh-CN.json +0 -37
  616. package/templates/native-authorization/i18n/zh-TW.json +0 -37
  617. package/templates/native-go/README.md +0 -459
  618. package/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +0 -61
  619. package/templates/native-go/backend/cmd/app/main.go +0 -95
  620. package/templates/native-go/backend/cmd/background-worker/main.go +0 -38
  621. package/templates/native-go/backend/go.mod +0 -9
  622. package/templates/native-go/backend/go.sum +0 -4
  623. package/templates/native-go/backend/internal/api/cgi_framing_test.go +0 -32
  624. package/templates/native-go/backend/internal/api/cookie_review_test.go +0 -28
  625. package/templates/native-go/backend/internal/api/deadline_test.go +0 -114
  626. package/templates/native-go/backend/internal/api/dsm-session.go +0 -54
  627. package/templates/native-go/backend/internal/api/dsm-session_test.go +0 -51
  628. package/templates/native-go/backend/internal/api/entry_test.go +0 -47
  629. package/templates/native-go/backend/internal/api/errors.go +0 -47
  630. package/templates/native-go/backend/internal/api/permissions.go +0 -161
  631. package/templates/native-go/backend/internal/api/permissions.json +0 -5
  632. package/templates/native-go/backend/internal/api/permissions_test.go +0 -113
  633. package/templates/native-go/backend/internal/api/policy_fixture_test.go +0 -8
  634. package/templates/native-go/backend/internal/api/registry.go +0 -142
  635. package/templates/native-go/backend/internal/api/registry_test.go +0 -344
  636. package/templates/native-go/backend/internal/api/resource_limits_test.go +0 -87
  637. package/templates/native-go/backend/internal/api/sdk-permissions.json +0 -59
  638. package/templates/native-go/backend/internal/api/sdk_policy_test.go +0 -31
  639. package/templates/native-go/backend/internal/api/server.go +0 -305
  640. package/templates/native-go/backend/internal/api/testdata/permissions-cases.json +0 -172
  641. package/templates/native-go/backend/internal/app/background.go +0 -249
  642. package/templates/native-go/backend/internal/app/background_none.go +0 -8
  643. package/templates/native-go/backend/internal/app/background_owner.go +0 -38
  644. package/templates/native-go/backend/internal/app/background_owner_test.go +0 -163
  645. package/templates/native-go/backend/internal/app/background_schedule.go +0 -69
  646. package/templates/native-go/backend/internal/app/background_schedule_test.go +0 -62
  647. package/templates/native-go/backend/internal/app/background_test.go +0 -320
  648. package/templates/native-go/backend/internal/app/delegate_config.go +0 -57
  649. package/templates/native-go/backend/internal/app/delegate_config_test.go +0 -28
  650. package/templates/native-go/backend/internal/app/delegate_none.go +0 -5
  651. package/templates/native-go/backend/internal/app/identity.go +0 -20
  652. package/templates/native-go/backend/internal/app/identity_test.go +0 -15
  653. package/templates/native-go/backend/internal/app/migrations.go +0 -41
  654. package/templates/native-go/backend/internal/app/migrations_test.go +0 -41
  655. package/templates/native-go/backend/internal/app/portal.go +0 -30
  656. package/templates/native-go/backend/internal/app/portal_test.go +0 -55
  657. package/templates/native-go/backend/internal/app/root_none.go +0 -9
  658. package/templates/native-go/backend/internal/app/routes.go +0 -137
  659. package/templates/native-go/backend/internal/app/routes_test.go +0 -165
  660. package/templates/native-go/backend/internal/app/session_files.go +0 -9
  661. package/templates/native-go/backend/internal/app/session_files_test.go +0 -14
  662. package/templates/native-go/backend/internal/app/shared_folder.go +0 -144
  663. package/templates/native-go/backend/internal/app/shared_folder_test.go +0 -158
  664. package/templates/native-go/backend/internal/background/access.go +0 -57
  665. package/templates/native-go/backend/internal/background/lock_test.go +0 -131
  666. package/templates/native-go/backend/internal/background/owner_test.go +0 -118
  667. package/templates/native-go/backend/internal/background/runner.go +0 -185
  668. package/templates/native-go/backend/internal/background/runner_test.go +0 -209
  669. package/templates/native-go/backend/internal/background/schedule.go +0 -336
  670. package/templates/native-go/backend/internal/background/schedule_test.go +0 -368
  671. package/templates/native-go/backend/internal/background/store.go +0 -825
  672. package/templates/native-go/backend/internal/background/store_test.go +0 -365
  673. package/templates/native-go/backend/internal/datamigrate/migrate.go +0 -191
  674. package/templates/native-go/backend/internal/datamigrate/migrate_test.go +0 -177
  675. package/templates/native-go/backend/internal/dsm/admin.go +0 -76
  676. package/templates/native-go/backend/internal/dsm/admin_linux.go +0 -110
  677. package/templates/native-go/backend/internal/dsm/admin_linux_test.go +0 -105
  678. package/templates/native-go/backend/internal/dsm/admin_other.go +0 -15
  679. package/templates/native-go/backend/internal/dsm/admin_test.go +0 -67
  680. package/templates/native-go/backend/internal/dsm/apppriv.go +0 -30
  681. package/templates/native-go/backend/internal/dsm/auth.go +0 -94
  682. package/templates/native-go/backend/internal/dsm/auth_test.go +0 -159
  683. package/templates/native-go/backend/internal/dsm/bridge_file.go +0 -75
  684. package/templates/native-go/backend/internal/dsm/bridge_file_test.go +0 -57
  685. package/templates/native-go/backend/internal/dsm/entry.go +0 -177
  686. package/templates/native-go/backend/internal/dsm/entry_test.go +0 -315
  687. package/templates/native-go/backend/internal/dsm/native/admin-aarch64.elf +0 -0
  688. package/templates/native-go/backend/internal/dsm/native/admin-armv7.elf +0 -0
  689. package/templates/native-go/backend/internal/dsm/native/admin-x86_64.elf +0 -0
  690. package/templates/native-go/backend/internal/dsm/native/admin_check.c +0 -28
  691. package/templates/native-go/backend/internal/dsm/native/apppriv-aarch64.elf +0 -0
  692. package/templates/native-go/backend/internal/dsm/native/apppriv-armv7.elf +0 -0
  693. package/templates/native-go/backend/internal/dsm/native/apppriv-x86_64.elf +0 -0
  694. package/templates/native-go/backend/internal/dsm/native/apppriv_check.c +0 -33
  695. package/templates/native-go/backend/internal/dsm/native/build.sh +0 -18
  696. package/templates/native-go/backend/internal/dsm/native/licenses/GLIBC-NOTICES.txt +0 -400
  697. package/templates/native-go/backend/internal/dsm/native/licenses/LGPL-2.1.txt +0 -501
  698. package/templates/native-go/backend/internal/dsm/native/licenses/SOURCE.txt +0 -5
  699. package/templates/native-go/backend/internal/dsm/native/licenses/ZIG-MIT.txt +0 -21
  700. package/templates/native-go/backend/internal/dsm/native/provenance.json +0 -18
  701. package/templates/native-go/backend/internal/filestation/browse_test.go +0 -67
  702. package/templates/native-go/backend/internal/filestation/check_permission.go +0 -71
  703. package/templates/native-go/backend/internal/filestation/check_permission_test.go +0 -77
  704. package/templates/native-go/backend/internal/filestation/client.go +0 -337
  705. package/templates/native-go/backend/internal/filestation/client_test.go +0 -155
  706. package/templates/native-go/backend/internal/filestation/doc.go +0 -4
  707. package/templates/native-go/backend/internal/filestation/download_dsm71_test.go +0 -82
  708. package/templates/native-go/backend/internal/filestation/http.go +0 -70
  709. package/templates/native-go/backend/internal/filestation/http_test.go +0 -188
  710. package/templates/native-go/backend/internal/filestation/operations_test.go +0 -206
  711. package/templates/native-go/backend/internal/filestation/read_file_test.go +0 -89
  712. package/templates/native-go/backend/internal/filestation/sdk_policy_test.go +0 -39
  713. package/templates/native-go/backend/internal/filestation/service.go +0 -254
  714. package/templates/native-go/backend/internal/filestation/service_test.go +0 -74
  715. package/templates/native-go/backend/internal/filestation/upload_stream.go +0 -76
  716. package/templates/native-go/backend/internal/filestation/upload_stream_test.go +0 -77
  717. package/templates/native-go/backend/internal/filestation/write.go +0 -32
  718. package/templates/native-go/backend/internal/filestation/write_test.go +0 -124
  719. package/templates/native-go/backend/internal/identity/README.md +0 -59
  720. package/templates/native-go/backend/internal/identity/dsm.go +0 -115
  721. package/templates/native-go/backend/internal/identity/http.go +0 -291
  722. package/templates/native-go/backend/internal/identity/identity_test.go +0 -530
  723. package/templates/native-go/backend/internal/identity/service.go +0 -159
  724. package/templates/native-go/backend/internal/identity/store.go +0 -109
  725. package/templates/native-go/backend/internal/jsonlimits/limits.go +0 -48
  726. package/templates/native-go/backend/internal/jsonlimits/limits_test.go +0 -52
  727. package/templates/native-go/backend/internal/portal/portal.go +0 -138
  728. package/templates/native-go/backend/internal/portal/portal_test.go +0 -89
  729. package/templates/native-go/dsm-package.yaml +0 -71
  730. package/templates/native-go/gitignore +0 -1
  731. package/templates/native-go/i18n/glossary.json +0 -663
  732. package/templates/native-go/i18n/messages/de.json +0 -29
  733. package/templates/native-go/i18n/messages/en.json +0 -29
  734. package/templates/native-go/i18n/messages/es.json +0 -29
  735. package/templates/native-go/i18n/messages/fr.json +0 -29
  736. package/templates/native-go/i18n/messages/it.json +0 -29
  737. package/templates/native-go/i18n/messages/ja.json +0 -29
  738. package/templates/native-go/i18n/messages/ko.json +0 -29
  739. package/templates/native-go/i18n/messages/zh-CN.json +0 -29
  740. package/templates/native-go/i18n/messages/zh-TW.json +0 -29
  741. package/templates/native-go/ui/app.css +0 -45
  742. package/templates/native-go/ui/app.js +0 -111
  743. package/templates/native-go-delegate/DELEGATE.md +0 -263
  744. package/templates/native-go-delegate/backend/cmd/background-worker/main.go +0 -48
  745. package/templates/native-go-delegate/backend/internal/app/delegate.go +0 -25
  746. package/templates/native-go-delegate/backend/internal/app/delegate_on.go +0 -5
  747. package/templates/native-go-delegate/backend/internal/app/delegate_routes_test.go +0 -31
  748. package/templates/native-go-delegate/backend/internal/background/delegate_review_test.go +0 -174
  749. package/templates/native-go-delegate/backend/internal/background/delegated.go +0 -277
  750. package/templates/native-go-delegate/backend/internal/background/delegated_moves.go +0 -270
  751. package/templates/native-go-delegate/backend/internal/background/delegated_test.go +0 -34
  752. package/templates/native-go-delegate/backend/internal/delegate/admission_recovery_test.go +0 -410
  753. package/templates/native-go-delegate/backend/internal/delegate/busy_review_test.go +0 -15
  754. package/templates/native-go-delegate/backend/internal/delegate/cancel_contract_test.go +0 -95
  755. package/templates/native-go-delegate/backend/internal/delegate/client.go +0 -151
  756. package/templates/native-go-delegate/backend/internal/delegate/client_test.go +0 -214
  757. package/templates/native-go-delegate/backend/internal/delegate/destination.go +0 -110
  758. package/templates/native-go-delegate/backend/internal/delegate/destination_state.go +0 -117
  759. package/templates/native-go-delegate/backend/internal/delegate/destination_state_test.go +0 -60
  760. package/templates/native-go-delegate/backend/internal/delegate/destination_test.go +0 -116
  761. package/templates/native-go-delegate/backend/internal/delegate/example.go +0 -81
  762. package/templates/native-go-delegate/backend/internal/delegate/example_test.go +0 -91
  763. package/templates/native-go-delegate/backend/internal/delegate/executor_contract_test.go +0 -511
  764. package/templates/native-go-delegate/backend/internal/delegate/files.go +0 -132
  765. package/templates/native-go-delegate/backend/internal/delegate/long_running_routes.go +0 -92
  766. package/templates/native-go-delegate/backend/internal/delegate/long_running_routes_test.go +0 -99
  767. package/templates/native-go-delegate/backend/internal/delegate/move.go +0 -348
  768. package/templates/native-go-delegate/backend/internal/delegate/move_test.go +0 -351
  769. package/templates/native-go-delegate/backend/internal/delegate/operations_list.go +0 -65
  770. package/templates/native-go-delegate/backend/internal/delegate/operations_list_test.go +0 -114
  771. package/templates/native-go-delegate/backend/internal/delegate/retry.go +0 -106
  772. package/templates/native-go-delegate/backend/internal/delegate/retry_test.go +0 -143
  773. package/templates/native-go-delegate/backend/internal/delegate/service.go +0 -364
  774. package/templates/native-go-delegate/backend/internal/delegate/service_test.go +0 -318
  775. package/templates/native-go-delegate/backend/internal/delegate/staging.go +0 -121
  776. package/templates/native-go-delegate/backend/internal/delegate/status_disabled_test.go +0 -51
  777. package/templates/native-go-delegate/backend/internal/delegate/testdata/executor_contract.txt +0 -112
  778. package/templates/native-go-delegate/backend/internal/delegate/transient_contract_test.go +0 -137
  779. package/templates/native-go-delegate/backend/internal/delegate/wait_cancel_test.go +0 -101
  780. package/templates/native-go-delegate/backend/internal/delegate/worker.go +0 -225
  781. package/templates/native-go-delegate/backend/internal/filestation/files.go +0 -43
  782. package/templates/native-go-delegate/backend/internal/filestation/files_test.go +0 -59
  783. package/templates/native-go-delegate/frontend/src/CapabilityPanels.vue +0 -37
  784. package/templates/native-go-delegate/frontend/src/delegate/BackgroundSavePanel.vue +0 -113
  785. package/templates/native-go-delegate/frontend/src/delegate/DelegatePanel.vue +0 -70
  786. package/templates/native-go-delegate/frontend/src/delegate/copy.ts +0 -8
  787. package/templates/native-go-delegate/frontend/src/delegate/i18n/waiting.json +0 -11
  788. package/templates/native-go-delegate/frontend/test/background-save.test.ts +0 -121
  789. package/templates/native-go-delegate/frontend/test/delegate.test.ts +0 -145
  790. package/templates/native-go-delegate/frontend/test/scope-settings.test.ts +0 -49
  791. package/templates/native-go-delegate/test-frontend.sh +0 -12
  792. package/templates/native-go-delegate/test.sh +0 -18
  793. package/templates/native-go-jobs/BACKGROUND.md +0 -108
  794. package/templates/native-go-jobs/backend/internal/app/background_on.go +0 -7
  795. package/templates/native-go-jobs/backend/internal/app/background_routes_test.go +0 -90
  796. package/templates/native-go-jobs/frontend/src/background/BackgroundPanel.vue +0 -170
  797. package/templates/native-go-jobs/frontend/src/background/i18n/de.json +0 -75
  798. package/templates/native-go-jobs/frontend/src/background/i18n/en.json +0 -75
  799. package/templates/native-go-jobs/frontend/src/background/i18n/es.json +0 -75
  800. package/templates/native-go-jobs/frontend/src/background/i18n/fr.json +0 -75
  801. package/templates/native-go-jobs/frontend/src/background/i18n/it.json +0 -75
  802. package/templates/native-go-jobs/frontend/src/background/i18n/ja.json +0 -75
  803. package/templates/native-go-jobs/frontend/src/background/i18n/ko.json +0 -75
  804. package/templates/native-go-jobs/frontend/src/background/i18n/zh-CN.json +0 -75
  805. package/templates/native-go-jobs/frontend/src/background/i18n/zh-TW.json +0 -75
  806. package/templates/native-go-jobs/frontend/src/background/i18n.ts +0 -19
  807. package/templates/native-go-jobs/frontend/src/background/picker-provider.ts +0 -12
  808. package/templates/native-go-jobs/frontend/src/background/request-key.ts +0 -5
  809. package/templates/native-go-jobs/frontend/test/background.test.ts +0 -205
  810. package/templates/native-go-root-ops/backend/internal/app/executor.go +0 -140
  811. package/templates/native-go-root-ops/backend/internal/app/executor_test.go +0 -117
  812. package/templates/native-go-root-ops/root/whoami.sh +0 -3
  813. package/templates/native-go-vue/README.md +0 -47
  814. package/templates/native-go-vue/frontend/DESIGN.md +0 -61
  815. package/templates/native-go-vue/frontend/package-lock.json +0 -2530
  816. package/templates/native-go-vue/frontend/package.json +0 -6
  817. package/templates/native-go-vue/frontend/src/App.vue +0 -96
  818. package/templates/native-go-vue/frontend/src/CapabilityPanels.vue +0 -6
  819. package/templates/native-go-vue/frontend/src/context.ts +0 -78
  820. package/templates/native-go-vue/frontend/src/delegate/ExecutorSettings.vue +0 -70
  821. package/templates/native-go-vue/frontend/src/delegate/catalogs.ts +0 -11
  822. package/templates/native-go-vue/frontend/src/delegate/copy.test.ts +0 -12
  823. package/templates/native-go-vue/frontend/src/delegate/copy.ts +0 -4
  824. package/templates/native-go-vue/frontend/src/delegate/executor-settings.test.ts +0 -23
  825. package/templates/native-go-vue/frontend/src/delegate/executor-setup.ts +0 -24
  826. package/templates/native-go-vue/frontend/src/delegate/facade.test.ts +0 -100
  827. package/templates/native-go-vue/frontend/src/delegate/facade.ts +0 -85
  828. package/templates/native-go-vue/frontend/src/delegate/i18n/de.json +0 -47
  829. package/templates/native-go-vue/frontend/src/delegate/i18n/en.json +0 -47
  830. package/templates/native-go-vue/frontend/src/delegate/i18n/es.json +0 -47
  831. package/templates/native-go-vue/frontend/src/delegate/i18n/fr.json +0 -47
  832. package/templates/native-go-vue/frontend/src/delegate/i18n/it.json +0 -47
  833. package/templates/native-go-vue/frontend/src/delegate/i18n/ja.json +0 -47
  834. package/templates/native-go-vue/frontend/src/delegate/i18n/ko.json +0 -47
  835. package/templates/native-go-vue/frontend/src/delegate/i18n/save/de.json +0 -42
  836. package/templates/native-go-vue/frontend/src/delegate/i18n/save/en.json +0 -42
  837. package/templates/native-go-vue/frontend/src/delegate/i18n/save/es.json +0 -42
  838. package/templates/native-go-vue/frontend/src/delegate/i18n/save/fr.json +0 -42
  839. package/templates/native-go-vue/frontend/src/delegate/i18n/save/it.json +0 -42
  840. package/templates/native-go-vue/frontend/src/delegate/i18n/save/ja.json +0 -42
  841. package/templates/native-go-vue/frontend/src/delegate/i18n/save/ko.json +0 -42
  842. package/templates/native-go-vue/frontend/src/delegate/i18n/save/zh-CN.json +0 -42
  843. package/templates/native-go-vue/frontend/src/delegate/i18n/save/zh-TW.json +0 -42
  844. package/templates/native-go-vue/frontend/src/delegate/i18n/zh-CN.json +0 -47
  845. package/templates/native-go-vue/frontend/src/delegate/i18n/zh-TW.json +0 -47
  846. package/templates/native-go-vue/frontend/src/delegate/long-running.ts +0 -57
  847. package/templates/native-go-vue/frontend/src/delegate/save-copy.test.ts +0 -12
  848. package/templates/native-go-vue/frontend/src/delegate/save-copy.ts +0 -24
  849. package/templates/native-go-vue/frontend/src/delegate/scoped-picker.test.ts +0 -12
  850. package/templates/native-go-vue/frontend/src/delegate/scoped-picker.ts +0 -21
  851. package/templates/native-go-vue/frontend/src/files/FileBrowser.vue +0 -131
  852. package/templates/native-go-vue/frontend/src/files/FilesPage.vue +0 -35
  853. package/templates/native-go-vue/frontend/src/files/files.test.ts +0 -100
  854. package/templates/native-go-vue/frontend/src/files/provider.test.ts +0 -48
  855. package/templates/native-go-vue/frontend/src/files/transfers.test.ts +0 -27
  856. package/templates/native-go-vue/frontend/src/files/transfers.ts +0 -25
  857. package/templates/native-go-vue/frontend/src/i18n/de.json +0 -20
  858. package/templates/native-go-vue/frontend/src/i18n/en.json +0 -20
  859. package/templates/native-go-vue/frontend/src/i18n/es.json +0 -20
  860. package/templates/native-go-vue/frontend/src/i18n/fr.json +0 -20
  861. package/templates/native-go-vue/frontend/src/i18n/it.json +0 -20
  862. package/templates/native-go-vue/frontend/src/i18n/ja.json +0 -20
  863. package/templates/native-go-vue/frontend/src/i18n/ko.json +0 -20
  864. package/templates/native-go-vue/frontend/src/i18n/zh-CN.json +0 -20
  865. package/templates/native-go-vue/frontend/src/i18n/zh-TW.json +0 -20
  866. package/templates/native-go-vue/frontend/src/i18n.ts +0 -13
  867. package/templates/native-go-vue/frontend/src/identity/DESIGN.md +0 -46
  868. package/templates/native-go-vue/frontend/src/identity/LoginPage.vue +0 -78
  869. package/templates/native-go-vue/frontend/src/identity/i18n/de.json +0 -27
  870. package/templates/native-go-vue/frontend/src/identity/i18n/en.json +0 -27
  871. package/templates/native-go-vue/frontend/src/identity/i18n/es.json +0 -27
  872. package/templates/native-go-vue/frontend/src/identity/i18n/fr.json +0 -27
  873. package/templates/native-go-vue/frontend/src/identity/i18n/it.json +0 -27
  874. package/templates/native-go-vue/frontend/src/identity/i18n/ja.json +0 -27
  875. package/templates/native-go-vue/frontend/src/identity/i18n/ko.json +0 -27
  876. package/templates/native-go-vue/frontend/src/identity/i18n/zh-CN.json +0 -27
  877. package/templates/native-go-vue/frontend/src/identity/i18n/zh-TW.json +0 -27
  878. package/templates/native-go-vue/frontend/src/identity/i18n.ts +0 -14
  879. package/templates/native-go-vue/frontend/src/identity/login.test.ts +0 -32
  880. package/templates/native-go-vue/frontend/src/identity/session.test.ts +0 -33
  881. package/templates/native-go-vue/frontend/src/identity/session.ts +0 -74
  882. package/templates/native-go-vue/frontend/src/main.ts +0 -32
  883. package/templates/native-go-vue/frontend/src/nas/NasPicker.vue +0 -42
  884. package/templates/native-go-vue/frontend/src/nas/contract.ts +0 -12
  885. package/templates/native-go-vue/frontend/src/nas/destination.test.ts +0 -48
  886. package/templates/native-go-vue/frontend/src/nas/i18n/files/de.json +0 -41
  887. package/templates/native-go-vue/frontend/src/nas/i18n/files/en.json +0 -41
  888. package/templates/native-go-vue/frontend/src/nas/i18n/files/es.json +0 -41
  889. package/templates/native-go-vue/frontend/src/nas/i18n/files/fr.json +0 -41
  890. package/templates/native-go-vue/frontend/src/nas/i18n/files/it.json +0 -41
  891. package/templates/native-go-vue/frontend/src/nas/i18n/files/ja.json +0 -41
  892. package/templates/native-go-vue/frontend/src/nas/i18n/files/ko.json +0 -41
  893. package/templates/native-go-vue/frontend/src/nas/i18n/files/zh-CN.json +0 -41
  894. package/templates/native-go-vue/frontend/src/nas/i18n/files/zh-TW.json +0 -41
  895. package/templates/native-go-vue/frontend/src/nas/i18n.ts +0 -2
  896. package/templates/native-go-vue/frontend/src/nas/locale.ts +0 -24
  897. package/templates/native-go-vue/frontend/src/nas/provider.ts +0 -50
  898. package/templates/native-go-vue/frontend/src/nas/use-request.ts +0 -18
  899. package/templates/native-go-vue/frontend/src/portal/PortalSettings.vue +0 -39
  900. package/templates/native-go-vue/frontend/src/shell/AppShell.vue +0 -48
  901. package/templates/native-go-vue/frontend/src/shell/i18n/de.json +0 -4
  902. package/templates/native-go-vue/frontend/src/shell/i18n/en.json +0 -4
  903. package/templates/native-go-vue/frontend/src/shell/i18n/es.json +0 -4
  904. package/templates/native-go-vue/frontend/src/shell/i18n/fr.json +0 -4
  905. package/templates/native-go-vue/frontend/src/shell/i18n/it.json +0 -4
  906. package/templates/native-go-vue/frontend/src/shell/i18n/ja.json +0 -4
  907. package/templates/native-go-vue/frontend/src/shell/i18n/ko.json +0 -4
  908. package/templates/native-go-vue/frontend/src/shell/i18n/zh-CN.json +0 -4
  909. package/templates/native-go-vue/frontend/src/shell/i18n/zh-TW.json +0 -4
  910. package/templates/native-go-vue/frontend/src/shell/i18n.ts +0 -17
  911. package/templates/native-go-vue/frontend/src/shell/pages.ts +0 -15
  912. package/templates/native-go-vue/frontend/src/style.css +0 -27
  913. package/templates/native-go-vue/frontend/test/apps.test.ts +0 -57
  914. package/templates/native-go-vue/frontend/test/native-controls.test.ts +0 -27
  915. package/templates/native-go-vue/frontend/test/portal-settings.test.ts +0 -71
  916. package/templates/native-go-vue/frontend/test/shell-i18n.test.ts +0 -50
  917. package/templates/native-go-vue/frontend/test/shell-ui.test.ts +0 -20
  918. package/templates/native-go-vue/frontend/test/shell.test.ts +0 -30
  919. package/templates/native-go-vue/frontend/tsconfig.json +0 -1
  920. package/templates/native-go-vue/frontend/vite.config.ts +0 -10
  921. package/templates/native-go-vue/gitignore +0 -2
  922. /package/{dist/templates/_daemon → assets/go/daemon}/fixture_linux_test.go +0 -0
  923. /package/{dist/templates/_daemon → assets/go/daemon}/fixture_other_test.go +0 -0
  924. /package/{dist/templates/_daemon → assets/go/daemon}/go.mod +0 -0
  925. /package/{dist/templates/_daemon → assets/go/daemon}/main.go +0 -0
  926. /package/{dist/templates/_daemon → assets/go/daemon}/main_test.go +0 -0
  927. /package/{dist/templates/_daemon → assets/go/daemon}/process_linux.go +0 -0
  928. /package/{dist/templates/_daemon → assets/go/daemon}/process_linux_test.go +0 -0
  929. /package/{dist/templates/_daemon → assets/go/daemon}/process_other.go +0 -0
  930. /package/{dist/templates/_daemon → assets/go/daemon}/testdata/child.go +0 -0
  931. /package/{dist/templates/_gateway → assets/go/gateway}/auth.go +0 -0
  932. /package/{dist/templates/_gateway → assets/go/gateway}/auth_test.go +0 -0
  933. /package/{dist/templates/_gateway → assets/go/gateway}/cgi.go +0 -0
  934. /package/{dist/templates/_gateway → assets/go/gateway}/cgi_test.go +0 -0
  935. /package/{dist/templates/_gateway → assets/go/gateway}/csrf.go +0 -0
  936. /package/{dist/templates/_gateway → assets/go/gateway}/csrf_test.go +0 -0
  937. /package/{dist/templates/_gateway → assets/go/gateway}/directory.go +0 -0
  938. /package/{dist/templates/_gateway → assets/go/gateway}/directory_test.go +0 -0
  939. /package/{dist/templates/_gateway → assets/go/gateway}/gateway.go +0 -0
  940. /package/{dist/templates/_gateway → assets/go/gateway}/gateway_test.go +0 -0
  941. /package/{dist/templates/_gateway → assets/go/gateway}/go.mod +0 -0
  942. /package/{dist/templates/_gateway → assets/go/gateway}/groups.go +0 -0
  943. /package/{dist/templates/_gateway → assets/go/gateway}/main.go +0 -0
  944. /package/{dist/templates/_shared → assets/licenses}/GO-LICENSE +0 -0
  945. /package/{dist/templates/_shared → assets/licenses}/GO-PATENTS +0 -0
  946. /package/{dist/templates/_shared/LICENSES → assets/licenses}/TEMPLATE.txt +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,272 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.1 (2026-10-12)
4
+
5
+ Fixes from the 0.9.0 acceptance on DSM (t-0294, t-0290, t-0292).
6
+
7
+ 繁中摘要:`build` 重複 `--arch` 時每個架構都建置;SDK 下載失敗回報
8
+ `SDK_DOWNLOAD_FAILED`(不再包成 `STANDALONE_API_PERMISSIONS_INVALID`),`check`
9
+ 顯示每個錯誤碼自己的建議;`status` 列出 portal;Vue App 只在 SDK 的
10
+ ExecutorSettings 核准,plain UI 的 DSM 視窗面板改為有樣式、跟隨 DSM 語言並在面板內
11
+ 輸入密碼。更正 0.9.0 的核准說明:policy 不變的升級不需重新核准,只有
12
+ install-selected 的 scope 需要管理員確認一次。記錄 SDK 0.9.1 executor digests(只換
13
+ executor、policy digest 不變,免重新核准)。App 分兩層:有 executor(rootOps 或
14
+ delegate)的 App 解除安裝時自動移除應用程式權限規則,宣告 portal 時再 reload nginx,
15
+ 精靈與 cleanup 清單只把它們列為自動清除失敗時的後備;無升權 App 任何階段都不用 root,
16
+ 應用程式權限規則仍由管理員手動移除。破壞性變更:portal 只限 executor 層級,無升權
17
+ native App 以 `STANDALONE_PORTAL_REQUIRES_EXECUTOR` 拒絕,Compose App 以
18
+ `CONTRACT_PORTAL_REQUIRES_EXECUTOR` 拒絕。並附 0.9.0 安裝殘留的清理步驟。
19
+
20
+ ### Build and check
21
+
22
+ - `build --arch x86_64 --arch aarch64` builds every family named; 0.9.0 built
23
+ only the last one. Repeated values and comma lists combine.
24
+ - An SDK version Go cannot fetch is reported as `SDK_DOWNLOAD_FAILED` with the
25
+ GOPRIVATE and git-credential hint. 0.9.0 wrapped it as
26
+ `STANDALONE_API_PERMISSIONS_INVALID`.
27
+ - `check` shows the registry suggestion of each error code. It no longer
28
+ replaces every `dsm-package.yaml` error's suggestion with "fix the schema 2
29
+ fields".
30
+ - `STANDALONE_ENTRY_UNSUPPORTED` names the `main.go` of the project's
31
+ `backend.main`, not always `cmd/app/main.go`.
32
+
33
+ ### Status
34
+
35
+ - `status` lists `portal` for an App with `portal: {}`. It reads the App's
36
+ `portal.status`: `ready` with the URL when an administrator set an alias,
37
+ `needs-admin-approval` when none is set, and `blocked` before install or
38
+ when the status cannot be read.
39
+
40
+ ### DSM window approval
41
+
42
+ - A Vue App approves the executor only in the SDK's `ExecutorSettings`. The
43
+ DSM window no longer adds its own approval panel to a Vue App with
44
+ `rootOps` or a fixed delegate scope. That panel used unstyled English
45
+ buttons, and its password prompt was appended below the App, so approving
46
+ from it never reached PasswordConfirm.
47
+ - A plain-UI App keeps the window panel. It now uses the panel styles, shows
48
+ its text in the DSM language (the nine SDK locales), and asks for the
49
+ administrator password inside the panel. The password goes to
50
+ `authorize` the same way as in `ExecutorSettings`.
51
+ - Breaking: `confirmPassword` without a password fails with
52
+ `password_required` and sends nothing; the masked form it appended is gone.
53
+
54
+ ### Portal needs the executor tier (breaking)
55
+
56
+ - DSM removes a portal App's Login Portal alias at uninstall but does not
57
+ reload nginx (DSM 7.4, t-0294), so `/<alias>/` kept opening a DSM page.
58
+ Only root can reload it, so a `portal` now needs `capabilities.rootOps` or
59
+ `capabilities.delegate`. A no-privilege native App with `portal` fails
60
+ `check`/`build` with `STANDALONE_PORTAL_REQUIRES_EXECUTOR`; `add portal`
61
+ refuses it unless the same call adds `root-ops` or `delegate`; `inspect`
62
+ flags such an SPK with `PORTAL_REQUIRES_EXECUTOR`.
63
+ - A Compose App has no executor: `integration.web.portal` now always fails
64
+ with `CONTRACT_PORTAL_REQUIRES_EXECUTOR` and the schema no longer describes
65
+ its shape. `CONTRACT_PORTAL_INVALID`, `CONTRACT_PORTAL_UNSUPPORTED` and
66
+ `CONTRACT_PORTAL_MIN_DSM` are gone, and `inspect` reports a Compose SPK's
67
+ `web-config` as an unknown resource.
68
+ - Fix: add `root-ops` or `delegate`, or remove the portal and let an
69
+ administrator set up a reverse proxy in DSM.
70
+
71
+ ### Uninstall
72
+
73
+ - An App with the executor (rootOps or delegate) cleans up after DSM itself:
74
+ SDK 0.9.1's root purge deletes the App's rules in Control Panel >
75
+ Application Privileges and, for a portal App, reloads nginx once DSM has
76
+ removed the alias. The uninstall wizard says so in the nine languages, and
77
+ `status`/`inspect` list both only as fallbacks: "Only if automatic cleanup
78
+ failed after uninstall; see the system log entry synopkgland-executor."
79
+ - A no-privilege App never uses root, not even at uninstall. Its wizard keeps
80
+ saying that DSM keeps the App's rules in Control Panel > Application
81
+ Privileges, that a later install under the same name applies them again,
82
+ and that an administrator can remove them; the cleanup list keeps that
83
+ item. It never mentions a Login Portal alias, because it cannot declare one.
84
+ A test builds plain, files, jobs, identity and `entry: app-privilege` SPKs
85
+ and checks they run as the package account, ship no executor or root
86
+ tasks, and that their scripts never call synowebapi, nginx or a system
87
+ unit.
88
+
89
+ ### SDK 0.9.1
90
+
91
+ - Depends on `@synopackageland/templates` 0.9.1: `init` scaffolds Apps that
92
+ require SDK 0.9.1 (`backend/go.mod` and `@synopackageland/sdk`).
93
+ - The CLI records the SDK 0.9.1 executor digests, rebuilt with the
94
+ uninstall cleanup (x86_64 `5d75af3c…`, aarch64 `b0e1f817…`, armv7
95
+ `17db613a…`; lifecycle digests equal 0.9.0). SDK 0.9.1 only replaces the
96
+ executor: the policy format, task scripts and permissions are unchanged,
97
+ so the policy digest stays the same and no App needs a new approval. An App moved from SDK
98
+ 0.9.0 to 0.9.1 in `backend/go.mod` keeps its approval; the installed
99
+ executor re-pins the new executor by itself.
100
+
101
+ ### Cleaning up after 0.9.0 installs
102
+
103
+ An App built with SDK 0.9.0 could leave root tasks behind at uninstall
104
+ (t-0294 bugs 1 and 3). If the App is still installed, rebuild it with SDK
105
+ 0.9.1, install that build and then uninstall it: the 0.9.1 purge rebuilds the
106
+ task inventory from the approved policy and deletes the tasks. Otherwise an
107
+ administrator removes them by hand:
108
+
109
+ - Control Panel > Task Scheduler: delete `<package> executor control` and
110
+ `<package> executor selection`.
111
+ - The boot event, which DSM's web API refuses to delete over HTTP (error
112
+ 119): as root, run
113
+ `/usr/syno/bin/synowebapi --exec api=SYNO.Core.EventScheduler method=delete version=1 task_name="<package> executor boot"`.
114
+ - Control Panel > Application Privileges: remove the App's rules. Control
115
+ Panel > Login Portal: if its alias still opens, save an application alias
116
+ there to reload nginx, or restart the NAS. The 0.9.1 rebuild-and-uninstall
117
+ route above does both for you.
118
+
119
+ ### Approval after upgrading (correction to 0.9.0)
120
+
121
+ - 0.9.0 said a delegate App rebuilt with it needs one new approval. Measured
122
+ on DSM 7.4 (t-0294): a `files.moveFromStaging` App upgraded from 0.8.0 to
123
+ 0.9.0 kept the same policy digest. The installed executor re-pinned the new
124
+ executor by itself, with no new approval. Only an `install-selected` scope
125
+ needed one administrator confirmation (PasswordConfirm) of the shared
126
+ folder.
127
+ - A new approval is needed only when the executor policy changes, for
128
+ example new operations, another scope or changed root scripts.
129
+
130
+ ### Release tooling
131
+
132
+ - `node scripts/executor-digests.mjs <sdk>/release/vX.Y.Z.json` records a
133
+ released SDK's executor and lifecycle digests in
134
+ `src/runtime/executor-digests.json`. It checks the three architectures,
135
+ go1.26.9 and the CLI minor. A tagged release (`commit` set) never changes
136
+ a recorded version; a release not yet tagged (`commit: null`) replaces its
137
+ own entry. SDK 0.9.1's digests were recorded this way.
138
+ - `test/fixtures/executor-setup/` holds the `executor/setup.json` this CLI
139
+ writes for delegate, time-limited delegate with jobs, root-ops and
140
+ install-selected Apps, for the SDK executor's contract test.
141
+ `UPDATE_EXECUTOR_SETUP_FIXTURES=1 npm test` regenerates them.
142
+ - The npm gate runs `scripts/smoke-exports.mjs`, the export check of
143
+ `smoke-pack.sh`. In 0.9.0 that check still imported the removed
144
+ `authorizationTemplateDirectory`, so `gate.sh docker` always failed.
145
+
146
+ ## 0.9.0 (2026-10-11)
147
+
148
+ The CLI, the SDK and the project templates are now three repositories, and
149
+ the CLI only packages, deploys and checks. An App names its SDK version once,
150
+ in `backend/go.mod`. Background saves can create subfolders and choose what
151
+ happens on a name conflict, and time-limited delegate jobs gain read, rename,
152
+ copy, move and delete.
153
+
154
+ 繁中摘要:CLI 移到 github.com/synopackageland/syno-pkg-land-cli,只負責打包、部署與檢查;
155
+ 範本改由 `@synopackageland/templates`(精確 pin)提供;SDK 是
156
+ `github.com/synopackageland/syno-pkg-land-sdk`(Go)與 `@synopackageland/sdk`(前端,含
157
+ `./vue`),版本只寫在 `backend/go.mod`。`build` 依該版本 `go mod download`
158
+ executor 並比對 CLI 內建的 sha256 表。`check` 新增 `SDK_REQUIRED`、
159
+ `SDK_VERSION_MISMATCH`、`SDK_UNSUPPORTED`。`files.moveFromStaging` 的 `name`
160
+ 可帶子資料夾,新增 `conflict: fail|overwrite|rename`;有時限的 delegate 新增
161
+ `files.read`、`files.rename`、`files.copy`、`files.move`、`files.delete`。
162
+ 管理員只在 executor policy 改變時需要重新核准;0.9.0 的 policy 有改變。
163
+
164
+ ### Repositories and the SDK version
165
+
166
+ - The CLI is github.com/synopackageland/syno-pkg-land-cli, published as
167
+ `@synopackageland/cli`. The SDK is github.com/synopackageland/syno-pkg-land-sdk: the Go
168
+ module `github.com/synopackageland/syno-pkg-land-sdk` and the npm package
169
+ `@synopackageland/sdk`, which includes the Vue components at
170
+ `@synopackageland/sdk/vue`.
171
+ - The `require github.com/synopackageland/syno-pkg-land-sdk` line in `backend/go.mod` is the
172
+ only SDK version. `dsm-package.yaml` has no SDK field.
173
+ - `check` and `build` report `SDK_REQUIRED` when `capabilities.delegate` or
174
+ `rootOps` is declared without that line (an `entry` mode without it fails
175
+ with `STANDALONE_ENTRY_UNSUPPORTED`), `SDK_UNSUPPORTED` when its minor version is not the CLI's (CLI 0.9.x builds
176
+ SDK 0.9.x), and `SDK_VERSION_MISMATCH` when the frontend's
177
+ `@synopackageland/sdk` differs from it. A `file:` frontend dependency is
178
+ compared through that folder's `package.json` version.
179
+ - `build` reads the SDK version from `backend/go.mod`, runs `go mod download`
180
+ for the executor of that version, and builds it with go1.26.9. Its sha256
181
+ must match the table shipped in this CLI, or the build fails with
182
+ `EXECUTOR_DIGEST_MISMATCH`. A version Go cannot fetch fails with
183
+ `SDK_DOWNLOAD_FAILED`. While the SDK repositories are private, set
184
+ `GOPRIVATE=github.com/synopackageland/*` and give git a credential for
185
+ github.com; the error says which of the two is missing. Root task scripts
186
+ and `sdk-permissions.json` come from the same SDK version.
187
+ - The CGI binds both policy digests at link time:
188
+ `<module>/internal/api.expectedPermissionsDigest` for the App and
189
+ `github.com/synopackageland/syno-pkg-land-sdk/api.expectedSDKPermissionsDigest` for the
190
+ SDK.
191
+ - `@synopackageland/cli/authorization-sdk` exports `AUTHORIZATION_RUNTIME`
192
+ and `ROOT_RUNTIME`. `authorizationTemplateDirectory` is removed;
193
+ `AuthorizationGate` is in `@synopackageland/sdk/vue`.
194
+
195
+ ### Templates
196
+
197
+ - `init` and `add` read the templates from `@synopackageland/templates`, a
198
+ dependency pinned to an exact version. `SYNOPKGLAND_TEMPLATES_DIR` points
199
+ them at a templates checkout; without either, `TEMPLATES_MISSING`.
200
+ - `init` fills the placeholders in every generated file; the Go module path
201
+ of a new backend is the package id. The next steps say
202
+ `(cd frontend && npm install)`: the templates ship no lockfile.
203
+ - `init` and `add` share one capability overlay table (`root-ops`, `jobs`,
204
+ `delegate`).
205
+
206
+ ### Local SDK checkout
207
+
208
+ - With `SYNOPKGLAND_SDK_DIR`, `init` adds
209
+ `replace github.com/synopackageland/syno-pkg-land-sdk => $SYNOPKGLAND_SDK_DIR` to
210
+ `backend/go.mod` and sets the frontend dependency to
211
+ `file:$SYNOPKGLAND_SDK_DIR/ts`; install it with
212
+ `(cd frontend && npm install --install-links)`, which packs the SDK like the
213
+ released package. npm does not build a `file:` package, so a Vue project
214
+ needs `(cd $SYNOPKGLAND_SDK_DIR/ts && npm ci && npm run build)` first, and
215
+ again after SDK changes; `init` refuses a checkout without `ts/dist`, or
216
+ without a root `go.mod`, with `SDK_DIR_NOT_READY`.
217
+ - `build` uses `$SYNOPKGLAND_SDK_DIR/executor`, skips the digest table and
218
+ warns with `EXECUTOR_DIGEST_UNVERIFIED`. Do not
219
+ publish such an SPK; the release script refuses to run while
220
+ `SYNOPKGLAND_SDK_DIR` or `SYNOPKGLAND_TEMPLATES_DIR` is set.
221
+
222
+ ### Delegate: subfolders and conflict policy
223
+
224
+ - `files.moveFromStaging` (Go: `delegate.MoveParams.Name`) accepts folders
225
+ below the destination, for example `Album/CD1/01.flac`. The executor's move
226
+ child creates missing folders as the user, after the final revoke check, so
227
+ a canceled move leaves none behind. Existing folders are reused. Limits: 16
228
+ folders, 255 bytes per name, 1024 bytes in total. A name without folders
229
+ behaves exactly as before.
230
+ - New `conflict` field for `files.moveFromStaging` and the time-limited
231
+ `files.write`: `fail` (default, unchanged), `overwrite` (atomic replace of a
232
+ regular file the user can write) or `rename` (`name (1).ext` up to
233
+ `name (99).ext`; the receipt path reports the name used).
234
+ - New error codes: `invalid-path`, `path-too-deep`,
235
+ `destination-not-directory`, `name-too-long`.
236
+
237
+ ### Delegate: file operations for time-limited grants
238
+
239
+ - New operations `files.read`, `files.rename`, `files.copy`, `files.move` and
240
+ `files.delete`, each declared on its own; a write operation never implies
241
+ delete. Go: `job.Files()` returns `delegate.JobFiles` with `Read`, `Rename`,
242
+ `CreateFolderAll`, `Copy`, `Move`, `Delete`, `TaskStatus` and `CancelTask`.
243
+ - `files.createFolder` takes `parents` (`CreateFolderAll`, like `mkdir -p`).
244
+ - Except `files.write` and `files.read`, the executor calls File Station as the
245
+ user through one root-side allowlist of methods, and re-checks the paths File
246
+ Station reports against the grant. `files.read` copies the file into staging
247
+ in a child that drops to the user and never follows symlinks.
248
+ - Copy, move and delete run as File Station background tasks followed with the
249
+ implied `files.taskStatus` and `files.taskCancel`; revoking the grant stops
250
+ them. Delete needs `recursive` for folders and goes to the recycle bin; a
251
+ Shared Folder without one needs `permanent`.
252
+ - File Station refusals now report SDK codes (`PERMISSION_DENIED`,
253
+ `not-found`, `destination-exists`, `NO_SPACE`, `invalid-path`,
254
+ `name-too-long`) instead of `DSM_FAILED`. New codes: `not-a-file`,
255
+ `recursive-required`, `recycle-bin-disabled`, `task-not-found`,
256
+ `too-many-tasks`, `READ_FAILED`.
257
+
258
+ ### Approval
259
+
260
+ - An administrator approves the executor policy (operations, scope and root
261
+ tasks), not the executor binary. When an upgrade keeps the policy and the
262
+ new executor matches the `INFO` anchor, it installs without a new approval.
263
+ When the policy changes, the App stays at `needs-admin-approval` until an
264
+ administrator approves again.
265
+ - The 0.9.0 policy changes (new operations and `conflict`), so a delegate App
266
+ rebuilt with this CLI needs one new approval after the upgrade.
267
+ Moving the SDK to its own repository does not add one. Apps not rebuilt are
268
+ not affected.
269
+
3
270
  ## 0.8.0 (2026-10-11)
4
271
 
5
272
  Faster builds, one SPK checker for any package, and a guide for scripts and
package/README.md CHANGED
@@ -18,7 +18,7 @@ Native Go apps need Go 1.25+ and npm. The CLI is tested on Node.js 22.19.
18
18
  ```sh
19
19
  synopkgland init -t native-go --with files,jobs,login --package MyApp my-app
20
20
  cd my-app
21
- (cd frontend && npm ci)
21
+ (cd frontend && npm install)
22
22
  synopkgland check --json
23
23
  synopkgland build --arch x86_64 --json
24
24
  synopkgland inspect dist/MyApp-0.1.0-0001-x86_64.spk --json
@@ -40,6 +40,27 @@ the SPK with Package Center's Manual Install.
40
40
  Existing native products with their own payload layout use `backend: {kind: native}` in
41
41
  `dsm-package.yaml`.
42
42
 
43
+ ## SDK and templates
44
+
45
+ The CLI packages, deploys and checks. The app-side code is the SDK
46
+ ([synopackageland/syno-pkg-land-sdk](https://github.com/synopackageland/syno-pkg-land-sdk)): the Go module
47
+ `github.com/synopackageland/syno-pkg-land-sdk` and the npm package `@synopackageland/sdk` (Vue components at
48
+ `@synopackageland/sdk/vue`). The `require github.com/synopackageland/syno-pkg-land-sdk` line in
49
+ `backend/go.mod` is the app's only SDK version; `build` compiles the executor of that version
50
+ and checks it against the digests shipped in this CLI. CLI 0.9.x builds SDK 0.9.x.
51
+
52
+ The SDK repositories are private for now, so Go cannot fetch them from proxy.golang.org. Set
53
+ `go env -w GOPRIVATE=github.com/synopackageland/*` and give git a credential that can read
54
+ `https://github.com/synopackageland/syno-pkg-land-sdk` (check with `git ls-remote`); a failed
55
+ fetch reports `SDK_DOWNLOAD_FAILED` with the step that is missing.
56
+
57
+ `init` and `add` read their templates from `@synopackageland/templates`, an exact-pinned
58
+ dependency. For development against local checkouts, set `SYNOPKGLAND_TEMPLATES_DIR` to a
59
+ templates checkout and `SYNOPKGLAND_SDK_DIR` to an SDK checkout; SPKs built with
60
+ `SYNOPKGLAND_SDK_DIR` warn `EXECUTOR_DIGEST_UNVERIFIED` and must not be published. A Vue project
61
+ packs the local SDK into its frontend (`npm install --install-links`) without building it: run
62
+ `npm ci && npm run build` in `$SYNOPKGLAND_SDK_DIR/ts` first, and again after SDK changes.
63
+
43
64
  ## Capabilities
44
65
 
45
66
  Add them with `init --with …` or later with `synopkgland add <capability…>`.
@@ -51,7 +72,7 @@ Add them with `init --with …` or later with `synopkgland add <capability…>`.
51
72
  | `login` | Sign users in with their DSM account, without the DSM desktop | Nobody; requires HTTPS for password sign-in |
52
73
  | `delegate` | Move files into a user's chosen folder while the user is offline | An administrator, once |
53
74
  | `root-ops` | Run fixed `root/*.sh` scripts for administrators | An administrator, once |
54
- | `portal` | Open the app from its own Application Portal alias | An administrator sets the alias; needs 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.3.2-86009+ |
55
76
 
56
77
  Delegate is implemented; its default operation is `files.moveFromStaging`.
57
78
  Device lifecycle acceptance on real hardware is still pending for delegate and root operations.
@@ -86,14 +107,15 @@ UI components and `npx --no syno-pkg-land-ui describe Button --json` describes o
86
107
 
87
108
  ## Licensing
88
109
 
89
- The CLI and its original templates are MIT licensed, Copyright (c) 2026 synopkgland.
110
+ The CLI is MIT licensed, Copyright (c) 2026 synopkgland.
90
111
  Third-party components keep their own terms.
91
112
 
92
113
  - Generated projects keep the template terms in `LICENSES/TEMPLATE.txt`. `init` does not choose a
93
114
  license for your app: add your own `LICENSE`.
94
115
  - An SPK carries its legal notices under `LICENSES/` in the installed payload: `TEMPLATE.txt`,
95
- an optional `APP.txt`, Go's license, patents and third-party notices, and the Vue UI notices.
96
- - Vue builds generate the UI notices from the installed, locked dependencies; run `npm ci` in
116
+ an optional `APP.txt`, `SDK.txt` (the SDK's MIT license, when `backend/go.mod` requires the SDK),
117
+ Go's license, patents and third-party notices, and the Vue UI notices.
118
+ - Vue builds generate the UI notices from the installed dependencies; run `npm install` in
97
119
  `frontend/` first. A missing notice or version mismatch fails the build.
98
120
  - Keep `backend/THIRD_PARTY_NOTICES.txt` current when you change Go modules. Your own binaries,
99
121
  added modules, container images and upstream apps need their own notices.
package/dist/add.js CHANGED
@@ -5,19 +5,10 @@ import { isScalar, parseDocument } from 'yaml';
5
5
  import { capabilityNames, capabilitySettings } from './capabilities.js';
6
6
  import { initFromTemplate, nativeCapabilitySettings } from './init.js';
7
7
  import { templatesRoot } from './template-paths.js';
8
+ import { borrowedTarget, capabilityOverlays } from './capability-overlays.js';
8
9
  import { DEFAULT_MIN_DSM, isDsmAtLeast, PORTAL_MIN_DSM } from './build-spk/dsm-version.js';
9
10
  import { loadStandaloneManifest } from './standalone/manifest.js';
10
- const overlays = {
11
- jobs: ['native-go-jobs'],
12
- 'root-ops': ['native-go-root-ops'],
13
- delegate: ['native-go-jobs', 'native-go-delegate'],
14
- files: ['native-go-files'], login: ['native-go-identity'],
15
- };
16
- const removed = {
17
- jobs: ['backend/internal/app/background_none.go'],
18
- 'root-ops': ['backend/internal/app/root_none.go'],
19
- delegate: ['backend/internal/app/background_none.go', 'backend/internal/app/root_none.go', 'backend/internal/app/delegate_none.go'],
20
- };
11
+ import { PORTAL_REQUIRES_EXECUTOR } from './portal/alias.js';
21
12
  function files(root, dir = root) {
22
13
  if (!existsSync(dir))
23
14
  return [];
@@ -77,10 +68,21 @@ function addPortal(root, result) {
77
68
  writeFileSync(manifestPath, String(doc));
78
69
  return withNotes({ ...result, added: [...result.added, 'portal'] }, notes);
79
70
  }
71
+ /** A portal needs the executor tier, already declared or added in the same call; nothing is written otherwise. */
72
+ function refuseNoPrivilegePortal(root, rest) {
73
+ const loaded = loadStandaloneManifest(root);
74
+ if (!loaded.ok)
75
+ throw new Error(loaded.errors.map(e => `[${e.code}] ${e.message}`).join('\n'));
76
+ const { rootOps, delegate } = loaded.manifest.capabilities;
77
+ if (!rootOps && !delegate && !rest.some(name => name === 'root-ops' || name === 'delegate')) {
78
+ throw new Error(`[STANDALONE_PORTAL_REQUIRES_EXECUTOR] ${PORTAL_REQUIRES_EXECUTOR}`);
79
+ }
80
+ }
80
81
  export function addCapabilities(root, requested) {
81
82
  const wanted = [...new Set(requested.flatMap(value => value.split(',')).map(value => value.trim()))];
82
83
  if (wanted.includes('portal')) {
83
84
  const rest = wanted.filter(name => name !== 'portal');
85
+ refuseNoPrivilegePortal(root, rest);
84
86
  return addPortal(root, rest.length ? addCapabilities(root, rest) : { added: [], unchanged: [] });
85
87
  }
86
88
  const names = capabilityNames(requested);
@@ -106,12 +108,9 @@ export function addCapabilities(root, requested) {
106
108
  const before = join(work, 'before'), generated = join(work, 'generated');
107
109
  initFromTemplate('native-go', before, { ui: m.ui.build ? 'vue' : 'plain', with: existingNames, packageId: m.package, displayName: m.displayname });
108
110
  initFromTemplate('native-go', generated, { ui: m.ui.build ? 'vue' : 'plain', with: [...existingNames, ...added], packageId: m.package, displayName: m.displayname });
109
- const destinations = [...new Set(added.flatMap(name => overlays[name].flatMap(overlay => files(join(templatesRoot(), overlay)))))].filter(file => existsSync(join(generated, file)));
110
- if (added.includes('delegate'))
111
- destinations.push('backend/internal/background/store.go', 'backend/internal/app/executor.go', 'backend/internal/app/executor_test.go', 'backend/internal/api/sdk-permissions.json');
112
- if (added.includes('jobs') || added.includes('delegate') || added.includes('root-ops'))
113
- destinations.push('backend/internal/app/routes_test.go');
114
- const deletions = added.flatMap(name => removed[name] ?? []);
111
+ const capability = capabilityOverlays(added);
112
+ const destinations = [...new Set([...capability.overlays.flatMap(overlay => files(join(templatesRoot(), overlay))), ...capability.borrowed.map(borrowedTarget)])].filter(file => existsSync(join(generated, file)));
113
+ const deletions = capability.removed;
115
114
  const conflicts = [];
116
115
  for (const file of destinations) {
117
116
  if (existsSync(join(before, file)) && safePath(root, file) && existsSync(join(root, file)) && lstatSync(join(root, file)).isFile() && readFileSync(join(root, file)).equals(readFileSync(join(before, file))))
@@ -4,4 +4,3 @@
4
4
  */
5
5
  export { ROOT_RUNTIME, type RootTask } from './standalone/native-root-window.js';
6
6
  export { AUTHORIZATION_RUNTIME } from './standalone/native-authorization-window.js';
7
- export declare const authorizationTemplateDirectory: URL;
@@ -4,4 +4,3 @@
4
4
  */
5
5
  export { ROOT_RUNTIME } from './standalone/native-root-window.js';
6
6
  export { AUTHORIZATION_RUNTIME } from './standalone/native-authorization-window.js';
7
- export const authorizationTemplateDirectory = new URL('../templates/native-authorization/', import.meta.url);
@@ -19,7 +19,5 @@ export declare function portalMinDsmMessage(value: string, field: string): strin
19
19
  export declare function isDsmAtLeast(value: string, floor: string): boolean;
20
20
  /** Container Apps cannot declare an os_min_ver below {@link CONTAINER_MIN_DSM}. */
21
21
  export declare function assertContainerMinDsm(value: string): void;
22
- /** A compose portal cannot be built for an os_min_ver below {@link PORTAL_MIN_DSM}. */
23
- export declare function assertPortalMinDsm(value: string): void;
24
22
  /** `--min-dsm`: a release (`7.1`) or a full `<version>-<build>` string (`7.2-69057`). */
25
23
  export declare function resolveMinDsm(value: string): string;
@@ -44,12 +44,6 @@ export function assertContainerMinDsm(value) {
44
44
  throw new Error(`[MIN_DSM_CONTAINER_FLOOR] 容器 App 需要 DSM ${CONTAINER_MIN_DSM} 以上(docker-project/Container Manager 從 DSM 7.2.1 才有),收到「${value}」。`);
45
45
  }
46
46
  }
47
- /** A compose portal cannot be built for an os_min_ver below {@link PORTAL_MIN_DSM}. */
48
- export function assertPortalMinDsm(value) {
49
- if (!isDsmAtLeast(value, PORTAL_MIN_DSM)) {
50
- throw new Error(`[CONTRACT_PORTAL_MIN_DSM] ${portalMinDsmMessage(value, "integration.web.portal")}`);
51
- }
52
- }
53
47
  const FULL_VERSION = /^7\.\d+(\.\d+)?-\d+$/;
54
48
  /** `--min-dsm`: a release (`7.1`) or a full `<version>-<build>` string (`7.2-69057`). */
55
49
  export function resolveMinDsm(value) {
@@ -3,7 +3,7 @@ import { join } from "node:path";
3
3
  import { checkCgiBinary } from "../standalone/binary.js";
4
4
  import { runCommand } from "../standalone/build.js";
5
5
  import { resolvedWebAccess } from "../contract/web-launch.js";
6
- import { templatesRoot } from "../template-paths.js";
6
+ import { goAssetDir } from "../template-paths.js";
7
7
  import { PINNED_GO_HINT, pinnedGoBuildEnv, pinnedGoProblem } from "./go-toolchain.js";
8
8
  export { gatewayEntryPath } from "../contract/web-launch.js";
9
9
  /** Where the gateway CGI sits in the package payload; DSM serves `ui/` under /webman/3rdparty/<package>/. */
@@ -28,7 +28,7 @@ export async function buildGatewayBinary(input) {
28
28
  const out = join(input.work, `gateway-${input.arch}.cgi`);
29
29
  const ldflags = ["-s", "-w", "-buildid=", `-X main.packageID=${input.packageId}`, `-X 'main.configJSON=${JSON.stringify(input.config)}'`].join(" ");
30
30
  const result = await (input.run ?? runCommand)("go", ["build", "-trimpath", "-buildvcs=false", "-ldflags", ldflags, "-o", out, "."], {
31
- cwd: join(templatesRoot(), "_gateway"),
31
+ cwd: goAssetDir("gateway"),
32
32
  env: { ...process.env, ...pinnedGoBuildEnv(input.arch) },
33
33
  });
34
34
  if (result.missing) {
@@ -1,7 +1,7 @@
1
1
  import { metadataInfoFields } from "../package-metadata.js";
2
2
  import { chmodSync, copyFileSync, cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync, } from "node:fs";
3
3
  import { tmpdir } from "node:os";
4
- import { dirname, join } from "node:path";
4
+ import { join } from "node:path";
5
5
  import { createHash } from "node:crypto";
6
6
  import * as tar from "tar";
7
7
  import { parseDocument, Scalar } from "yaml";
@@ -14,13 +14,12 @@ import { validateProject } from "../validate.js";
14
14
  import { packageIcons, writeDsmWindowIcons, writePackageCenterIcons } from "./dsm-icons.js";
15
15
  import { contractIconPath } from "../contract/icon.js";
16
16
  import { infoArchValue, isContainerArchFamily } from "./dsm-arch.js";
17
- import { assertContainerMinDsm, assertPortalMinDsm, resolveMinDsm } from "./dsm-version.js";
17
+ import { assertContainerMinDsm, resolveMinDsm } from "./dsm-version.js";
18
18
  import { createReproducibleTar } from "./reproducible-archive.js";
19
19
  import { copyProjectNotices } from "./notices.js";
20
20
  import { renderDeleteAppDataBlock } from "./delete-app-data.js";
21
21
  import { renderUninstallWizardFiles } from "./uninstall-wizard.js";
22
22
  import { renderInstallWizardFiles } from "./install-wizard.js";
23
- import { contractPortal, PORTAL_JSON_RELPATH, PORTAL_MUSTACHE_RELPATH, renderPortalJson, renderPortalLifecycle, renderPortalMustache, renderPortalWizardStep } from "../portal/package.js";
24
23
  import { renderWizardFiles, writeWizardUiFiles } from "./wizard-i18n.js";
25
24
  import { sharedFolderCombobox } from "./share-combobox.js";
26
25
  import { writeUiTexts } from "./ui-texts.js";
@@ -70,8 +69,6 @@ export async function buildSpk(options) {
70
69
  }
71
70
  if (options.minDsm !== undefined) {
72
71
  assertContainerMinDsm(String(contract.os_min_ver));
73
- if (contractPortal(contract))
74
- assertPortalMinDsm(String(contract.os_min_ver));
75
72
  }
76
73
  const parsedCompose = loadCompose(options.project.composePath);
77
74
  const route = parsedCompose?.compose
@@ -126,7 +123,7 @@ export async function buildSpk(options) {
126
123
  mkdirSync(join(staging, "scripts"), { recursive: true });
127
124
  for (const name of SCRIPT_NAMES) {
128
125
  const scriptPath = join(staging, "scripts", name);
129
- writeFileSync(scriptPath, withPortalLifecycle(name, contract, renderManagedScript(name, contract, isResourceWorkerRoute, rwEligibility?.adminport, isDynamicRoute, rwEligibility?.headless === true)), "utf8");
126
+ writeFileSync(scriptPath, renderManagedScript(name, contract, isResourceWorkerRoute, rwEligibility?.adminport, isDynamicRoute, rwEligibility?.headless === true), "utf8");
130
127
  chmodSync(scriptPath, SCRIPT_MODE);
131
128
  }
132
129
  mkdirSync(join(staging, "package"), { recursive: true });
@@ -185,14 +182,6 @@ export async function buildSpk(options) {
185
182
  writeDsmWindowIcons(uiDir, icons);
186
183
  writeUiTexts(uiDir, contractAppTitle(contract));
187
184
  }
188
- const portal = contractPortal(contract);
189
- if (portal) {
190
- for (const [path, text] of [[PORTAL_JSON_RELPATH, renderPortalJson(portal)], [PORTAL_MUSTACHE_RELPATH, renderPortalMustache()]]) {
191
- mkdirSync(dirname(join(staging, "package", path)), { recursive: true });
192
- writeFileSync(join(staging, "package", path), text, "utf8");
193
- chmodSync(join(staging, "package", path), FILE_MODE);
194
- }
195
- }
196
185
  if (gateway && gatewayBinary) {
197
186
  writeGatewayPayload(join(staging, "package"), gatewayBinary, gateway);
198
187
  }
@@ -615,11 +604,7 @@ function renderUpgradeWizard(t, contract, compose) {
615
604
  }];
616
605
  }
617
606
  function writeWizards(staging, contract, compose, kind) {
618
- const portal = contractPortal(contract);
619
- const install = renderInstallWizardFiles(String(contract.package), (t) => [
620
- ...renderInstallWizard(t, contract, compose),
621
- ...(portal ? [renderPortalWizardStep(t, portal.alias)] : []),
622
- ]);
607
+ const install = renderInstallWizardFiles(String(contract.package), (t) => renderInstallWizard(t, contract, compose));
623
608
  writeWizardUiFiles(staging, {
624
609
  ...install.static,
625
610
  ...install.dynamic,
@@ -818,10 +803,6 @@ function renderDynamicCanonicalMirror(headless = false) {
818
803
  function shellQuote(value) {
819
804
  return "'" + value.replace(/'/g, "'\\''") + "'";
820
805
  }
821
- function withPortalLifecycle(name, contract, script) {
822
- const portal = contractPortal(contract);
823
- return portal ? script.replace("#!/bin/sh\n", () => `#!/bin/sh\n${renderPortalLifecycle(name, portal)}`) : script;
824
- }
825
806
  function renderManagedScript(name, contract, isResourceWorker = false, resourceWorkerAdminport, isDynamicRoute = false, isHeadlessRoute = false) {
826
807
  if (isResourceWorker) {
827
808
  if (name === "start-stop-status") {
@@ -1,5 +1,6 @@
1
1
  import { copyFileSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync } from 'node:fs';
2
2
  import { dirname, join } from 'node:path';
3
+ import { sdkRequirement, sdkSource } from '../runtime/sdk-source.js';
3
4
  /** Copy legal text only; never follow a project-supplied symlink. */
4
5
  export function copyNoticeTree(source, target) {
5
6
  const stat = lstatSync(source);
@@ -28,7 +29,7 @@ export function copyProjectNotices(root, payload) {
28
29
  export function copyStandaloneNotices(root, uiDir, payload, go, goDir = join(root, 'backend')) {
29
30
  copyProjectNotices(root, payload);
30
31
  const dest = join(payload, 'LICENSES');
31
- const shared = new URL('../../templates/_shared/', import.meta.url);
32
+ const shared = new URL('../../assets/licenses/', import.meta.url);
32
33
  if (go) {
33
34
  mkdirSync(dest, { recursive: true });
34
35
  for (const name of ['GO-LICENSE', 'GO-PATENTS'])
@@ -36,14 +37,17 @@ export function copyStandaloneNotices(root, uiDir, payload, go, goDir = join(roo
36
37
  if (existsSync(join(goDir, 'THIRD_PARTY_NOTICES.txt')))
37
38
  copyNoticeTree(join(goDir, 'THIRD_PARTY_NOTICES.txt'), join(dest, 'GO-THIRD_PARTY_NOTICES.txt'));
38
39
  }
39
- const nativeAdmin = join(goDir, 'internal/dsm/native');
40
- if (go && existsSync(join(nativeAdmin, 'admin_check.c'))) {
41
- for (const name of ['admin_check.c', 'apppriv_check.c', 'build.sh', 'provenance.json', 'licenses']) {
42
- // Projects scaffolded before the AppPriv bridge carry only the administrator bridge.
43
- if (name === 'apppriv_check.c' && !existsSync(join(nativeAdmin, name)))
44
- continue;
40
+ // The SDK's dsm package embeds the native administrator and AppPriv bridges; their sources and terms ship with them.
41
+ const sdk = go ? sdkRequirement(goDir) : undefined;
42
+ if (sdk) {
43
+ const source = sdkSource(sdk);
44
+ const license = join(source.goDir, 'LICENSE');
45
+ if (!existsSync(license))
46
+ throw new Error(`[NOTICE_MISSING] SDK license missing: ${license}`);
47
+ copyNoticeTree(license, join(dest, 'SDK.txt'));
48
+ const nativeAdmin = join(source.goDir, 'dsm/native');
49
+ for (const name of ['admin_check.c', 'apppriv_check.c', 'build.sh', 'provenance.json', 'licenses'])
45
50
  copyNoticeTree(join(nativeAdmin, name), join(dest, 'native-admin', name));
46
- }
47
51
  }
48
52
  const frontend = join(root, 'frontend/package.json');
49
53
  const usesUi = existsSync(frontend) && Boolean(JSON.parse(readFileSync(frontend, 'utf8')).dependencies?.['@synopackageland/ui']);
@@ -1,4 +1,3 @@
1
- import { contractPortal, portalResource } from "../portal/package.js";
2
1
  import { collectUnpinnedImages } from "../compose/analyze.js";
3
2
  import { cookieStripHeaders, resolvedWebLaunch, usesAuthGateway, webStationAlias, webStationServiceName, } from "../contract/web-launch.js";
4
3
  export { classifyComposeRoute, resourceWorkerEligibility, } from "../compose/analyze.js";
@@ -79,8 +78,6 @@ export function renderResourceConfig(contract, eligibility, compose) {
79
78
  ...webResource,
80
79
  };
81
80
  }
82
- if (contractPortal(contract))
83
- combined = { ...combined, ...portalResource() };
84
81
  return `${JSON.stringify(combined, null, 2)}\n`;
85
82
  }
86
83
  /**
@@ -1,7 +1,12 @@
1
1
  /** The key DSM's built-in packages use for their "also remove my data" box. */
2
2
  export declare const REMOVE_ADDITIONAL_KEY = "pkgwizard_remove_additional";
3
3
  export type UninstallWizardKind = "native" | "container";
4
- /** `uninstall_uifile` (English) plus one `uninstall_uifile_<dsm language>` per locale. */
5
- export declare function renderUninstallWizardFiles(packageName: string, kind: UninstallWizardKind, options?: {
4
+ interface UninstallWizardOptions {
5
+ /** The App runs the root executor (rootOps or delegate), which purges DSM's leftovers on uninstall. */
6
6
  executor?: boolean;
7
- }): Record<string, string>;
7
+ /** The App declares a Login Portal alias (web-config app-portal); only the executor tier can. */
8
+ portal?: boolean;
9
+ }
10
+ /** `uninstall_uifile` (English) plus one `uninstall_uifile_<dsm language>` per locale. */
11
+ export declare function renderUninstallWizardFiles(packageName: string, kind: UninstallWizardKind, options?: UninstallWizardOptions): Record<string, string>;
12
+ export {};
@@ -4,7 +4,7 @@ export const REMOVE_ADDITIONAL_KEY = "pkgwizard_remove_additional";
4
4
  function list(items) {
5
5
  return `<ul class="synopkg-ul-list">${items.map((item) => `<li>${item}</li>`).join("")}</ul>`;
6
6
  }
7
- function renderUninstallWizard(t, packageName, kind, executor) {
7
+ function renderUninstallWizard(t, packageName, kind, { executor = false, portal = false }) {
8
8
  const vars = { package: packageName };
9
9
  return [{
10
10
  step_title: t("uninstall.step"),
@@ -21,6 +21,8 @@ function renderUninstallWizard(t, packageName, kind, executor) {
21
21
  { desc: t(kind === "container" ? "uninstall.keep.container" : "uninstall.keep.native") },
22
22
  ...(kind === "native" ? [{ desc: t("uninstall.retained.native", vars) }] : []),
23
23
  ...(executor ? [{ desc: t("uninstall.executor", vars) }] : []),
24
+ { desc: t(executor ? "uninstall.appPrivilege.auto" : "uninstall.appPrivilege", vars) },
25
+ ...(executor && portal ? [{ desc: t("uninstall.portal.auto", vars) }] : []),
24
26
  { desc: t("uninstall.backup") },
25
27
  {
26
28
  type: "multiselect",
@@ -31,5 +33,5 @@ function renderUninstallWizard(t, packageName, kind, executor) {
31
33
  }
32
34
  /** `uninstall_uifile` (English) plus one `uninstall_uifile_<dsm language>` per locale. */
33
35
  export function renderUninstallWizardFiles(packageName, kind, options = {}) {
34
- return renderWizardFiles("uninstall_uifile", (t) => renderUninstallWizard(t, packageName, kind, options.executor === true));
36
+ return renderWizardFiles("uninstall_uifile", (t) => renderUninstallWizard(t, packageName, kind, options));
35
37
  }