@synopackageland/cli 0.8.0 → 0.9.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.
- package/CHANGELOG.md +124 -0
- package/README.md +26 -4
- package/dist/add.js +4 -17
- package/dist/authorization-sdk.d.ts +0 -1
- package/dist/authorization-sdk.js +0 -1
- package/dist/build-spk/gateway.js +2 -2
- package/dist/build-spk/notices.js +12 -8
- package/dist/capability-overlays.d.ts +15 -0
- package/dist/capability-overlays.js +18 -0
- package/dist/cli-version.d.ts +2 -0
- package/dist/cli-version.js +3 -0
- package/dist/cli.js +3 -1
- package/dist/error-registry.js +12 -4
- package/dist/info.js +2 -1
- package/dist/init.js +52 -58
- package/dist/reproducible.js +1 -1
- package/dist/runtime/delegate-contract.d.ts +15 -0
- package/dist/runtime/delegate-contract.js +2 -0
- package/dist/runtime/executor-build.d.ts +15 -1
- package/dist/runtime/executor-build.js +42 -11
- package/dist/runtime/executor-digests.json +13 -0
- package/dist/runtime/executor-inspect.d.ts +1 -0
- package/dist/runtime/executor-inspect.js +5 -2
- package/dist/runtime/executor-policy.d.ts +3 -1
- package/dist/runtime/executor-policy.js +7 -2
- package/dist/runtime/executor-source.d.ts +21 -0
- package/dist/runtime/executor-source.js +35 -0
- package/dist/runtime/executor-tasks.d.ts +5 -2
- package/dist/runtime/executor-tasks.js +6 -4
- package/dist/runtime/sdk-source.d.ts +31 -0
- package/dist/runtime/sdk-source.js +92 -0
- package/dist/standalone/api-permissions.d.ts +4 -1
- package/dist/standalone/api-permissions.js +10 -18
- package/dist/standalone/build.d.ts +1 -0
- package/dist/standalone/build.js +11 -4
- package/dist/standalone/daemon.js +2 -2
- package/dist/standalone/dsm-window.js +2 -2
- package/dist/standalone/manifest.d.ts +5 -2
- package/dist/standalone/manifest.js +9 -3
- package/dist/standalone/root-window.d.ts +1 -1
- package/dist/standalone/root-window.js +0 -1
- package/dist/standalone/sdk-check.d.ts +9 -0
- package/dist/standalone/sdk-check.js +43 -0
- package/dist/standalone/spk.js +1 -1
- package/dist/template-paths.d.ts +7 -2
- package/dist/template-paths.js +18 -6
- package/package.json +13 -3
- package/dist/templates/_executor/README.md +0 -318
- package/dist/templates/_executor/anchor.go +0 -156
- package/dist/templates/_executor/anchor_test.go +0 -161
- package/dist/templates/_executor/apppriv_review_test.go +0 -28
- package/dist/templates/_executor/auth_presence_review_test.go +0 -38
- package/dist/templates/_executor/cancel_contract_test.go +0 -236
- package/dist/templates/_executor/cmd/lifecycle/main.go +0 -42
- package/dist/templates/_executor/cookie_review_test.go +0 -27
- package/dist/templates/_executor/copy.go +0 -64
- package/dist/templates/_executor/copy_test.go +0 -88
- package/dist/templates/_executor/digest_review_test.go +0 -120
- package/dist/templates/_executor/directories.go +0 -40
- package/dist/templates/_executor/dsm.go +0 -369
- package/dist/templates/_executor/dsm_test.go +0 -290
- package/dist/templates/_executor/executor.go +0 -735
- package/dist/templates/_executor/executor_test.go +0 -314
- package/dist/templates/_executor/go.mod +0 -5
- package/dist/templates/_executor/identity.go +0 -74
- package/dist/templates/_executor/identity_kernel_linux_test.go +0 -60
- package/dist/templates/_executor/identity_linux.go +0 -82
- package/dist/templates/_executor/identity_security_test.go +0 -43
- package/dist/templates/_executor/internal/lifecycle/lifecycle.go +0 -95
- package/dist/templates/_executor/internal/lifecycle/lifecycle_test.go +0 -232
- package/dist/templates/_executor/internal/taskscript/boot.sh +0 -31
- package/dist/templates/_executor/internal/taskscript/cmd/main.go +0 -19
- package/dist/templates/_executor/internal/taskscript/control.sh +0 -31
- package/dist/templates/_executor/internal/taskscript/tasks.go +0 -44
- package/dist/templates/_executor/json_review_test.go +0 -40
- package/dist/templates/_executor/lifecycle_test.go +0 -97
- package/dist/templates/_executor/link_linux.go +0 -28
- package/dist/templates/_executor/long_running_test.go +0 -530
- package/dist/templates/_executor/main.go +0 -576
- package/dist/templates/_executor/managed.go +0 -117
- package/dist/templates/_executor/managed_test.go +0 -137
- package/dist/templates/_executor/move_linux.go +0 -490
- package/dist/templates/_executor/move_linux_test.go +0 -460
- package/dist/templates/_executor/move_validation.go +0 -46
- package/dist/templates/_executor/move_validation_test.go +0 -187
- package/dist/templates/_executor/operations.go +0 -926
- package/dist/templates/_executor/path_test.go +0 -35
- package/dist/templates/_executor/pid.go +0 -37
- package/dist/templates/_executor/pid_test.go +0 -113
- package/dist/templates/_executor/platform_linux.go +0 -187
- package/dist/templates/_executor/platform_linux_test.go +0 -191
- package/dist/templates/_executor/platform_other.go +0 -76
- package/dist/templates/_executor/process.go +0 -142
- package/dist/templates/_executor/purge_log.go +0 -18
- package/dist/templates/_executor/records.go +0 -242
- package/dist/templates/_executor/scope_cancel_contract_test.go +0 -91
- package/dist/templates/_executor/scope_client.go +0 -37
- package/dist/templates/_executor/scope_contract.go +0 -12
- package/dist/templates/_executor/selected_scope.go +0 -146
- package/dist/templates/_executor/selected_scope_test.go +0 -186
- package/dist/templates/_executor/socket_linux_test.go +0 -46
- package/dist/templates/_executor/status_disabled_test.go +0 -33
- package/dist/templates/_executor/store.go +0 -91
- package/dist/templates/_executor/supervise.go +0 -109
- package/dist/templates/_executor/supervise_test.go +0 -130
- package/dist/templates/_executor/task_race_review_test.go +0 -47
- package/dist/templates/_executor/tasks.go +0 -320
- package/dist/templates/_executor/tasks_dsm71_test.go +0 -114
- package/dist/templates/_executor/tasks_review_test.go +0 -43
- package/dist/templates/_executor/tasks_test.go +0 -223
- package/dist/templates/_executor/testdata/evidence/cleanup.json +0 -24
- package/dist/templates/_executor/testdata/evidence/final-smoke.jsonl +0 -9
- package/dist/templates/_executor/testdata/evidence/kernel-acl.json +0 -6
- package/dist/templates/_executor/testdata/evidence/linux-tests.log +0 -123
- package/dist/templates/_executor/testdata/evidence/live.jsonl +0 -23
- package/dist/templates/_executor/testdata/evidence/storage.json +0 -90
- package/dist/templates/_executor/testdata/evidence/validation.json +0 -55
- package/dist/templates/_executor/testdata/live_probe.py +0 -98
- package/dist/templates/_executor/upgrade_watch_test.go +0 -244
- package/dist/templates/_executor/watch.go +0 -164
- package/dist/templates/_executor/watch_test.go +0 -291
- package/dist/templates/_executor/write_review_linux_test.go +0 -87
- package/dist/templates/_shared/AGENTS.md +0 -146
- package/dist/templates/_shared/CLAUDE.md +0 -1
- package/dist/templates/_shared/third-party-notices.mjs +0 -51
- package/dist/templates/binary/LICENSES/GO-LICENSE +0 -27
- package/dist/templates/binary/LICENSES/GO-PATENTS +0 -22
- package/dist/templates/binary/dsm-package.yaml +0 -46
- package/dist/templates/binary/example/main.go +0 -16
- package/dist/templates/binary/gitignore +0 -2
- package/dist/templates/binary/i18n/messages/de.json +0 -4
- package/dist/templates/binary/i18n/messages/en.json +0 -4
- package/dist/templates/binary/i18n/messages/es.json +0 -4
- package/dist/templates/binary/i18n/messages/fr.json +0 -4
- package/dist/templates/binary/i18n/messages/it.json +0 -4
- package/dist/templates/binary/i18n/messages/ja.json +0 -4
- package/dist/templates/binary/i18n/messages/ko.json +0 -4
- package/dist/templates/binary/i18n/messages/zh-CN.json +0 -4
- package/dist/templates/binary/i18n/messages/zh-TW.json +0 -4
- package/dist/templates/binary/ui/app.css +0 -4
- package/dist/templates/binary/ui/app.js +0 -32
- package/dist/templates/compose/compose.yaml +0 -8
- package/dist/templates/compose/synology-app.yaml +0 -16
- package/dist/templates/native-authorization/AuthorizationGate.vue +0 -91
- package/dist/templates/native-authorization/i18n/de.json +0 -37
- package/dist/templates/native-authorization/i18n/en.json +0 -37
- package/dist/templates/native-authorization/i18n/es.json +0 -37
- package/dist/templates/native-authorization/i18n/fr.json +0 -37
- package/dist/templates/native-authorization/i18n/index.ts +0 -15
- package/dist/templates/native-authorization/i18n/it.json +0 -37
- package/dist/templates/native-authorization/i18n/ja.json +0 -37
- package/dist/templates/native-authorization/i18n/ko.json +0 -37
- package/dist/templates/native-authorization/i18n/zh-CN.json +0 -37
- package/dist/templates/native-authorization/i18n/zh-TW.json +0 -37
- package/dist/templates/native-go/README.md +0 -459
- package/dist/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +0 -61
- package/dist/templates/native-go/backend/cmd/app/main.go +0 -95
- package/dist/templates/native-go/backend/cmd/background-worker/main.go +0 -38
- package/dist/templates/native-go/backend/go.mod +0 -9
- package/dist/templates/native-go/backend/go.sum +0 -4
- package/dist/templates/native-go/backend/internal/api/cgi_framing_test.go +0 -32
- package/dist/templates/native-go/backend/internal/api/cookie_review_test.go +0 -28
- package/dist/templates/native-go/backend/internal/api/deadline_test.go +0 -114
- package/dist/templates/native-go/backend/internal/api/dsm-session.go +0 -54
- package/dist/templates/native-go/backend/internal/api/dsm-session_test.go +0 -51
- package/dist/templates/native-go/backend/internal/api/entry_test.go +0 -47
- package/dist/templates/native-go/backend/internal/api/errors.go +0 -47
- package/dist/templates/native-go/backend/internal/api/permissions.go +0 -161
- package/dist/templates/native-go/backend/internal/api/permissions.json +0 -5
- package/dist/templates/native-go/backend/internal/api/permissions_test.go +0 -113
- package/dist/templates/native-go/backend/internal/api/policy_fixture_test.go +0 -8
- package/dist/templates/native-go/backend/internal/api/registry.go +0 -142
- package/dist/templates/native-go/backend/internal/api/registry_test.go +0 -344
- package/dist/templates/native-go/backend/internal/api/resource_limits_test.go +0 -87
- package/dist/templates/native-go/backend/internal/api/sdk-permissions.json +0 -59
- package/dist/templates/native-go/backend/internal/api/sdk_policy_test.go +0 -31
- package/dist/templates/native-go/backend/internal/api/server.go +0 -305
- package/dist/templates/native-go/backend/internal/api/testdata/permissions-cases.json +0 -172
- package/dist/templates/native-go/backend/internal/app/background.go +0 -249
- package/dist/templates/native-go/backend/internal/app/background_none.go +0 -8
- package/dist/templates/native-go/backend/internal/app/background_owner.go +0 -38
- package/dist/templates/native-go/backend/internal/app/background_owner_test.go +0 -163
- package/dist/templates/native-go/backend/internal/app/background_schedule.go +0 -69
- package/dist/templates/native-go/backend/internal/app/background_schedule_test.go +0 -62
- package/dist/templates/native-go/backend/internal/app/background_test.go +0 -320
- package/dist/templates/native-go/backend/internal/app/delegate_config.go +0 -57
- package/dist/templates/native-go/backend/internal/app/delegate_config_test.go +0 -28
- package/dist/templates/native-go/backend/internal/app/delegate_none.go +0 -5
- package/dist/templates/native-go/backend/internal/app/identity.go +0 -20
- package/dist/templates/native-go/backend/internal/app/identity_test.go +0 -15
- package/dist/templates/native-go/backend/internal/app/migrations.go +0 -41
- package/dist/templates/native-go/backend/internal/app/migrations_test.go +0 -41
- package/dist/templates/native-go/backend/internal/app/portal.go +0 -30
- package/dist/templates/native-go/backend/internal/app/portal_test.go +0 -55
- package/dist/templates/native-go/backend/internal/app/root_none.go +0 -9
- package/dist/templates/native-go/backend/internal/app/routes.go +0 -137
- package/dist/templates/native-go/backend/internal/app/routes_test.go +0 -165
- package/dist/templates/native-go/backend/internal/app/session_files.go +0 -9
- package/dist/templates/native-go/backend/internal/app/session_files_test.go +0 -14
- package/dist/templates/native-go/backend/internal/app/shared_folder.go +0 -144
- package/dist/templates/native-go/backend/internal/app/shared_folder_test.go +0 -158
- package/dist/templates/native-go/backend/internal/background/access.go +0 -57
- package/dist/templates/native-go/backend/internal/background/lock_test.go +0 -131
- package/dist/templates/native-go/backend/internal/background/owner_test.go +0 -118
- package/dist/templates/native-go/backend/internal/background/runner.go +0 -185
- package/dist/templates/native-go/backend/internal/background/runner_test.go +0 -209
- package/dist/templates/native-go/backend/internal/background/schedule.go +0 -336
- package/dist/templates/native-go/backend/internal/background/schedule_test.go +0 -368
- package/dist/templates/native-go/backend/internal/background/store.go +0 -825
- package/dist/templates/native-go/backend/internal/background/store_test.go +0 -365
- package/dist/templates/native-go/backend/internal/datamigrate/migrate.go +0 -191
- package/dist/templates/native-go/backend/internal/datamigrate/migrate_test.go +0 -177
- package/dist/templates/native-go/backend/internal/dsm/admin.go +0 -76
- package/dist/templates/native-go/backend/internal/dsm/admin_linux.go +0 -110
- package/dist/templates/native-go/backend/internal/dsm/admin_linux_test.go +0 -105
- package/dist/templates/native-go/backend/internal/dsm/admin_other.go +0 -15
- package/dist/templates/native-go/backend/internal/dsm/admin_test.go +0 -67
- package/dist/templates/native-go/backend/internal/dsm/apppriv.go +0 -30
- package/dist/templates/native-go/backend/internal/dsm/auth.go +0 -94
- package/dist/templates/native-go/backend/internal/dsm/auth_test.go +0 -159
- package/dist/templates/native-go/backend/internal/dsm/bridge_file.go +0 -75
- package/dist/templates/native-go/backend/internal/dsm/bridge_file_test.go +0 -57
- package/dist/templates/native-go/backend/internal/dsm/entry.go +0 -177
- package/dist/templates/native-go/backend/internal/dsm/entry_test.go +0 -315
- package/dist/templates/native-go/backend/internal/dsm/native/admin-aarch64.elf +0 -0
- package/dist/templates/native-go/backend/internal/dsm/native/admin-armv7.elf +0 -0
- package/dist/templates/native-go/backend/internal/dsm/native/admin-x86_64.elf +0 -0
- package/dist/templates/native-go/backend/internal/dsm/native/admin_check.c +0 -28
- package/dist/templates/native-go/backend/internal/dsm/native/apppriv-aarch64.elf +0 -0
- package/dist/templates/native-go/backend/internal/dsm/native/apppriv-armv7.elf +0 -0
- package/dist/templates/native-go/backend/internal/dsm/native/apppriv-x86_64.elf +0 -0
- package/dist/templates/native-go/backend/internal/dsm/native/apppriv_check.c +0 -33
- package/dist/templates/native-go/backend/internal/dsm/native/build.sh +0 -18
- package/dist/templates/native-go/backend/internal/dsm/native/licenses/GLIBC-NOTICES.txt +0 -400
- package/dist/templates/native-go/backend/internal/dsm/native/licenses/LGPL-2.1.txt +0 -501
- package/dist/templates/native-go/backend/internal/dsm/native/licenses/SOURCE.txt +0 -5
- package/dist/templates/native-go/backend/internal/dsm/native/licenses/ZIG-MIT.txt +0 -21
- package/dist/templates/native-go/backend/internal/dsm/native/provenance.json +0 -18
- package/dist/templates/native-go/backend/internal/filestation/browse_test.go +0 -67
- package/dist/templates/native-go/backend/internal/filestation/check_permission.go +0 -71
- package/dist/templates/native-go/backend/internal/filestation/check_permission_test.go +0 -77
- package/dist/templates/native-go/backend/internal/filestation/client.go +0 -337
- package/dist/templates/native-go/backend/internal/filestation/client_test.go +0 -155
- package/dist/templates/native-go/backend/internal/filestation/doc.go +0 -4
- package/dist/templates/native-go/backend/internal/filestation/download_dsm71_test.go +0 -82
- package/dist/templates/native-go/backend/internal/filestation/http.go +0 -70
- package/dist/templates/native-go/backend/internal/filestation/http_test.go +0 -188
- package/dist/templates/native-go/backend/internal/filestation/operations_test.go +0 -206
- package/dist/templates/native-go/backend/internal/filestation/read_file_test.go +0 -89
- package/dist/templates/native-go/backend/internal/filestation/sdk_policy_test.go +0 -39
- package/dist/templates/native-go/backend/internal/filestation/service.go +0 -254
- package/dist/templates/native-go/backend/internal/filestation/service_test.go +0 -74
- package/dist/templates/native-go/backend/internal/filestation/upload_stream.go +0 -76
- package/dist/templates/native-go/backend/internal/filestation/upload_stream_test.go +0 -77
- package/dist/templates/native-go/backend/internal/filestation/write.go +0 -32
- package/dist/templates/native-go/backend/internal/filestation/write_test.go +0 -124
- package/dist/templates/native-go/backend/internal/identity/README.md +0 -59
- package/dist/templates/native-go/backend/internal/identity/dsm.go +0 -115
- package/dist/templates/native-go/backend/internal/identity/http.go +0 -291
- package/dist/templates/native-go/backend/internal/identity/identity_test.go +0 -530
- package/dist/templates/native-go/backend/internal/identity/service.go +0 -159
- package/dist/templates/native-go/backend/internal/identity/store.go +0 -109
- package/dist/templates/native-go/backend/internal/jsonlimits/limits.go +0 -48
- package/dist/templates/native-go/backend/internal/jsonlimits/limits_test.go +0 -52
- package/dist/templates/native-go/backend/internal/portal/portal.go +0 -138
- package/dist/templates/native-go/backend/internal/portal/portal_test.go +0 -89
- package/dist/templates/native-go/dsm-package.yaml +0 -71
- package/dist/templates/native-go/gitignore +0 -1
- package/dist/templates/native-go/i18n/glossary.json +0 -663
- package/dist/templates/native-go/i18n/messages/de.json +0 -29
- package/dist/templates/native-go/i18n/messages/en.json +0 -29
- package/dist/templates/native-go/i18n/messages/es.json +0 -29
- package/dist/templates/native-go/i18n/messages/fr.json +0 -29
- package/dist/templates/native-go/i18n/messages/it.json +0 -29
- package/dist/templates/native-go/i18n/messages/ja.json +0 -29
- package/dist/templates/native-go/i18n/messages/ko.json +0 -29
- package/dist/templates/native-go/i18n/messages/zh-CN.json +0 -29
- package/dist/templates/native-go/i18n/messages/zh-TW.json +0 -29
- package/dist/templates/native-go/ui/app.css +0 -45
- package/dist/templates/native-go/ui/app.js +0 -111
- package/dist/templates/native-go-delegate/DELEGATE.md +0 -263
- package/dist/templates/native-go-delegate/backend/cmd/background-worker/main.go +0 -48
- package/dist/templates/native-go-delegate/backend/internal/app/delegate.go +0 -25
- package/dist/templates/native-go-delegate/backend/internal/app/delegate_on.go +0 -5
- package/dist/templates/native-go-delegate/backend/internal/app/delegate_routes_test.go +0 -31
- package/dist/templates/native-go-delegate/backend/internal/background/delegate_review_test.go +0 -174
- package/dist/templates/native-go-delegate/backend/internal/background/delegated.go +0 -277
- package/dist/templates/native-go-delegate/backend/internal/background/delegated_moves.go +0 -270
- package/dist/templates/native-go-delegate/backend/internal/background/delegated_test.go +0 -34
- package/dist/templates/native-go-delegate/backend/internal/delegate/admission_recovery_test.go +0 -410
- package/dist/templates/native-go-delegate/backend/internal/delegate/busy_review_test.go +0 -15
- package/dist/templates/native-go-delegate/backend/internal/delegate/cancel_contract_test.go +0 -95
- package/dist/templates/native-go-delegate/backend/internal/delegate/client.go +0 -151
- package/dist/templates/native-go-delegate/backend/internal/delegate/client_test.go +0 -214
- package/dist/templates/native-go-delegate/backend/internal/delegate/destination.go +0 -110
- package/dist/templates/native-go-delegate/backend/internal/delegate/destination_state.go +0 -117
- package/dist/templates/native-go-delegate/backend/internal/delegate/destination_state_test.go +0 -60
- package/dist/templates/native-go-delegate/backend/internal/delegate/destination_test.go +0 -116
- package/dist/templates/native-go-delegate/backend/internal/delegate/example.go +0 -81
- package/dist/templates/native-go-delegate/backend/internal/delegate/example_test.go +0 -91
- package/dist/templates/native-go-delegate/backend/internal/delegate/executor_contract_test.go +0 -511
- package/dist/templates/native-go-delegate/backend/internal/delegate/files.go +0 -132
- package/dist/templates/native-go-delegate/backend/internal/delegate/long_running_routes.go +0 -92
- package/dist/templates/native-go-delegate/backend/internal/delegate/long_running_routes_test.go +0 -99
- package/dist/templates/native-go-delegate/backend/internal/delegate/move.go +0 -348
- package/dist/templates/native-go-delegate/backend/internal/delegate/move_test.go +0 -351
- package/dist/templates/native-go-delegate/backend/internal/delegate/operations_list.go +0 -65
- package/dist/templates/native-go-delegate/backend/internal/delegate/operations_list_test.go +0 -114
- package/dist/templates/native-go-delegate/backend/internal/delegate/retry.go +0 -106
- package/dist/templates/native-go-delegate/backend/internal/delegate/retry_test.go +0 -143
- package/dist/templates/native-go-delegate/backend/internal/delegate/service.go +0 -364
- package/dist/templates/native-go-delegate/backend/internal/delegate/service_test.go +0 -318
- package/dist/templates/native-go-delegate/backend/internal/delegate/staging.go +0 -121
- package/dist/templates/native-go-delegate/backend/internal/delegate/status_disabled_test.go +0 -51
- package/dist/templates/native-go-delegate/backend/internal/delegate/testdata/executor_contract.txt +0 -112
- package/dist/templates/native-go-delegate/backend/internal/delegate/transient_contract_test.go +0 -137
- package/dist/templates/native-go-delegate/backend/internal/delegate/wait_cancel_test.go +0 -101
- package/dist/templates/native-go-delegate/backend/internal/delegate/worker.go +0 -225
- package/dist/templates/native-go-delegate/backend/internal/filestation/files.go +0 -43
- package/dist/templates/native-go-delegate/backend/internal/filestation/files_test.go +0 -59
- package/dist/templates/native-go-delegate/frontend/src/CapabilityPanels.vue +0 -37
- package/dist/templates/native-go-delegate/frontend/src/delegate/BackgroundSavePanel.vue +0 -113
- package/dist/templates/native-go-delegate/frontend/src/delegate/DelegatePanel.vue +0 -70
- package/dist/templates/native-go-delegate/frontend/src/delegate/copy.ts +0 -8
- package/dist/templates/native-go-delegate/frontend/src/delegate/i18n/waiting.json +0 -11
- package/dist/templates/native-go-delegate/frontend/test/background-save.test.ts +0 -121
- package/dist/templates/native-go-delegate/frontend/test/delegate.test.ts +0 -145
- package/dist/templates/native-go-delegate/frontend/test/scope-settings.test.ts +0 -49
- package/dist/templates/native-go-delegate/test-frontend.sh +0 -12
- package/dist/templates/native-go-delegate/test.sh +0 -18
- package/dist/templates/native-go-jobs/BACKGROUND.md +0 -108
- package/dist/templates/native-go-jobs/backend/internal/app/background_on.go +0 -7
- package/dist/templates/native-go-jobs/backend/internal/app/background_routes_test.go +0 -90
- package/dist/templates/native-go-jobs/frontend/src/background/BackgroundPanel.vue +0 -170
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/de.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/en.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/es.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/fr.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/it.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/ja.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/ko.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/zh-CN.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/zh-TW.json +0 -75
- package/dist/templates/native-go-jobs/frontend/src/background/i18n.ts +0 -19
- package/dist/templates/native-go-jobs/frontend/src/background/picker-provider.ts +0 -12
- package/dist/templates/native-go-jobs/frontend/src/background/request-key.ts +0 -5
- package/dist/templates/native-go-jobs/frontend/test/background.test.ts +0 -205
- package/dist/templates/native-go-root-ops/backend/internal/app/executor.go +0 -140
- package/dist/templates/native-go-root-ops/backend/internal/app/executor_test.go +0 -117
- package/dist/templates/native-go-root-ops/root/whoami.sh +0 -3
- package/dist/templates/native-go-vue/README.md +0 -47
- package/dist/templates/native-go-vue/frontend/DESIGN.md +0 -61
- package/dist/templates/native-go-vue/frontend/package-lock.json +0 -2530
- package/dist/templates/native-go-vue/frontend/package.json +0 -6
- package/dist/templates/native-go-vue/frontend/src/App.vue +0 -96
- package/dist/templates/native-go-vue/frontend/src/CapabilityPanels.vue +0 -6
- package/dist/templates/native-go-vue/frontend/src/context.ts +0 -78
- package/dist/templates/native-go-vue/frontend/src/delegate/ExecutorSettings.vue +0 -70
- package/dist/templates/native-go-vue/frontend/src/delegate/catalogs.ts +0 -11
- package/dist/templates/native-go-vue/frontend/src/delegate/copy.test.ts +0 -12
- package/dist/templates/native-go-vue/frontend/src/delegate/copy.ts +0 -4
- package/dist/templates/native-go-vue/frontend/src/delegate/executor-settings.test.ts +0 -23
- package/dist/templates/native-go-vue/frontend/src/delegate/executor-setup.ts +0 -24
- package/dist/templates/native-go-vue/frontend/src/delegate/facade.test.ts +0 -100
- package/dist/templates/native-go-vue/frontend/src/delegate/facade.ts +0 -85
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/de.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/en.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/es.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/fr.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/it.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/ja.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/ko.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/de.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/en.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/es.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/fr.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/it.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/ja.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/ko.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/zh-CN.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/save/zh-TW.json +0 -42
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/zh-CN.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/zh-TW.json +0 -47
- package/dist/templates/native-go-vue/frontend/src/delegate/long-running.ts +0 -57
- package/dist/templates/native-go-vue/frontend/src/delegate/save-copy.test.ts +0 -12
- package/dist/templates/native-go-vue/frontend/src/delegate/save-copy.ts +0 -24
- package/dist/templates/native-go-vue/frontend/src/delegate/scoped-picker.test.ts +0 -12
- package/dist/templates/native-go-vue/frontend/src/delegate/scoped-picker.ts +0 -21
- package/dist/templates/native-go-vue/frontend/src/files/FileBrowser.vue +0 -131
- package/dist/templates/native-go-vue/frontend/src/files/FilesPage.vue +0 -35
- package/dist/templates/native-go-vue/frontend/src/files/files.test.ts +0 -100
- package/dist/templates/native-go-vue/frontend/src/files/provider.test.ts +0 -48
- package/dist/templates/native-go-vue/frontend/src/files/transfers.test.ts +0 -27
- package/dist/templates/native-go-vue/frontend/src/files/transfers.ts +0 -25
- package/dist/templates/native-go-vue/frontend/src/i18n/de.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/en.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/es.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/fr.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/it.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/ja.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/ko.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/zh-CN.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n/zh-TW.json +0 -20
- package/dist/templates/native-go-vue/frontend/src/i18n.ts +0 -13
- package/dist/templates/native-go-vue/frontend/src/identity/DESIGN.md +0 -46
- package/dist/templates/native-go-vue/frontend/src/identity/LoginPage.vue +0 -78
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/de.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/en.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/es.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/fr.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/it.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/ja.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/ko.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/zh-CN.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n/zh-TW.json +0 -27
- package/dist/templates/native-go-vue/frontend/src/identity/i18n.ts +0 -14
- package/dist/templates/native-go-vue/frontend/src/identity/login.test.ts +0 -32
- package/dist/templates/native-go-vue/frontend/src/identity/session.test.ts +0 -33
- package/dist/templates/native-go-vue/frontend/src/identity/session.ts +0 -74
- package/dist/templates/native-go-vue/frontend/src/main.ts +0 -32
- package/dist/templates/native-go-vue/frontend/src/nas/NasPicker.vue +0 -42
- package/dist/templates/native-go-vue/frontend/src/nas/contract.ts +0 -12
- package/dist/templates/native-go-vue/frontend/src/nas/destination.test.ts +0 -48
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/de.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/en.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/es.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/fr.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/it.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/ja.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/ko.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/zh-CN.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/zh-TW.json +0 -41
- package/dist/templates/native-go-vue/frontend/src/nas/i18n.ts +0 -2
- package/dist/templates/native-go-vue/frontend/src/nas/locale.ts +0 -24
- package/dist/templates/native-go-vue/frontend/src/nas/provider.ts +0 -50
- package/dist/templates/native-go-vue/frontend/src/nas/use-request.ts +0 -18
- package/dist/templates/native-go-vue/frontend/src/portal/PortalSettings.vue +0 -39
- package/dist/templates/native-go-vue/frontend/src/shell/AppShell.vue +0 -48
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/de.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/en.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/es.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/fr.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/it.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/ja.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/ko.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/zh-CN.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/zh-TW.json +0 -4
- package/dist/templates/native-go-vue/frontend/src/shell/i18n.ts +0 -17
- package/dist/templates/native-go-vue/frontend/src/shell/pages.ts +0 -15
- package/dist/templates/native-go-vue/frontend/src/style.css +0 -27
- package/dist/templates/native-go-vue/frontend/test/apps.test.ts +0 -57
- package/dist/templates/native-go-vue/frontend/test/native-controls.test.ts +0 -27
- package/dist/templates/native-go-vue/frontend/test/portal-settings.test.ts +0 -71
- package/dist/templates/native-go-vue/frontend/test/shell-i18n.test.ts +0 -50
- package/dist/templates/native-go-vue/frontend/test/shell-ui.test.ts +0 -20
- package/dist/templates/native-go-vue/frontend/test/shell.test.ts +0 -30
- package/dist/templates/native-go-vue/frontend/tsconfig.json +0 -1
- package/dist/templates/native-go-vue/frontend/vite.config.ts +0 -10
- package/dist/templates/native-go-vue/gitignore +0 -2
- package/templates/_daemon/fixture_linux_test.go +0 -15
- package/templates/_daemon/fixture_other_test.go +0 -7
- package/templates/_daemon/go.mod +0 -5
- package/templates/_daemon/main.go +0 -611
- package/templates/_daemon/main_test.go +0 -315
- package/templates/_daemon/process_linux.go +0 -55
- package/templates/_daemon/process_linux_test.go +0 -161
- package/templates/_daemon/process_other.go +0 -14
- package/templates/_daemon/testdata/child.go +0 -44
- package/templates/_executor/README.md +0 -318
- package/templates/_executor/anchor.go +0 -156
- package/templates/_executor/anchor_test.go +0 -161
- package/templates/_executor/apppriv_review_test.go +0 -28
- package/templates/_executor/auth_presence_review_test.go +0 -38
- package/templates/_executor/cancel_contract_test.go +0 -236
- package/templates/_executor/cmd/lifecycle/main.go +0 -42
- package/templates/_executor/cookie_review_test.go +0 -27
- package/templates/_executor/copy.go +0 -64
- package/templates/_executor/copy_test.go +0 -88
- package/templates/_executor/digest_review_test.go +0 -120
- package/templates/_executor/directories.go +0 -40
- package/templates/_executor/dsm.go +0 -369
- package/templates/_executor/dsm_test.go +0 -290
- package/templates/_executor/executor.go +0 -735
- package/templates/_executor/executor_test.go +0 -314
- package/templates/_executor/go.mod +0 -5
- package/templates/_executor/identity.go +0 -74
- package/templates/_executor/identity_kernel_linux_test.go +0 -60
- package/templates/_executor/identity_linux.go +0 -82
- package/templates/_executor/identity_security_test.go +0 -43
- package/templates/_executor/internal/lifecycle/lifecycle.go +0 -95
- package/templates/_executor/internal/lifecycle/lifecycle_test.go +0 -232
- package/templates/_executor/internal/taskscript/boot.sh +0 -31
- package/templates/_executor/internal/taskscript/cmd/main.go +0 -19
- package/templates/_executor/internal/taskscript/control.sh +0 -31
- package/templates/_executor/internal/taskscript/tasks.go +0 -44
- package/templates/_executor/json_review_test.go +0 -40
- package/templates/_executor/lifecycle_test.go +0 -97
- package/templates/_executor/link_linux.go +0 -28
- package/templates/_executor/long_running_test.go +0 -530
- package/templates/_executor/main.go +0 -576
- package/templates/_executor/managed.go +0 -117
- package/templates/_executor/managed_test.go +0 -137
- package/templates/_executor/move_linux.go +0 -490
- package/templates/_executor/move_linux_test.go +0 -460
- package/templates/_executor/move_validation.go +0 -46
- package/templates/_executor/move_validation_test.go +0 -187
- package/templates/_executor/operations.go +0 -926
- package/templates/_executor/path_test.go +0 -35
- package/templates/_executor/pid.go +0 -37
- package/templates/_executor/pid_test.go +0 -113
- package/templates/_executor/platform_linux.go +0 -187
- package/templates/_executor/platform_linux_test.go +0 -191
- package/templates/_executor/platform_other.go +0 -76
- package/templates/_executor/process.go +0 -142
- package/templates/_executor/purge_log.go +0 -18
- package/templates/_executor/records.go +0 -242
- package/templates/_executor/scope_cancel_contract_test.go +0 -91
- package/templates/_executor/scope_client.go +0 -37
- package/templates/_executor/scope_contract.go +0 -12
- package/templates/_executor/selected_scope.go +0 -146
- package/templates/_executor/selected_scope_test.go +0 -186
- package/templates/_executor/socket_linux_test.go +0 -46
- package/templates/_executor/status_disabled_test.go +0 -33
- package/templates/_executor/store.go +0 -91
- package/templates/_executor/supervise.go +0 -109
- package/templates/_executor/supervise_test.go +0 -130
- package/templates/_executor/task_race_review_test.go +0 -47
- package/templates/_executor/tasks.go +0 -320
- package/templates/_executor/tasks_dsm71_test.go +0 -114
- package/templates/_executor/tasks_review_test.go +0 -43
- package/templates/_executor/tasks_test.go +0 -223
- package/templates/_executor/testdata/evidence/cleanup.json +0 -24
- package/templates/_executor/testdata/evidence/final-smoke.jsonl +0 -9
- package/templates/_executor/testdata/evidence/kernel-acl.json +0 -6
- package/templates/_executor/testdata/evidence/linux-tests.log +0 -123
- package/templates/_executor/testdata/evidence/live.jsonl +0 -23
- package/templates/_executor/testdata/evidence/storage.json +0 -90
- package/templates/_executor/testdata/evidence/validation.json +0 -55
- package/templates/_executor/testdata/live_probe.py +0 -98
- package/templates/_executor/upgrade_watch_test.go +0 -244
- package/templates/_executor/watch.go +0 -164
- package/templates/_executor/watch_test.go +0 -291
- package/templates/_executor/write_review_linux_test.go +0 -87
- package/templates/_gateway/auth.go +0 -101
- package/templates/_gateway/auth_test.go +0 -216
- package/templates/_gateway/cgi.go +0 -133
- package/templates/_gateway/cgi_test.go +0 -156
- package/templates/_gateway/csrf.go +0 -73
- package/templates/_gateway/csrf_test.go +0 -155
- package/templates/_gateway/directory.go +0 -108
- package/templates/_gateway/directory_test.go +0 -202
- package/templates/_gateway/gateway.go +0 -412
- package/templates/_gateway/gateway_test.go +0 -676
- package/templates/_gateway/go.mod +0 -5
- package/templates/_gateway/groups.go +0 -66
- package/templates/_gateway/main.go +0 -45
- package/templates/_shared/AGENTS.md +0 -146
- package/templates/_shared/CLAUDE.md +0 -1
- package/templates/_shared/GO-LICENSE +0 -27
- package/templates/_shared/GO-PATENTS +0 -22
- package/templates/_shared/LICENSES/TEMPLATE.txt +0 -21
- package/templates/_shared/third-party-notices.mjs +0 -51
- package/templates/binary/LICENSES/GO-LICENSE +0 -27
- package/templates/binary/LICENSES/GO-PATENTS +0 -22
- package/templates/binary/dsm-package.yaml +0 -46
- package/templates/binary/example/main.go +0 -16
- package/templates/binary/gitignore +0 -2
- package/templates/binary/i18n/messages/de.json +0 -4
- package/templates/binary/i18n/messages/en.json +0 -4
- package/templates/binary/i18n/messages/es.json +0 -4
- package/templates/binary/i18n/messages/fr.json +0 -4
- package/templates/binary/i18n/messages/it.json +0 -4
- package/templates/binary/i18n/messages/ja.json +0 -4
- package/templates/binary/i18n/messages/ko.json +0 -4
- package/templates/binary/i18n/messages/zh-CN.json +0 -4
- package/templates/binary/i18n/messages/zh-TW.json +0 -4
- package/templates/binary/ui/app.css +0 -4
- package/templates/binary/ui/app.js +0 -32
- package/templates/compose/compose.yaml +0 -8
- package/templates/compose/synology-app.yaml +0 -16
- package/templates/native-authorization/AuthorizationGate.vue +0 -91
- package/templates/native-authorization/i18n/de.json +0 -37
- package/templates/native-authorization/i18n/en.json +0 -37
- package/templates/native-authorization/i18n/es.json +0 -37
- package/templates/native-authorization/i18n/fr.json +0 -37
- package/templates/native-authorization/i18n/index.ts +0 -15
- package/templates/native-authorization/i18n/it.json +0 -37
- package/templates/native-authorization/i18n/ja.json +0 -37
- package/templates/native-authorization/i18n/ko.json +0 -37
- package/templates/native-authorization/i18n/zh-CN.json +0 -37
- package/templates/native-authorization/i18n/zh-TW.json +0 -37
- package/templates/native-go/README.md +0 -459
- package/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +0 -61
- package/templates/native-go/backend/cmd/app/main.go +0 -95
- package/templates/native-go/backend/cmd/background-worker/main.go +0 -38
- package/templates/native-go/backend/go.mod +0 -9
- package/templates/native-go/backend/go.sum +0 -4
- package/templates/native-go/backend/internal/api/cgi_framing_test.go +0 -32
- package/templates/native-go/backend/internal/api/cookie_review_test.go +0 -28
- package/templates/native-go/backend/internal/api/deadline_test.go +0 -114
- package/templates/native-go/backend/internal/api/dsm-session.go +0 -54
- package/templates/native-go/backend/internal/api/dsm-session_test.go +0 -51
- package/templates/native-go/backend/internal/api/entry_test.go +0 -47
- package/templates/native-go/backend/internal/api/errors.go +0 -47
- package/templates/native-go/backend/internal/api/permissions.go +0 -161
- package/templates/native-go/backend/internal/api/permissions.json +0 -5
- package/templates/native-go/backend/internal/api/permissions_test.go +0 -113
- package/templates/native-go/backend/internal/api/policy_fixture_test.go +0 -8
- package/templates/native-go/backend/internal/api/registry.go +0 -142
- package/templates/native-go/backend/internal/api/registry_test.go +0 -344
- package/templates/native-go/backend/internal/api/resource_limits_test.go +0 -87
- package/templates/native-go/backend/internal/api/sdk-permissions.json +0 -59
- package/templates/native-go/backend/internal/api/sdk_policy_test.go +0 -31
- package/templates/native-go/backend/internal/api/server.go +0 -305
- package/templates/native-go/backend/internal/api/testdata/permissions-cases.json +0 -172
- package/templates/native-go/backend/internal/app/background.go +0 -249
- package/templates/native-go/backend/internal/app/background_none.go +0 -8
- package/templates/native-go/backend/internal/app/background_owner.go +0 -38
- package/templates/native-go/backend/internal/app/background_owner_test.go +0 -163
- package/templates/native-go/backend/internal/app/background_schedule.go +0 -69
- package/templates/native-go/backend/internal/app/background_schedule_test.go +0 -62
- package/templates/native-go/backend/internal/app/background_test.go +0 -320
- package/templates/native-go/backend/internal/app/delegate_config.go +0 -57
- package/templates/native-go/backend/internal/app/delegate_config_test.go +0 -28
- package/templates/native-go/backend/internal/app/delegate_none.go +0 -5
- package/templates/native-go/backend/internal/app/identity.go +0 -20
- package/templates/native-go/backend/internal/app/identity_test.go +0 -15
- package/templates/native-go/backend/internal/app/migrations.go +0 -41
- package/templates/native-go/backend/internal/app/migrations_test.go +0 -41
- package/templates/native-go/backend/internal/app/portal.go +0 -30
- package/templates/native-go/backend/internal/app/portal_test.go +0 -55
- package/templates/native-go/backend/internal/app/root_none.go +0 -9
- package/templates/native-go/backend/internal/app/routes.go +0 -137
- package/templates/native-go/backend/internal/app/routes_test.go +0 -165
- package/templates/native-go/backend/internal/app/session_files.go +0 -9
- package/templates/native-go/backend/internal/app/session_files_test.go +0 -14
- package/templates/native-go/backend/internal/app/shared_folder.go +0 -144
- package/templates/native-go/backend/internal/app/shared_folder_test.go +0 -158
- package/templates/native-go/backend/internal/background/access.go +0 -57
- package/templates/native-go/backend/internal/background/lock_test.go +0 -131
- package/templates/native-go/backend/internal/background/owner_test.go +0 -118
- package/templates/native-go/backend/internal/background/runner.go +0 -185
- package/templates/native-go/backend/internal/background/runner_test.go +0 -209
- package/templates/native-go/backend/internal/background/schedule.go +0 -336
- package/templates/native-go/backend/internal/background/schedule_test.go +0 -368
- package/templates/native-go/backend/internal/background/store.go +0 -825
- package/templates/native-go/backend/internal/background/store_test.go +0 -365
- package/templates/native-go/backend/internal/datamigrate/migrate.go +0 -191
- package/templates/native-go/backend/internal/datamigrate/migrate_test.go +0 -177
- package/templates/native-go/backend/internal/dsm/admin.go +0 -76
- package/templates/native-go/backend/internal/dsm/admin_linux.go +0 -110
- package/templates/native-go/backend/internal/dsm/admin_linux_test.go +0 -105
- package/templates/native-go/backend/internal/dsm/admin_other.go +0 -15
- package/templates/native-go/backend/internal/dsm/admin_test.go +0 -67
- package/templates/native-go/backend/internal/dsm/apppriv.go +0 -30
- package/templates/native-go/backend/internal/dsm/auth.go +0 -94
- package/templates/native-go/backend/internal/dsm/auth_test.go +0 -159
- package/templates/native-go/backend/internal/dsm/bridge_file.go +0 -75
- package/templates/native-go/backend/internal/dsm/bridge_file_test.go +0 -57
- package/templates/native-go/backend/internal/dsm/entry.go +0 -177
- package/templates/native-go/backend/internal/dsm/entry_test.go +0 -315
- package/templates/native-go/backend/internal/dsm/native/admin-aarch64.elf +0 -0
- package/templates/native-go/backend/internal/dsm/native/admin-armv7.elf +0 -0
- package/templates/native-go/backend/internal/dsm/native/admin-x86_64.elf +0 -0
- package/templates/native-go/backend/internal/dsm/native/admin_check.c +0 -28
- package/templates/native-go/backend/internal/dsm/native/apppriv-aarch64.elf +0 -0
- package/templates/native-go/backend/internal/dsm/native/apppriv-armv7.elf +0 -0
- package/templates/native-go/backend/internal/dsm/native/apppriv-x86_64.elf +0 -0
- package/templates/native-go/backend/internal/dsm/native/apppriv_check.c +0 -33
- package/templates/native-go/backend/internal/dsm/native/build.sh +0 -18
- package/templates/native-go/backend/internal/dsm/native/licenses/GLIBC-NOTICES.txt +0 -400
- package/templates/native-go/backend/internal/dsm/native/licenses/LGPL-2.1.txt +0 -501
- package/templates/native-go/backend/internal/dsm/native/licenses/SOURCE.txt +0 -5
- package/templates/native-go/backend/internal/dsm/native/licenses/ZIG-MIT.txt +0 -21
- package/templates/native-go/backend/internal/dsm/native/provenance.json +0 -18
- package/templates/native-go/backend/internal/filestation/browse_test.go +0 -67
- package/templates/native-go/backend/internal/filestation/check_permission.go +0 -71
- package/templates/native-go/backend/internal/filestation/check_permission_test.go +0 -77
- package/templates/native-go/backend/internal/filestation/client.go +0 -337
- package/templates/native-go/backend/internal/filestation/client_test.go +0 -155
- package/templates/native-go/backend/internal/filestation/doc.go +0 -4
- package/templates/native-go/backend/internal/filestation/download_dsm71_test.go +0 -82
- package/templates/native-go/backend/internal/filestation/http.go +0 -70
- package/templates/native-go/backend/internal/filestation/http_test.go +0 -188
- package/templates/native-go/backend/internal/filestation/operations_test.go +0 -206
- package/templates/native-go/backend/internal/filestation/read_file_test.go +0 -89
- package/templates/native-go/backend/internal/filestation/sdk_policy_test.go +0 -39
- package/templates/native-go/backend/internal/filestation/service.go +0 -254
- package/templates/native-go/backend/internal/filestation/service_test.go +0 -74
- package/templates/native-go/backend/internal/filestation/upload_stream.go +0 -76
- package/templates/native-go/backend/internal/filestation/upload_stream_test.go +0 -77
- package/templates/native-go/backend/internal/filestation/write.go +0 -32
- package/templates/native-go/backend/internal/filestation/write_test.go +0 -124
- package/templates/native-go/backend/internal/identity/README.md +0 -59
- package/templates/native-go/backend/internal/identity/dsm.go +0 -115
- package/templates/native-go/backend/internal/identity/http.go +0 -291
- package/templates/native-go/backend/internal/identity/identity_test.go +0 -530
- package/templates/native-go/backend/internal/identity/service.go +0 -159
- package/templates/native-go/backend/internal/identity/store.go +0 -109
- package/templates/native-go/backend/internal/jsonlimits/limits.go +0 -48
- package/templates/native-go/backend/internal/jsonlimits/limits_test.go +0 -52
- package/templates/native-go/backend/internal/portal/portal.go +0 -138
- package/templates/native-go/backend/internal/portal/portal_test.go +0 -89
- package/templates/native-go/dsm-package.yaml +0 -71
- package/templates/native-go/gitignore +0 -1
- package/templates/native-go/i18n/glossary.json +0 -663
- package/templates/native-go/i18n/messages/de.json +0 -29
- package/templates/native-go/i18n/messages/en.json +0 -29
- package/templates/native-go/i18n/messages/es.json +0 -29
- package/templates/native-go/i18n/messages/fr.json +0 -29
- package/templates/native-go/i18n/messages/it.json +0 -29
- package/templates/native-go/i18n/messages/ja.json +0 -29
- package/templates/native-go/i18n/messages/ko.json +0 -29
- package/templates/native-go/i18n/messages/zh-CN.json +0 -29
- package/templates/native-go/i18n/messages/zh-TW.json +0 -29
- package/templates/native-go/ui/app.css +0 -45
- package/templates/native-go/ui/app.js +0 -111
- package/templates/native-go-delegate/DELEGATE.md +0 -263
- package/templates/native-go-delegate/backend/cmd/background-worker/main.go +0 -48
- package/templates/native-go-delegate/backend/internal/app/delegate.go +0 -25
- package/templates/native-go-delegate/backend/internal/app/delegate_on.go +0 -5
- package/templates/native-go-delegate/backend/internal/app/delegate_routes_test.go +0 -31
- package/templates/native-go-delegate/backend/internal/background/delegate_review_test.go +0 -174
- package/templates/native-go-delegate/backend/internal/background/delegated.go +0 -277
- package/templates/native-go-delegate/backend/internal/background/delegated_moves.go +0 -270
- package/templates/native-go-delegate/backend/internal/background/delegated_test.go +0 -34
- package/templates/native-go-delegate/backend/internal/delegate/admission_recovery_test.go +0 -410
- package/templates/native-go-delegate/backend/internal/delegate/busy_review_test.go +0 -15
- package/templates/native-go-delegate/backend/internal/delegate/cancel_contract_test.go +0 -95
- package/templates/native-go-delegate/backend/internal/delegate/client.go +0 -151
- package/templates/native-go-delegate/backend/internal/delegate/client_test.go +0 -214
- package/templates/native-go-delegate/backend/internal/delegate/destination.go +0 -110
- package/templates/native-go-delegate/backend/internal/delegate/destination_state.go +0 -117
- package/templates/native-go-delegate/backend/internal/delegate/destination_state_test.go +0 -60
- package/templates/native-go-delegate/backend/internal/delegate/destination_test.go +0 -116
- package/templates/native-go-delegate/backend/internal/delegate/example.go +0 -81
- package/templates/native-go-delegate/backend/internal/delegate/example_test.go +0 -91
- package/templates/native-go-delegate/backend/internal/delegate/executor_contract_test.go +0 -511
- package/templates/native-go-delegate/backend/internal/delegate/files.go +0 -132
- package/templates/native-go-delegate/backend/internal/delegate/long_running_routes.go +0 -92
- package/templates/native-go-delegate/backend/internal/delegate/long_running_routes_test.go +0 -99
- package/templates/native-go-delegate/backend/internal/delegate/move.go +0 -348
- package/templates/native-go-delegate/backend/internal/delegate/move_test.go +0 -351
- package/templates/native-go-delegate/backend/internal/delegate/operations_list.go +0 -65
- package/templates/native-go-delegate/backend/internal/delegate/operations_list_test.go +0 -114
- package/templates/native-go-delegate/backend/internal/delegate/retry.go +0 -106
- package/templates/native-go-delegate/backend/internal/delegate/retry_test.go +0 -143
- package/templates/native-go-delegate/backend/internal/delegate/service.go +0 -364
- package/templates/native-go-delegate/backend/internal/delegate/service_test.go +0 -318
- package/templates/native-go-delegate/backend/internal/delegate/staging.go +0 -121
- package/templates/native-go-delegate/backend/internal/delegate/status_disabled_test.go +0 -51
- package/templates/native-go-delegate/backend/internal/delegate/testdata/executor_contract.txt +0 -112
- package/templates/native-go-delegate/backend/internal/delegate/transient_contract_test.go +0 -137
- package/templates/native-go-delegate/backend/internal/delegate/wait_cancel_test.go +0 -101
- package/templates/native-go-delegate/backend/internal/delegate/worker.go +0 -225
- package/templates/native-go-delegate/backend/internal/filestation/files.go +0 -43
- package/templates/native-go-delegate/backend/internal/filestation/files_test.go +0 -59
- package/templates/native-go-delegate/frontend/src/CapabilityPanels.vue +0 -37
- package/templates/native-go-delegate/frontend/src/delegate/BackgroundSavePanel.vue +0 -113
- package/templates/native-go-delegate/frontend/src/delegate/DelegatePanel.vue +0 -70
- package/templates/native-go-delegate/frontend/src/delegate/copy.ts +0 -8
- package/templates/native-go-delegate/frontend/src/delegate/i18n/waiting.json +0 -11
- package/templates/native-go-delegate/frontend/test/background-save.test.ts +0 -121
- package/templates/native-go-delegate/frontend/test/delegate.test.ts +0 -145
- package/templates/native-go-delegate/frontend/test/scope-settings.test.ts +0 -49
- package/templates/native-go-delegate/test-frontend.sh +0 -12
- package/templates/native-go-delegate/test.sh +0 -18
- package/templates/native-go-jobs/BACKGROUND.md +0 -108
- package/templates/native-go-jobs/backend/internal/app/background_on.go +0 -7
- package/templates/native-go-jobs/backend/internal/app/background_routes_test.go +0 -90
- package/templates/native-go-jobs/frontend/src/background/BackgroundPanel.vue +0 -170
- package/templates/native-go-jobs/frontend/src/background/i18n/de.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/en.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/es.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/fr.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/it.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/ja.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/ko.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/zh-CN.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n/zh-TW.json +0 -75
- package/templates/native-go-jobs/frontend/src/background/i18n.ts +0 -19
- package/templates/native-go-jobs/frontend/src/background/picker-provider.ts +0 -12
- package/templates/native-go-jobs/frontend/src/background/request-key.ts +0 -5
- package/templates/native-go-jobs/frontend/test/background.test.ts +0 -205
- package/templates/native-go-root-ops/backend/internal/app/executor.go +0 -140
- package/templates/native-go-root-ops/backend/internal/app/executor_test.go +0 -117
- package/templates/native-go-root-ops/root/whoami.sh +0 -3
- package/templates/native-go-vue/README.md +0 -47
- package/templates/native-go-vue/frontend/DESIGN.md +0 -61
- package/templates/native-go-vue/frontend/package-lock.json +0 -2530
- package/templates/native-go-vue/frontend/package.json +0 -6
- package/templates/native-go-vue/frontend/src/App.vue +0 -96
- package/templates/native-go-vue/frontend/src/CapabilityPanels.vue +0 -6
- package/templates/native-go-vue/frontend/src/context.ts +0 -78
- package/templates/native-go-vue/frontend/src/delegate/ExecutorSettings.vue +0 -70
- package/templates/native-go-vue/frontend/src/delegate/catalogs.ts +0 -11
- package/templates/native-go-vue/frontend/src/delegate/copy.test.ts +0 -12
- package/templates/native-go-vue/frontend/src/delegate/copy.ts +0 -4
- package/templates/native-go-vue/frontend/src/delegate/executor-settings.test.ts +0 -23
- package/templates/native-go-vue/frontend/src/delegate/executor-setup.ts +0 -24
- package/templates/native-go-vue/frontend/src/delegate/facade.test.ts +0 -100
- package/templates/native-go-vue/frontend/src/delegate/facade.ts +0 -85
- package/templates/native-go-vue/frontend/src/delegate/i18n/de.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/en.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/es.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/fr.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/it.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/ja.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/ko.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/de.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/en.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/es.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/fr.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/it.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/ja.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/ko.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/zh-CN.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/save/zh-TW.json +0 -42
- package/templates/native-go-vue/frontend/src/delegate/i18n/zh-CN.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/i18n/zh-TW.json +0 -47
- package/templates/native-go-vue/frontend/src/delegate/long-running.ts +0 -57
- package/templates/native-go-vue/frontend/src/delegate/save-copy.test.ts +0 -12
- package/templates/native-go-vue/frontend/src/delegate/save-copy.ts +0 -24
- package/templates/native-go-vue/frontend/src/delegate/scoped-picker.test.ts +0 -12
- package/templates/native-go-vue/frontend/src/delegate/scoped-picker.ts +0 -21
- package/templates/native-go-vue/frontend/src/files/FileBrowser.vue +0 -131
- package/templates/native-go-vue/frontend/src/files/FilesPage.vue +0 -35
- package/templates/native-go-vue/frontend/src/files/files.test.ts +0 -100
- package/templates/native-go-vue/frontend/src/files/provider.test.ts +0 -48
- package/templates/native-go-vue/frontend/src/files/transfers.test.ts +0 -27
- package/templates/native-go-vue/frontend/src/files/transfers.ts +0 -25
- package/templates/native-go-vue/frontend/src/i18n/de.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/en.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/es.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/fr.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/it.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/ja.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/ko.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/zh-CN.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n/zh-TW.json +0 -20
- package/templates/native-go-vue/frontend/src/i18n.ts +0 -13
- package/templates/native-go-vue/frontend/src/identity/DESIGN.md +0 -46
- package/templates/native-go-vue/frontend/src/identity/LoginPage.vue +0 -78
- package/templates/native-go-vue/frontend/src/identity/i18n/de.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/en.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/es.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/fr.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/it.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/ja.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/ko.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/zh-CN.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n/zh-TW.json +0 -27
- package/templates/native-go-vue/frontend/src/identity/i18n.ts +0 -14
- package/templates/native-go-vue/frontend/src/identity/login.test.ts +0 -32
- package/templates/native-go-vue/frontend/src/identity/session.test.ts +0 -33
- package/templates/native-go-vue/frontend/src/identity/session.ts +0 -74
- package/templates/native-go-vue/frontend/src/main.ts +0 -32
- package/templates/native-go-vue/frontend/src/nas/NasPicker.vue +0 -42
- package/templates/native-go-vue/frontend/src/nas/contract.ts +0 -12
- package/templates/native-go-vue/frontend/src/nas/destination.test.ts +0 -48
- package/templates/native-go-vue/frontend/src/nas/i18n/files/de.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/en.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/es.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/fr.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/it.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/ja.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/ko.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/zh-CN.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n/files/zh-TW.json +0 -41
- package/templates/native-go-vue/frontend/src/nas/i18n.ts +0 -2
- package/templates/native-go-vue/frontend/src/nas/locale.ts +0 -24
- package/templates/native-go-vue/frontend/src/nas/provider.ts +0 -50
- package/templates/native-go-vue/frontend/src/nas/use-request.ts +0 -18
- package/templates/native-go-vue/frontend/src/portal/PortalSettings.vue +0 -39
- package/templates/native-go-vue/frontend/src/shell/AppShell.vue +0 -48
- package/templates/native-go-vue/frontend/src/shell/i18n/de.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/en.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/es.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/fr.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/it.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/ja.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/ko.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/zh-CN.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n/zh-TW.json +0 -4
- package/templates/native-go-vue/frontend/src/shell/i18n.ts +0 -17
- package/templates/native-go-vue/frontend/src/shell/pages.ts +0 -15
- package/templates/native-go-vue/frontend/src/style.css +0 -27
- package/templates/native-go-vue/frontend/test/apps.test.ts +0 -57
- package/templates/native-go-vue/frontend/test/native-controls.test.ts +0 -27
- package/templates/native-go-vue/frontend/test/portal-settings.test.ts +0 -71
- package/templates/native-go-vue/frontend/test/shell-i18n.test.ts +0 -50
- package/templates/native-go-vue/frontend/test/shell-ui.test.ts +0 -20
- package/templates/native-go-vue/frontend/test/shell.test.ts +0 -30
- package/templates/native-go-vue/frontend/tsconfig.json +0 -1
- package/templates/native-go-vue/frontend/vite.config.ts +0 -10
- package/templates/native-go-vue/gitignore +0 -2
- /package/{dist/templates/_daemon → assets/go/daemon}/fixture_linux_test.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/fixture_other_test.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/go.mod +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/main.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/main_test.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/process_linux.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/process_linux_test.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/process_other.go +0 -0
- /package/{dist/templates/_daemon → assets/go/daemon}/testdata/child.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/auth.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/auth_test.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/cgi.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/cgi_test.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/csrf.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/csrf_test.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/directory.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/directory_test.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/gateway.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/gateway_test.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/go.mod +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/groups.go +0 -0
- /package/{dist/templates/_gateway → assets/go/gateway}/main.go +0 -0
- /package/{dist/templates/_shared → assets/licenses}/GO-LICENSE +0 -0
- /package/{dist/templates/_shared → assets/licenses}/GO-PATENTS +0 -0
- /package/{dist/templates/_shared/LICENSES → assets/licenses}/TEMPLATE.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { chmodSync, copyFileSync, lstatSync, mkdirSync, readdirSync, realpathSync, writeFileSync } from "node:fs";
|
|
2
2
|
import { isAbsolute, join, relative, resolve } from "node:path";
|
|
3
3
|
import { PINNED_GO_HINT, pinnedGoBuildEnv, pinnedGoProblem } from "../build-spk/go-toolchain.js";
|
|
4
|
-
import {
|
|
4
|
+
import { goAssetDir } from "../template-paths.js";
|
|
5
5
|
import { checkCgiBinary } from "./binary.js";
|
|
6
6
|
import { StandaloneBuildError } from "./spk.js";
|
|
7
7
|
const fields = new Set(["exec", "targets", "args", "env", "timeouts", "uninstall_args"]);
|
|
@@ -60,7 +60,7 @@ export async function buildDaemonControl(manifest, arch, work, run) {
|
|
|
60
60
|
return undefined;
|
|
61
61
|
const out = join(work, `daemon-control-${arch}`);
|
|
62
62
|
const result = await run("go", ["build", "-trimpath", "-buildvcs=false", "-ldflags", "-s -w -buildid=", "-o", out, "."], {
|
|
63
|
-
cwd:
|
|
63
|
+
cwd: goAssetDir("daemon"), env: { ...process.env, ...pinnedGoBuildEnv(arch) },
|
|
64
64
|
});
|
|
65
65
|
if (result.missing || result.status !== 0)
|
|
66
66
|
throw new StandaloneBuildError("STANDALONE_DAEMON_BUILD_FAILED", `daemon controller build failed (${arch}). ${PINNED_GO_HINT}\n${result.stderr}`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { REOPEN_EVENTS_RUNTIME } from "./reopen-events.js";
|
|
2
2
|
import { DSM_LANGS } from "./i18n.js";
|
|
3
|
-
import { PASSWORD_CONFIRM, ROOT_PANEL, ROOT_RUNTIME
|
|
3
|
+
import { PASSWORD_CONFIRM, ROOT_PANEL, ROOT_RUNTIME } from "./root-window.js";
|
|
4
4
|
import { HOST_ADAPTER_RUNTIME } from "./host-adapter.js";
|
|
5
5
|
import { permitsOrdinaryUsers } from "./api-permissions.js";
|
|
6
6
|
import { PORTAL_RUNTIME } from "./portal-window.js";
|
|
@@ -320,7 +320,7 @@ function settingsOnlyApproval(manifest) {
|
|
|
320
320
|
*/
|
|
321
321
|
function renderRootParts(ns, manifest) {
|
|
322
322
|
return {
|
|
323
|
-
definitions: `${ns}.rootTasks = ${JSON.stringify(
|
|
323
|
+
definitions: `${ns}.rootTasks = ${JSON.stringify(manifest.executor.tasks)};
|
|
324
324
|
${ns}.createRootAccess = (function () {
|
|
325
325
|
${ROOT_RUNTIME}
|
|
326
326
|
return createRootAccess;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type PackageMetadata } from "../package-metadata.js";
|
|
2
2
|
import { type DelegateCapability } from "../runtime/executor-policy.js";
|
|
3
|
-
import type { ExecutorPins } from "../runtime/executor-tasks.js";
|
|
3
|
+
import type { ExecutorPins, ExecutorTask } from "../runtime/executor-tasks.js";
|
|
4
4
|
import { type NativeArchFamily } from "../build-spk/dsm-arch.js";
|
|
5
5
|
import { type Catalogs, type InfoTranslations } from "./i18n.js";
|
|
6
6
|
export type { InfoText } from "./i18n.js";
|
|
@@ -58,7 +58,10 @@ export interface StandaloneManifest {
|
|
|
58
58
|
capabilities: Capabilities;
|
|
59
59
|
/** Fixed root/<name>.sh operations, enabled by capabilities.rootOps. */
|
|
60
60
|
rootOps?: RootOp[];
|
|
61
|
-
executor
|
|
61
|
+
/** Set by build: the pins and the root tasks generated from the App's SDK executor. */
|
|
62
|
+
executor?: ExecutorPins & {
|
|
63
|
+
tasks: ExecutorTask[];
|
|
64
|
+
};
|
|
62
65
|
daemon?: Daemon;
|
|
63
66
|
/** `install.sharedFolder`: the Shared Folder the install wizard selects or `data-share` creates. */
|
|
64
67
|
sharedFolder?: SharedFolder;
|
|
@@ -14,6 +14,8 @@ import { floorAtAdministrators, permitsOrdinaryUsers, readApiPermissions } from
|
|
|
14
14
|
import { readPortalDeclaration } from "../portal/alias.js";
|
|
15
15
|
import { renderPackageIcons } from "../build-spk/dsm-icons.js";
|
|
16
16
|
import { validateReproducible } from "../reproducible-config.js";
|
|
17
|
+
import { SDK_MODULE, sdkRequirement } from "../runtime/sdk-source.js";
|
|
18
|
+
import { sdkProblems } from "./sdk-check.js";
|
|
17
19
|
/**
|
|
18
20
|
* `dsm-package.yaml`: a Standalone Package, i.e. an unsigned native SPK that
|
|
19
21
|
* runs as its own DSM package account with a CGI backend and a DSM window UI.
|
|
@@ -151,7 +153,7 @@ function readManifest(raw, c) {
|
|
|
151
153
|
const sharedFolder = raw.install === undefined ? undefined : readSharedFolder(raw.install, e => c.fail(e.code, e.message));
|
|
152
154
|
const entry = raw.entry === undefined ? undefined : readEntry(raw.entry, backend, permissions?.policy, c);
|
|
153
155
|
if (entry === "admin-only" && permissions) {
|
|
154
|
-
const floored = floorAtAdministrators(permissions.policy);
|
|
156
|
+
const floored = floorAtAdministrators(permissions.policy, permissions.sdk);
|
|
155
157
|
if (floored.widened.length) {
|
|
156
158
|
c.fail("STANDALONE_ENTRY_WIDENED", `entry: admin-only 以管理員為所有 route 的下限;permissions.json 的 ${floored.widened.join("、")} 會開放給其他人。請改為 administrators,或改用 entry: app-privilege/省略 entry。`);
|
|
157
159
|
}
|
|
@@ -162,6 +164,10 @@ function readManifest(raw, c) {
|
|
|
162
164
|
c.fail("CAPABILITY_COMBINATION_INVALID", "capabilities.identity 需要獨立登入頁;plain UI 不支援,請改用 vue UI(init --ui vue)。");
|
|
163
165
|
if (capabilities.delegate?.scope === "install-selected" && ui && !ui.build)
|
|
164
166
|
c.fail("CAPABILITY_COMBINATION_INVALID", "delegate scope install-selected 只能在 Vue 面板確認;plain UI 不支援,請改用 vue UI(init --ui vue)。");
|
|
167
|
+
if (backend?.kind === "go") {
|
|
168
|
+
for (const problem of sdkProblems(backend.dir, ui?.build?.cwd, Boolean(capabilities.delegate || capabilities.rootOps)))
|
|
169
|
+
c.fail(problem.code, problem.message);
|
|
170
|
+
}
|
|
165
171
|
const i18n = raw.i18n === undefined ? undefined : readI18n(raw.i18n, c);
|
|
166
172
|
const icon = raw.icon === undefined ? undefined : readIcon(raw.icon, c);
|
|
167
173
|
const portal = raw.portal === undefined || !packageId ? undefined : readPortalDeclaration(raw.portal, packageId)
|
|
@@ -222,9 +228,9 @@ function readEntry(value, backend, policy, c) {
|
|
|
222
228
|
if (!backend)
|
|
223
229
|
return undefined;
|
|
224
230
|
const main = backend.kind === "go" ? join(backend.dir, backend.main, "main.go") : "";
|
|
225
|
-
if (backend.kind !== "go" || !
|
|
231
|
+
if (backend.kind !== "go" || !sdkRequirement(backend.dir)
|
|
226
232
|
|| !existsSync(main) || !readFileSync(main, "utf8").includes("dsm.NewEntryGate(")) {
|
|
227
|
-
return c.fail("STANDALONE_ENTRY_UNSUPPORTED",
|
|
233
|
+
return c.fail("STANDALONE_ENTRY_UNSUPPORTED", `entry 需要 SDK 的 entry gate:backend/go.mod 要 require ${SDK_MODULE},並在 cmd/app/main.go 以 dsm.NewEntryGate 包住 authenticator。`);
|
|
228
234
|
}
|
|
229
235
|
if (value === "app-privilege" && !permitsOrdinaryUsers(policy)) {
|
|
230
236
|
return c.fail("STANDALONE_ENTRY_INVALID", "entry: app-privilege 需要至少一個 permissions.json 標為 authenticated 的 route,一般使用者才有功能可用。");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { type ExecutorTask as RootTask } from '../runtime/executor-tasks.js';
|
|
2
2
|
/** Exact readback is authoritative. PasswordConfirm tokens are reused immediately,
|
|
3
3
|
* across both Root APIs, and never persisted (DSM validity is about 300 seconds). */
|
|
4
4
|
export declare const ROOT_RUNTIME: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { bootDefinition, controlDefinition } from '../runtime/executor-tasks.js';
|
|
2
2
|
import { executorScopeTask } from '../runtime/executor-scope-task.js';
|
|
3
3
|
import { versionUnsupported } from '../runtime/dsm-version.js';
|
|
4
|
-
export { executorTasks as rootTasks } from '../runtime/executor-tasks.js';
|
|
5
4
|
/** Exact readback is authoritative. PasswordConfirm tokens are reused immediately,
|
|
6
5
|
* across both Root APIs, and never persisted (DSM validity is about 300 seconds). */
|
|
7
6
|
export const ROOT_RUNTIME = `function createRootAccess(options) {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface SdkProblem {
|
|
2
|
+
code: string;
|
|
3
|
+
message: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* backend/go.mod names the App's SDK version; the frontend package and this
|
|
7
|
+
* CLI must agree with it. `needsSdk`: the App declares delegate or rootOps.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sdkProblems(backendDir: string, frontendDir: string | undefined, needsSdk: boolean, cliVersion?: string): SdkProblem[];
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join, resolve } from "node:path";
|
|
3
|
+
import { CLI_VERSION } from "../cli-version.js";
|
|
4
|
+
import { SDK_MODULE, SDK_PACKAGE, sdkRequirement } from "../runtime/sdk-source.js";
|
|
5
|
+
const minorLine = (version) => version.split(".").slice(0, 2).join(".");
|
|
6
|
+
/**
|
|
7
|
+
* backend/go.mod names the App's SDK version; the frontend package and this
|
|
8
|
+
* CLI must agree with it. `needsSdk`: the App declares delegate or rootOps.
|
|
9
|
+
*/
|
|
10
|
+
export function sdkProblems(backendDir, frontendDir, needsSdk, cliVersion = CLI_VERSION) {
|
|
11
|
+
const version = sdkRequirement(backendDir);
|
|
12
|
+
if (!version) {
|
|
13
|
+
return needsSdk ? [{ code: "SDK_REQUIRED", message: `capabilities.delegate 與 rootOps 需要 SDK:在 backend/go.mod 加入 require ${SDK_MODULE} v${minorLine(cliVersion)}.x。` }] : [];
|
|
14
|
+
}
|
|
15
|
+
const problems = [];
|
|
16
|
+
if (minorLine(version) !== minorLine(cliVersion)) {
|
|
17
|
+
problems.push({ code: "SDK_UNSUPPORTED", message: `backend/go.mod 要求 SDK ${version};CLI ${cliVersion} 只支援 SDK ${minorLine(cliVersion)}.x。請改用對應的 CLI,或把 SDK 升到 ${minorLine(cliVersion)}.x。` });
|
|
18
|
+
}
|
|
19
|
+
const frontend = frontendDir === undefined ? undefined : frontendSdkVersion(frontendDir);
|
|
20
|
+
if (frontend && frontend.version !== version) {
|
|
21
|
+
problems.push({ code: "SDK_VERSION_MISMATCH", message: `frontend/package.json 的 ${SDK_PACKAGE} 是 ${frontend.spec}(${frontend.version ?? "讀不到版本"}),backend/go.mod 要求 ${version};兩者必須相同。` });
|
|
22
|
+
}
|
|
23
|
+
return problems;
|
|
24
|
+
}
|
|
25
|
+
/** The SDK the frontend depends on: a version, or a file: checkout read through its package.json. */
|
|
26
|
+
function frontendSdkVersion(frontendDir) {
|
|
27
|
+
const pkg = readJson(join(frontendDir, "package.json"));
|
|
28
|
+
const spec = pkg?.dependencies?.[SDK_PACKAGE] ?? pkg?.devDependencies?.[SDK_PACKAGE];
|
|
29
|
+
if (typeof spec !== "string")
|
|
30
|
+
return undefined;
|
|
31
|
+
if (!spec.startsWith("file:"))
|
|
32
|
+
return { spec, version: spec };
|
|
33
|
+
const version = readJson(join(resolve(frontendDir, spec.slice("file:".length)), "package.json"))?.version;
|
|
34
|
+
return { spec, version: typeof version === "string" ? version : undefined };
|
|
35
|
+
}
|
|
36
|
+
function readJson(path) {
|
|
37
|
+
try {
|
|
38
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
}
|
package/dist/standalone/spk.js
CHANGED
|
@@ -84,7 +84,7 @@ export async function assembleStandaloneSpk(options) {
|
|
|
84
84
|
}
|
|
85
85
|
copyStandaloneNotices(manifest.root, manifest.ui.dir, join(staging, 'package'), manifest.backend.kind === 'go' || Boolean(manifest.daemon), manifest.backend.kind === 'go' ? manifest.backend.dir : undefined);
|
|
86
86
|
if (manifest.daemon)
|
|
87
|
-
copyFileSync(new URL('../../
|
|
87
|
+
copyFileSync(new URL('../../assets/licenses/TEMPLATE.txt', import.meta.url), join(staging, 'package', 'LICENSES', 'DAEMON-LICENSE.txt'));
|
|
88
88
|
const portal = nativePortal(manifest);
|
|
89
89
|
if (portal) {
|
|
90
90
|
writeFile(join(staging, "package", PORTAL_JSON_RELPATH), renderPortalJson(portal));
|
package/dist/template-paths.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* The scaffold templates come from the exactly pinned @synopackageland/templates
|
|
3
|
+
* package; SYNOPKGLAND_TEMPLATES_DIR points at a templates checkout instead.
|
|
4
|
+
*/
|
|
5
|
+
export declare function templatesRoot(env?: NodeJS.ProcessEnv, from?: string): string;
|
|
6
|
+
/** Go sources the CLI builds into every SPK that needs them; they are not scaffolded. */
|
|
7
|
+
export declare function goAssetDir(name: "daemon" | "gateway"): string;
|
package/dist/template-paths.js
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
/**
|
|
5
|
+
* The scaffold templates come from the exactly pinned @synopackageland/templates
|
|
6
|
+
* package; SYNOPKGLAND_TEMPLATES_DIR points at a templates checkout instead.
|
|
7
|
+
*/
|
|
8
|
+
export function templatesRoot(env = process.env, from = import.meta.url) {
|
|
9
|
+
if (env.SYNOPKGLAND_TEMPLATES_DIR)
|
|
10
|
+
return join(env.SYNOPKGLAND_TEMPLATES_DIR, "templates");
|
|
11
|
+
try {
|
|
12
|
+
return join(dirname(createRequire(from).resolve("@synopackageland/templates/package.json")), "templates");
|
|
13
|
+
}
|
|
14
|
+
catch {
|
|
15
|
+
throw new Error("[TEMPLATES_MISSING] @synopackageland/templates is not installed; reinstall @synopackageland/cli, or set SYNOPKGLAND_TEMPLATES_DIR to a templates checkout.");
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/** Go sources the CLI builds into every SPK that needs them; they are not scaffolded. */
|
|
19
|
+
export function goAssetDir(name) {
|
|
20
|
+
return fileURLToPath(new URL(`../assets/go/${name}`, import.meta.url));
|
|
9
21
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synopackageland/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Syno Package Land Developer Kit CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -13,16 +13,18 @@
|
|
|
13
13
|
"dist",
|
|
14
14
|
"assets",
|
|
15
15
|
"CHANGELOG.md",
|
|
16
|
-
"templates",
|
|
17
16
|
"schema",
|
|
18
17
|
"skills"
|
|
19
18
|
],
|
|
20
19
|
"scripts": {
|
|
21
|
-
"build": "rm -rf dist && tsc
|
|
20
|
+
"build": "rm -rf dist && tsc",
|
|
22
21
|
"test": "npm run build && node --import tsx --test test/**/*.test.ts",
|
|
22
|
+
"test:scripts": "node --test scripts/test/release.test.mjs scripts/test/pack-docker.test.mjs scripts/test/npm-pack.test.mjs scripts/test/executor-bump.test.mjs",
|
|
23
|
+
"gates": "bash scripts/ci/gate.sh npm && bash scripts/ci/gate.sh native-go && bash scripts/ci/gate.sh daemon-gateway",
|
|
23
24
|
"prepublishOnly": "npm run build"
|
|
24
25
|
},
|
|
25
26
|
"dependencies": {
|
|
27
|
+
"@synopackageland/templates": "0.9.0",
|
|
26
28
|
"ajv": "^8.17.1",
|
|
27
29
|
"commander": "^13.1.0",
|
|
28
30
|
"tar": "^7.4.3",
|
|
@@ -38,6 +40,14 @@
|
|
|
38
40
|
"registry": "https://registry.npmjs.org"
|
|
39
41
|
},
|
|
40
42
|
"license": "MIT",
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "git+https://github.com/synopackageland/syno-pkg-land-cli.git"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/synopackageland/syno-pkg-land-cli#readme",
|
|
48
|
+
"bugs": {
|
|
49
|
+
"url": "https://github.com/synopackageland/syno-pkg-land-cli/issues"
|
|
50
|
+
},
|
|
41
51
|
"exports": {
|
|
42
52
|
"./authorization-sdk": "./dist/authorization-sdk.js",
|
|
43
53
|
"./dist/*": "./dist/*",
|
|
@@ -1,318 +0,0 @@
|
|
|
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
|
-
Fixed writer children verify `no_new_privs` with `PR_GET_NO_NEW_PRIVS` on their
|
|
11
|
-
locked Linux thread. DSM kernel 4.4 supports this flag but omits its proc status
|
|
12
|
-
field; a failed syscall or a value other than one still refuses the write.
|
|
13
|
-
Saved IDs and zero capabilities remain mandatory. The parent passes the pinned
|
|
14
|
-
package-owned private source as a read-only FD; destination creation and publish
|
|
15
|
-
remain under the subject UID, and source cleanup runs under the package UID.
|
|
16
|
-
|
|
17
|
-
## Protected inventory and policy
|
|
18
|
-
|
|
19
|
-
Setup must copy the INFO-anchored executor, policy-pinned policy and root scripts into:
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
/usr/local/etc/synopkgland/<package>/ root:root 0700
|
|
23
|
-
runtime/ root:root 0700
|
|
24
|
-
executor root:root 0700
|
|
25
|
-
policy.json root:root 0600
|
|
26
|
-
tasks.json root:root 0600 (verified setup task inventory)
|
|
27
|
-
root/<name>.sh root:root 0600
|
|
28
|
-
delegations/ root:root 0700
|
|
29
|
-
<random-256-bit-id>.json root:root 0600
|
|
30
|
-
executor.pid root:root 0600
|
|
31
|
-
executor.log root:root 0600 (control start)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
The runtime location is mandatory; `control purge` removes this package's entire
|
|
35
|
-
protected inventory after stopping it. The parent `/usr/local/etc/synopkgland`
|
|
36
|
-
may be root:root 0755. Ancestors must be root-owned and not group/world writable;
|
|
37
|
-
symlinks and writable runtime files are refused. Neither package-owned `etc` nor
|
|
38
|
-
package `var` is trusted for executor code or delegation storage. The chosen path
|
|
39
|
-
was measured on vt-nas DSM 7.4; survival of future DSM updates remains unverified.
|
|
40
|
-
|
|
41
|
-
`policy.json` has this strict schema (no unknown keys):
|
|
42
|
-
|
|
43
|
-
```json
|
|
44
|
-
{
|
|
45
|
-
"v": 1,
|
|
46
|
-
"package": "com.example.downloader",
|
|
47
|
-
"app": "com.example.downloader.Application",
|
|
48
|
-
"scope": "home",
|
|
49
|
-
"operations": [
|
|
50
|
-
"status", "delegate.create", "delegate.list", "delegate.revoke",
|
|
51
|
-
"files.list", "files.info", "files.createFolder",
|
|
52
|
-
"files.checkPermission", "files.write", "root.run"
|
|
53
|
-
],
|
|
54
|
-
"root": {"whoami": "<64 lowercase hexadecimal SHA-256 digits>"}
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
`app` is the actual registered DSM AppPriv application ID, not a guessed package
|
|
59
|
-
ID. DSM 7.x omits default-allowed Apps from AppPriv preview; an absent
|
|
60
|
-
entry in a valid applications array is allowed. Explicit deny/custom, duplicate
|
|
61
|
-
entries and malformed responses are refused. Account eligibility is rechecked
|
|
62
|
-
independently, so absence never bypasses a disabled account. `scope` is the
|
|
63
|
-
manifest's fixed `home` or `shared:<share-name>`; omit it for root-only packages.
|
|
64
|
-
`operations` includes every permitted ID, including management and status IDs;
|
|
65
|
-
no implicit allowlist exemptions. `root` is omitted when root operations are
|
|
66
|
-
disabled. Only names in this digest map can execute. Setup pins policy bytes and
|
|
67
|
-
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.
|
|
68
|
-
|
|
69
|
-
## Requests
|
|
70
|
-
|
|
71
|
-
Every request: `{"v":1,"op":"...","auth":{},"params":{...}}` followed by
|
|
72
|
-
newline. `auth.dsm_cookie` is only the DSM `id` value, never a raw Cookie header.
|
|
73
|
-
Caller requests also require `auth.dsm_synotoken`, forwarded from the current
|
|
74
|
-
HTTP request's X-SYNO-TOKEN or SynoToken header. Both aliases may be present
|
|
75
|
-
when their values match; conflicting aliases or repeated values of either header
|
|
76
|
-
are refused. Local NormalUser verification
|
|
77
|
-
sends both the id cookie and X-SYNO-TOKEN; neither value enters logs or storage.
|
|
78
|
-
Only the executor's local DSM NormalUser HTTP result establishes identity. Other
|
|
79
|
-
identity fields, duplicate JSON keys, invalid UTF-8, unrelated parameters, unknown
|
|
80
|
-
operations and policy-excluded operations are rejected. Replies follow §2.4.
|
|
81
|
-
|
|
82
|
-
| Operation | Parameters | Result |
|
|
83
|
-
| --- | --- | --- |
|
|
84
|
-
| status | none | executor_digest, policy_digest, version, ready, disabled |
|
|
85
|
-
| delegate.create | job_id, ops[], scope, path, ttl_seconds | delegation_id, subject {username, uid}, expires_at (RFC3339) |
|
|
86
|
-
| delegate.list | none | delegations[] with public metadata, including revoked/expired records |
|
|
87
|
-
| delegate.revoke | delegation_id; job_id required without cookie | revoked |
|
|
88
|
-
| files.list, files.info, files.checkPermission | delegation_id, job_id, path | DSM data object |
|
|
89
|
-
| files.createFolder | delegation_id, job_id, path (parent), name | DSM data object |
|
|
90
|
-
| files.write | delegation_id, job_id, staging (relative), dest_dir, name | path |
|
|
91
|
-
| root.run | name | output (stdout and stderr combined) |
|
|
92
|
-
|
|
93
|
-
Create/list require a cookie and SynoToken. Revoke accepts the subject/admin session pair or a matching
|
|
94
|
-
package job ID. Root operations require the session pair independently verified as an
|
|
95
|
-
active administrators member. Delegated operations recheck the account, UID,
|
|
96
|
-
expired=`normal`, App and File Station privileges, scope,
|
|
97
|
-
job, operation, expiry and revocation. UIDs below 1024 are excluded as system
|
|
98
|
-
accounts. TTL must be 1–2592000 seconds. No cookie/SynoToken/SID/password is persisted.
|
|
99
|
-
|
|
100
|
-
Paths use File Station spellings `/home[/...]` or `/<share>[/...]`. A delegation
|
|
101
|
-
binds the requested directory's canonical path. Symlinks resolving outside that
|
|
102
|
-
directory are denied. `files.write` opens package-owned, singly linked regular
|
|
103
|
-
staging files with no symlink components; its fresh child checks setgroups,
|
|
104
|
-
setresgid and setresuid in order, then real/effective/saved/filesystem IDs and groups, empty capability sets and
|
|
105
|
-
`no_new_privs`. Admin users retain their own nonzero UID and current groups. The child
|
|
106
|
-
opens the destination after dropping identity, verifies its pinned directory and
|
|
107
|
-
scope, and copies into an exclusive hidden `.synopkgland-<job_id>-<random>.part`
|
|
108
|
-
file. After fsync it publishes the complete file with a hard link, then removes
|
|
109
|
-
the temporary name. Existing files and symlinks are never overwritten. The
|
|
110
|
-
executor cleans the exact temporary name as the subject user after a canceled or
|
|
111
|
-
killed child, using a retained directory descriptor; startup performs no scan.
|
|
112
|
-
Successful writes request exact source cleanup in a separate package-UID child;
|
|
113
|
-
cleanup failure retains the source and never downgrades a committed receipt. DSM ACL inheritance can
|
|
114
|
-
produce a mode different from the requested 0600 (observed 0711 on vt-nas).
|
|
115
|
-
|
|
116
|
-
File Station CheckPermission uses v3 with a fixed non-overwriting probe filename
|
|
117
|
-
and size zero; it creates no file. Missing/failed API data is denied. DSM output
|
|
118
|
-
and root script output are capped at 1 MiB; commands have 20-second deadlines,
|
|
119
|
-
connection read/write deadlines are 15/5 seconds and request execution is bounded
|
|
120
|
-
by 30 seconds. At most 16 connections are admitted. Legacy runner APIs use short
|
|
121
|
-
admission leases; revoke/disable persist the fence then drain accepted legacy
|
|
122
|
-
calls outside the commit lock before acknowledging. Bulk copy holds no commit
|
|
123
|
-
lock. Linux command timeouts kill the entire command process group.
|
|
124
|
-
|
|
125
|
-
File Station APIs resolve path strings inside DSM after executor scope validation;
|
|
126
|
-
there is no atomic DSM API for binding that subsequent lookup to our directory
|
|
127
|
-
FD. Concurrent subject-controlled directory renames remain a scope-race limitation
|
|
128
|
-
for runner API operations. The writer uses pinned directory descriptors; a user
|
|
129
|
-
can still move a directory after its final scope check. These are release review
|
|
130
|
-
items, not assertions of complete race freedom.
|
|
131
|
-
|
|
132
|
-
## Lifecycle and checks
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
executor serve --package com.example.downloader
|
|
136
|
-
executor supervise --package com.example.downloader
|
|
137
|
-
executor control start --package com.example.downloader
|
|
138
|
-
executor control stop --package com.example.downloader
|
|
139
|
-
executor control purge --package com.example.downloader
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Root control start launches asynchronously; the caller reads socket status to
|
|
143
|
-
establish readiness. It starts `executor supervise`, a root supervisor that runs
|
|
144
|
-
`serve` as its child and restarts it after an abnormal end (signal or non-zero
|
|
145
|
-
exit) with a 1 s backoff doubling to 60 s, reset after a minute of healthy run.
|
|
146
|
-
A restarted `serve --revived` honors a `stop` already in the mailbox. Exit 0
|
|
147
|
-
(root replacement, shutdown, purge), exit 3 (another monitor holds the pidfile)
|
|
148
|
-
or a removed runtime end supervision. A held flock pidfile refuses duplicate
|
|
149
|
-
serve. Root's pinned
|
|
150
|
-
boot/control start can validate and terminate a previous monitor before launching
|
|
151
|
-
its replacement; package-account start only writes the mailbox and cannot replace
|
|
152
|
-
runtime. Stop pauses the listener while the monitor continues. Purge removes this
|
|
153
|
-
package's protected state and deletes only its verified recorded scheduler tasks.
|
|
154
|
-
|
|
155
|
-
Run `go test -race ./...` and `bash scripts/ci/gate.sh native-go`. The gate adds
|
|
156
|
-
Linux amd64/arm64 vet, static binary builds and test compilation. Linux-specific
|
|
157
|
-
syscall tests require a disposable Linux root fixture. This revision was tested
|
|
158
|
-
on a Linux VM; DSM ACL, logout and reboot behavior remain unverified. The
|
|
159
|
-
`testdata/live_probe.py` harness expects isolated disposable accounts and a
|
|
160
|
-
manually copied runtime, reads passwords only from stdin, and logs no credentials.
|
|
161
|
-
The live harness uses DSM's registered `SYNO.Desktop` AppPriv ID as a stand-in for
|
|
162
|
-
an installed App; installed-package AppPriv integration belongs to setup testing.
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
## Package lifecycle
|
|
166
|
-
|
|
167
|
-
Package-account hooks atomically write `stop` before upgrades/stops, `start` on
|
|
168
|
-
install/upgrade completion and package start, and `purge` before uninstall.
|
|
169
|
-
`stop` cancels/drains requests and removes the listener without ending the root
|
|
170
|
-
monitor. `start` resumes if both package executor and policy hashes equal the approved
|
|
171
|
-
runtime pins. If only the executor changed, the policy hash is unchanged and the
|
|
172
|
-
executor hash equals the single `synopkgland_executor_sha256` key in the
|
|
173
|
-
root-owned `/var/packages/<package>/INFO`, the root monitor copies it into
|
|
174
|
-
`runtime/`, verifies the copy and runs root `control start`, which replaces the
|
|
175
|
-
monitor without reapproval. Any other change stays paused for administrator
|
|
176
|
-
approval. Only root's pinned boot/control path or this anchored install can
|
|
177
|
-
replace a monitor or runtime. To exercise this path on a NAS without a real
|
|
178
|
-
executor change, the repository's `scripts/test/executor-bump.py` makes a
|
|
179
|
-
build+1 SPK whose executor differs by one byte and rewrites the INFO anchor,
|
|
180
|
-
`executor/setup.json` and the window script's embedded pins together.
|
|
181
|
-
|
|
182
|
-
At start, scheduler readback must exactly match the canonical lifecycle scripts
|
|
183
|
-
regenerated from the package identity and approved policy pin. Package
|
|
184
|
-
setup metadata supplies hints only. The verified names, pins and script hashes
|
|
185
|
-
are stored in root:root 0600 `runtime/tasks.json`. Purge regenerates the scripts
|
|
186
|
-
and revalidates each current definition before EventScheduler v1
|
|
187
|
-
delete (`task_name`) or TaskScheduler v2 delete (`tasks=[{id,real_owner}]`).
|
|
188
|
-
Boot mirrors from TaskScheduler are ignored. Changed, missing, ambiguous or
|
|
189
|
-
unverifiable records are logged and retained for administrator review; protected
|
|
190
|
-
runtime, delegations and sockets are still removed, then the monitor exits.
|
|
191
|
-
An absent process does not block uninstall; the pinned boot task handles pending
|
|
192
|
-
purge or a missing package on the next boot. If the retained binary/policy is
|
|
193
|
-
missing or tampered with, boot refuses execution and requires manual review.
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
The separate package-account `executor/lifecycle` helper writes an atomic 0600
|
|
197
|
-
mailbox request. Stop/purge wait at most 50 seconds for socket disappearance;
|
|
198
|
-
start returns after writing and lets the monitor verify pins asynchronously.
|
|
199
|
-
The helper never calls synowebapi or TaskScheduler. Socket inspection failures
|
|
200
|
-
and timeouts warn and permit lifecycle to continue. Write/validation failures
|
|
201
|
-
remain errors. Delegate hooks attempt worker stop first; a worker stop failure
|
|
202
|
-
warns and still requests executor pause/purge.
|
|
203
|
-
|
|
204
|
-
The monitor polls every 500 ms with bounded regular-file reads, accepting only
|
|
205
|
-
exact start/stop/purge (optionally one trailing newline). Invalid values are
|
|
206
|
-
ignored and logged without logging contents. The preuninst `purge` mailbox is
|
|
207
|
-
handled immediately; cleanup completes asynchronously. Package directory/INFO
|
|
208
|
-
identity absence is a fallback: the monitor pauses the socket and requests,
|
|
209
|
-
retains runtime/delegations/tasks, and purges only after 10 continuous minutes of
|
|
210
|
-
confirmed absence, even while paused. Every poll checks again; a valid identity
|
|
211
|
-
resets the timer, and an unreadable path cannot count as confirmed absence.
|
|
212
|
-
Reappearance re-reads the mailbox, including an unchanged `start`: matching pins
|
|
213
|
-
resume, changed pins stay paused for administrator approval, `stop` stays paused,
|
|
214
|
-
and `purge` clears state immediately. A root-approved new monitor ignores the
|
|
215
|
-
stop file already present at startup; that exception ends after an absence.
|
|
216
|
-
|
|
217
|
-
The boot task checks pending purge/package disappearance before accessing source.
|
|
218
|
-
It verifies the retained policy pin before offline purge from the root-only
|
|
219
|
-
runtime. Normal boot verifies the copies against the policy pin and the INFO
|
|
220
|
-
executor anchor, installs them and calls root control start to replace a
|
|
221
|
-
previous monitor. Scripts stay within 1 KiB with no percent characters, including the
|
|
222
|
-
longest package name. Partial/tampered retained state requires administrator
|
|
223
|
-
review. All nine uninstall wizard locales name the two tasks and disclose the
|
|
224
|
-
retained DSM storage/infrastructure. `inspect`/`status` cleanup guidance is
|
|
225
|
-
conditional; it does not claim that remote remnants were observed.
|
|
226
|
-
|
|
227
|
-
Directories newly created by the executor are explicitly chowned/chmodded through
|
|
228
|
-
a directory descriptor and verified with fstat, so boot umask 0077 cannot reduce
|
|
229
|
-
/run/synopkgland 0755 or its package directory 0750. Existing directories are
|
|
230
|
-
validated and never repaired/adopted. The package directory must already have
|
|
231
|
-
root/package-group ownership. The socket is set to root/package-group 0660 and
|
|
232
|
-
verified using Linux O_PATH + fstat on its filesystem inode.
|
|
233
|
-
|
|
234
|
-
## Explicit long-running v1 extension
|
|
235
|
-
|
|
236
|
-
The pinned policy opts in with top-level `destinations: ["save"]` and
|
|
237
|
-
`lifetime: "until-revoked"`, together with `files.moveFromStaging` in the
|
|
238
|
-
operation allowlist. Destination keys match `^[a-z][a-z0-9_-]{0,63}$`; unknown
|
|
239
|
-
keys/lifetimes fail closed. Legacy policies/TTL grants never become permanent.
|
|
240
|
-
The existing v1 envelope, peer UID check, protected runtime and session verifier
|
|
241
|
-
remain unchanged. `root.run` is independent and is never a writer fallback.
|
|
242
|
-
|
|
243
|
-
| Operation | Parameters | Result |
|
|
244
|
-
| --- | --- | --- |
|
|
245
|
-
| delegate.create (permanent) | scope, ops:[files.moveFromStaging], path, destination, lifetime:until-revoked | delegation_id, subject, path, destination, lifetime; zero expiry |
|
|
246
|
-
| files.moveFromStaging | delegation_id, job_id, staging, name, size | job_id, state |
|
|
247
|
-
| files.operationStatus | original delegation_id, job_id | job_id, state, optional code/receipt |
|
|
248
|
-
| files.cancelOperation | original delegation_id, job_id | current operation state |
|
|
249
|
-
| delegate.disable / delegate.enable | none; live administrator session | disabled |
|
|
250
|
-
| delegate.audit | none; live owner/admin session | latest bounded events |
|
|
251
|
-
|
|
252
|
-
Permanent create needs the current user's cookie and SynoToken and a successful
|
|
253
|
-
File Station write check. The executor derives username/UID and exact directory
|
|
254
|
-
identity itself. Permanent revoke is owner-bound even for administrators; admins
|
|
255
|
-
can disable the entire package. Auth-less operation submission/status/cancel is
|
|
256
|
-
for the trusted package producer holding the grant reference and original job ID.
|
|
257
|
-
If credentials are supplied, both must verify and the owner must match; failed
|
|
258
|
-
caller auth never falls back to offline authority. A compromised package backend
|
|
259
|
-
can use all valid grants it holds, as documented in the approved trust model.
|
|
260
|
-
|
|
261
|
-
Grants survive service restart in the protected store. The disabled flag also
|
|
262
|
-
survives; mailbox start/boot never clears it. Disable persists first and revokes
|
|
263
|
-
all legacy/permanent grants. Enable checks the live admin session and completes
|
|
264
|
-
revocation before clearing the flag; it never restores old grants. Repeated enable
|
|
265
|
-
while already enabled is a no-op.
|
|
266
|
-
|
|
267
|
-
Operations are separate `operation-<sha256(job_id)>.record` files, root:root 0600.
|
|
268
|
-
They bind immutable grant/job/staging/name/size and move through queued, copying,
|
|
269
|
-
committed, canceled, interrupted or uncertain. Queued resumes without credentials;
|
|
270
|
-
copying becomes interrupted on restart, or uncertain after durable publish intent.
|
|
271
|
-
Neither state is replayed. Changed input for the same job is `operation-conflict`.
|
|
272
|
-
Committed status alone includes `receipt:{path,size}`. Cleanup failures retain
|
|
273
|
-
committed and add `CLEANUP_PENDING`. No same-name/hash guessing establishes receipt.
|
|
274
|
-
|
|
275
|
-
Limits: 16 GiB per file, actual size+1 read, 16 queued, one active copy per package,
|
|
276
|
-
24-hour attempt, 10 MiB operation metadata. Full journals reject new admissions;
|
|
277
|
-
terminal records are retained to prevent replay. Bulk input bypasses job spools
|
|
278
|
-
and the old 64 MiB wrapper limit. Long copies revalidate account/AppPriv/ACL/path
|
|
279
|
-
with five-second polling and bounded checks; publish revalidates again. A failed
|
|
280
|
-
identity/ACL/path check invalidates the grant and requires a new selection.
|
|
281
|
-
|
|
282
|
-
The fixed child drops identity before opening the destination and creating any
|
|
283
|
-
inode. Every component uses FD-relative O_NOFOLLOW; ancestors use O_PATH so only
|
|
284
|
-
search rights are required. Source is package-owned, regular and singly linked;
|
|
285
|
-
destination is the exact granted device/inode, never a caller-supplied path.
|
|
286
|
-
Part metadata is durable before copying. Publish links the open part inode with
|
|
287
|
-
no replacement, refusing files/symlinks/FIFOs at the final name. Revoke, disable
|
|
288
|
-
and publish share the commit lock. Lost/malformed publish replies drain the child
|
|
289
|
-
before releasing that lock and produce uncertain; a confirmed no-side-effect
|
|
290
|
-
refusal such as `destination-exists` remains interrupted. The lock covers bounded
|
|
291
|
-
publish handshake/fsync, never the bulk copy. During the copy the child watches
|
|
292
|
-
its control pipe: if `serve` dies the pipe closes, so the child stops within one
|
|
293
|
-
1 MiB chunk and unlinks its part (no `PR_SET_PDEATHSIG`, which the identity drop
|
|
294
|
-
clears; works on kernel 3.10). Kernel-blocked filesystem I/O can
|
|
295
|
-
still delay draining; it cannot be declared safely complete by a timeout.
|
|
296
|
-
Legacy `files.write` uses this same child and publish handshake; the executor
|
|
297
|
-
has no other writer, so no child can publish after `serve` is gone.
|
|
298
|
-
|
|
299
|
-
Destination/part cleanup runs as the owner; source cleanup runs as package UID.
|
|
300
|
-
Restart cleans only journaled exact part identity as the current eligible owner;
|
|
301
|
-
changed/missing/inaccessible directories are retained for review, never scanned
|
|
302
|
-
or deleted as root. Subject-controlled directory moves after the final check
|
|
303
|
-
can still complete in the pinned directory object. DSM ACL changes and publication
|
|
304
|
-
are not atomic, and silent UID/inode reuse is not universally detected. A subject
|
|
305
|
-
who owns the destination can mutate its own output; this is not a content sandbox.
|
|
306
|
-
|
|
307
|
-
Structured audit lives in protected `audit.jsonl`/`audit.previous`, at most 50 MiB
|
|
308
|
-
combined, separate from authority. Events include package, username/UID, operation,
|
|
309
|
-
job, location and result; no session credentials. Owner queries are filtered,
|
|
310
|
-
admins can view this package's events. Replies contain at most 256 events/1 MiB.
|
|
311
|
-
Admission events are labeled `admitting` because a subsequent durable write can
|
|
312
|
-
fail. The operation journal, not an admission audit event, establishes completion.
|
|
313
|
-
|
|
314
|
-
The existing status operation reads `Store.Disabled`; protected-store errors set
|
|
315
|
-
`ready:false` rather than assuming enabled. Backend `delegate.status` exposes the
|
|
316
|
-
verified boolean and `disabled` capability state. Backend `delegate.operations.list`
|
|
317
|
-
is strictly empty-params, freshly owner/UID-filtered move-mirror metadata; it is
|
|
318
|
-
not an executor operation. Live completion remains `files.operationStatus`.
|