@synopackageland/cli 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1300) hide show
  1. package/README.md +69 -38
  2. package/dist/add.d.ts +4 -0
  3. package/dist/add.js +124 -0
  4. package/dist/build-spk/delete-app-data.d.ts +2 -2
  5. package/dist/build-spk/generator.js +3 -90
  6. package/dist/build-spk/native-lifecycle.d.ts +3 -49
  7. package/dist/build-spk/native-lifecycle.js +8 -187
  8. package/dist/build-spk/notices.d.ts +1 -1
  9. package/dist/build-spk/notices.js +8 -12
  10. package/dist/build-spk/uninstall-wizard.d.ts +3 -10
  11. package/dist/build-spk/uninstall-wizard.js +5 -3
  12. package/dist/build-spk/wizard-messages.d.ts +28 -6
  13. package/dist/build-spk/wizard-messages.js +33 -11
  14. package/dist/capabilities.d.ts +4 -0
  15. package/dist/capabilities.js +12 -0
  16. package/dist/cli.js +329 -467
  17. package/dist/compose/analyze.js +2 -2
  18. package/dist/contract/unsupported-types.js +1 -1
  19. package/dist/deploy/deploy.d.ts +1 -1
  20. package/dist/deploy/deploy.js +1 -3
  21. package/dist/deploy/plan.d.ts +1 -1
  22. package/dist/deploy/plan.js +55 -24
  23. package/dist/discovery.d.ts +1 -2
  24. package/dist/discovery.js +3 -3
  25. package/dist/error-registry.js +70 -298
  26. package/dist/host/dsm-client.js +79 -7
  27. package/dist/host/types.d.ts +13 -0
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.js +1 -0
  30. package/dist/info.d.ts +20 -2
  31. package/dist/info.js +140 -0
  32. package/dist/init.d.ts +2 -14
  33. package/dist/init.js +89 -90
  34. package/dist/inspect.js +1 -1
  35. package/dist/log.d.ts +5 -0
  36. package/dist/log.js +18 -0
  37. package/dist/runtime/executor-build.d.ts +22 -0
  38. package/dist/runtime/executor-build.js +36 -0
  39. package/dist/runtime/executor-inspect.d.ts +15 -0
  40. package/dist/runtime/executor-inspect.js +32 -0
  41. package/dist/runtime/executor-policy.d.ts +25 -0
  42. package/dist/runtime/executor-policy.js +24 -0
  43. package/dist/runtime/executor-tasks.d.ts +16 -0
  44. package/dist/runtime/executor-tasks.js +28 -0
  45. package/dist/runtime/uninstall-cleanup.d.ts +7 -0
  46. package/dist/runtime/uninstall-cleanup.js +10 -0
  47. package/dist/skill.js +3 -1
  48. package/dist/standalone/api-permissions.d.ts +18 -0
  49. package/dist/standalone/api-permissions.js +63 -0
  50. package/dist/standalone/build.d.ts +1 -1
  51. package/dist/standalone/build.js +26 -40
  52. package/dist/standalone/dsm-window.js +42 -23
  53. package/dist/standalone/inspect-spk.d.ts +9 -3
  54. package/dist/standalone/inspect-spk.js +64 -68
  55. package/dist/standalone/lifecycle.d.ts +1 -1
  56. package/dist/standalone/lifecycle.js +31 -27
  57. package/dist/standalone/manifest.d.ts +17 -14
  58. package/dist/standalone/manifest.js +77 -53
  59. package/dist/standalone/resource.d.ts +2 -2
  60. package/dist/standalone/resource.js +1 -1
  61. package/dist/standalone/root-ops.d.ts +1 -30
  62. package/dist/standalone/root-ops.js +1 -68
  63. package/dist/standalone/root-window.d.ts +5 -38
  64. package/dist/standalone/root-window.js +116 -399
  65. package/dist/standalone/spk.d.ts +3 -5
  66. package/dist/standalone/spk.js +24 -49
  67. package/dist/templates/_executor/README.md +204 -0
  68. package/dist/templates/_executor/apppriv_review_test.go +28 -0
  69. package/dist/templates/_executor/auth_presence_review_test.go +38 -0
  70. package/dist/templates/_executor/cmd/lifecycle/main.go +42 -0
  71. package/dist/templates/_executor/cookie_review_test.go +27 -0
  72. package/dist/templates/_executor/digest_review_test.go +120 -0
  73. package/dist/templates/_executor/directories.go +40 -0
  74. package/dist/templates/_executor/dsm.go +319 -0
  75. package/dist/templates/_executor/dsm_test.go +196 -0
  76. package/dist/templates/_executor/executor.go +524 -0
  77. package/dist/templates/_executor/executor_test.go +284 -0
  78. package/dist/templates/_executor/go.mod +3 -0
  79. package/dist/templates/_executor/identity.go +48 -0
  80. package/dist/templates/_executor/internal/lifecycle/lifecycle.go +90 -0
  81. package/dist/templates/_executor/internal/lifecycle/lifecycle_test.go +174 -0
  82. package/dist/templates/_executor/internal/taskscript/boot.sh +31 -0
  83. package/dist/templates/_executor/internal/taskscript/cmd/main.go +19 -0
  84. package/dist/templates/_executor/internal/taskscript/control.sh +26 -0
  85. package/dist/templates/_executor/internal/taskscript/tasks.go +42 -0
  86. package/dist/templates/_executor/json_review_test.go +40 -0
  87. package/dist/templates/_executor/lifecycle_test.go +86 -0
  88. package/dist/templates/_executor/main.go +518 -0
  89. package/dist/templates/_executor/managed.go +117 -0
  90. package/dist/templates/_executor/managed_test.go +137 -0
  91. package/dist/templates/_executor/path_test.go +17 -0
  92. package/dist/templates/_executor/platform_linux.go +336 -0
  93. package/dist/templates/_executor/platform_linux_test.go +247 -0
  94. package/dist/templates/_executor/platform_other.go +42 -0
  95. package/dist/templates/_executor/process.go +139 -0
  96. package/dist/templates/_executor/socket_linux_test.go +46 -0
  97. package/dist/templates/_executor/store.go +90 -0
  98. package/dist/templates/_executor/task_race_review_test.go +47 -0
  99. package/dist/templates/_executor/tasks.go +283 -0
  100. package/dist/templates/_executor/tasks_review_test.go +43 -0
  101. package/dist/templates/_executor/tasks_test.go +166 -0
  102. package/dist/templates/_executor/testdata/evidence/cleanup.json +24 -0
  103. package/dist/templates/_executor/testdata/evidence/final-smoke.jsonl +9 -0
  104. package/dist/templates/_executor/testdata/evidence/kernel-acl.json +6 -0
  105. package/dist/templates/_executor/testdata/evidence/linux-tests.log +123 -0
  106. package/dist/templates/_executor/testdata/evidence/live.jsonl +23 -0
  107. package/dist/templates/_executor/testdata/evidence/storage.json +90 -0
  108. package/dist/templates/_executor/testdata/evidence/validation.json +55 -0
  109. package/dist/templates/_executor/testdata/live_probe.py +98 -0
  110. package/dist/templates/_executor/upgrade_watch_test.go +236 -0
  111. package/dist/templates/_executor/watch.go +156 -0
  112. package/dist/templates/_executor/watch_test.go +270 -0
  113. package/dist/templates/_executor/write_review_linux_test.go +95 -0
  114. package/dist/templates/_shared/AGENTS.md +17 -0
  115. package/dist/templates/_shared/CLAUDE.md +1 -0
  116. package/dist/templates/binary/LICENSES/GO-LICENSE +27 -0
  117. package/dist/templates/binary/LICENSES/GO-PATENTS +22 -0
  118. package/dist/templates/binary/dsm-package.yaml +19 -0
  119. package/dist/templates/binary/example/main.go +16 -0
  120. package/dist/templates/binary/gitignore +2 -0
  121. package/dist/templates/binary/ui/app.css +4 -0
  122. package/dist/templates/binary/ui/app.js +17 -0
  123. package/dist/templates/native-go/README.md +128 -139
  124. package/dist/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +1 -1
  125. package/dist/templates/native-go/backend/cmd/app/main.go +33 -26
  126. package/dist/templates/native-go/backend/internal/api/cgi_framing_test.go +32 -0
  127. package/dist/templates/native-go/backend/internal/api/cookie_review_test.go +28 -0
  128. package/dist/templates/native-go/backend/internal/api/deadline_test.go +114 -0
  129. package/dist/templates/native-go/backend/internal/api/dsm-session.go +54 -0
  130. package/dist/templates/native-go/backend/internal/api/dsm-session_test.go +51 -0
  131. package/dist/templates/native-go/backend/internal/api/errors.go +14 -0
  132. package/dist/templates/native-go/backend/internal/api/permissions.go +161 -0
  133. package/dist/templates/native-go/backend/internal/api/permissions.json +5 -0
  134. package/dist/templates/native-go/backend/internal/api/permissions_test.go +113 -0
  135. package/dist/templates/native-go/backend/internal/api/policy_fixture_test.go +8 -0
  136. package/dist/templates/native-go/backend/internal/api/registry.go +48 -32
  137. package/dist/templates/native-go/backend/internal/api/registry_test.go +16 -1
  138. package/dist/templates/native-go/backend/internal/api/resource_limits_test.go +87 -0
  139. package/dist/templates/native-go/backend/internal/api/sdk-permissions.json +46 -0
  140. package/dist/templates/native-go/backend/internal/api/sdk_policy_test.go +31 -0
  141. package/dist/templates/native-go/backend/internal/api/server.go +135 -8
  142. package/dist/templates/native-go/backend/internal/api/testdata/permissions-cases.json +172 -0
  143. package/dist/templates/native-go/backend/internal/app/background.go +23 -44
  144. package/dist/templates/native-go/backend/internal/app/background_owner.go +0 -21
  145. package/dist/templates/native-go/backend/internal/app/background_owner_test.go +40 -22
  146. package/dist/templates/native-go/backend/internal/app/background_schedule.go +0 -5
  147. package/dist/templates/native-go/backend/internal/app/background_schedule_test.go +1 -1
  148. package/dist/templates/native-go/backend/internal/app/background_test.go +15 -41
  149. package/dist/templates/native-go/backend/internal/app/delegate_none.go +5 -0
  150. package/dist/templates/native-go/backend/internal/app/identity.go +20 -0
  151. package/dist/templates/native-go/backend/internal/app/identity_test.go +15 -0
  152. package/dist/templates/native-go/backend/internal/app/routes.go +12 -36
  153. package/dist/templates/native-go/backend/internal/app/routes_test.go +16 -40
  154. package/dist/templates/native-go/backend/internal/app/session_files.go +4 -10
  155. package/dist/templates/native-go/backend/internal/app/session_files_test.go +8 -20
  156. package/dist/templates/native-go/backend/internal/app/shared_folder_test.go +4 -4
  157. package/dist/templates/native-go/backend/internal/background/lock_test.go +131 -0
  158. package/dist/templates/native-go/backend/internal/background/owner_test.go +12 -20
  159. package/dist/templates/native-go/backend/internal/background/runner_test.go +1 -1
  160. package/dist/templates/native-go/backend/internal/background/schedule.go +53 -17
  161. package/dist/templates/native-go/backend/internal/background/schedule_test.go +42 -9
  162. package/dist/templates/native-go/backend/internal/background/store.go +115 -99
  163. package/dist/templates/native-go/backend/internal/background/store_test.go +10 -52
  164. package/dist/templates/native-go/backend/internal/dsm/admin.go +70 -0
  165. package/dist/templates/native-go/backend/internal/dsm/admin_linux.go +80 -0
  166. package/dist/templates/native-go/backend/internal/dsm/admin_linux_test.go +49 -0
  167. package/dist/templates/native-go/backend/internal/dsm/admin_other.go +12 -0
  168. package/dist/templates/native-go/backend/internal/dsm/admin_test.go +67 -0
  169. package/dist/templates/native-go/backend/internal/dsm/auth.go +24 -48
  170. package/dist/templates/native-go/backend/internal/dsm/auth_test.go +43 -23
  171. package/dist/templates/native-go/backend/internal/dsm/native/admin-aarch64.elf +0 -0
  172. package/dist/templates/native-go/backend/internal/dsm/native/admin-x86_64.elf +0 -0
  173. package/dist/templates/native-go/backend/internal/dsm/native/admin_check.c +28 -0
  174. package/dist/templates/native-go/backend/internal/dsm/native/build.sh +9 -0
  175. package/dist/templates/native-go/backend/internal/dsm/native/licenses/GLIBC-NOTICES.txt +400 -0
  176. package/dist/templates/native-go/backend/internal/dsm/native/licenses/LGPL-2.1.txt +501 -0
  177. package/dist/templates/native-go/backend/internal/dsm/native/licenses/SOURCE.txt +5 -0
  178. package/dist/templates/native-go/backend/internal/dsm/native/licenses/ZIG-MIT.txt +21 -0
  179. package/dist/templates/native-go/backend/internal/dsm/native/provenance.json +12 -0
  180. package/dist/templates/native-go/backend/internal/filestation/client.go +68 -18
  181. package/dist/templates/native-go/backend/internal/filestation/client_test.go +7 -7
  182. package/dist/templates/native-go/backend/internal/filestation/doc.go +1 -1
  183. package/dist/templates/native-go/backend/internal/filestation/http.go +70 -0
  184. package/dist/templates/native-go/backend/internal/filestation/http_test.go +188 -0
  185. package/dist/templates/native-go/backend/internal/filestation/operations_test.go +206 -0
  186. package/dist/templates/native-go/backend/internal/filestation/read_file_test.go +2 -3
  187. package/dist/templates/native-go/backend/internal/filestation/service.go +117 -117
  188. package/dist/templates/native-go/backend/internal/filestation/service_test.go +30 -50
  189. package/dist/templates/native-go/backend/internal/filestation/upload_stream.go +76 -0
  190. package/dist/templates/native-go/backend/internal/filestation/upload_stream_test.go +77 -0
  191. package/dist/templates/native-go/backend/internal/filestation/write.go +0 -40
  192. package/dist/templates/native-go/backend/internal/filestation/write_test.go +6 -5
  193. package/dist/templates/native-go/backend/internal/identity/README.md +55 -0
  194. package/dist/templates/native-go/backend/internal/identity/dsm.go +96 -0
  195. package/dist/templates/native-go/backend/internal/identity/http.go +291 -0
  196. package/dist/templates/native-go/backend/internal/identity/identity_test.go +483 -0
  197. package/dist/templates/native-go/backend/internal/identity/service.go +159 -0
  198. package/dist/templates/native-go/backend/internal/identity/store.go +109 -0
  199. package/dist/templates/native-go/backend/internal/jsonlimits/limits.go +48 -0
  200. package/dist/templates/native-go/backend/internal/jsonlimits/limits_test.go +52 -0
  201. package/dist/templates/native-go/dsm-package.yaml +8 -17
  202. package/dist/templates/native-go-delegate/DELEGATE.md +142 -0
  203. package/dist/templates/native-go-delegate/backend/cmd/background-worker/main.go +41 -0
  204. package/dist/templates/native-go-delegate/backend/internal/app/delegate.go +15 -0
  205. package/dist/templates/native-go-delegate/backend/internal/app/delegate_on.go +5 -0
  206. package/dist/templates/native-go-delegate/backend/internal/app/delegate_routes_test.go +17 -0
  207. package/dist/templates/native-go-delegate/backend/internal/background/delegate_review_test.go +174 -0
  208. package/dist/templates/native-go-delegate/backend/internal/background/delegated.go +277 -0
  209. package/dist/templates/native-go-delegate/backend/internal/background/delegated_test.go +34 -0
  210. package/dist/templates/native-go-delegate/backend/internal/delegate/busy_review_test.go +15 -0
  211. package/dist/templates/native-go-delegate/backend/internal/delegate/client.go +143 -0
  212. package/dist/templates/native-go-delegate/backend/internal/delegate/client_test.go +214 -0
  213. package/dist/templates/native-go-delegate/backend/internal/delegate/files.go +132 -0
  214. package/dist/templates/native-go-delegate/backend/internal/delegate/retry.go +106 -0
  215. package/dist/templates/native-go-delegate/backend/internal/delegate/retry_test.go +143 -0
  216. package/dist/templates/native-go-delegate/backend/internal/delegate/service.go +323 -0
  217. package/dist/templates/native-go-delegate/backend/internal/delegate/service_test.go +318 -0
  218. package/dist/templates/native-go-delegate/backend/internal/delegate/wait_cancel_test.go +101 -0
  219. package/dist/templates/native-go-delegate/backend/internal/delegate/worker.go +225 -0
  220. package/dist/templates/native-go-delegate/backend/internal/filestation/files.go +73 -0
  221. package/dist/templates/native-go-delegate/backend/internal/filestation/files_test.go +59 -0
  222. package/dist/templates/native-go-delegate/frontend/src/CapabilityPanels.vue +10 -0
  223. package/dist/templates/native-go-delegate/frontend/src/delegate/DelegatePanel.vue +70 -0
  224. package/dist/templates/native-go-delegate/frontend/src/delegate/copy.ts +9 -0
  225. package/dist/templates/native-go-delegate/frontend/src/delegate/i18n/waiting.json +11 -0
  226. package/dist/templates/native-go-delegate/frontend/test/delegate.test.ts +130 -0
  227. package/dist/templates/native-go-delegate/test-frontend.sh +12 -0
  228. package/dist/templates/native-go-delegate/test.sh +17 -0
  229. package/dist/templates/native-go-jobs/BACKGROUND.md +108 -0
  230. package/dist/templates/native-go-jobs/backend/internal/app/background_routes_test.go +90 -0
  231. package/dist/templates/native-go-jobs/frontend/src/background/BackgroundPanel.vue +170 -0
  232. package/dist/templates/native-go-jobs/frontend/src/background/i18n/de.json +75 -0
  233. package/dist/templates/native-go-jobs/frontend/src/background/i18n/en.json +75 -0
  234. package/dist/templates/native-go-jobs/frontend/src/background/i18n/es.json +75 -0
  235. package/dist/templates/native-go-jobs/frontend/src/background/i18n/fr.json +75 -0
  236. package/dist/templates/native-go-jobs/frontend/src/background/i18n/it.json +75 -0
  237. package/dist/templates/native-go-jobs/frontend/src/background/i18n/ja.json +75 -0
  238. package/dist/templates/native-go-jobs/frontend/src/background/i18n/ko.json +75 -0
  239. package/dist/templates/native-go-jobs/frontend/src/background/i18n/zh-CN.json +75 -0
  240. package/dist/templates/native-go-jobs/frontend/src/background/i18n/zh-TW.json +75 -0
  241. package/dist/templates/native-go-jobs/frontend/src/background/picker-provider.ts +12 -0
  242. package/dist/templates/native-go-jobs/frontend/src/background/request-key.ts +5 -0
  243. package/dist/templates/native-go-jobs/frontend/test/background.test.ts +208 -0
  244. package/dist/templates/native-go-root-ops/backend/internal/app/executor.go +112 -0
  245. package/dist/templates/native-go-root-ops/backend/internal/app/executor_test.go +53 -0
  246. package/dist/templates/native-go-root-ops/root/whoami.sh +3 -0
  247. package/dist/templates/native-go-vue/README.md +36 -248
  248. package/dist/templates/native-go-vue/frontend/DESIGN.md +20 -49
  249. package/dist/templates/native-go-vue/frontend/package-lock.json +278 -159
  250. package/dist/templates/native-go-vue/frontend/package.json +2 -2
  251. package/dist/templates/native-go-vue/frontend/src/App.vue +55 -151
  252. package/dist/templates/native-go-vue/frontend/src/CapabilityPanels.vue +6 -0
  253. package/dist/templates/native-go-vue/frontend/src/context.ts +2 -14
  254. package/dist/templates/native-go-vue/frontend/src/delegate/ExecutorSettings.vue +25 -0
  255. package/dist/templates/native-go-vue/frontend/src/delegate/copy.ts +4 -0
  256. package/dist/templates/native-go-vue/frontend/src/delegate/executor-setup.ts +18 -0
  257. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/en.json +36 -0
  258. package/dist/templates/native-go-vue/frontend/src/delegate/i18n/zh-TW.json +36 -0
  259. package/dist/templates/native-go-vue/frontend/src/files/FileBrowser.vue +131 -0
  260. package/dist/templates/native-go-vue/frontend/src/files/FilesPage.vue +35 -0
  261. package/dist/templates/native-go-vue/frontend/src/files/files.test.ts +93 -0
  262. package/dist/templates/native-go-vue/frontend/src/files/provider.test.ts +48 -0
  263. package/dist/templates/native-go-vue/frontend/src/files/transfers.test.ts +27 -0
  264. package/dist/templates/native-go-vue/frontend/src/files/transfers.ts +25 -0
  265. package/dist/templates/native-go-vue/frontend/src/identity/DESIGN.md +46 -0
  266. package/dist/templates/native-go-vue/frontend/src/identity/LoginPage.vue +76 -0
  267. package/dist/templates/native-go-vue/frontend/src/identity/login.test.ts +32 -0
  268. package/dist/templates/native-go-vue/frontend/src/identity/session.test.ts +29 -0
  269. package/dist/templates/native-go-vue/frontend/src/identity/session.ts +73 -0
  270. package/dist/templates/native-go-vue/frontend/src/main.ts +7 -4
  271. package/dist/templates/native-go-vue/frontend/src/nas/NasPicker.vue +23 -0
  272. package/dist/templates/native-go-vue/frontend/src/nas/contract.ts +12 -0
  273. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/de.json +41 -0
  274. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/en.json +41 -0
  275. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/es.json +41 -0
  276. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/fr.json +41 -0
  277. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/it.json +41 -0
  278. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/ja.json +41 -0
  279. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/ko.json +41 -0
  280. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/zh-CN.json +41 -0
  281. package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/zh-TW.json +41 -0
  282. package/dist/templates/native-go-vue/frontend/src/nas/i18n.ts +2 -38
  283. package/dist/templates/native-go-vue/frontend/src/nas/locale.ts +24 -0
  284. package/dist/templates/native-go-vue/frontend/src/nas/provider.ts +46 -55
  285. package/dist/templates/native-go-vue/frontend/src/nas/use-request.ts +13 -22
  286. package/dist/templates/native-go-vue/frontend/src/shell/AppShell.vue +3 -3
  287. package/dist/templates/native-go-vue/frontend/src/shell/i18n/de.json +1 -7
  288. package/dist/templates/native-go-vue/frontend/src/shell/i18n/en.json +1 -7
  289. package/dist/templates/native-go-vue/frontend/src/shell/i18n/es.json +1 -7
  290. package/dist/templates/native-go-vue/frontend/src/shell/i18n/fr.json +1 -7
  291. package/dist/templates/native-go-vue/frontend/src/shell/i18n/it.json +1 -7
  292. package/dist/templates/native-go-vue/frontend/src/shell/i18n/ja.json +1 -7
  293. package/dist/templates/native-go-vue/frontend/src/shell/i18n/ko.json +1 -7
  294. package/dist/templates/native-go-vue/frontend/src/shell/i18n/zh-CN.json +1 -7
  295. package/dist/templates/native-go-vue/frontend/src/shell/i18n/zh-TW.json +1 -7
  296. package/dist/templates/native-go-vue/frontend/src/shell/pages.ts +3 -22
  297. package/dist/templates/native-go-vue/frontend/test/apps.test.ts +33 -201
  298. package/dist/templates/native-go-vue/frontend/test/shell-ui.test.ts +15 -109
  299. package/dist/templates/native-go-vue/frontend/test/shell.test.ts +4 -19
  300. package/dist/templates/native-go-vue/frontend/vite.config.ts +2 -2
  301. package/dist/types.d.ts +1 -1
  302. package/dist/validate.js +27 -36
  303. package/package.json +2 -5
  304. package/skills/SKILL.md +21 -3
  305. package/skills/reference/create.md +15 -6
  306. package/skills/reference/deploy.md +5 -3
  307. package/skills/reference/diagnose.md +1 -1
  308. package/skills/reference/files.md +8 -6
  309. package/skills/reference/identity.md +9 -3
  310. package/skills/reference/ui-json.md +78 -0
  311. package/skills/reference/ui-vue.md +71 -0
  312. package/skills/reference/wrap.md +3 -4
  313. package/templates/_executor/README.md +204 -0
  314. package/templates/_executor/apppriv_review_test.go +28 -0
  315. package/templates/_executor/auth_presence_review_test.go +38 -0
  316. package/templates/_executor/cmd/lifecycle/main.go +42 -0
  317. package/templates/_executor/cookie_review_test.go +27 -0
  318. package/templates/_executor/digest_review_test.go +120 -0
  319. package/templates/_executor/directories.go +40 -0
  320. package/templates/_executor/dsm.go +319 -0
  321. package/templates/_executor/dsm_test.go +196 -0
  322. package/templates/_executor/executor.go +524 -0
  323. package/templates/_executor/executor_test.go +284 -0
  324. package/templates/_executor/go.mod +3 -0
  325. package/templates/_executor/identity.go +48 -0
  326. package/templates/_executor/internal/lifecycle/lifecycle.go +90 -0
  327. package/templates/_executor/internal/lifecycle/lifecycle_test.go +174 -0
  328. package/templates/_executor/internal/taskscript/boot.sh +31 -0
  329. package/templates/_executor/internal/taskscript/cmd/main.go +19 -0
  330. package/templates/_executor/internal/taskscript/control.sh +26 -0
  331. package/templates/_executor/internal/taskscript/tasks.go +42 -0
  332. package/templates/_executor/json_review_test.go +40 -0
  333. package/templates/_executor/lifecycle_test.go +86 -0
  334. package/templates/_executor/main.go +518 -0
  335. package/templates/_executor/managed.go +117 -0
  336. package/templates/_executor/managed_test.go +137 -0
  337. package/templates/_executor/path_test.go +17 -0
  338. package/templates/_executor/platform_linux.go +336 -0
  339. package/templates/_executor/platform_linux_test.go +247 -0
  340. package/templates/_executor/platform_other.go +42 -0
  341. package/templates/_executor/process.go +139 -0
  342. package/templates/_executor/socket_linux_test.go +46 -0
  343. package/templates/_executor/store.go +90 -0
  344. package/templates/_executor/task_race_review_test.go +47 -0
  345. package/templates/_executor/tasks.go +283 -0
  346. package/templates/_executor/tasks_review_test.go +43 -0
  347. package/templates/_executor/tasks_test.go +166 -0
  348. package/templates/_executor/testdata/evidence/cleanup.json +24 -0
  349. package/templates/_executor/testdata/evidence/final-smoke.jsonl +9 -0
  350. package/templates/_executor/testdata/evidence/kernel-acl.json +6 -0
  351. package/templates/_executor/testdata/evidence/linux-tests.log +123 -0
  352. package/templates/_executor/testdata/evidence/live.jsonl +23 -0
  353. package/templates/_executor/testdata/evidence/storage.json +90 -0
  354. package/templates/_executor/testdata/evidence/validation.json +55 -0
  355. package/templates/_executor/testdata/live_probe.py +98 -0
  356. package/templates/_executor/upgrade_watch_test.go +236 -0
  357. package/templates/_executor/watch.go +156 -0
  358. package/templates/_executor/watch_test.go +270 -0
  359. package/templates/_executor/write_review_linux_test.go +95 -0
  360. package/templates/_shared/AGENTS.md +17 -0
  361. package/templates/_shared/CLAUDE.md +1 -0
  362. package/templates/binary/LICENSES/GO-LICENSE +27 -0
  363. package/templates/binary/LICENSES/GO-PATENTS +22 -0
  364. package/templates/binary/dsm-package.yaml +19 -0
  365. package/templates/binary/example/main.go +16 -0
  366. package/templates/binary/gitignore +2 -0
  367. package/templates/binary/ui/app.css +4 -0
  368. package/templates/binary/ui/app.js +17 -0
  369. package/templates/native-go/README.md +128 -139
  370. package/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +1 -1
  371. package/templates/native-go/backend/cmd/app/main.go +33 -26
  372. package/templates/native-go/backend/internal/api/cgi_framing_test.go +32 -0
  373. package/templates/native-go/backend/internal/api/cookie_review_test.go +28 -0
  374. package/templates/native-go/backend/internal/api/deadline_test.go +114 -0
  375. package/templates/native-go/backend/internal/api/dsm-session.go +54 -0
  376. package/templates/native-go/backend/internal/api/dsm-session_test.go +51 -0
  377. package/templates/native-go/backend/internal/api/errors.go +14 -0
  378. package/templates/native-go/backend/internal/api/permissions.go +161 -0
  379. package/templates/native-go/backend/internal/api/permissions.json +5 -0
  380. package/templates/native-go/backend/internal/api/permissions_test.go +113 -0
  381. package/templates/native-go/backend/internal/api/policy_fixture_test.go +8 -0
  382. package/templates/native-go/backend/internal/api/registry.go +48 -32
  383. package/templates/native-go/backend/internal/api/registry_test.go +16 -1
  384. package/templates/native-go/backend/internal/api/resource_limits_test.go +87 -0
  385. package/templates/native-go/backend/internal/api/sdk-permissions.json +46 -0
  386. package/templates/native-go/backend/internal/api/sdk_policy_test.go +31 -0
  387. package/templates/native-go/backend/internal/api/server.go +135 -8
  388. package/templates/native-go/backend/internal/api/testdata/permissions-cases.json +172 -0
  389. package/templates/native-go/backend/internal/app/background.go +23 -44
  390. package/templates/native-go/backend/internal/app/background_owner.go +0 -21
  391. package/templates/native-go/backend/internal/app/background_owner_test.go +40 -22
  392. package/templates/native-go/backend/internal/app/background_schedule.go +0 -5
  393. package/templates/native-go/backend/internal/app/background_schedule_test.go +1 -1
  394. package/templates/native-go/backend/internal/app/background_test.go +15 -41
  395. package/templates/native-go/backend/internal/app/delegate_none.go +5 -0
  396. package/templates/native-go/backend/internal/app/identity.go +20 -0
  397. package/templates/native-go/backend/internal/app/identity_test.go +15 -0
  398. package/templates/native-go/backend/internal/app/routes.go +12 -36
  399. package/templates/native-go/backend/internal/app/routes_test.go +16 -40
  400. package/templates/native-go/backend/internal/app/session_files.go +4 -10
  401. package/templates/native-go/backend/internal/app/session_files_test.go +8 -20
  402. package/templates/native-go/backend/internal/app/shared_folder_test.go +4 -4
  403. package/templates/native-go/backend/internal/background/lock_test.go +131 -0
  404. package/templates/native-go/backend/internal/background/owner_test.go +12 -20
  405. package/templates/native-go/backend/internal/background/runner_test.go +1 -1
  406. package/templates/native-go/backend/internal/background/schedule.go +53 -17
  407. package/templates/native-go/backend/internal/background/schedule_test.go +42 -9
  408. package/templates/native-go/backend/internal/background/store.go +115 -99
  409. package/templates/native-go/backend/internal/background/store_test.go +10 -52
  410. package/templates/native-go/backend/internal/dsm/admin.go +70 -0
  411. package/templates/native-go/backend/internal/dsm/admin_linux.go +80 -0
  412. package/templates/native-go/backend/internal/dsm/admin_linux_test.go +49 -0
  413. package/templates/native-go/backend/internal/dsm/admin_other.go +12 -0
  414. package/templates/native-go/backend/internal/dsm/admin_test.go +67 -0
  415. package/templates/native-go/backend/internal/dsm/auth.go +24 -48
  416. package/templates/native-go/backend/internal/dsm/auth_test.go +43 -23
  417. package/templates/native-go/backend/internal/dsm/native/admin-aarch64.elf +0 -0
  418. package/templates/native-go/backend/internal/dsm/native/admin-x86_64.elf +0 -0
  419. package/templates/native-go/backend/internal/dsm/native/admin_check.c +28 -0
  420. package/templates/native-go/backend/internal/dsm/native/build.sh +9 -0
  421. package/templates/native-go/backend/internal/dsm/native/licenses/GLIBC-NOTICES.txt +400 -0
  422. package/templates/native-go/backend/internal/dsm/native/licenses/LGPL-2.1.txt +501 -0
  423. package/templates/native-go/backend/internal/dsm/native/licenses/SOURCE.txt +5 -0
  424. package/templates/native-go/backend/internal/dsm/native/licenses/ZIG-MIT.txt +21 -0
  425. package/templates/native-go/backend/internal/dsm/native/provenance.json +12 -0
  426. package/templates/native-go/backend/internal/filestation/client.go +68 -18
  427. package/templates/native-go/backend/internal/filestation/client_test.go +7 -7
  428. package/templates/native-go/backend/internal/filestation/doc.go +1 -1
  429. package/templates/native-go/backend/internal/filestation/http.go +70 -0
  430. package/templates/native-go/backend/internal/filestation/http_test.go +188 -0
  431. package/templates/native-go/backend/internal/filestation/operations_test.go +206 -0
  432. package/templates/native-go/backend/internal/filestation/read_file_test.go +2 -3
  433. package/templates/native-go/backend/internal/filestation/service.go +117 -117
  434. package/templates/native-go/backend/internal/filestation/service_test.go +30 -50
  435. package/templates/native-go/backend/internal/filestation/upload_stream.go +76 -0
  436. package/templates/native-go/backend/internal/filestation/upload_stream_test.go +77 -0
  437. package/templates/native-go/backend/internal/filestation/write.go +0 -40
  438. package/templates/native-go/backend/internal/filestation/write_test.go +6 -5
  439. package/templates/native-go/backend/internal/identity/README.md +55 -0
  440. package/templates/native-go/backend/internal/identity/dsm.go +96 -0
  441. package/templates/native-go/backend/internal/identity/http.go +291 -0
  442. package/templates/native-go/backend/internal/identity/identity_test.go +483 -0
  443. package/templates/native-go/backend/internal/identity/service.go +159 -0
  444. package/templates/native-go/backend/internal/identity/store.go +109 -0
  445. package/templates/native-go/backend/internal/jsonlimits/limits.go +48 -0
  446. package/templates/native-go/backend/internal/jsonlimits/limits_test.go +52 -0
  447. package/templates/native-go/dsm-package.yaml +8 -17
  448. package/templates/native-go-delegate/DELEGATE.md +142 -0
  449. package/templates/native-go-delegate/backend/cmd/background-worker/main.go +41 -0
  450. package/templates/native-go-delegate/backend/internal/app/delegate.go +15 -0
  451. package/templates/native-go-delegate/backend/internal/app/delegate_on.go +5 -0
  452. package/templates/native-go-delegate/backend/internal/app/delegate_routes_test.go +17 -0
  453. package/templates/native-go-delegate/backend/internal/background/delegate_review_test.go +174 -0
  454. package/templates/native-go-delegate/backend/internal/background/delegated.go +277 -0
  455. package/templates/native-go-delegate/backend/internal/background/delegated_test.go +34 -0
  456. package/templates/native-go-delegate/backend/internal/delegate/busy_review_test.go +15 -0
  457. package/templates/native-go-delegate/backend/internal/delegate/client.go +143 -0
  458. package/templates/native-go-delegate/backend/internal/delegate/client_test.go +214 -0
  459. package/templates/native-go-delegate/backend/internal/delegate/files.go +132 -0
  460. package/templates/native-go-delegate/backend/internal/delegate/retry.go +106 -0
  461. package/templates/native-go-delegate/backend/internal/delegate/retry_test.go +143 -0
  462. package/templates/native-go-delegate/backend/internal/delegate/service.go +323 -0
  463. package/templates/native-go-delegate/backend/internal/delegate/service_test.go +318 -0
  464. package/templates/native-go-delegate/backend/internal/delegate/wait_cancel_test.go +101 -0
  465. package/templates/native-go-delegate/backend/internal/delegate/worker.go +225 -0
  466. package/templates/native-go-delegate/backend/internal/filestation/files.go +73 -0
  467. package/templates/native-go-delegate/backend/internal/filestation/files_test.go +59 -0
  468. package/templates/native-go-delegate/frontend/src/CapabilityPanels.vue +10 -0
  469. package/templates/native-go-delegate/frontend/src/delegate/DelegatePanel.vue +70 -0
  470. package/templates/native-go-delegate/frontend/src/delegate/copy.ts +9 -0
  471. package/templates/native-go-delegate/frontend/src/delegate/i18n/waiting.json +11 -0
  472. package/templates/native-go-delegate/frontend/test/delegate.test.ts +130 -0
  473. package/templates/native-go-delegate/test-frontend.sh +12 -0
  474. package/templates/native-go-delegate/test.sh +17 -0
  475. package/templates/native-go-jobs/BACKGROUND.md +108 -0
  476. package/templates/native-go-jobs/backend/internal/app/background_routes_test.go +90 -0
  477. package/templates/native-go-jobs/frontend/src/background/BackgroundPanel.vue +170 -0
  478. package/templates/native-go-jobs/frontend/src/background/i18n/de.json +75 -0
  479. package/templates/native-go-jobs/frontend/src/background/i18n/en.json +75 -0
  480. package/templates/native-go-jobs/frontend/src/background/i18n/es.json +75 -0
  481. package/templates/native-go-jobs/frontend/src/background/i18n/fr.json +75 -0
  482. package/templates/native-go-jobs/frontend/src/background/i18n/it.json +75 -0
  483. package/templates/native-go-jobs/frontend/src/background/i18n/ja.json +75 -0
  484. package/templates/native-go-jobs/frontend/src/background/i18n/ko.json +75 -0
  485. package/templates/native-go-jobs/frontend/src/background/i18n/zh-CN.json +75 -0
  486. package/templates/native-go-jobs/frontend/src/background/i18n/zh-TW.json +75 -0
  487. package/templates/native-go-jobs/frontend/src/background/picker-provider.ts +12 -0
  488. package/templates/native-go-jobs/frontend/src/background/request-key.ts +5 -0
  489. package/templates/native-go-jobs/frontend/test/background.test.ts +208 -0
  490. package/templates/native-go-root-ops/backend/internal/app/executor.go +112 -0
  491. package/templates/native-go-root-ops/backend/internal/app/executor_test.go +53 -0
  492. package/templates/native-go-root-ops/root/whoami.sh +3 -0
  493. package/templates/native-go-vue/README.md +36 -248
  494. package/templates/native-go-vue/frontend/DESIGN.md +20 -49
  495. package/templates/native-go-vue/frontend/package-lock.json +278 -159
  496. package/templates/native-go-vue/frontend/package.json +2 -2
  497. package/templates/native-go-vue/frontend/src/App.vue +55 -151
  498. package/templates/native-go-vue/frontend/src/CapabilityPanels.vue +6 -0
  499. package/templates/native-go-vue/frontend/src/context.ts +2 -14
  500. package/templates/native-go-vue/frontend/src/delegate/ExecutorSettings.vue +25 -0
  501. package/templates/native-go-vue/frontend/src/delegate/copy.ts +4 -0
  502. package/templates/native-go-vue/frontend/src/delegate/executor-setup.ts +18 -0
  503. package/templates/native-go-vue/frontend/src/delegate/i18n/en.json +36 -0
  504. package/templates/native-go-vue/frontend/src/delegate/i18n/zh-TW.json +36 -0
  505. package/templates/native-go-vue/frontend/src/files/FileBrowser.vue +131 -0
  506. package/templates/native-go-vue/frontend/src/files/FilesPage.vue +35 -0
  507. package/templates/native-go-vue/frontend/src/files/files.test.ts +93 -0
  508. package/templates/native-go-vue/frontend/src/files/provider.test.ts +48 -0
  509. package/templates/native-go-vue/frontend/src/files/transfers.test.ts +27 -0
  510. package/templates/native-go-vue/frontend/src/files/transfers.ts +25 -0
  511. package/templates/native-go-vue/frontend/src/identity/DESIGN.md +46 -0
  512. package/templates/native-go-vue/frontend/src/identity/LoginPage.vue +76 -0
  513. package/templates/native-go-vue/frontend/src/identity/login.test.ts +32 -0
  514. package/templates/native-go-vue/frontend/src/identity/session.test.ts +29 -0
  515. package/templates/native-go-vue/frontend/src/identity/session.ts +73 -0
  516. package/templates/native-go-vue/frontend/src/main.ts +7 -4
  517. package/templates/native-go-vue/frontend/src/nas/NasPicker.vue +23 -0
  518. package/templates/native-go-vue/frontend/src/nas/contract.ts +12 -0
  519. package/templates/native-go-vue/frontend/src/nas/i18n/files/de.json +41 -0
  520. package/templates/native-go-vue/frontend/src/nas/i18n/files/en.json +41 -0
  521. package/templates/native-go-vue/frontend/src/nas/i18n/files/es.json +41 -0
  522. package/templates/native-go-vue/frontend/src/nas/i18n/files/fr.json +41 -0
  523. package/templates/native-go-vue/frontend/src/nas/i18n/files/it.json +41 -0
  524. package/templates/native-go-vue/frontend/src/nas/i18n/files/ja.json +41 -0
  525. package/templates/native-go-vue/frontend/src/nas/i18n/files/ko.json +41 -0
  526. package/templates/native-go-vue/frontend/src/nas/i18n/files/zh-CN.json +41 -0
  527. package/templates/native-go-vue/frontend/src/nas/i18n/files/zh-TW.json +41 -0
  528. package/templates/native-go-vue/frontend/src/nas/i18n.ts +2 -38
  529. package/templates/native-go-vue/frontend/src/nas/locale.ts +24 -0
  530. package/templates/native-go-vue/frontend/src/nas/provider.ts +46 -55
  531. package/templates/native-go-vue/frontend/src/nas/use-request.ts +13 -22
  532. package/templates/native-go-vue/frontend/src/shell/AppShell.vue +3 -3
  533. package/templates/native-go-vue/frontend/src/shell/i18n/de.json +1 -7
  534. package/templates/native-go-vue/frontend/src/shell/i18n/en.json +1 -7
  535. package/templates/native-go-vue/frontend/src/shell/i18n/es.json +1 -7
  536. package/templates/native-go-vue/frontend/src/shell/i18n/fr.json +1 -7
  537. package/templates/native-go-vue/frontend/src/shell/i18n/it.json +1 -7
  538. package/templates/native-go-vue/frontend/src/shell/i18n/ja.json +1 -7
  539. package/templates/native-go-vue/frontend/src/shell/i18n/ko.json +1 -7
  540. package/templates/native-go-vue/frontend/src/shell/i18n/zh-CN.json +1 -7
  541. package/templates/native-go-vue/frontend/src/shell/i18n/zh-TW.json +1 -7
  542. package/templates/native-go-vue/frontend/src/shell/pages.ts +3 -22
  543. package/templates/native-go-vue/frontend/test/apps.test.ts +33 -201
  544. package/templates/native-go-vue/frontend/test/shell-ui.test.ts +15 -109
  545. package/templates/native-go-vue/frontend/test/shell.test.ts +4 -19
  546. package/templates/native-go-vue/frontend/vite.config.ts +2 -2
  547. package/dist/authorization-sdk.d.ts +0 -5
  548. package/dist/authorization-sdk.js +0 -5
  549. package/dist/build-spk/native-payload.d.ts +0 -37
  550. package/dist/build-spk/native-payload.js +0 -679
  551. package/dist/native/load.d.ts +0 -8
  552. package/dist/native/load.js +0 -11
  553. package/dist/native/types.d.ts +0 -28
  554. package/dist/native/types.js +0 -3
  555. package/dist/native/validate.d.ts +0 -6
  556. package/dist/native/validate.js +0 -143
  557. package/dist/standalone/authorization-window.d.ts +0 -2
  558. package/dist/standalone/authorization-window.js +0 -28
  559. package/dist/standalone/authorization.d.ts +0 -48
  560. package/dist/standalone/authorization.js +0 -116
  561. package/dist/standalone/helper-inventory.d.ts +0 -31
  562. package/dist/standalone/helper-inventory.js +0 -11
  563. package/dist/standalone/helper.d.ts +0 -22
  564. package/dist/standalone/helper.js +0 -123
  565. package/dist/standalone/inspect-helper.d.ts +0 -6
  566. package/dist/standalone/inspect-helper.js +0 -103
  567. package/dist/standalone/job-diagnostics.d.ts +0 -1
  568. package/dist/standalone/job-diagnostics.js +0 -49
  569. package/dist/standalone/lifecycle-helper.d.ts +0 -2
  570. package/dist/standalone/lifecycle-helper.js +0 -12
  571. package/dist/standalone/native-layout.d.ts +0 -74
  572. package/dist/standalone/native-layout.js +0 -318
  573. package/dist/standalone/root-messages.d.ts +0 -7
  574. package/dist/standalone/root-messages.js +0 -259
  575. package/dist/standalone/worker-contract-json.d.ts +0 -8
  576. package/dist/standalone/worker-contract-json.js +0 -141
  577. package/dist/standalone/worker-contract.d.ts +0 -189
  578. package/dist/standalone/worker-contract.js +0 -175
  579. package/dist/standalone/worker-registry.d.ts +0 -40
  580. package/dist/standalone/worker-registry.js +0 -167
  581. package/dist/templates/_authorization/main.go +0 -104
  582. package/dist/templates/_authorization/main_test.go +0 -35
  583. package/dist/templates/_shared/notice-overrides/index.json +0 -14
  584. package/dist/templates/_shared/notice-overrides/utils-0.4.2-LICENSE +0 -21
  585. package/dist/templates/_shared/notice-overrides/utils-0.5.0-LICENSE +0 -21
  586. package/dist/templates/binary/native.yaml +0 -16
  587. package/dist/templates/binary/synology-app.yaml +0 -7
  588. package/dist/templates/compose-import/compose.yaml +0 -10
  589. package/dist/templates/compose-import/synology-app.yaml +0 -15
  590. package/dist/templates/native-go/backend/cmd/app/sdk_main.go +0 -62
  591. package/dist/templates/native-go/backend/cmd/dsm-readonly-probe/main_linux.go +0 -46
  592. package/dist/templates/native-go/backend/cmd/helper/main.go +0 -64
  593. package/dist/templates/native-go/backend/cmd/helper/sdk_registry.go +0 -19
  594. package/dist/templates/native-go/backend/internal/api/binary.go +0 -154
  595. package/dist/templates/native-go/backend/internal/api/binary_test.go +0 -165
  596. package/dist/templates/native-go/backend/internal/app/authorization_none.go +0 -5
  597. package/dist/templates/native-go/backend/internal/app/integration_state.go +0 -16
  598. package/dist/templates/native-go/backend/internal/app/nas_cgi_artifact_test.go +0 -129
  599. package/dist/templates/native-go/backend/internal/app/nas_refusal_test.go +0 -46
  600. package/dist/templates/native-go/backend/internal/app/sdk_jobs.go +0 -70
  601. package/dist/templates/native-go/backend/internal/app/sdk_jobs_test.go +0 -116
  602. package/dist/templates/native-go/backend/internal/app/sdk_routes.go +0 -177
  603. package/dist/templates/native-go/backend/internal/dsmprobe/collector_linux.go +0 -335
  604. package/dist/templates/native-go/backend/internal/dsmprobe/collector_linux_test.go +0 -41
  605. package/dist/templates/native-go/backend/internal/dsmprobe/protocol.go +0 -179
  606. package/dist/templates/native-go/backend/internal/dsmprobe/protocol_test.go +0 -29
  607. package/dist/templates/native-go/backend/internal/filestation/repository.go +0 -207
  608. package/dist/templates/native-go/backend/internal/filestation/repository_test.go +0 -104
  609. package/dist/templates/native-go/backend/internal/filestation/sdk_session.go +0 -241
  610. package/dist/templates/native-go/backend/internal/filestation/sdk_session_test.go +0 -183
  611. package/dist/templates/native-go/backend/internal/filestation/session_semantics_test.go +0 -383
  612. package/dist/templates/native-go/backend/internal/helper/background_proof.go +0 -163
  613. package/dist/templates/native-go/backend/internal/helper/background_proof_contract.go +0 -46
  614. package/dist/templates/native-go/backend/internal/helper/background_proof_test.go +0 -161
  615. package/dist/templates/native-go/backend/internal/helper/cohort.go +0 -393
  616. package/dist/templates/native-go/backend/internal/helper/cohort_publication.go +0 -18
  617. package/dist/templates/native-go/backend/internal/helper/cohort_publication_test.go +0 -105
  618. package/dist/templates/native-go/backend/internal/helper/cohort_test.go +0 -372
  619. package/dist/templates/native-go/backend/internal/helper/control.go +0 -424
  620. package/dist/templates/native-go/backend/internal/helper/control_test.go +0 -250
  621. package/dist/templates/native-go/backend/internal/helper/data_contract.go +0 -245
  622. package/dist/templates/native-go/backend/internal/helper/data_contract_test.go +0 -51
  623. package/dist/templates/native-go/backend/internal/helper/data_decode.go +0 -184
  624. package/dist/templates/native-go/backend/internal/helper/data_decode_pointer_test.go +0 -30
  625. package/dist/templates/native-go/backend/internal/helper/data_protocol.go +0 -419
  626. package/dist/templates/native-go/backend/internal/helper/data_protocol_test.go +0 -449
  627. package/dist/templates/native-go/backend/internal/helper/dsm_acl_linux.go +0 -139
  628. package/dist/templates/native-go/backend/internal/helper/dsm_acl_linux_test.go +0 -121
  629. package/dist/templates/native-go/backend/internal/helper/dsm_acl_syscall_linux.go +0 -95
  630. package/dist/templates/native-go/backend/internal/helper/dsm_acl_syscall_linux_test.go +0 -56
  631. package/dist/templates/native-go/backend/internal/helper/dsm_bridge_linux.go +0 -144
  632. package/dist/templates/native-go/backend/internal/helper/dsm_bridge_linux_test.go +0 -89
  633. package/dist/templates/native-go/backend/internal/helper/dsm_home_linux.go +0 -107
  634. package/dist/templates/native-go/backend/internal/helper/dsm_home_linux_test.go +0 -82
  635. package/dist/templates/native-go/backend/internal/helper/dsm_probe_transport_linux.go +0 -151
  636. package/dist/templates/native-go/backend/internal/helper/dsm_probe_transport_linux_test.go +0 -66
  637. package/dist/templates/native-go/backend/internal/helper/grant_authority.go +0 -519
  638. package/dist/templates/native-go/backend/internal/helper/grant_authority_contract.go +0 -88
  639. package/dist/templates/native-go/backend/internal/helper/grant_authority_test.go +0 -510
  640. package/dist/templates/native-go/backend/internal/helper/grant_cohort.go +0 -389
  641. package/dist/templates/native-go/backend/internal/helper/grant_cohort_test.go +0 -239
  642. package/dist/templates/native-go/backend/internal/helper/grant_delivery.go +0 -49
  643. package/dist/templates/native-go/backend/internal/helper/grant_delivery_methods.go +0 -273
  644. package/dist/templates/native-go/backend/internal/helper/grant_delivery_test.go +0 -322
  645. package/dist/templates/native-go/backend/internal/helper/grant_operation_contract.go +0 -47
  646. package/dist/templates/native-go/backend/internal/helper/grant_readonly_test.go +0 -180
  647. package/dist/templates/native-go/backend/internal/helper/grant_repository_linux.go +0 -416
  648. package/dist/templates/native-go/backend/internal/helper/grant_repository_linux_test.go +0 -469
  649. package/dist/templates/native-go/backend/internal/helper/grant_rpc.go +0 -147
  650. package/dist/templates/native-go/backend/internal/helper/grant_rpc_test.go +0 -51
  651. package/dist/templates/native-go/backend/internal/helper/grant_snapshot.go +0 -78
  652. package/dist/templates/native-go/backend/internal/helper/grant_supervisor_linux.go +0 -134
  653. package/dist/templates/native-go/backend/internal/helper/grant_supervisor_linux_test.go +0 -254
  654. package/dist/templates/native-go/backend/internal/helper/jobcontract/bindings.go +0 -48
  655. package/dist/templates/native-go/backend/internal/helper/jobcontract/contract_test.go +0 -436
  656. package/dist/templates/native-go/backend/internal/helper/jobcontract/decode.go +0 -185
  657. package/dist/templates/native-go/backend/internal/helper/jobcontract/digest.go +0 -55
  658. package/dist/templates/native-go/backend/internal/helper/jobcontract/registry.go +0 -85
  659. package/dist/templates/native-go/backend/internal/helper/jobcontract/registry_test.go +0 -73
  660. package/dist/templates/native-go/backend/internal/helper/jobcontract/result.go +0 -53
  661. package/dist/templates/native-go/backend/internal/helper/jobcontract/stub.go +0 -8
  662. package/dist/templates/native-go/backend/internal/helper/jobcontract/testdata/input-digests.json +0 -127
  663. package/dist/templates/native-go/backend/internal/helper/jobcontract/types.go +0 -234
  664. package/dist/templates/native-go/backend/internal/helper/jobcontract/types_test.go +0 -29
  665. package/dist/templates/native-go/backend/internal/helper/jobcontract/validate.go +0 -462
  666. package/dist/templates/native-go/backend/internal/helper/lease.go +0 -112
  667. package/dist/templates/native-go/backend/internal/helper/lease_linux.go +0 -44
  668. package/dist/templates/native-go/backend/internal/helper/lease_other.go +0 -8
  669. package/dist/templates/native-go/backend/internal/helper/legacy_authority_schema_linux_test.go +0 -34
  670. package/dist/templates/native-go/backend/internal/helper/legacy_authority_schema_test.go +0 -6
  671. package/dist/templates/native-go/backend/internal/helper/lifecycle.go +0 -234
  672. package/dist/templates/native-go/backend/internal/helper/lifecycle_test.go +0 -473
  673. package/dist/templates/native-go/backend/internal/helper/managed_pilot.go +0 -284
  674. package/dist/templates/native-go/backend/internal/helper/managed_pilot_repository_linux.go +0 -74
  675. package/dist/templates/native-go/backend/internal/helper/managed_pilot_repository_linux_test.go +0 -40
  676. package/dist/templates/native-go/backend/internal/helper/managed_pilot_test.go +0 -210
  677. package/dist/templates/native-go/backend/internal/helper/management.go +0 -86
  678. package/dist/templates/native-go/backend/internal/helper/nas_shipped_refusal_linux_test.go +0 -97
  679. package/dist/templates/native-go/backend/internal/helper/native_discovery.go +0 -79
  680. package/dist/templates/native-go/backend/internal/helper/native_identity.go +0 -89
  681. package/dist/templates/native-go/backend/internal/helper/native_provider.go +0 -159
  682. package/dist/templates/native-go/backend/internal/helper/native_provider_test.go +0 -421
  683. package/dist/templates/native-go/backend/internal/helper/observation.go +0 -244
  684. package/dist/templates/native-go/backend/internal/helper/observation_health_test.go +0 -127
  685. package/dist/templates/native-go/backend/internal/helper/observation_reload_budget_test.go +0 -117
  686. package/dist/templates/native-go/backend/internal/helper/observation_test.go +0 -196
  687. package/dist/templates/native-go/backend/internal/helper/observer_diagnostic.go +0 -155
  688. package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_linux.go +0 -76
  689. package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_linux_test.go +0 -130
  690. package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_test.go +0 -98
  691. package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_writer.go +0 -40
  692. package/dist/templates/native-go/backend/internal/helper/operation_bootstrap_linux.go +0 -193
  693. package/dist/templates/native-go/backend/internal/helper/operation_credentials_linux.go +0 -56
  694. package/dist/templates/native-go/backend/internal/helper/operation_linux.go +0 -480
  695. package/dist/templates/native-go/backend/internal/helper/operation_linux_test.go +0 -528
  696. package/dist/templates/native-go/backend/internal/helper/peer_linux.go +0 -44
  697. package/dist/templates/native-go/backend/internal/helper/peer_other.go +0 -7
  698. package/dist/templates/native-go/backend/internal/helper/process_linux.go +0 -180
  699. package/dist/templates/native-go/backend/internal/helper/process_other.go +0 -5
  700. package/dist/templates/native-go/backend/internal/helper/publication_test.go +0 -178
  701. package/dist/templates/native-go/backend/internal/helper/purge.go +0 -115
  702. package/dist/templates/native-go/backend/internal/helper/purge_test.go +0 -59
  703. package/dist/templates/native-go/backend/internal/helper/query_deadline_linux_test.go +0 -115
  704. package/dist/templates/native-go/backend/internal/helper/query_pending_diagnostic_test.go +0 -254
  705. package/dist/templates/native-go/backend/internal/helper/read_stream_cohort_linux_test.go +0 -156
  706. package/dist/templates/native-go/backend/internal/helper/read_transfer.go +0 -40
  707. package/dist/templates/native-go/backend/internal/helper/read_transfer_linux.go +0 -109
  708. package/dist/templates/native-go/backend/internal/helper/read_transfer_linux_test.go +0 -118
  709. package/dist/templates/native-go/backend/internal/helper/read_transfer_test.go +0 -177
  710. package/dist/templates/native-go/backend/internal/helper/readonly.go +0 -105
  711. package/dist/templates/native-go/backend/internal/helper/readonly_admission.go +0 -85
  712. package/dist/templates/native-go/backend/internal/helper/readonly_cohort_linux_test.go +0 -253
  713. package/dist/templates/native-go/backend/internal/helper/readonly_linux_test.go +0 -378
  714. package/dist/templates/native-go/backend/internal/helper/readonly_mount_linux.go +0 -65
  715. package/dist/templates/native-go/backend/internal/helper/readonly_mount_proxy_linux.go +0 -113
  716. package/dist/templates/native-go/backend/internal/helper/readonly_operations_linux.go +0 -168
  717. package/dist/templates/native-go/backend/internal/helper/readonly_resolver_linux.go +0 -241
  718. package/dist/templates/native-go/backend/internal/helper/readonly_test.go +0 -40
  719. package/dist/templates/native-go/backend/internal/helper/relaxed_identity.go +0 -252
  720. package/dist/templates/native-go/backend/internal/helper/relaxed_identity_contract.go +0 -105
  721. package/dist/templates/native-go/backend/internal/helper/relaxed_identity_test.go +0 -406
  722. package/dist/templates/native-go/backend/internal/helper/relaxed_invalidation.go +0 -203
  723. package/dist/templates/native-go/backend/internal/helper/repair.go +0 -132
  724. package/dist/templates/native-go/backend/internal/helper/repair_test.go +0 -271
  725. package/dist/templates/native-go/backend/internal/helper/revoke.go +0 -109
  726. package/dist/templates/native-go/backend/internal/helper/revoke_test.go +0 -121
  727. package/dist/templates/native-go/backend/internal/helper/s1r_actor_acl_linux_test.go +0 -303
  728. package/dist/templates/native-go/backend/internal/helper/s1r_actor_fixture_linux_test.go +0 -184
  729. package/dist/templates/native-go/backend/internal/helper/s1r_actor_races_linux_test.go +0 -250
  730. package/dist/templates/native-go/backend/internal/helper/s1r_fixture_contract_linux_test.go +0 -18
  731. package/dist/templates/native-go/backend/internal/helper/sdk_assembly_linux.go +0 -51
  732. package/dist/templates/native-go/backend/internal/helper/sdk_attach.go +0 -83
  733. package/dist/templates/native-go/backend/internal/helper/sdk_attach_contract.go +0 -32
  734. package/dist/templates/native-go/backend/internal/helper/sdk_attach_test.go +0 -184
  735. package/dist/templates/native-go/backend/internal/helper/sdk_authority_schema_test.go +0 -6
  736. package/dist/templates/native-go/backend/internal/helper/sdk_background_authority.go +0 -832
  737. package/dist/templates/native-go/backend/internal/helper/sdk_background_authority_test.go +0 -714
  738. package/dist/templates/native-go/backend/internal/helper/sdk_background_invalidation.go +0 -218
  739. package/dist/templates/native-go/backend/internal/helper/sdk_background_lease.go +0 -218
  740. package/dist/templates/native-go/backend/internal/helper/sdk_background_snapshot.go +0 -110
  741. package/dist/templates/native-go/backend/internal/helper/sdk_background_store_linux_test.go +0 -261
  742. package/dist/templates/native-go/backend/internal/helper/sdk_background_store_test.go +0 -58
  743. package/dist/templates/native-go/backend/internal/helper/sdk_bindings.go +0 -60
  744. package/dist/templates/native-go/backend/internal/helper/sdk_data_contract.go +0 -251
  745. package/dist/templates/native-go/backend/internal/helper/sdk_data_protocol.go +0 -424
  746. package/dist/templates/native-go/backend/internal/helper/sdk_dispatch_absence_test.go +0 -51
  747. package/dist/templates/native-go/backend/internal/helper/sdk_display.go +0 -488
  748. package/dist/templates/native-go/backend/internal/helper/sdk_display_contract.go +0 -121
  749. package/dist/templates/native-go/backend/internal/helper/sdk_display_test.go +0 -459
  750. package/dist/templates/native-go/backend/internal/helper/sdk_grant_authority.go +0 -559
  751. package/dist/templates/native-go/backend/internal/helper/sdk_grant_repository_linux.go +0 -417
  752. package/dist/templates/native-go/backend/internal/helper/sdk_grant_snapshot.go +0 -94
  753. package/dist/templates/native-go/backend/internal/helper/sdk_history.go +0 -80
  754. package/dist/templates/native-go/backend/internal/helper/sdk_history_test.go +0 -76
  755. package/dist/templates/native-go/backend/internal/helper/sdk_job.go +0 -697
  756. package/dist/templates/native-go/backend/internal/helper/sdk_job_child_linux.go +0 -309
  757. package/dist/templates/native-go/backend/internal/helper/sdk_job_contract.go +0 -122
  758. package/dist/templates/native-go/backend/internal/helper/sdk_job_linux_test.go +0 -159
  759. package/dist/templates/native-go/backend/internal/helper/sdk_job_process_linux.go +0 -327
  760. package/dist/templates/native-go/backend/internal/helper/sdk_job_test.go +0 -501
  761. package/dist/templates/native-go/backend/internal/helper/sdk_job_vm_linux_test.go +0 -343
  762. package/dist/templates/native-go/backend/internal/helper/sdk_journal.go +0 -77
  763. package/dist/templates/native-go/backend/internal/helper/sdk_journal_linux.go +0 -244
  764. package/dist/templates/native-go/backend/internal/helper/sdk_journal_linux_test.go +0 -295
  765. package/dist/templates/native-go/backend/internal/helper/sdk_journal_test.go +0 -71
  766. package/dist/templates/native-go/backend/internal/helper/sdk_picker_test.go +0 -50
  767. package/dist/templates/native-go/backend/internal/helper/sdk_process_linux.go +0 -184
  768. package/dist/templates/native-go/backend/internal/helper/sdk_public_vm_linux_test.go +0 -129
  769. package/dist/templates/native-go/backend/internal/helper/sdk_relaxed_invalidation.go +0 -242
  770. package/dist/templates/native-go/backend/internal/helper/sdk_rpc.go +0 -299
  771. package/dist/templates/native-go/backend/internal/helper/sdk_rpc_contract.go +0 -70
  772. package/dist/templates/native-go/backend/internal/helper/sdk_rpc_test.go +0 -135
  773. package/dist/templates/native-go/backend/internal/helper/sdk_server_linux.go +0 -161
  774. package/dist/templates/native-go/backend/internal/helper/sdk_session.go +0 -677
  775. package/dist/templates/native-go/backend/internal/helper/sdk_session_contract.go +0 -72
  776. package/dist/templates/native-go/backend/internal/helper/sdk_session_fence_test.go +0 -215
  777. package/dist/templates/native-go/backend/internal/helper/sdk_session_test.go +0 -475
  778. package/dist/templates/native-go/backend/internal/helper/sdk_supervisor_frame.go +0 -78
  779. package/dist/templates/native-go/backend/internal/helper/sdk_supervisor_linux.go +0 -414
  780. package/dist/templates/native-go/backend/internal/helper/sdk_transport.go +0 -79
  781. package/dist/templates/native-go/backend/internal/helper/sdk_transport_linux.go +0 -82
  782. package/dist/templates/native-go/backend/internal/helper/sdk_transport_test.go +0 -64
  783. package/dist/templates/native-go/backend/internal/helper/server_linux.go +0 -136
  784. package/dist/templates/native-go/backend/internal/helper/stale_management_linux_test.go +0 -126
  785. package/dist/templates/native-go/backend/internal/helper/stale_management_test.go +0 -122
  786. package/dist/templates/native-go/backend/internal/helper/startup_diagnostic.go +0 -68
  787. package/dist/templates/native-go/backend/internal/helper/startup_diagnostic_linux_test.go +0 -126
  788. package/dist/templates/native-go/backend/internal/helper/startup_diagnostic_test.go +0 -117
  789. package/dist/templates/native-go/backend/internal/helper/status.go +0 -343
  790. package/dist/templates/native-go/backend/internal/helper/status_test.go +0 -333
  791. package/dist/templates/native-go/backend/internal/helper/supervision.go +0 -107
  792. package/dist/templates/native-go/backend/internal/helper/supervision_test.go +0 -124
  793. package/dist/templates/native-go/backend/internal/helper/supervisor_frame.go +0 -79
  794. package/dist/templates/native-go/backend/internal/helper/supervisor_frame_linux_test.go +0 -69
  795. package/dist/templates/native-go/backend/internal/helper/supervisor_frame_test.go +0 -107
  796. package/dist/templates/native-go/backend/internal/helper/supervisor_linux.go +0 -367
  797. package/dist/templates/native-go/backend/internal/helper/supervisor_linux_test.go +0 -913
  798. package/dist/templates/native-go/backend/internal/helper/supervisor_socket_eof_test.go +0 -74
  799. package/dist/templates/native-go/backend/internal/helper/supervisor_socket_test.go +0 -45
  800. package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/create.json +0 -23
  801. package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/frames.json +0 -67
  802. package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/grant-store.json +0 -52
  803. package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/intent.json +0 -20
  804. package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/list.json +0 -20
  805. package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/publish.json +0 -20
  806. package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/read.json +0 -22
  807. package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/stat.json +0 -22
  808. package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/write-stream.json +0 -22
  809. package/dist/templates/native-go/backend/internal/helper/unit_connection.go +0 -75
  810. package/dist/templates/native-go/backend/internal/helper/unit_connection_linux_test.go +0 -135
  811. package/dist/templates/native-go/backend/internal/helper/unit_connection_test.go +0 -151
  812. package/dist/templates/native-go/backend/internal/helper/unit_frame_test.go +0 -32
  813. package/dist/templates/native-go/backend/internal/helper/unit_linux.go +0 -368
  814. package/dist/templates/native-go/backend/internal/helper/unit_linux_test.go +0 -46
  815. package/dist/templates/native-go/backend/internal/helper/unit_mechanisms_linux_test.go +0 -217
  816. package/dist/templates/native-go/backend/internal/helper/unit_padding_linux_test.go +0 -178
  817. package/dist/templates/native-go/backend/internal/helper/unit_query_linux.go +0 -115
  818. package/dist/templates/native-go/backend/internal/helper/unit_reload_linux_test.go +0 -372
  819. package/dist/templates/native-go/backend/internal/helper/unit_reload_sequence_linux_test.go +0 -232
  820. package/dist/templates/native-go/backend/internal/helper/write.go +0 -77
  821. package/dist/templates/native-go/backend/internal/helper/write_admission.go +0 -260
  822. package/dist/templates/native-go/backend/internal/helper/write_admission_test.go +0 -135
  823. package/dist/templates/native-go/backend/internal/helper/write_cohort_linux_test.go +0 -218
  824. package/dist/templates/native-go/backend/internal/helper/write_files_linux.go +0 -205
  825. package/dist/templates/native-go/backend/internal/helper/write_files_linux_test.go +0 -225
  826. package/dist/templates/native-go/backend/internal/helper/write_intent_linux.go +0 -116
  827. package/dist/templates/native-go/backend/internal/helper/write_intent_linux_test.go +0 -74
  828. package/dist/templates/native-go/backend/internal/helper/write_operation_linux.go +0 -245
  829. package/dist/templates/native-go/backend/internal/helper/write_test.go +0 -53
  830. package/dist/templates/native-go-authorization/backend/internal/app/authorization.go +0 -298
  831. package/dist/templates/native-go-authorization/backend/internal/app/authorization_test.go +0 -96
  832. package/dist/templates/native-go-authorization/frontend/src/authorization/AuthorizationGate.vue +0 -89
  833. package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/de.json +0 -36
  834. package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/en.json +0 -36
  835. package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/es.json +0 -36
  836. package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/fr.json +0 -36
  837. package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/index.ts +0 -15
  838. package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/it.json +0 -36
  839. package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/ja.json +0 -36
  840. package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/ko.json +0 -36
  841. package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/zh-CN.json +0 -36
  842. package/dist/templates/native-go-authorization/frontend/src/authorization/i18n/zh-TW.json +0 -36
  843. package/dist/templates/native-go-authorization/frontend/test/authorization-preview.html +0 -14
  844. package/dist/templates/native-go-authorization/frontend/test/authorization.test.ts +0 -59
  845. package/dist/templates/native-go-background/BACKGROUND.md +0 -111
  846. package/dist/templates/native-go-background/backend/internal/app/background_routes_test.go +0 -32
  847. package/dist/templates/native-go-background/frontend/src/background/BackgroundPanel.vue +0 -178
  848. package/dist/templates/native-go-background/frontend/src/background/i18n/de.json +0 -83
  849. package/dist/templates/native-go-background/frontend/src/background/i18n/en.json +0 -83
  850. package/dist/templates/native-go-background/frontend/src/background/i18n/es.json +0 -83
  851. package/dist/templates/native-go-background/frontend/src/background/i18n/fr.json +0 -83
  852. package/dist/templates/native-go-background/frontend/src/background/i18n/it.json +0 -83
  853. package/dist/templates/native-go-background/frontend/src/background/i18n/ja.json +0 -83
  854. package/dist/templates/native-go-background/frontend/src/background/i18n/ko.json +0 -83
  855. package/dist/templates/native-go-background/frontend/src/background/i18n/zh-CN.json +0 -83
  856. package/dist/templates/native-go-background/frontend/src/background/i18n/zh-TW.json +0 -83
  857. package/dist/templates/native-go-background/frontend/src/background/picker-provider.ts +0 -13
  858. package/dist/templates/native-go-background/frontend/test/background.test.ts +0 -179
  859. package/dist/templates/native-go-better-auth/backend/internal/app/identity.go +0 -208
  860. package/dist/templates/native-go-better-auth/backend/internal/app/identity_test.go +0 -113
  861. package/dist/templates/native-go-better-auth/node/app.mjs +0 -72
  862. package/dist/templates/native-go-better-auth/node/build.mjs +0 -4
  863. package/dist/templates/native-go-better-auth/node/package-lock.json +0 -862
  864. package/dist/templates/native-go-better-auth/node/package.json +0 -1
  865. package/dist/templates/native-go-better-auth/node/test/auth.test.mjs +0 -31
  866. package/dist/templates/native-go-integration/backend/internal/app/identity_none.go +0 -6
  867. package/dist/templates/native-go-integration/backend/internal/app/personal.go +0 -203
  868. package/dist/templates/native-go-integration/backend/internal/app/personal_test.go +0 -156
  869. package/dist/templates/native-go-root/backend/internal/app/root.go +0 -107
  870. package/dist/templates/native-go-root/backend/internal/app/root_test.go +0 -124
  871. package/dist/templates/native-go-root/root/whoami.sh +0 -6
  872. package/dist/templates/native-go-vue/frontend/README-JOBS.md +0 -75
  873. package/dist/templates/native-go-vue/frontend/README-M2.md +0 -64
  874. package/dist/templates/native-go-vue/frontend/src/M2App.vue +0 -57
  875. package/dist/templates/native-go-vue/frontend/src/SDKApp.vue +0 -203
  876. package/dist/templates/native-go-vue/frontend/src/jobs/InteractiveJobForm.vue +0 -70
  877. package/dist/templates/native-go-vue/frontend/src/jobs/JobsAdminPanel.vue +0 -33
  878. package/dist/templates/native-go-vue/frontend/src/jobs/JobsPanel.vue +0 -135
  879. package/dist/templates/native-go-vue/frontend/src/jobs/connected-provider.ts +0 -179
  880. package/dist/templates/native-go-vue/frontend/src/jobs/i18n/de.json +0 -62
  881. package/dist/templates/native-go-vue/frontend/src/jobs/i18n/en.json +0 -62
  882. package/dist/templates/native-go-vue/frontend/src/jobs/i18n/es.json +0 -62
  883. package/dist/templates/native-go-vue/frontend/src/jobs/i18n/fr.json +0 -62
  884. package/dist/templates/native-go-vue/frontend/src/jobs/i18n/it.json +0 -62
  885. package/dist/templates/native-go-vue/frontend/src/jobs/i18n/ja.json +0 -62
  886. package/dist/templates/native-go-vue/frontend/src/jobs/i18n/ko.json +0 -62
  887. package/dist/templates/native-go-vue/frontend/src/jobs/i18n/zh-CN.json +0 -62
  888. package/dist/templates/native-go-vue/frontend/src/jobs/i18n/zh-TW.json +0 -62
  889. package/dist/templates/native-go-vue/frontend/src/jobs/i18n.ts +0 -15
  890. package/dist/templates/native-go-vue/frontend/src/jobs/mock-provider.ts +0 -67
  891. package/dist/templates/native-go-vue/frontend/src/jobs/provider.ts +0 -60
  892. package/dist/templates/native-go-vue/frontend/src/jobs/validate.ts +0 -44
  893. package/dist/templates/native-go-vue/frontend/src/m2-main.ts +0 -21
  894. package/dist/templates/native-go-vue/frontend/src/m2-style.css +0 -7
  895. package/dist/templates/native-go-vue/frontend/src/nas/M2Files.vue +0 -94
  896. package/dist/templates/native-go-vue/frontend/src/nas/M2PathPicker.vue +0 -70
  897. package/dist/templates/native-go-vue/frontend/src/nas/M2Settings.vue +0 -69
  898. package/dist/templates/native-go-vue/frontend/src/nas/NasGrantSettings.vue +0 -74
  899. package/dist/templates/native-go-vue/frontend/src/nas/NasPathPicker.vue +0 -106
  900. package/dist/templates/native-go-vue/frontend/src/nas/NasUnavailable.vue +0 -20
  901. package/dist/templates/native-go-vue/frontend/src/nas/i18n/de.json +0 -74
  902. package/dist/templates/native-go-vue/frontend/src/nas/i18n/en.json +0 -74
  903. package/dist/templates/native-go-vue/frontend/src/nas/i18n/es.json +0 -74
  904. package/dist/templates/native-go-vue/frontend/src/nas/i18n/fr.json +0 -74
  905. package/dist/templates/native-go-vue/frontend/src/nas/i18n/it.json +0 -74
  906. package/dist/templates/native-go-vue/frontend/src/nas/i18n/ja.json +0 -74
  907. package/dist/templates/native-go-vue/frontend/src/nas/i18n/ko.json +0 -74
  908. package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/de.json +0 -56
  909. package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/en.json +0 -56
  910. package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/es.json +0 -56
  911. package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/fr.json +0 -56
  912. package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/it.json +0 -56
  913. package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/ja.json +0 -56
  914. package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/ko.json +0 -56
  915. package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/zh-CN.json +0 -56
  916. package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/zh-TW.json +0 -56
  917. package/dist/templates/native-go-vue/frontend/src/nas/i18n/zh-CN.json +0 -74
  918. package/dist/templates/native-go-vue/frontend/src/nas/i18n/zh-TW.json +0 -74
  919. package/dist/templates/native-go-vue/frontend/src/nas/m2-contract.ts +0 -33
  920. package/dist/templates/native-go-vue/frontend/src/nas/m2-i18n.ts +0 -24
  921. package/dist/templates/native-go-vue/frontend/src/nas/m2-provider.ts +0 -104
  922. package/dist/templates/native-go-vue/frontend/src/nas/mock-provider.ts +0 -119
  923. package/dist/templates/native-go-vue/frontend/src/nas/use-m2-request.ts +0 -18
  924. package/dist/templates/native-go-vue/frontend/src/sdk-main.ts +0 -39
  925. package/dist/templates/native-go-vue/frontend/test/jobs-connected.test.ts +0 -163
  926. package/dist/templates/native-go-vue/frontend/test/jobs-preview.html +0 -22
  927. package/dist/templates/native-go-vue/frontend/test/jobs.test.ts +0 -176
  928. package/dist/templates/native-go-vue/frontend/test/m2-preview.html +0 -27
  929. package/dist/templates/native-go-vue/frontend/test/m2-provider.test.ts +0 -87
  930. package/dist/templates/native-go-vue/frontend/test/m2-ui.test.ts +0 -209
  931. package/dist/templates/native-go-vue/frontend/test/nas-provider.test.ts +0 -81
  932. package/dist/templates/native-go-vue/frontend/test/nas-request.test.ts +0 -21
  933. package/dist/templates/native-go-vue/frontend/test/nas-ui.test.ts +0 -261
  934. package/dist/templates/native-go-vue/frontend/test/picker-wire.test.ts +0 -110
  935. package/dist/templates/native-go-vue/frontend/test/shell-preview.html +0 -19
  936. package/dist/templates/native-go-vue/frontend/test/shell-sdk.test.ts +0 -73
  937. package/templates/_authorization/main.go +0 -104
  938. package/templates/_authorization/main_test.go +0 -35
  939. package/templates/_shared/notice-overrides/index.json +0 -14
  940. package/templates/_shared/notice-overrides/utils-0.4.2-LICENSE +0 -21
  941. package/templates/_shared/notice-overrides/utils-0.5.0-LICENSE +0 -21
  942. package/templates/binary/native.yaml +0 -16
  943. package/templates/binary/synology-app.yaml +0 -7
  944. package/templates/compose-import/compose.yaml +0 -10
  945. package/templates/compose-import/synology-app.yaml +0 -15
  946. package/templates/native-go/backend/cmd/app/sdk_main.go +0 -62
  947. package/templates/native-go/backend/cmd/dsm-readonly-probe/main_linux.go +0 -46
  948. package/templates/native-go/backend/cmd/helper/main.go +0 -64
  949. package/templates/native-go/backend/cmd/helper/sdk_registry.go +0 -19
  950. package/templates/native-go/backend/internal/api/binary.go +0 -154
  951. package/templates/native-go/backend/internal/api/binary_test.go +0 -165
  952. package/templates/native-go/backend/internal/app/authorization_none.go +0 -5
  953. package/templates/native-go/backend/internal/app/integration_state.go +0 -16
  954. package/templates/native-go/backend/internal/app/nas_cgi_artifact_test.go +0 -129
  955. package/templates/native-go/backend/internal/app/nas_refusal_test.go +0 -46
  956. package/templates/native-go/backend/internal/app/sdk_jobs.go +0 -70
  957. package/templates/native-go/backend/internal/app/sdk_jobs_test.go +0 -116
  958. package/templates/native-go/backend/internal/app/sdk_routes.go +0 -177
  959. package/templates/native-go/backend/internal/dsmprobe/collector_linux.go +0 -335
  960. package/templates/native-go/backend/internal/dsmprobe/collector_linux_test.go +0 -41
  961. package/templates/native-go/backend/internal/dsmprobe/protocol.go +0 -179
  962. package/templates/native-go/backend/internal/dsmprobe/protocol_test.go +0 -29
  963. package/templates/native-go/backend/internal/filestation/repository.go +0 -207
  964. package/templates/native-go/backend/internal/filestation/repository_test.go +0 -104
  965. package/templates/native-go/backend/internal/filestation/sdk_session.go +0 -241
  966. package/templates/native-go/backend/internal/filestation/sdk_session_test.go +0 -183
  967. package/templates/native-go/backend/internal/filestation/session_semantics_test.go +0 -383
  968. package/templates/native-go/backend/internal/helper/background_proof.go +0 -163
  969. package/templates/native-go/backend/internal/helper/background_proof_contract.go +0 -46
  970. package/templates/native-go/backend/internal/helper/background_proof_test.go +0 -161
  971. package/templates/native-go/backend/internal/helper/cohort.go +0 -393
  972. package/templates/native-go/backend/internal/helper/cohort_publication.go +0 -18
  973. package/templates/native-go/backend/internal/helper/cohort_publication_test.go +0 -105
  974. package/templates/native-go/backend/internal/helper/cohort_test.go +0 -372
  975. package/templates/native-go/backend/internal/helper/control.go +0 -424
  976. package/templates/native-go/backend/internal/helper/control_test.go +0 -250
  977. package/templates/native-go/backend/internal/helper/data_contract.go +0 -245
  978. package/templates/native-go/backend/internal/helper/data_contract_test.go +0 -51
  979. package/templates/native-go/backend/internal/helper/data_decode.go +0 -184
  980. package/templates/native-go/backend/internal/helper/data_decode_pointer_test.go +0 -30
  981. package/templates/native-go/backend/internal/helper/data_protocol.go +0 -419
  982. package/templates/native-go/backend/internal/helper/data_protocol_test.go +0 -449
  983. package/templates/native-go/backend/internal/helper/dsm_acl_linux.go +0 -139
  984. package/templates/native-go/backend/internal/helper/dsm_acl_linux_test.go +0 -121
  985. package/templates/native-go/backend/internal/helper/dsm_acl_syscall_linux.go +0 -95
  986. package/templates/native-go/backend/internal/helper/dsm_acl_syscall_linux_test.go +0 -56
  987. package/templates/native-go/backend/internal/helper/dsm_bridge_linux.go +0 -144
  988. package/templates/native-go/backend/internal/helper/dsm_bridge_linux_test.go +0 -89
  989. package/templates/native-go/backend/internal/helper/dsm_home_linux.go +0 -107
  990. package/templates/native-go/backend/internal/helper/dsm_home_linux_test.go +0 -82
  991. package/templates/native-go/backend/internal/helper/dsm_probe_transport_linux.go +0 -151
  992. package/templates/native-go/backend/internal/helper/dsm_probe_transport_linux_test.go +0 -66
  993. package/templates/native-go/backend/internal/helper/grant_authority.go +0 -519
  994. package/templates/native-go/backend/internal/helper/grant_authority_contract.go +0 -88
  995. package/templates/native-go/backend/internal/helper/grant_authority_test.go +0 -510
  996. package/templates/native-go/backend/internal/helper/grant_cohort.go +0 -389
  997. package/templates/native-go/backend/internal/helper/grant_cohort_test.go +0 -239
  998. package/templates/native-go/backend/internal/helper/grant_delivery.go +0 -49
  999. package/templates/native-go/backend/internal/helper/grant_delivery_methods.go +0 -273
  1000. package/templates/native-go/backend/internal/helper/grant_delivery_test.go +0 -322
  1001. package/templates/native-go/backend/internal/helper/grant_operation_contract.go +0 -47
  1002. package/templates/native-go/backend/internal/helper/grant_readonly_test.go +0 -180
  1003. package/templates/native-go/backend/internal/helper/grant_repository_linux.go +0 -416
  1004. package/templates/native-go/backend/internal/helper/grant_repository_linux_test.go +0 -469
  1005. package/templates/native-go/backend/internal/helper/grant_rpc.go +0 -147
  1006. package/templates/native-go/backend/internal/helper/grant_rpc_test.go +0 -51
  1007. package/templates/native-go/backend/internal/helper/grant_snapshot.go +0 -78
  1008. package/templates/native-go/backend/internal/helper/grant_supervisor_linux.go +0 -134
  1009. package/templates/native-go/backend/internal/helper/grant_supervisor_linux_test.go +0 -254
  1010. package/templates/native-go/backend/internal/helper/jobcontract/bindings.go +0 -48
  1011. package/templates/native-go/backend/internal/helper/jobcontract/contract_test.go +0 -436
  1012. package/templates/native-go/backend/internal/helper/jobcontract/decode.go +0 -185
  1013. package/templates/native-go/backend/internal/helper/jobcontract/digest.go +0 -55
  1014. package/templates/native-go/backend/internal/helper/jobcontract/registry.go +0 -85
  1015. package/templates/native-go/backend/internal/helper/jobcontract/registry_test.go +0 -73
  1016. package/templates/native-go/backend/internal/helper/jobcontract/result.go +0 -53
  1017. package/templates/native-go/backend/internal/helper/jobcontract/stub.go +0 -8
  1018. package/templates/native-go/backend/internal/helper/jobcontract/testdata/input-digests.json +0 -127
  1019. package/templates/native-go/backend/internal/helper/jobcontract/types.go +0 -234
  1020. package/templates/native-go/backend/internal/helper/jobcontract/types_test.go +0 -29
  1021. package/templates/native-go/backend/internal/helper/jobcontract/validate.go +0 -462
  1022. package/templates/native-go/backend/internal/helper/lease.go +0 -112
  1023. package/templates/native-go/backend/internal/helper/lease_linux.go +0 -44
  1024. package/templates/native-go/backend/internal/helper/lease_other.go +0 -8
  1025. package/templates/native-go/backend/internal/helper/legacy_authority_schema_linux_test.go +0 -34
  1026. package/templates/native-go/backend/internal/helper/legacy_authority_schema_test.go +0 -6
  1027. package/templates/native-go/backend/internal/helper/lifecycle.go +0 -234
  1028. package/templates/native-go/backend/internal/helper/lifecycle_test.go +0 -473
  1029. package/templates/native-go/backend/internal/helper/managed_pilot.go +0 -284
  1030. package/templates/native-go/backend/internal/helper/managed_pilot_repository_linux.go +0 -74
  1031. package/templates/native-go/backend/internal/helper/managed_pilot_repository_linux_test.go +0 -40
  1032. package/templates/native-go/backend/internal/helper/managed_pilot_test.go +0 -210
  1033. package/templates/native-go/backend/internal/helper/management.go +0 -86
  1034. package/templates/native-go/backend/internal/helper/nas_shipped_refusal_linux_test.go +0 -97
  1035. package/templates/native-go/backend/internal/helper/native_discovery.go +0 -79
  1036. package/templates/native-go/backend/internal/helper/native_identity.go +0 -89
  1037. package/templates/native-go/backend/internal/helper/native_provider.go +0 -159
  1038. package/templates/native-go/backend/internal/helper/native_provider_test.go +0 -421
  1039. package/templates/native-go/backend/internal/helper/observation.go +0 -244
  1040. package/templates/native-go/backend/internal/helper/observation_health_test.go +0 -127
  1041. package/templates/native-go/backend/internal/helper/observation_reload_budget_test.go +0 -117
  1042. package/templates/native-go/backend/internal/helper/observation_test.go +0 -196
  1043. package/templates/native-go/backend/internal/helper/observer_diagnostic.go +0 -155
  1044. package/templates/native-go/backend/internal/helper/observer_diagnostic_linux.go +0 -76
  1045. package/templates/native-go/backend/internal/helper/observer_diagnostic_linux_test.go +0 -130
  1046. package/templates/native-go/backend/internal/helper/observer_diagnostic_test.go +0 -98
  1047. package/templates/native-go/backend/internal/helper/observer_diagnostic_writer.go +0 -40
  1048. package/templates/native-go/backend/internal/helper/operation_bootstrap_linux.go +0 -193
  1049. package/templates/native-go/backend/internal/helper/operation_credentials_linux.go +0 -56
  1050. package/templates/native-go/backend/internal/helper/operation_linux.go +0 -480
  1051. package/templates/native-go/backend/internal/helper/operation_linux_test.go +0 -528
  1052. package/templates/native-go/backend/internal/helper/peer_linux.go +0 -44
  1053. package/templates/native-go/backend/internal/helper/peer_other.go +0 -7
  1054. package/templates/native-go/backend/internal/helper/process_linux.go +0 -180
  1055. package/templates/native-go/backend/internal/helper/process_other.go +0 -5
  1056. package/templates/native-go/backend/internal/helper/publication_test.go +0 -178
  1057. package/templates/native-go/backend/internal/helper/purge.go +0 -115
  1058. package/templates/native-go/backend/internal/helper/purge_test.go +0 -59
  1059. package/templates/native-go/backend/internal/helper/query_deadline_linux_test.go +0 -115
  1060. package/templates/native-go/backend/internal/helper/query_pending_diagnostic_test.go +0 -254
  1061. package/templates/native-go/backend/internal/helper/read_stream_cohort_linux_test.go +0 -156
  1062. package/templates/native-go/backend/internal/helper/read_transfer.go +0 -40
  1063. package/templates/native-go/backend/internal/helper/read_transfer_linux.go +0 -109
  1064. package/templates/native-go/backend/internal/helper/read_transfer_linux_test.go +0 -118
  1065. package/templates/native-go/backend/internal/helper/read_transfer_test.go +0 -177
  1066. package/templates/native-go/backend/internal/helper/readonly.go +0 -105
  1067. package/templates/native-go/backend/internal/helper/readonly_admission.go +0 -85
  1068. package/templates/native-go/backend/internal/helper/readonly_cohort_linux_test.go +0 -253
  1069. package/templates/native-go/backend/internal/helper/readonly_linux_test.go +0 -378
  1070. package/templates/native-go/backend/internal/helper/readonly_mount_linux.go +0 -65
  1071. package/templates/native-go/backend/internal/helper/readonly_mount_proxy_linux.go +0 -113
  1072. package/templates/native-go/backend/internal/helper/readonly_operations_linux.go +0 -168
  1073. package/templates/native-go/backend/internal/helper/readonly_resolver_linux.go +0 -241
  1074. package/templates/native-go/backend/internal/helper/readonly_test.go +0 -40
  1075. package/templates/native-go/backend/internal/helper/relaxed_identity.go +0 -252
  1076. package/templates/native-go/backend/internal/helper/relaxed_identity_contract.go +0 -105
  1077. package/templates/native-go/backend/internal/helper/relaxed_identity_test.go +0 -406
  1078. package/templates/native-go/backend/internal/helper/relaxed_invalidation.go +0 -203
  1079. package/templates/native-go/backend/internal/helper/repair.go +0 -132
  1080. package/templates/native-go/backend/internal/helper/repair_test.go +0 -271
  1081. package/templates/native-go/backend/internal/helper/revoke.go +0 -109
  1082. package/templates/native-go/backend/internal/helper/revoke_test.go +0 -121
  1083. package/templates/native-go/backend/internal/helper/s1r_actor_acl_linux_test.go +0 -303
  1084. package/templates/native-go/backend/internal/helper/s1r_actor_fixture_linux_test.go +0 -184
  1085. package/templates/native-go/backend/internal/helper/s1r_actor_races_linux_test.go +0 -250
  1086. package/templates/native-go/backend/internal/helper/s1r_fixture_contract_linux_test.go +0 -18
  1087. package/templates/native-go/backend/internal/helper/sdk_assembly_linux.go +0 -51
  1088. package/templates/native-go/backend/internal/helper/sdk_attach.go +0 -83
  1089. package/templates/native-go/backend/internal/helper/sdk_attach_contract.go +0 -32
  1090. package/templates/native-go/backend/internal/helper/sdk_attach_test.go +0 -184
  1091. package/templates/native-go/backend/internal/helper/sdk_authority_schema_test.go +0 -6
  1092. package/templates/native-go/backend/internal/helper/sdk_background_authority.go +0 -832
  1093. package/templates/native-go/backend/internal/helper/sdk_background_authority_test.go +0 -714
  1094. package/templates/native-go/backend/internal/helper/sdk_background_invalidation.go +0 -218
  1095. package/templates/native-go/backend/internal/helper/sdk_background_lease.go +0 -218
  1096. package/templates/native-go/backend/internal/helper/sdk_background_snapshot.go +0 -110
  1097. package/templates/native-go/backend/internal/helper/sdk_background_store_linux_test.go +0 -261
  1098. package/templates/native-go/backend/internal/helper/sdk_background_store_test.go +0 -58
  1099. package/templates/native-go/backend/internal/helper/sdk_bindings.go +0 -60
  1100. package/templates/native-go/backend/internal/helper/sdk_data_contract.go +0 -251
  1101. package/templates/native-go/backend/internal/helper/sdk_data_protocol.go +0 -424
  1102. package/templates/native-go/backend/internal/helper/sdk_dispatch_absence_test.go +0 -51
  1103. package/templates/native-go/backend/internal/helper/sdk_display.go +0 -488
  1104. package/templates/native-go/backend/internal/helper/sdk_display_contract.go +0 -121
  1105. package/templates/native-go/backend/internal/helper/sdk_display_test.go +0 -459
  1106. package/templates/native-go/backend/internal/helper/sdk_grant_authority.go +0 -559
  1107. package/templates/native-go/backend/internal/helper/sdk_grant_repository_linux.go +0 -417
  1108. package/templates/native-go/backend/internal/helper/sdk_grant_snapshot.go +0 -94
  1109. package/templates/native-go/backend/internal/helper/sdk_history.go +0 -80
  1110. package/templates/native-go/backend/internal/helper/sdk_history_test.go +0 -76
  1111. package/templates/native-go/backend/internal/helper/sdk_job.go +0 -697
  1112. package/templates/native-go/backend/internal/helper/sdk_job_child_linux.go +0 -309
  1113. package/templates/native-go/backend/internal/helper/sdk_job_contract.go +0 -122
  1114. package/templates/native-go/backend/internal/helper/sdk_job_linux_test.go +0 -159
  1115. package/templates/native-go/backend/internal/helper/sdk_job_process_linux.go +0 -327
  1116. package/templates/native-go/backend/internal/helper/sdk_job_test.go +0 -501
  1117. package/templates/native-go/backend/internal/helper/sdk_job_vm_linux_test.go +0 -343
  1118. package/templates/native-go/backend/internal/helper/sdk_journal.go +0 -77
  1119. package/templates/native-go/backend/internal/helper/sdk_journal_linux.go +0 -244
  1120. package/templates/native-go/backend/internal/helper/sdk_journal_linux_test.go +0 -295
  1121. package/templates/native-go/backend/internal/helper/sdk_journal_test.go +0 -71
  1122. package/templates/native-go/backend/internal/helper/sdk_picker_test.go +0 -50
  1123. package/templates/native-go/backend/internal/helper/sdk_process_linux.go +0 -184
  1124. package/templates/native-go/backend/internal/helper/sdk_public_vm_linux_test.go +0 -129
  1125. package/templates/native-go/backend/internal/helper/sdk_relaxed_invalidation.go +0 -242
  1126. package/templates/native-go/backend/internal/helper/sdk_rpc.go +0 -299
  1127. package/templates/native-go/backend/internal/helper/sdk_rpc_contract.go +0 -70
  1128. package/templates/native-go/backend/internal/helper/sdk_rpc_test.go +0 -135
  1129. package/templates/native-go/backend/internal/helper/sdk_server_linux.go +0 -161
  1130. package/templates/native-go/backend/internal/helper/sdk_session.go +0 -677
  1131. package/templates/native-go/backend/internal/helper/sdk_session_contract.go +0 -72
  1132. package/templates/native-go/backend/internal/helper/sdk_session_fence_test.go +0 -215
  1133. package/templates/native-go/backend/internal/helper/sdk_session_test.go +0 -475
  1134. package/templates/native-go/backend/internal/helper/sdk_supervisor_frame.go +0 -78
  1135. package/templates/native-go/backend/internal/helper/sdk_supervisor_linux.go +0 -414
  1136. package/templates/native-go/backend/internal/helper/sdk_transport.go +0 -79
  1137. package/templates/native-go/backend/internal/helper/sdk_transport_linux.go +0 -82
  1138. package/templates/native-go/backend/internal/helper/sdk_transport_test.go +0 -64
  1139. package/templates/native-go/backend/internal/helper/server_linux.go +0 -136
  1140. package/templates/native-go/backend/internal/helper/stale_management_linux_test.go +0 -126
  1141. package/templates/native-go/backend/internal/helper/stale_management_test.go +0 -122
  1142. package/templates/native-go/backend/internal/helper/startup_diagnostic.go +0 -68
  1143. package/templates/native-go/backend/internal/helper/startup_diagnostic_linux_test.go +0 -126
  1144. package/templates/native-go/backend/internal/helper/startup_diagnostic_test.go +0 -117
  1145. package/templates/native-go/backend/internal/helper/status.go +0 -343
  1146. package/templates/native-go/backend/internal/helper/status_test.go +0 -333
  1147. package/templates/native-go/backend/internal/helper/supervision.go +0 -107
  1148. package/templates/native-go/backend/internal/helper/supervision_test.go +0 -124
  1149. package/templates/native-go/backend/internal/helper/supervisor_frame.go +0 -79
  1150. package/templates/native-go/backend/internal/helper/supervisor_frame_linux_test.go +0 -69
  1151. package/templates/native-go/backend/internal/helper/supervisor_frame_test.go +0 -107
  1152. package/templates/native-go/backend/internal/helper/supervisor_linux.go +0 -367
  1153. package/templates/native-go/backend/internal/helper/supervisor_linux_test.go +0 -913
  1154. package/templates/native-go/backend/internal/helper/supervisor_socket_eof_test.go +0 -74
  1155. package/templates/native-go/backend/internal/helper/supervisor_socket_test.go +0 -45
  1156. package/templates/native-go/backend/internal/helper/testdata/protocol2/create.json +0 -23
  1157. package/templates/native-go/backend/internal/helper/testdata/protocol2/frames.json +0 -67
  1158. package/templates/native-go/backend/internal/helper/testdata/protocol2/grant-store.json +0 -52
  1159. package/templates/native-go/backend/internal/helper/testdata/protocol2/intent.json +0 -20
  1160. package/templates/native-go/backend/internal/helper/testdata/protocol2/list.json +0 -20
  1161. package/templates/native-go/backend/internal/helper/testdata/protocol2/publish.json +0 -20
  1162. package/templates/native-go/backend/internal/helper/testdata/protocol2/read.json +0 -22
  1163. package/templates/native-go/backend/internal/helper/testdata/protocol2/stat.json +0 -22
  1164. package/templates/native-go/backend/internal/helper/testdata/protocol2/write-stream.json +0 -22
  1165. package/templates/native-go/backend/internal/helper/unit_connection.go +0 -75
  1166. package/templates/native-go/backend/internal/helper/unit_connection_linux_test.go +0 -135
  1167. package/templates/native-go/backend/internal/helper/unit_connection_test.go +0 -151
  1168. package/templates/native-go/backend/internal/helper/unit_frame_test.go +0 -32
  1169. package/templates/native-go/backend/internal/helper/unit_linux.go +0 -368
  1170. package/templates/native-go/backend/internal/helper/unit_linux_test.go +0 -46
  1171. package/templates/native-go/backend/internal/helper/unit_mechanisms_linux_test.go +0 -217
  1172. package/templates/native-go/backend/internal/helper/unit_padding_linux_test.go +0 -178
  1173. package/templates/native-go/backend/internal/helper/unit_query_linux.go +0 -115
  1174. package/templates/native-go/backend/internal/helper/unit_reload_linux_test.go +0 -372
  1175. package/templates/native-go/backend/internal/helper/unit_reload_sequence_linux_test.go +0 -232
  1176. package/templates/native-go/backend/internal/helper/write.go +0 -77
  1177. package/templates/native-go/backend/internal/helper/write_admission.go +0 -260
  1178. package/templates/native-go/backend/internal/helper/write_admission_test.go +0 -135
  1179. package/templates/native-go/backend/internal/helper/write_cohort_linux_test.go +0 -218
  1180. package/templates/native-go/backend/internal/helper/write_files_linux.go +0 -205
  1181. package/templates/native-go/backend/internal/helper/write_files_linux_test.go +0 -225
  1182. package/templates/native-go/backend/internal/helper/write_intent_linux.go +0 -116
  1183. package/templates/native-go/backend/internal/helper/write_intent_linux_test.go +0 -74
  1184. package/templates/native-go/backend/internal/helper/write_operation_linux.go +0 -245
  1185. package/templates/native-go/backend/internal/helper/write_test.go +0 -53
  1186. package/templates/native-go-authorization/backend/internal/app/authorization.go +0 -298
  1187. package/templates/native-go-authorization/backend/internal/app/authorization_test.go +0 -96
  1188. package/templates/native-go-authorization/frontend/src/authorization/AuthorizationGate.vue +0 -89
  1189. package/templates/native-go-authorization/frontend/src/authorization/i18n/de.json +0 -36
  1190. package/templates/native-go-authorization/frontend/src/authorization/i18n/en.json +0 -36
  1191. package/templates/native-go-authorization/frontend/src/authorization/i18n/es.json +0 -36
  1192. package/templates/native-go-authorization/frontend/src/authorization/i18n/fr.json +0 -36
  1193. package/templates/native-go-authorization/frontend/src/authorization/i18n/index.ts +0 -15
  1194. package/templates/native-go-authorization/frontend/src/authorization/i18n/it.json +0 -36
  1195. package/templates/native-go-authorization/frontend/src/authorization/i18n/ja.json +0 -36
  1196. package/templates/native-go-authorization/frontend/src/authorization/i18n/ko.json +0 -36
  1197. package/templates/native-go-authorization/frontend/src/authorization/i18n/zh-CN.json +0 -36
  1198. package/templates/native-go-authorization/frontend/src/authorization/i18n/zh-TW.json +0 -36
  1199. package/templates/native-go-authorization/frontend/test/authorization-preview.html +0 -14
  1200. package/templates/native-go-authorization/frontend/test/authorization.test.ts +0 -59
  1201. package/templates/native-go-background/BACKGROUND.md +0 -111
  1202. package/templates/native-go-background/backend/internal/app/background_routes_test.go +0 -32
  1203. package/templates/native-go-background/frontend/src/background/BackgroundPanel.vue +0 -178
  1204. package/templates/native-go-background/frontend/src/background/i18n/de.json +0 -83
  1205. package/templates/native-go-background/frontend/src/background/i18n/en.json +0 -83
  1206. package/templates/native-go-background/frontend/src/background/i18n/es.json +0 -83
  1207. package/templates/native-go-background/frontend/src/background/i18n/fr.json +0 -83
  1208. package/templates/native-go-background/frontend/src/background/i18n/it.json +0 -83
  1209. package/templates/native-go-background/frontend/src/background/i18n/ja.json +0 -83
  1210. package/templates/native-go-background/frontend/src/background/i18n/ko.json +0 -83
  1211. package/templates/native-go-background/frontend/src/background/i18n/zh-CN.json +0 -83
  1212. package/templates/native-go-background/frontend/src/background/i18n/zh-TW.json +0 -83
  1213. package/templates/native-go-background/frontend/src/background/picker-provider.ts +0 -13
  1214. package/templates/native-go-background/frontend/test/background.test.ts +0 -179
  1215. package/templates/native-go-better-auth/backend/internal/app/identity.go +0 -208
  1216. package/templates/native-go-better-auth/backend/internal/app/identity_test.go +0 -113
  1217. package/templates/native-go-better-auth/node/app.mjs +0 -72
  1218. package/templates/native-go-better-auth/node/build.mjs +0 -4
  1219. package/templates/native-go-better-auth/node/package-lock.json +0 -862
  1220. package/templates/native-go-better-auth/node/package.json +0 -1
  1221. package/templates/native-go-better-auth/node/test/auth.test.mjs +0 -31
  1222. package/templates/native-go-integration/backend/internal/app/identity_none.go +0 -6
  1223. package/templates/native-go-integration/backend/internal/app/personal.go +0 -203
  1224. package/templates/native-go-integration/backend/internal/app/personal_test.go +0 -156
  1225. package/templates/native-go-root/backend/internal/app/root.go +0 -107
  1226. package/templates/native-go-root/backend/internal/app/root_test.go +0 -124
  1227. package/templates/native-go-root/root/whoami.sh +0 -6
  1228. package/templates/native-go-vue/frontend/README-JOBS.md +0 -75
  1229. package/templates/native-go-vue/frontend/README-M2.md +0 -64
  1230. package/templates/native-go-vue/frontend/src/M2App.vue +0 -57
  1231. package/templates/native-go-vue/frontend/src/SDKApp.vue +0 -203
  1232. package/templates/native-go-vue/frontend/src/jobs/InteractiveJobForm.vue +0 -70
  1233. package/templates/native-go-vue/frontend/src/jobs/JobsAdminPanel.vue +0 -33
  1234. package/templates/native-go-vue/frontend/src/jobs/JobsPanel.vue +0 -135
  1235. package/templates/native-go-vue/frontend/src/jobs/connected-provider.ts +0 -179
  1236. package/templates/native-go-vue/frontend/src/jobs/i18n/de.json +0 -62
  1237. package/templates/native-go-vue/frontend/src/jobs/i18n/en.json +0 -62
  1238. package/templates/native-go-vue/frontend/src/jobs/i18n/es.json +0 -62
  1239. package/templates/native-go-vue/frontend/src/jobs/i18n/fr.json +0 -62
  1240. package/templates/native-go-vue/frontend/src/jobs/i18n/it.json +0 -62
  1241. package/templates/native-go-vue/frontend/src/jobs/i18n/ja.json +0 -62
  1242. package/templates/native-go-vue/frontend/src/jobs/i18n/ko.json +0 -62
  1243. package/templates/native-go-vue/frontend/src/jobs/i18n/zh-CN.json +0 -62
  1244. package/templates/native-go-vue/frontend/src/jobs/i18n/zh-TW.json +0 -62
  1245. package/templates/native-go-vue/frontend/src/jobs/i18n.ts +0 -15
  1246. package/templates/native-go-vue/frontend/src/jobs/mock-provider.ts +0 -67
  1247. package/templates/native-go-vue/frontend/src/jobs/provider.ts +0 -60
  1248. package/templates/native-go-vue/frontend/src/jobs/validate.ts +0 -44
  1249. package/templates/native-go-vue/frontend/src/m2-main.ts +0 -21
  1250. package/templates/native-go-vue/frontend/src/m2-style.css +0 -7
  1251. package/templates/native-go-vue/frontend/src/nas/M2Files.vue +0 -94
  1252. package/templates/native-go-vue/frontend/src/nas/M2PathPicker.vue +0 -70
  1253. package/templates/native-go-vue/frontend/src/nas/M2Settings.vue +0 -69
  1254. package/templates/native-go-vue/frontend/src/nas/NasGrantSettings.vue +0 -74
  1255. package/templates/native-go-vue/frontend/src/nas/NasPathPicker.vue +0 -106
  1256. package/templates/native-go-vue/frontend/src/nas/NasUnavailable.vue +0 -20
  1257. package/templates/native-go-vue/frontend/src/nas/i18n/de.json +0 -74
  1258. package/templates/native-go-vue/frontend/src/nas/i18n/en.json +0 -74
  1259. package/templates/native-go-vue/frontend/src/nas/i18n/es.json +0 -74
  1260. package/templates/native-go-vue/frontend/src/nas/i18n/fr.json +0 -74
  1261. package/templates/native-go-vue/frontend/src/nas/i18n/it.json +0 -74
  1262. package/templates/native-go-vue/frontend/src/nas/i18n/ja.json +0 -74
  1263. package/templates/native-go-vue/frontend/src/nas/i18n/ko.json +0 -74
  1264. package/templates/native-go-vue/frontend/src/nas/i18n/m2/de.json +0 -56
  1265. package/templates/native-go-vue/frontend/src/nas/i18n/m2/en.json +0 -56
  1266. package/templates/native-go-vue/frontend/src/nas/i18n/m2/es.json +0 -56
  1267. package/templates/native-go-vue/frontend/src/nas/i18n/m2/fr.json +0 -56
  1268. package/templates/native-go-vue/frontend/src/nas/i18n/m2/it.json +0 -56
  1269. package/templates/native-go-vue/frontend/src/nas/i18n/m2/ja.json +0 -56
  1270. package/templates/native-go-vue/frontend/src/nas/i18n/m2/ko.json +0 -56
  1271. package/templates/native-go-vue/frontend/src/nas/i18n/m2/zh-CN.json +0 -56
  1272. package/templates/native-go-vue/frontend/src/nas/i18n/m2/zh-TW.json +0 -56
  1273. package/templates/native-go-vue/frontend/src/nas/i18n/zh-CN.json +0 -74
  1274. package/templates/native-go-vue/frontend/src/nas/i18n/zh-TW.json +0 -74
  1275. package/templates/native-go-vue/frontend/src/nas/m2-contract.ts +0 -33
  1276. package/templates/native-go-vue/frontend/src/nas/m2-i18n.ts +0 -24
  1277. package/templates/native-go-vue/frontend/src/nas/m2-provider.ts +0 -104
  1278. package/templates/native-go-vue/frontend/src/nas/mock-provider.ts +0 -119
  1279. package/templates/native-go-vue/frontend/src/nas/use-m2-request.ts +0 -18
  1280. package/templates/native-go-vue/frontend/src/sdk-main.ts +0 -39
  1281. package/templates/native-go-vue/frontend/test/jobs-connected.test.ts +0 -163
  1282. package/templates/native-go-vue/frontend/test/jobs-preview.html +0 -22
  1283. package/templates/native-go-vue/frontend/test/jobs.test.ts +0 -176
  1284. package/templates/native-go-vue/frontend/test/m2-preview.html +0 -27
  1285. package/templates/native-go-vue/frontend/test/m2-provider.test.ts +0 -87
  1286. package/templates/native-go-vue/frontend/test/m2-ui.test.ts +0 -209
  1287. package/templates/native-go-vue/frontend/test/nas-provider.test.ts +0 -81
  1288. package/templates/native-go-vue/frontend/test/nas-request.test.ts +0 -21
  1289. package/templates/native-go-vue/frontend/test/nas-ui.test.ts +0 -261
  1290. package/templates/native-go-vue/frontend/test/picker-wire.test.ts +0 -110
  1291. package/templates/native-go-vue/frontend/test/shell-preview.html +0 -19
  1292. package/templates/native-go-vue/frontend/test/shell-sdk.test.ts +0 -73
  1293. /package/dist/templates/{hello-files → compose}/compose.yaml +0 -0
  1294. /package/dist/templates/{hello-files → compose}/synology-app.yaml +0 -0
  1295. /package/dist/templates/{native-go-background → native-go-jobs}/backend/internal/app/background_on.go +0 -0
  1296. /package/dist/templates/{native-go-background → native-go-jobs}/frontend/src/background/i18n.ts +0 -0
  1297. /package/templates/{hello-files → compose}/compose.yaml +0 -0
  1298. /package/templates/{hello-files → compose}/synology-app.yaml +0 -0
  1299. /package/templates/{native-go-background → native-go-jobs}/backend/internal/app/background_on.go +0 -0
  1300. /package/templates/{native-go-background → native-go-jobs}/frontend/src/background/i18n.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import { createHash } from "node:crypto";
2
- import { chmodSync, copyFileSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, realpathSync, rmSync, writeFileSync, } from "node:fs";
2
+ import { chmodSync, copyFileSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync, } from "node:fs";
3
3
  import { tmpdir } from "node:os";
4
- import { dirname, join, relative, isAbsolute } from "node:path";
4
+ import { dirname, join } from "node:path";
5
5
  import { infoArchValue } from "../build-spk/dsm-arch.js";
6
6
  import { writeDsmWindowIcons, writePackageCenterIcons } from "../build-spk/dsm-icons.js";
7
7
  import { renderNativePrivilege } from "../build-spk/native-lifecycle.js";
@@ -12,13 +12,12 @@ import { createReproducibleTar } from "../build-spk/reproducible-archive.js";
12
12
  import { renderStandaloneScript } from "./lifecycle.js";
13
13
  import { DSM_LANGS, LOCALES } from "./i18n.js";
14
14
  import { CGI_PAYLOAD_PATH, renderUiConfig, renderWindowScript, windowScriptName } from "./dsm-window.js";
15
- import { hasHelper, inertWorkerRegistry } from "./helper-inventory.js";
16
15
  import { copyStandaloneNotices } from "../build-spk/notices.js";
17
16
  import { hostScriptName, renderHostAdapterScript } from "./host-adapter.js";
18
17
  import { copyDaemonPayload } from "./daemon.js";
19
18
  import { BACKGROUND_UNIT_DIR, BACKGROUND_WORKER_PAYLOAD, backgroundUnitName, renderBackgroundUnit } from "./background.js";
20
19
  import { renderStandaloneResource } from "./resource.js";
21
- import { authorizationPlan } from "./authorization.js";
20
+ import { executorPlan } from "../runtime/executor-build.js";
22
21
  import { renderSharedFolderUpgradeWizardFiles, sharedFolderInstallSteps } from "./shared-folder.js";
23
22
  const FILE_MODE = 0o644;
24
23
  const EXEC_MODE = 0o755;
@@ -42,14 +41,14 @@ export class StandaloneBuildError extends Error {
42
41
  /**
43
42
  * Packs an unsigned Standalone Package SPK. DSM runs installation/lifecycle
44
43
  * as the package account, including an optional foreground daemon. Root
45
- * integration remains separate and requires explicit administrator approval.
44
+ * authorization remains separate and requires explicit administrator approval.
46
45
  */
47
46
  export async function assembleStandaloneSpk(options) {
48
47
  const { manifest } = options;
49
48
  const staging = mkdtempSync(join(tmpdir(), "syno-standalone-spk-"));
50
49
  try {
51
- if (manifest.privilege === "root" && !options.authorization)
52
- throw new StandaloneBuildError("AUTHORIZATION_PIN_REQUIRED", "root package requires pinned authorization bootstrap");
50
+ if ((manifest.capabilities.rootOps || manifest.capabilities.delegate) && !options.executor)
51
+ throw new StandaloneBuildError("EXECUTOR_PIN_REQUIRED", "Executor artifact required.");
53
52
  const uiRoot = join(staging, "package", "ui");
54
53
  const appDir = join(uiRoot, "app");
55
54
  copyUiTree(manifest.ui.dir, appDir);
@@ -67,7 +66,7 @@ export async function assembleStandaloneSpk(options) {
67
66
  throw new StandaloneBuildError("STANDALONE_DAEMON_ARTIFACT_REQUIRED", "daemon controller artifact required.");
68
67
  copyDaemonPayload(manifest, options.arch, join(staging, "package", "daemon"), options.daemonControl);
69
68
  }
70
- if (manifest.background) {
69
+ if (manifest.capabilities.jobs) {
71
70
  if (!options.backgroundWorker)
72
71
  throw new StandaloneBuildError("STANDALONE_BACKGROUND_ARTIFACT_REQUIRED", "background worker artifact required.");
73
72
  const worker = join(staging, "package", BACKGROUND_WORKER_PAYLOAD);
@@ -75,54 +74,33 @@ export async function assembleStandaloneSpk(options) {
75
74
  copyFileSync(options.backgroundWorker, worker);
76
75
  chmodSync(worker, EXEC_MODE);
77
76
  }
78
- if (hasHelper(manifest) && !options.helper)
79
- throw new StandaloneBuildError("HELPER_ARTIFACT_REQUIRED", "integration SPK 缺少已建置的 helper inventory。");
80
- if (options.helper) {
81
- const dir = join(staging, "package", "integration");
82
- mkdirSync(dir, { recursive: true });
83
- copyFileSync(options.helper.binary, join(dir, "helper"));
84
- copyFileSync(new URL("../../templates/native-go/backend/THIRD_PARTY_NOTICES.txt", import.meta.url), join(dir, "THIRD_PARTY_NOTICES.txt"));
85
- chmodSync(join(dir, "helper"), EXEC_MODE);
86
- writeFile(join(dir, "inventory.json"), JSON.stringify(options.helper.inventory));
87
- writeFile(join(dir, "workers.json"), options.helper.registry ?? inertWorkerRegistry(options.helper.workers));
88
- mkdirSync(join(dir, "workers"));
89
- for (const worker of options.helper.workers) {
90
- writeFileSync(join(dir, "workers", worker.id), worker.bytes, { mode: FILE_MODE });
91
- }
92
- }
93
- if (manifest.integration?.identity === "better-auth") {
94
- const source = join(manifest.root, "node", "dist", "app.mjs");
95
- const rel = relative(realpathSync(manifest.root), realpathSync(source));
96
- if (rel.startsWith("..") || isAbsolute(rel) || !lstatSync(source).isFile() || lstatSync(source).size > 16 * 1024 * 1024)
97
- throw new StandaloneBuildError("STANDALONE_IDENTITY_PAYLOAD_INVALID", "Better Auth bundle must be a bounded regular file inside the project.");
98
- const target = join(staging, "package", "integration", "identity", "app.mjs");
99
- mkdirSync(dirname(target), { recursive: true });
100
- copyFileSync(source, target);
101
- chmodSync(target, FILE_MODE);
102
- }
103
- copyStandaloneNotices(manifest.root, manifest.ui.dir, join(staging, 'package'), manifest.backend.kind === 'go' || Boolean(manifest.daemon), Boolean(options.helper), manifest.integration?.identity === 'better-auth', manifest.backend.kind === 'go' ? manifest.backend.dir : undefined);
77
+ copyStandaloneNotices(manifest.root, manifest.ui.dir, join(staging, 'package'), manifest.backend.kind === 'go' || Boolean(manifest.daemon), manifest.backend.kind === 'go' ? manifest.backend.dir : undefined);
104
78
  if (manifest.daemon)
105
79
  copyFileSync(new URL('../../templates/_shared/LICENSES/TEMPLATE.txt', import.meta.url), join(staging, 'package', 'LICENSES', 'DAEMON-LICENSE.txt'));
106
- if (manifest.privilege === "root") {
107
- if (!options.authorization || !/^[a-f0-9]{64}$/.test(options.authorization.bootstrapSha256))
108
- throw new StandaloneBuildError("AUTHORIZATION_PIN_REQUIRED", "root package requires pinned authorization bootstrap");
109
- const authDir = join(staging, "package", "authorization");
110
- mkdirSync(authDir);
111
- copyFileSync(options.authorization.binary, join(authDir, "bootstrap"));
112
- chmodSync(join(authDir, "bootstrap"), EXEC_MODE);
113
- writeFile(join(authDir, "manifest.json"), JSON.stringify(authorizationPlan(options.authorization, manifest)));
80
+ if (options.executor) {
81
+ const executorDir = join(staging, "package", "executor");
82
+ mkdirSync(executorDir);
83
+ copyFileSync(options.executor.binary, join(executorDir, "executor"));
84
+ chmodSync(join(executorDir, "executor"), EXEC_MODE);
85
+ copyFileSync(options.executor.lifecycleBinary, join(executorDir, "lifecycle"));
86
+ chmodSync(join(executorDir, "lifecycle"), EXEC_MODE);
87
+ writeFile(join(executorDir, "policy.json"), options.executor.policyText);
88
+ writeFile(join(executorDir, "setup.json"), JSON.stringify(executorPlan(options.executor)));
89
+ for (const op of manifest.rootOps ?? [])
90
+ writeFile(join(staging, "package", "root", op.name + ".sh"), op.body);
114
91
  }
115
92
  const packageTgz = join(staging, "package.tgz");
116
93
  await createReproducibleTar(join(staging, "package"), packageTgz, { gzip: true });
117
94
  rmSync(join(staging, "package"), { recursive: true, force: true });
118
95
  const checksum = createHash("md5").update(readFileSync(packageTgz)).digest("hex");
96
+ writeFile(join(staging, "sdk-package.json"), JSON.stringify({ schema: 2, backend: manifest.backend.kind, capabilities: Object.keys(manifest.capabilities).sort() }));
119
97
  writeFile(join(staging, "INFO"), renderInfo(manifest, options.arch, checksum));
120
98
  mkdirSync(join(staging, "conf"));
121
99
  writeFile(join(staging, "conf", "privilege"), renderNativePrivilege());
122
100
  const resource = renderStandaloneResource(manifest);
123
101
  if (resource)
124
102
  writeFile(join(staging, "conf", "resource"), resource);
125
- if (manifest.background) {
103
+ if (manifest.capabilities.jobs) {
126
104
  mkdirSync(join(staging, BACKGROUND_UNIT_DIR), { recursive: true });
127
105
  writeFile(join(staging, BACKGROUND_UNIT_DIR, backgroundUnitName(manifest.package)), renderBackgroundUnit(manifest.package));
128
106
  }
@@ -136,7 +114,7 @@ export async function assembleStandaloneSpk(options) {
136
114
  ...install.static,
137
115
  ...install.dynamic,
138
116
  ...(folder ? renderSharedFolderUpgradeWizardFiles(manifest.package, folder) : {}),
139
- ...renderUninstallWizardFiles(manifest.package, "native", { integration: hasHelper(manifest) }),
117
+ ...renderUninstallWizardFiles(manifest.package, "native", { executor: Boolean(options.executor) }),
140
118
  });
141
119
  writePackageCenterIcons(staging);
142
120
  mkdirSync(dirname(options.outputPath), { recursive: true });
@@ -147,6 +125,7 @@ export async function assembleStandaloneSpk(options) {
147
125
  }
148
126
  }
149
127
  function writeFile(path, content, mode = FILE_MODE) {
128
+ mkdirSync(dirname(path), { recursive: true });
150
129
  writeFileSync(path, content, "utf8");
151
130
  chmodSync(path, mode);
152
131
  }
@@ -169,12 +148,8 @@ function renderInfo(manifest, arch, checksum) {
169
148
  ["startable", "yes"],
170
149
  ["checksum", checksum],
171
150
  ];
172
- if (manifest.privilege === "root")
173
- fields.push(["sdk_root_authorization", "2"]);
174
- if (hasHelper(manifest) || manifest.daemon)
151
+ if (manifest.daemon)
175
152
  fields.push(["precheckstartstop", "yes"]);
176
- if (manifest.integration?.identity === "better-auth")
177
- fields.push(["install_dep_packages", "Node.js_v22"]);
178
153
  for (const locale of LOCALES) {
179
154
  const text = manifest.i18n?.info[locale];
180
155
  if (text?.displayname)
@@ -0,0 +1,204 @@
1
+ # Protected executor
2
+
3
+ Standalone, standard-library-only Go module. Build with `CGO_ENABLED=0 GOOS=linux
4
+ GOARCH=amd64|arm64 go build -trimpath -o executor .`. No network listener: the
5
+ package account uses `/run/synopkgland/<package>/executor.sock` (one JSON line,
6
+ including newline at most 65536 bytes). Socket access additionally requires exact
7
+ Linux SO_PEERCRED UID equality, even for another member of the package group.
8
+ Non-Linux builds support portable tests and refuse privileged service operations.
9
+
10
+ ## Protected inventory and policy
11
+
12
+ Setup must copy the digest-pinned executor, policy and root scripts into:
13
+
14
+ ```
15
+ /usr/local/etc/synopkgland/<package>/ root:root 0700
16
+ runtime/ root:root 0700
17
+ executor root:root 0700
18
+ policy.json root:root 0600
19
+ tasks.json root:root 0600 (verified setup task inventory)
20
+ root/<name>.sh root:root 0600
21
+ delegations/ root:root 0700
22
+ <random-256-bit-id>.json root:root 0600
23
+ executor.pid root:root 0600
24
+ executor.log root:root 0600 (control start)
25
+ ```
26
+
27
+ The runtime location is mandatory; `control purge` removes this package's entire
28
+ protected inventory after stopping it. The parent `/usr/local/etc/synopkgland`
29
+ may be root:root 0755. Ancestors must be root-owned and not group/world writable;
30
+ symlinks and writable runtime files are refused. Neither package-owned `etc` nor
31
+ package `var` is trusted for executor code or delegation storage. The chosen path
32
+ was measured on vt-nas DSM 7.4; survival of future DSM updates remains unverified.
33
+
34
+ `policy.json` has this strict schema (no unknown keys):
35
+
36
+ ```json
37
+ {
38
+ "v": 1,
39
+ "package": "com.example.downloader",
40
+ "app": "com.example.downloader.Application",
41
+ "scope": "home",
42
+ "operations": [
43
+ "status", "delegate.create", "delegate.list", "delegate.revoke",
44
+ "files.list", "files.info", "files.createFolder",
45
+ "files.checkPermission", "files.write", "root.run"
46
+ ],
47
+ "root": {"whoami": "<64 lowercase hexadecimal SHA-256 digits>"}
48
+ }
49
+ ```
50
+
51
+ `app` is the actual registered DSM AppPriv application ID, not a guessed package
52
+ ID. DSM 7.x omits default-allowed Apps from AppPriv preview; an absent
53
+ entry in a valid applications array is allowed. Explicit deny/custom, duplicate
54
+ entries and malformed responses are refused. Account eligibility is rechecked
55
+ independently, so absence never bypasses a disabled account. `scope` is the
56
+ manifest's fixed `home` or `shared:<share-name>`; omit it for root-only packages.
57
+ `operations` includes every permitted ID, including management and status IDs;
58
+ no implicit allowlist exemptions. `root` is omitted when root operations are
59
+ disabled. Only names in this digest map can execute. Setup pins policy bytes and
60
+ all root scripts; no policy data comes from the package socket. The caller authentication pair follows the coordinator-approved v6 update to PLAN §2.4.
61
+
62
+ ## Requests
63
+
64
+ Every request: `{"v":1,"op":"...","auth":{},"params":{...}}` followed by
65
+ newline. `auth.dsm_cookie` is only the DSM `id` value, never a raw Cookie header.
66
+ Caller requests also require `auth.dsm_synotoken`, forwarded from the current
67
+ HTTP request's X-SYNO-TOKEN or SynoToken header. Both aliases may be present
68
+ when their values match; conflicting aliases or repeated values of either header
69
+ are refused. Local NormalUser verification
70
+ sends both the id cookie and X-SYNO-TOKEN; neither value enters logs or storage.
71
+ Only the executor's local DSM NormalUser HTTP result establishes identity. Other
72
+ identity fields, duplicate JSON keys, invalid UTF-8, unrelated parameters, unknown
73
+ operations and policy-excluded operations are rejected. Replies follow §2.4.
74
+
75
+ | Operation | Parameters | Result |
76
+ | --- | --- | --- |
77
+ | status | none | executor_digest, policy_digest, version, ready |
78
+ | delegate.create | job_id, ops[], scope, path, ttl_seconds | delegation_id, subject {username, uid}, expires_at (RFC3339) |
79
+ | delegate.list | none | delegations[] with public metadata, including revoked/expired records |
80
+ | delegate.revoke | delegation_id; job_id required without cookie | revoked |
81
+ | files.list, files.info, files.checkPermission | delegation_id, job_id, path | DSM data object |
82
+ | files.createFolder | delegation_id, job_id, path (parent), name | DSM data object |
83
+ | files.write | delegation_id, job_id, staging (relative), dest_dir, name | path |
84
+ | root.run | name | output (stdout and stderr combined) |
85
+
86
+ Create/list require a cookie and SynoToken. Revoke accepts the subject/admin session pair or a matching
87
+ package job ID. Root operations require the session pair independently verified as an
88
+ active administrators member. Delegated operations recheck the account, UID,
89
+ expired=`normal`, non-admin membership, App and File Station privileges, scope,
90
+ job, operation, expiry and revocation. UIDs below 1024 are excluded as system
91
+ accounts. TTL must be 1–2592000 seconds. No cookie/SynoToken/SID/password is persisted.
92
+
93
+ Paths use File Station spellings `/home[/...]` or `/<share>[/...]`. A delegation
94
+ binds the requested directory's canonical path. Symlinks resolving outside that
95
+ directory are denied. `files.write` opens package-owned, singly linked regular
96
+ staging files with no symlink components; its fresh child checks setgroups,
97
+ setresgid and setresuid in order, then all real/effective IDs and groups. The child
98
+ opens the destination after dropping identity, verifies its pinned directory and
99
+ scope, and copies into an exclusive hidden `.synopkgland-<job_id>-<random>.part`
100
+ file. After fsync it publishes the complete file with a hard link, then removes
101
+ the temporary name. Existing files and symlinks are never overwritten. The
102
+ executor cleans the exact temporary name as the subject user after a canceled or
103
+ killed child, using a retained directory descriptor; startup performs no scan.
104
+ Successful writes delete staging. DSM ACL inheritance can
105
+ produce a mode different from the requested 0600 (observed 0711 on vt-nas).
106
+
107
+ File Station CheckPermission uses v3 with a fixed non-overwriting probe filename
108
+ and size zero; it creates no file. Missing/failed API data is denied. DSM output
109
+ and root script output are capped at 1 MiB; commands have 20-second deadlines,
110
+ connection read/write deadlines are 15/5 seconds and request execution is bounded
111
+ by 30 seconds. At most 16 connections are admitted. Execution/revocation are
112
+ serialized. Linux command timeouts kill the entire command process group.
113
+
114
+ File Station APIs resolve path strings inside DSM after executor scope validation;
115
+ there is no atomic DSM API for binding that subsequent lookup to our directory
116
+ FD. Concurrent subject-controlled directory renames remain a scope-race limitation
117
+ for runner API operations. The writer uses pinned directory descriptors; a user
118
+ can still move a directory after its final scope check. These are release review
119
+ items, not assertions of complete race freedom.
120
+
121
+ ## Lifecycle and checks
122
+
123
+ ```
124
+ executor serve --package com.example.downloader
125
+ executor control start --package com.example.downloader
126
+ executor control stop --package com.example.downloader
127
+ executor control purge --package com.example.downloader
128
+ ```
129
+
130
+ Root control start launches asynchronously; the caller reads socket status to
131
+ establish readiness. A held flock pidfile refuses duplicate serve. Root's pinned
132
+ boot/control start can validate and terminate a previous monitor before launching
133
+ its replacement; package-account start only writes the mailbox and cannot replace
134
+ runtime. Stop pauses the listener while the monitor continues. Purge removes this
135
+ package's protected state and deletes only its verified recorded scheduler tasks.
136
+
137
+ Run `go test -race ./...` and `bash scripts/ci/gate.sh native-go`. The gate adds
138
+ Linux amd64/arm64 vet, static binary builds and test compilation. Linux-specific
139
+ syscall tests also run on vt-nas from a cross-compiled test executable. The
140
+ `testdata/live_probe.py` harness expects isolated disposable accounts and a
141
+ manually copied runtime, reads passwords only from stdin, and logs no credentials.
142
+ The live harness uses DSM's registered `SYNO.Desktop` AppPriv ID as a stand-in for
143
+ an installed App; installed-package AppPriv integration belongs to setup testing.
144
+
145
+
146
+ ## Package lifecycle
147
+
148
+ Package-account hooks atomically write `stop` before upgrades/stops, `start` on
149
+ install/upgrade completion and package start, and `purge` before uninstall.
150
+ `stop` cancels/drains requests and removes the listener without ending the root
151
+ monitor. `start` resumes only if both package executor and policy hashes equal
152
+ the approved runtime pins; otherwise the service stays paused for administrator
153
+ approval. Only root's pinned boot/control path can replace a monitor or runtime.
154
+
155
+ At start, scheduler readback must exactly match the canonical lifecycle scripts
156
+ regenerated from the package identity and approved executor/policy pins. Package
157
+ setup metadata supplies hints only. The verified names, pins and script hashes
158
+ are stored in root:root 0600 `runtime/tasks.json`. Purge regenerates the scripts
159
+ and revalidates each current definition before EventScheduler v1
160
+ delete (`task_name`) or TaskScheduler v2 delete (`tasks=[{id,real_owner}]`).
161
+ Boot mirrors from TaskScheduler are ignored. Changed, missing, ambiguous or
162
+ unverifiable records are logged and retained for administrator review; protected
163
+ runtime, delegations and sockets are still removed, then the monitor exits.
164
+ An absent process does not block uninstall; the pinned boot task handles pending
165
+ purge or a missing package on the next boot. If the retained binary/policy is
166
+ missing or tampered with, boot refuses execution and requires manual review.
167
+
168
+
169
+ The separate package-account `executor/lifecycle` helper writes an atomic 0600
170
+ mailbox request. Stop/purge wait at most 50 seconds for socket disappearance;
171
+ start returns after writing and lets the monitor verify pins asynchronously.
172
+ The helper never calls synowebapi or TaskScheduler. Socket inspection failures
173
+ and timeouts warn and permit lifecycle to continue. Write/validation failures
174
+ remain errors. Delegate hooks attempt worker stop first; a worker stop failure
175
+ warns and still requests executor pause/purge.
176
+
177
+ The monitor polls every 500 ms with bounded regular-file reads, accepting only
178
+ exact start/stop/purge (optionally one trailing newline). Invalid values are
179
+ ignored and logged without logging contents. The preuninst `purge` mailbox is
180
+ handled immediately; cleanup completes asynchronously. Package directory/INFO
181
+ identity absence is a fallback: the monitor pauses the socket and requests,
182
+ retains runtime/delegations/tasks, and purges only after 10 continuous minutes of
183
+ confirmed absence, even while paused. Every poll checks again; a valid identity
184
+ resets the timer, and an unreadable path cannot count as confirmed absence.
185
+ Reappearance re-reads the mailbox, including an unchanged `start`: matching pins
186
+ resume, changed pins stay paused for administrator approval, `stop` stays paused,
187
+ and `purge` clears state immediately. A root-approved new monitor ignores the
188
+ stop file already present at startup; that exception ends after an absence.
189
+
190
+ The boot task checks pending purge/package disappearance before accessing source.
191
+ It verifies retained pins and protected copies again before offline purge. Normal
192
+ boot installs verified copies and calls root control start to replace a previous
193
+ monitor. Scripts stay within 1 KiB with no percent characters, including the
194
+ longest package name. Partial/tampered retained state requires administrator
195
+ review. All nine uninstall wizard locales name the two tasks and disclose the
196
+ retained DSM storage/infrastructure. `inspect`/`status` cleanup guidance is
197
+ conditional; it does not claim that remote remnants were observed.
198
+
199
+ Directories newly created by the executor are explicitly chowned/chmodded through
200
+ a directory descriptor and verified with fstat, so boot umask 0077 cannot reduce
201
+ /run/synopkgland 0755 or its package directory 0750. Existing directories are
202
+ validated and never repaired/adopted. The package directory must already have
203
+ root/package-group ownership. The socket is set to root/package-group 0660 and
204
+ verified using Linux O_PATH + fstat on its filesystem inode.
@@ -0,0 +1,28 @@
1
+ package main
2
+
3
+ import (
4
+ "context"
5
+ "testing"
6
+ )
7
+
8
+ func TestReviewAppPrivRejectsAmbiguousOrError(t *testing.T) {
9
+ cases := map[string]string{
10
+ "outer error": `{"success":true,"error":{"code":105},"data":{"applications":[]}}`,
11
+ "inner error": `{"success":true,"data":{"applications":[],"error":{"code":105}}}`,
12
+ "duplicate array hides deny": `{"success":true,"data":{"applications":[{"app_id":"app","privilelge":"deny"}],"applications":[]}}`,
13
+ "duplicate privilege hides deny": `{"success":true,"data":{"applications":[{"app_id":"app","privilelge":"deny","privilelge":"allow"}]}}`,
14
+ "duplicate app id": `{"success":true,"data":{"applications":[{"app_id":"other","app_id":"app","privilelge":"allow"}]}}`,
15
+ "null error": `{"success":true,"data":{"applications":[],"error":null}}`,
16
+ "nonobject entry": `{"success":true,"data":{"applications":[42]}}`,
17
+ "nested error": `{"success":true,"data":{"applications":[{"app_id":"other","privilelge":"allow","details":{"error":null}}]}}`,
18
+ "malformed entries": `{"success":true,"data":{"applications":[null,{}]}}`,
19
+ }
20
+ for name, reply := range cases {
21
+ t.Run(name, func(t *testing.T) {
22
+ d := &liveDSM{Command: &cmdStub{reply: reply}}
23
+ if d.Allow(context.Background(), Subject{Username: "alice"}, "app") == nil {
24
+ t.Fatal("unsafe AppPriv response allowed")
25
+ }
26
+ })
27
+ }
28
+ }
@@ -0,0 +1,38 @@
1
+ package main
2
+
3
+ import (
4
+ "context"
5
+ "encoding/json"
6
+ "testing"
7
+ )
8
+
9
+ func TestReviewEmptyPartialAuthMustNotBecomeWorkerRevoke(t *testing.T) {
10
+ for _, auth := range []string{`{"dsm_cookie":""}`, `{"dsm_synotoken":""}`, `{"dsm_cookie":"","dsm_synotoken":""}`, `null`} {
11
+ e, _, _ := setup(t)
12
+ id := create(t, e)
13
+ var req Request
14
+ p, _ := json.Marshal(map[string]string{"delegation_id": id, "job_id": "job1"})
15
+ raw := []byte(`{"v":1,"op":"delegate.revoke","auth":` + auth + `,"params":` + string(p) + `}`)
16
+ if err := strictJSON(raw, &req); err != nil {
17
+ t.Fatal(err)
18
+ }
19
+ if r := e.Handle(context.Background(), req); r.Code != "AUTH_DENIED" {
20
+ t.Errorf("partial auth %s became worker revoke: %+v", auth, r)
21
+ }
22
+ }
23
+ }
24
+
25
+ func TestWorkerRevokeRequiresAbsentOrEmptyAuthObject(t *testing.T) {
26
+ for _, auth := range []string{"", `,"auth":{}`} {
27
+ e, _, _ := setup(t)
28
+ id := create(t, e)
29
+ p, _ := json.Marshal(map[string]string{"delegation_id": id, "job_id": "job1"})
30
+ var req Request
31
+ if err := strictJSON([]byte(`{"v":1,"op":"delegate.revoke"`+auth+`,"params":`+string(p)+`}`), &req); err != nil {
32
+ t.Fatal(err)
33
+ }
34
+ if r := e.Handle(context.Background(), req); !r.OK {
35
+ t.Fatal("valid worker revoke denied", r)
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,42 @@
1
+ // This helper runs as the package account, separately from the root executor.
2
+ package main
3
+
4
+ import (
5
+ "context"
6
+ "errors"
7
+ "flag"
8
+ "fmt"
9
+ "os"
10
+ "path/filepath"
11
+ "time"
12
+
13
+ "synopkgland/executor/internal/lifecycle"
14
+ )
15
+
16
+ func main() {
17
+ if err := run(os.Args[1:]); err != nil {
18
+ fmt.Fprintln(os.Stderr, "executor lifecycle:", err)
19
+ os.Exit(1)
20
+ }
21
+ }
22
+ func run(args []string) error {
23
+ if len(args) == 0 {
24
+ return errors.New("start, stop or purge required")
25
+ }
26
+ action := args[0]
27
+ fs := flag.NewFlagSet("lifecycle", flag.ContinueOnError)
28
+ pkg := fs.String("package", "", "package account")
29
+ if err := fs.Parse(args[1:]); err != nil {
30
+ return err
31
+ }
32
+ if fs.NArg() != 0 {
33
+ return errors.New("unexpected arguments")
34
+ }
35
+ ctx, cancel := context.WithTimeout(context.Background(), 50*time.Second)
36
+ defer cancel()
37
+ data := os.Getenv("SYNOPKG_PKGVAR")
38
+ if data == "" {
39
+ data = filepath.Join("/var/packages", *pkg, "var")
40
+ }
41
+ return lifecycle.Run(ctx, lifecycle.Config{Package: *pkg, Data: data, Socket: filepath.Join("/run/synopkgland", *pkg, "executor.sock"), Log: func(s string) { fmt.Fprintln(os.Stderr, s) }}, action)
42
+ }
@@ -0,0 +1,27 @@
1
+ package main
2
+
3
+ import (
4
+ "context"
5
+ "testing"
6
+ )
7
+
8
+ func TestReviewCookieControlRejectedBeforeDSM(t *testing.T) {
9
+ for _, cookie := range []string{"sess\tion", "sess\x7fion", "sess\x01ion"} {
10
+ e, _, _ := setup(t)
11
+ if _, code := e.verified(context.Background(), Auth{Cookie: cookie, SynoToken: "token"}); code == "" {
12
+ t.Errorf("cookie control character accepted: %q", cookie)
13
+ }
14
+ }
15
+ }
16
+
17
+ func TestExecutorCookieRejectsEveryASCIIControl(t *testing.T) {
18
+ for c := 0; c <= 127; c++ {
19
+ if c >= 32 && c != 127 {
20
+ continue
21
+ }
22
+ e, _, _ := setup(t)
23
+ if _, code := e.verified(context.Background(), Auth{Cookie: "sess" + string(rune(c)) + "ion", SynoToken: "token"}); code != "AUTH_DENIED" {
24
+ t.Errorf("accepted control %d", c)
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,120 @@
1
+ package main
2
+
3
+ import (
4
+ "context"
5
+ "os"
6
+ "path/filepath"
7
+ "strings"
8
+ "testing"
9
+ "time"
10
+ )
11
+
12
+ func TestReviewLargePackageHashDoesNotBlockShutdown(t *testing.T) {
13
+ dir, err := filepath.EvalSymlinks(t.TempDir())
14
+ if err != nil {
15
+ t.Fatal(err)
16
+ }
17
+ exe := filepath.Join(dir, "executor")
18
+ f, err := os.Create(exe)
19
+ if err != nil {
20
+ t.Fatal(err)
21
+ }
22
+ if err = f.Truncate(1 << 40); err != nil {
23
+ f.Close()
24
+ t.Skip(err)
25
+ }
26
+ f.Close()
27
+ os.WriteFile(filepath.Join(dir, "policy.json"), []byte("policy"), 0600)
28
+ ctx, cancel := context.WithCancel(context.Background())
29
+ entered := make(chan struct{})
30
+ done := make(chan error, 1)
31
+ go func() {
32
+ done <- manageService(ctx, make(chan string), func() (func(), error) { return func() {}, nil }, func(ctx context.Context) bool {
33
+ close(entered)
34
+ return samePackagePins(ctx, dir, strings.Repeat("a", 64), strings.Repeat("b", 64))
35
+ }, func() error { return nil }, func(string) {})
36
+ }()
37
+ <-entered
38
+ time.Sleep(20 * time.Millisecond)
39
+ cancel()
40
+ blocked := false
41
+ select {
42
+ case <-done:
43
+ case <-time.After(50 * time.Millisecond):
44
+ blocked = true
45
+ }
46
+ os.Truncate(exe, 0)
47
+ if blocked {
48
+ <-done
49
+ t.Fatal("canceled monitor remains blocked hashing package-controlled file")
50
+ }
51
+ }
52
+
53
+ func TestDigestBoundsAndCancellation(t *testing.T) {
54
+ dir := realTestPath(t, t.TempDir())
55
+ for _, tc := range []struct {
56
+ name string
57
+ limit int64
58
+ }{{"executor", maxExecutorBytes}, {"policy.json", maxPolicyBytes}} {
59
+ path := filepath.Join(dir, tc.name)
60
+ f, err := os.Create(path)
61
+ if err != nil {
62
+ t.Fatal(err)
63
+ }
64
+ if err = f.Truncate(tc.limit + 1); err != nil {
65
+ t.Fatal(err)
66
+ }
67
+ f.Close()
68
+ if _, err = digestFile(context.Background(), path, tc.limit); err == nil {
69
+ t.Fatal("oversize file accepted")
70
+ }
71
+ os.WriteFile(path, []byte("valid"), 0600)
72
+ ctx, cancel := context.WithCancel(context.Background())
73
+ cancel()
74
+ if _, err = digestFile(ctx, path, tc.limit); err != context.Canceled {
75
+ t.Fatal("ignored cancellation", err)
76
+ }
77
+ }
78
+ if _, err := digestFile(context.Background(), dir, maxExecutorBytes); err == nil {
79
+ t.Fatal("directory accepted")
80
+ }
81
+ os.Symlink(filepath.Join(dir, "executor"), filepath.Join(dir, "link"))
82
+ if _, err := digestFile(context.Background(), filepath.Join(dir, "link"), maxExecutorBytes); err == nil {
83
+ t.Fatal("symlink accepted")
84
+ }
85
+ }
86
+
87
+ func TestLifecycleCancelsPendingPinCheck(t *testing.T) {
88
+ for _, action := range []string{"stop", "purge", "shutdown"} {
89
+ t.Run(action, func(t *testing.T) {
90
+ ctx, cancel := context.WithCancel(context.Background())
91
+ defer cancel()
92
+ entered, canceled := make(chan struct{}), make(chan struct{})
93
+ actions := make(chan string)
94
+ done := make(chan error, 1)
95
+ go func() {
96
+ done <- manageService(ctx, actions, func() (func(), error) { t.Error("opened during canceled check"); return func() {}, nil }, func(ctx context.Context) bool { close(entered); <-ctx.Done(); close(canceled); return false }, func() error { return nil }, func(string) {})
97
+ }()
98
+ <-entered
99
+ if action == "shutdown" {
100
+ cancel()
101
+ } else {
102
+ actions <- action
103
+ }
104
+ select {
105
+ case <-canceled:
106
+ case <-time.After(time.Second):
107
+ t.Fatal("pin check not canceled")
108
+ }
109
+ cancel()
110
+ select {
111
+ case err := <-done:
112
+ if err != nil {
113
+ t.Fatal(err)
114
+ }
115
+ case <-time.After(time.Second):
116
+ t.Fatal("monitor stuck")
117
+ }
118
+ })
119
+ }
120
+ }
@@ -0,0 +1,40 @@
1
+ package main
2
+
3
+ import (
4
+ "errors"
5
+ "os"
6
+ "syscall"
7
+ )
8
+
9
+ func directoryMatches(info os.FileInfo, mode os.FileMode, uid, gid int) bool {
10
+ st, ok := info.Sys().(*syscall.Stat_t)
11
+ return ok && info.IsDir() && info.Mode().Perm() == mode && int(st.Uid) == uid && int(st.Gid) == gid
12
+ }
13
+
14
+ // Only repair permissions on a directory this invocation created. mkdir's
15
+ // requested mode is reduced by the inherited boot-task umask (normally 0077).
16
+ func createDirectory(path string, mode os.FileMode, uid, gid int) (os.FileInfo, error) {
17
+ if err := os.Mkdir(path, mode); err != nil {
18
+ return nil, err
19
+ }
20
+ fd, err := syscall.Open(path, syscall.O_RDONLY|syscall.O_DIRECTORY|syscall.O_NOFOLLOW|syscall.O_CLOEXEC, 0)
21
+ if err != nil {
22
+ return nil, err
23
+ }
24
+ f := os.NewFile(uintptr(fd), path)
25
+ defer f.Close()
26
+ if err = f.Chown(uid, gid); err != nil {
27
+ return nil, err
28
+ }
29
+ if err = f.Chmod(mode); err != nil {
30
+ return nil, err
31
+ }
32
+ info, err := f.Stat()
33
+ if err != nil {
34
+ return nil, err
35
+ }
36
+ if !directoryMatches(info, mode, uid, gid) {
37
+ return nil, errors.New("created directory permissions")
38
+ }
39
+ return info, nil
40
+ }