@synopackageland/cli 0.5.3 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -38
- package/dist/add.d.ts +4 -0
- package/dist/add.js +124 -0
- package/dist/authorization-sdk.d.ts +6 -4
- package/dist/authorization-sdk.js +7 -5
- package/dist/build-spk/delete-app-data.d.ts +2 -2
- package/dist/build-spk/generator.js +3 -90
- package/dist/build-spk/native-lifecycle.d.ts +3 -49
- package/dist/build-spk/native-lifecycle.js +8 -187
- package/dist/build-spk/notices.d.ts +1 -1
- package/dist/build-spk/notices.js +8 -12
- package/dist/build-spk/uninstall-wizard.d.ts +3 -10
- package/dist/build-spk/uninstall-wizard.js +5 -3
- package/dist/build-spk/wizard-messages.d.ts +28 -6
- package/dist/build-spk/wizard-messages.js +33 -11
- package/dist/capabilities.d.ts +4 -0
- package/dist/capabilities.js +12 -0
- package/dist/cli.js +331 -465
- package/dist/compose/analyze.js +2 -2
- package/dist/contract/unsupported-types.js +1 -1
- package/dist/deploy/deploy.d.ts +1 -1
- package/dist/deploy/deploy.js +1 -3
- package/dist/deploy/plan.d.ts +1 -1
- package/dist/deploy/plan.js +55 -24
- package/dist/discovery.d.ts +1 -2
- package/dist/discovery.js +3 -3
- package/dist/error-registry.js +73 -296
- package/dist/host/dsm-client.js +79 -7
- package/dist/host/types.d.ts +13 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/info.d.ts +20 -2
- package/dist/info.js +140 -0
- package/dist/init.d.ts +2 -14
- package/dist/init.js +89 -90
- package/dist/inspect.js +1 -1
- package/dist/log.d.ts +5 -0
- package/dist/log.js +18 -0
- package/dist/runtime/executor-build.d.ts +22 -0
- package/dist/runtime/executor-build.js +36 -0
- package/dist/runtime/executor-inspect.d.ts +15 -0
- package/dist/runtime/executor-inspect.js +32 -0
- package/dist/runtime/executor-policy.d.ts +25 -0
- package/dist/runtime/executor-policy.js +24 -0
- package/dist/runtime/executor-tasks.d.ts +16 -0
- package/dist/runtime/executor-tasks.js +28 -0
- package/dist/runtime/uninstall-cleanup.d.ts +7 -0
- package/dist/runtime/uninstall-cleanup.js +10 -0
- package/dist/skill.js +3 -1
- package/dist/standalone/api-permissions.d.ts +18 -0
- package/dist/standalone/api-permissions.js +63 -0
- package/dist/standalone/build.d.ts +1 -1
- package/dist/standalone/build.js +26 -40
- package/dist/standalone/dsm-window.js +42 -23
- package/dist/standalone/inspect-spk.d.ts +8 -2
- package/dist/standalone/inspect-spk.js +68 -58
- package/dist/standalone/lifecycle.d.ts +1 -1
- package/dist/standalone/lifecycle.js +31 -27
- package/dist/standalone/manifest.d.ts +17 -14
- package/dist/standalone/manifest.js +77 -53
- package/dist/standalone/native-layout.d.ts +5 -0
- package/dist/standalone/native-layout.js +35 -8
- package/dist/standalone/native-root-window.d.ts +26 -0
- package/dist/standalone/native-root-window.js +282 -0
- package/dist/standalone/resource.d.ts +2 -2
- package/dist/standalone/resource.js +1 -1
- package/dist/standalone/root-ops.d.ts +1 -30
- package/dist/standalone/root-ops.js +1 -68
- package/dist/standalone/root-window.d.ts +5 -38
- package/dist/standalone/root-window.js +116 -399
- package/dist/standalone/spk.d.ts +3 -5
- package/dist/standalone/spk.js +24 -49
- package/dist/templates/_executor/README.md +204 -0
- package/dist/templates/_executor/apppriv_review_test.go +28 -0
- package/dist/templates/_executor/auth_presence_review_test.go +38 -0
- package/dist/templates/_executor/cmd/lifecycle/main.go +42 -0
- package/dist/templates/_executor/cookie_review_test.go +27 -0
- package/dist/templates/_executor/digest_review_test.go +120 -0
- package/dist/templates/_executor/directories.go +40 -0
- package/dist/templates/_executor/dsm.go +319 -0
- package/dist/templates/_executor/dsm_test.go +196 -0
- package/dist/templates/_executor/executor.go +524 -0
- package/dist/templates/_executor/executor_test.go +284 -0
- package/dist/templates/_executor/go.mod +3 -0
- package/dist/templates/_executor/identity.go +48 -0
- package/dist/templates/_executor/internal/lifecycle/lifecycle.go +90 -0
- package/dist/templates/_executor/internal/lifecycle/lifecycle_test.go +174 -0
- package/dist/templates/_executor/internal/taskscript/boot.sh +31 -0
- package/dist/templates/_executor/internal/taskscript/cmd/main.go +19 -0
- package/dist/templates/_executor/internal/taskscript/control.sh +26 -0
- package/dist/templates/_executor/internal/taskscript/tasks.go +42 -0
- package/dist/templates/_executor/json_review_test.go +40 -0
- package/dist/templates/_executor/lifecycle_test.go +86 -0
- package/dist/templates/_executor/main.go +518 -0
- package/dist/templates/_executor/managed.go +117 -0
- package/dist/templates/_executor/managed_test.go +137 -0
- package/dist/templates/_executor/path_test.go +17 -0
- package/dist/templates/_executor/platform_linux.go +336 -0
- package/dist/templates/_executor/platform_linux_test.go +247 -0
- package/dist/templates/_executor/platform_other.go +42 -0
- package/dist/templates/_executor/process.go +139 -0
- package/dist/templates/_executor/socket_linux_test.go +46 -0
- package/dist/templates/_executor/store.go +90 -0
- package/dist/templates/_executor/task_race_review_test.go +47 -0
- package/dist/templates/_executor/tasks.go +283 -0
- package/dist/templates/_executor/tasks_review_test.go +43 -0
- package/dist/templates/_executor/tasks_test.go +166 -0
- package/dist/templates/_executor/testdata/evidence/cleanup.json +24 -0
- package/dist/templates/_executor/testdata/evidence/final-smoke.jsonl +9 -0
- package/dist/templates/_executor/testdata/evidence/kernel-acl.json +6 -0
- package/dist/templates/_executor/testdata/evidence/linux-tests.log +123 -0
- package/dist/templates/_executor/testdata/evidence/live.jsonl +23 -0
- package/dist/templates/_executor/testdata/evidence/storage.json +90 -0
- package/dist/templates/_executor/testdata/evidence/validation.json +55 -0
- package/dist/templates/_executor/testdata/live_probe.py +98 -0
- package/dist/templates/_executor/upgrade_watch_test.go +236 -0
- package/dist/templates/_executor/watch.go +156 -0
- package/dist/templates/_executor/watch_test.go +270 -0
- package/dist/templates/_executor/write_review_linux_test.go +95 -0
- package/dist/templates/_shared/AGENTS.md +17 -0
- package/dist/templates/_shared/CLAUDE.md +1 -0
- package/dist/templates/binary/LICENSES/GO-LICENSE +27 -0
- package/dist/templates/binary/LICENSES/GO-PATENTS +22 -0
- package/dist/templates/binary/dsm-package.yaml +19 -0
- package/dist/templates/binary/example/main.go +16 -0
- package/dist/templates/binary/gitignore +2 -0
- package/dist/templates/binary/ui/app.css +4 -0
- package/dist/templates/binary/ui/app.js +17 -0
- package/dist/templates/native-go/README.md +128 -139
- package/dist/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +1 -1
- package/dist/templates/native-go/backend/cmd/app/main.go +33 -26
- package/dist/templates/native-go/backend/internal/api/cgi_framing_test.go +32 -0
- package/dist/templates/native-go/backend/internal/api/cookie_review_test.go +28 -0
- package/dist/templates/native-go/backend/internal/api/deadline_test.go +114 -0
- package/dist/templates/native-go/backend/internal/api/dsm-session.go +54 -0
- package/dist/templates/native-go/backend/internal/api/dsm-session_test.go +51 -0
- package/dist/templates/native-go/backend/internal/api/errors.go +14 -0
- package/dist/templates/native-go/backend/internal/api/permissions.go +161 -0
- package/dist/templates/native-go/backend/internal/api/permissions.json +5 -0
- package/dist/templates/native-go/backend/internal/api/permissions_test.go +113 -0
- package/dist/templates/native-go/backend/internal/api/policy_fixture_test.go +8 -0
- package/dist/templates/native-go/backend/internal/api/registry.go +48 -32
- package/dist/templates/native-go/backend/internal/api/registry_test.go +16 -1
- package/dist/templates/native-go/backend/internal/api/resource_limits_test.go +87 -0
- package/dist/templates/native-go/backend/internal/api/sdk-permissions.json +46 -0
- package/dist/templates/native-go/backend/internal/api/sdk_policy_test.go +31 -0
- package/dist/templates/native-go/backend/internal/api/server.go +135 -8
- package/dist/templates/native-go/backend/internal/api/testdata/permissions-cases.json +172 -0
- package/dist/templates/native-go/backend/internal/app/background.go +23 -44
- package/dist/templates/native-go/backend/internal/app/background_owner.go +0 -21
- package/dist/templates/native-go/backend/internal/app/background_owner_test.go +40 -22
- package/dist/templates/native-go/backend/internal/app/background_schedule.go +0 -5
- package/dist/templates/native-go/backend/internal/app/background_schedule_test.go +1 -1
- package/dist/templates/native-go/backend/internal/app/background_test.go +15 -41
- package/dist/templates/native-go/backend/internal/app/delegate_none.go +5 -0
- package/dist/templates/native-go/backend/internal/app/identity.go +20 -0
- package/dist/templates/native-go/backend/internal/app/identity_test.go +15 -0
- package/dist/templates/native-go/backend/internal/app/routes.go +12 -36
- package/dist/templates/native-go/backend/internal/app/routes_test.go +16 -40
- package/dist/templates/native-go/backend/internal/app/session_files.go +4 -10
- package/dist/templates/native-go/backend/internal/app/session_files_test.go +8 -20
- package/dist/templates/native-go/backend/internal/app/shared_folder_test.go +4 -4
- package/dist/templates/native-go/backend/internal/background/lock_test.go +131 -0
- package/dist/templates/native-go/backend/internal/background/owner_test.go +12 -20
- package/dist/templates/native-go/backend/internal/background/runner_test.go +1 -1
- package/dist/templates/native-go/backend/internal/background/schedule.go +53 -17
- package/dist/templates/native-go/backend/internal/background/schedule_test.go +42 -9
- package/dist/templates/native-go/backend/internal/background/store.go +115 -99
- package/dist/templates/native-go/backend/internal/background/store_test.go +10 -52
- package/dist/templates/native-go/backend/internal/dsm/admin.go +70 -0
- package/dist/templates/native-go/backend/internal/dsm/admin_linux.go +80 -0
- package/dist/templates/native-go/backend/internal/dsm/admin_linux_test.go +49 -0
- package/dist/templates/native-go/backend/internal/dsm/admin_other.go +12 -0
- package/dist/templates/native-go/backend/internal/dsm/admin_test.go +67 -0
- package/dist/templates/native-go/backend/internal/dsm/auth.go +24 -48
- package/dist/templates/native-go/backend/internal/dsm/auth_test.go +43 -23
- package/dist/templates/native-go/backend/internal/dsm/native/admin-aarch64.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 +28 -0
- package/dist/templates/native-go/backend/internal/dsm/native/build.sh +9 -0
- package/dist/templates/native-go/backend/internal/dsm/native/licenses/GLIBC-NOTICES.txt +400 -0
- package/dist/templates/native-go/backend/internal/dsm/native/licenses/LGPL-2.1.txt +501 -0
- package/dist/templates/native-go/backend/internal/dsm/native/licenses/SOURCE.txt +5 -0
- package/dist/templates/native-go/backend/internal/dsm/native/licenses/ZIG-MIT.txt +21 -0
- package/dist/templates/native-go/backend/internal/dsm/native/provenance.json +12 -0
- package/dist/templates/native-go/backend/internal/filestation/client.go +68 -18
- package/dist/templates/native-go/backend/internal/filestation/client_test.go +7 -7
- package/dist/templates/native-go/backend/internal/filestation/doc.go +1 -1
- package/dist/templates/native-go/backend/internal/filestation/http.go +70 -0
- package/dist/templates/native-go/backend/internal/filestation/http_test.go +188 -0
- package/dist/templates/native-go/backend/internal/filestation/operations_test.go +206 -0
- package/dist/templates/native-go/backend/internal/filestation/read_file_test.go +2 -3
- package/dist/templates/native-go/backend/internal/filestation/service.go +117 -117
- package/dist/templates/native-go/backend/internal/filestation/service_test.go +30 -50
- package/dist/templates/native-go/backend/internal/filestation/upload_stream.go +76 -0
- package/dist/templates/native-go/backend/internal/filestation/upload_stream_test.go +77 -0
- package/dist/templates/native-go/backend/internal/filestation/write.go +0 -40
- package/dist/templates/native-go/backend/internal/filestation/write_test.go +6 -5
- package/dist/templates/native-go/backend/internal/identity/README.md +55 -0
- package/dist/templates/native-go/backend/internal/identity/dsm.go +96 -0
- package/dist/templates/native-go/backend/internal/identity/http.go +291 -0
- package/dist/templates/native-go/backend/internal/identity/identity_test.go +483 -0
- package/dist/templates/native-go/backend/internal/identity/service.go +159 -0
- package/dist/templates/native-go/backend/internal/identity/store.go +109 -0
- package/dist/templates/native-go/backend/internal/jsonlimits/limits.go +48 -0
- package/dist/templates/native-go/backend/internal/jsonlimits/limits_test.go +52 -0
- package/dist/templates/native-go/dsm-package.yaml +8 -17
- package/dist/templates/native-go-delegate/DELEGATE.md +142 -0
- package/dist/templates/native-go-delegate/backend/cmd/background-worker/main.go +41 -0
- package/dist/templates/native-go-delegate/backend/internal/app/delegate.go +15 -0
- package/dist/templates/native-go-delegate/backend/internal/app/delegate_on.go +5 -0
- package/dist/templates/native-go-delegate/backend/internal/app/delegate_routes_test.go +17 -0
- package/dist/templates/native-go-delegate/backend/internal/background/delegate_review_test.go +174 -0
- package/dist/templates/native-go-delegate/backend/internal/background/delegated.go +277 -0
- package/dist/templates/native-go-delegate/backend/internal/background/delegated_test.go +34 -0
- package/dist/templates/native-go-delegate/backend/internal/delegate/busy_review_test.go +15 -0
- package/dist/templates/native-go-delegate/backend/internal/delegate/client.go +143 -0
- package/dist/templates/native-go-delegate/backend/internal/delegate/client_test.go +214 -0
- package/dist/templates/native-go-delegate/backend/internal/delegate/files.go +132 -0
- package/dist/templates/native-go-delegate/backend/internal/delegate/retry.go +106 -0
- package/dist/templates/native-go-delegate/backend/internal/delegate/retry_test.go +143 -0
- package/dist/templates/native-go-delegate/backend/internal/delegate/service.go +323 -0
- package/dist/templates/native-go-delegate/backend/internal/delegate/service_test.go +318 -0
- package/dist/templates/native-go-delegate/backend/internal/delegate/wait_cancel_test.go +101 -0
- package/dist/templates/native-go-delegate/backend/internal/delegate/worker.go +225 -0
- package/dist/templates/native-go-delegate/backend/internal/filestation/files.go +73 -0
- package/dist/templates/native-go-delegate/backend/internal/filestation/files_test.go +59 -0
- package/dist/templates/native-go-delegate/frontend/src/CapabilityPanels.vue +10 -0
- package/dist/templates/native-go-delegate/frontend/src/delegate/DelegatePanel.vue +70 -0
- package/dist/templates/native-go-delegate/frontend/src/delegate/copy.ts +9 -0
- package/dist/templates/native-go-delegate/frontend/src/delegate/i18n/waiting.json +11 -0
- package/dist/templates/native-go-delegate/frontend/test/delegate.test.ts +130 -0
- package/dist/templates/native-go-delegate/test-frontend.sh +12 -0
- package/dist/templates/native-go-delegate/test.sh +17 -0
- package/dist/templates/native-go-jobs/BACKGROUND.md +108 -0
- package/dist/templates/native-go-jobs/backend/internal/app/background_routes_test.go +90 -0
- package/dist/templates/native-go-jobs/frontend/src/background/BackgroundPanel.vue +170 -0
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/de.json +75 -0
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/en.json +75 -0
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/es.json +75 -0
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/fr.json +75 -0
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/it.json +75 -0
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/ja.json +75 -0
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/ko.json +75 -0
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/zh-CN.json +75 -0
- package/dist/templates/native-go-jobs/frontend/src/background/i18n/zh-TW.json +75 -0
- package/dist/templates/native-go-jobs/frontend/src/background/picker-provider.ts +12 -0
- package/dist/templates/native-go-jobs/frontend/src/background/request-key.ts +5 -0
- package/dist/templates/native-go-jobs/frontend/test/background.test.ts +208 -0
- package/dist/templates/native-go-root-ops/backend/internal/app/executor.go +112 -0
- package/dist/templates/native-go-root-ops/backend/internal/app/executor_test.go +53 -0
- package/dist/templates/native-go-root-ops/root/whoami.sh +3 -0
- package/dist/templates/native-go-vue/README.md +36 -248
- package/dist/templates/native-go-vue/frontend/DESIGN.md +20 -49
- package/dist/templates/native-go-vue/frontend/package-lock.json +278 -159
- package/dist/templates/native-go-vue/frontend/package.json +2 -2
- package/dist/templates/native-go-vue/frontend/src/App.vue +55 -151
- package/dist/templates/native-go-vue/frontend/src/CapabilityPanels.vue +6 -0
- package/dist/templates/native-go-vue/frontend/src/context.ts +2 -14
- package/dist/templates/native-go-vue/frontend/src/delegate/ExecutorSettings.vue +25 -0
- package/dist/templates/native-go-vue/frontend/src/delegate/copy.ts +4 -0
- package/dist/templates/native-go-vue/frontend/src/delegate/executor-setup.ts +18 -0
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/en.json +36 -0
- package/dist/templates/native-go-vue/frontend/src/delegate/i18n/zh-TW.json +36 -0
- package/dist/templates/native-go-vue/frontend/src/files/FileBrowser.vue +131 -0
- package/dist/templates/native-go-vue/frontend/src/files/FilesPage.vue +35 -0
- package/dist/templates/native-go-vue/frontend/src/files/files.test.ts +93 -0
- package/dist/templates/native-go-vue/frontend/src/files/provider.test.ts +48 -0
- package/dist/templates/native-go-vue/frontend/src/files/transfers.test.ts +27 -0
- package/dist/templates/native-go-vue/frontend/src/files/transfers.ts +25 -0
- package/dist/templates/native-go-vue/frontend/src/identity/DESIGN.md +46 -0
- package/dist/templates/native-go-vue/frontend/src/identity/LoginPage.vue +76 -0
- package/dist/templates/native-go-vue/frontend/src/identity/login.test.ts +32 -0
- package/dist/templates/native-go-vue/frontend/src/identity/session.test.ts +29 -0
- package/dist/templates/native-go-vue/frontend/src/identity/session.ts +73 -0
- package/dist/templates/native-go-vue/frontend/src/main.ts +7 -4
- package/dist/templates/native-go-vue/frontend/src/nas/NasPicker.vue +23 -0
- package/dist/templates/native-go-vue/frontend/src/nas/contract.ts +12 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/de.json +41 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/en.json +41 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/es.json +41 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/fr.json +41 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/it.json +41 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/ja.json +41 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/ko.json +41 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/zh-CN.json +41 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/files/zh-TW.json +41 -0
- package/dist/templates/native-go-vue/frontend/src/nas/i18n.ts +2 -38
- package/dist/templates/native-go-vue/frontend/src/nas/locale.ts +24 -0
- package/dist/templates/native-go-vue/frontend/src/nas/provider.ts +46 -55
- package/dist/templates/native-go-vue/frontend/src/nas/use-request.ts +13 -22
- package/dist/templates/native-go-vue/frontend/src/shell/AppShell.vue +3 -3
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/de.json +1 -7
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/en.json +1 -7
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/es.json +1 -7
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/fr.json +1 -7
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/it.json +1 -7
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/ja.json +1 -7
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/ko.json +1 -7
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/zh-CN.json +1 -7
- package/dist/templates/native-go-vue/frontend/src/shell/i18n/zh-TW.json +1 -7
- package/dist/templates/native-go-vue/frontend/src/shell/pages.ts +3 -22
- package/dist/templates/native-go-vue/frontend/test/apps.test.ts +33 -201
- package/dist/templates/native-go-vue/frontend/test/shell-ui.test.ts +15 -109
- package/dist/templates/native-go-vue/frontend/test/shell.test.ts +4 -19
- package/dist/templates/native-go-vue/frontend/vite.config.ts +2 -2
- package/dist/types.d.ts +1 -1
- package/dist/validate.js +28 -36
- package/package.json +5 -2
- package/skills/SKILL.md +25 -3
- package/skills/reference/create.md +15 -6
- package/skills/reference/deploy.md +5 -3
- package/skills/reference/diagnose.md +1 -1
- package/skills/reference/files.md +8 -6
- package/skills/reference/identity.md +9 -3
- package/skills/reference/ui-json.md +78 -0
- package/skills/reference/ui-vue.md +71 -0
- package/skills/reference/wrap.md +3 -4
- package/templates/_executor/README.md +204 -0
- package/templates/_executor/apppriv_review_test.go +28 -0
- package/templates/_executor/auth_presence_review_test.go +38 -0
- package/templates/_executor/cmd/lifecycle/main.go +42 -0
- package/templates/_executor/cookie_review_test.go +27 -0
- package/templates/_executor/digest_review_test.go +120 -0
- package/templates/_executor/directories.go +40 -0
- package/templates/_executor/dsm.go +319 -0
- package/templates/_executor/dsm_test.go +196 -0
- package/templates/_executor/executor.go +524 -0
- package/templates/_executor/executor_test.go +284 -0
- package/templates/_executor/go.mod +3 -0
- package/templates/_executor/identity.go +48 -0
- package/templates/_executor/internal/lifecycle/lifecycle.go +90 -0
- package/templates/_executor/internal/lifecycle/lifecycle_test.go +174 -0
- package/templates/_executor/internal/taskscript/boot.sh +31 -0
- package/templates/_executor/internal/taskscript/cmd/main.go +19 -0
- package/templates/_executor/internal/taskscript/control.sh +26 -0
- package/templates/_executor/internal/taskscript/tasks.go +42 -0
- package/templates/_executor/json_review_test.go +40 -0
- package/templates/_executor/lifecycle_test.go +86 -0
- package/templates/_executor/main.go +518 -0
- package/templates/_executor/managed.go +117 -0
- package/templates/_executor/managed_test.go +137 -0
- package/templates/_executor/path_test.go +17 -0
- package/templates/_executor/platform_linux.go +336 -0
- package/templates/_executor/platform_linux_test.go +247 -0
- package/templates/_executor/platform_other.go +42 -0
- package/templates/_executor/process.go +139 -0
- package/templates/_executor/socket_linux_test.go +46 -0
- package/templates/_executor/store.go +90 -0
- package/templates/_executor/task_race_review_test.go +47 -0
- package/templates/_executor/tasks.go +283 -0
- package/templates/_executor/tasks_review_test.go +43 -0
- package/templates/_executor/tasks_test.go +166 -0
- package/templates/_executor/testdata/evidence/cleanup.json +24 -0
- package/templates/_executor/testdata/evidence/final-smoke.jsonl +9 -0
- package/templates/_executor/testdata/evidence/kernel-acl.json +6 -0
- package/templates/_executor/testdata/evidence/linux-tests.log +123 -0
- package/templates/_executor/testdata/evidence/live.jsonl +23 -0
- package/templates/_executor/testdata/evidence/storage.json +90 -0
- package/templates/_executor/testdata/evidence/validation.json +55 -0
- package/templates/_executor/testdata/live_probe.py +98 -0
- package/templates/_executor/upgrade_watch_test.go +236 -0
- package/templates/_executor/watch.go +156 -0
- package/templates/_executor/watch_test.go +270 -0
- package/templates/_executor/write_review_linux_test.go +95 -0
- package/templates/_shared/AGENTS.md +17 -0
- package/templates/_shared/CLAUDE.md +1 -0
- package/templates/binary/LICENSES/GO-LICENSE +27 -0
- package/templates/binary/LICENSES/GO-PATENTS +22 -0
- package/templates/binary/dsm-package.yaml +19 -0
- package/templates/binary/example/main.go +16 -0
- package/templates/binary/gitignore +2 -0
- package/templates/binary/ui/app.css +4 -0
- package/templates/binary/ui/app.js +17 -0
- package/templates/native-go/README.md +128 -139
- package/templates/native-go/backend/THIRD_PARTY_NOTICES.txt +1 -1
- package/templates/native-go/backend/cmd/app/main.go +33 -26
- package/templates/native-go/backend/internal/api/cgi_framing_test.go +32 -0
- package/templates/native-go/backend/internal/api/cookie_review_test.go +28 -0
- package/templates/native-go/backend/internal/api/deadline_test.go +114 -0
- package/templates/native-go/backend/internal/api/dsm-session.go +54 -0
- package/templates/native-go/backend/internal/api/dsm-session_test.go +51 -0
- package/templates/native-go/backend/internal/api/errors.go +14 -0
- package/templates/native-go/backend/internal/api/permissions.go +161 -0
- package/templates/native-go/backend/internal/api/permissions.json +5 -0
- package/templates/native-go/backend/internal/api/permissions_test.go +113 -0
- package/templates/native-go/backend/internal/api/policy_fixture_test.go +8 -0
- package/templates/native-go/backend/internal/api/registry.go +48 -32
- package/templates/native-go/backend/internal/api/registry_test.go +16 -1
- package/templates/native-go/backend/internal/api/resource_limits_test.go +87 -0
- package/templates/native-go/backend/internal/api/sdk-permissions.json +46 -0
- package/templates/native-go/backend/internal/api/sdk_policy_test.go +31 -0
- package/templates/native-go/backend/internal/api/server.go +135 -8
- package/templates/native-go/backend/internal/api/testdata/permissions-cases.json +172 -0
- package/templates/native-go/backend/internal/app/background.go +23 -44
- package/templates/native-go/backend/internal/app/background_owner.go +0 -21
- package/templates/native-go/backend/internal/app/background_owner_test.go +40 -22
- package/templates/native-go/backend/internal/app/background_schedule.go +0 -5
- package/templates/native-go/backend/internal/app/background_schedule_test.go +1 -1
- package/templates/native-go/backend/internal/app/background_test.go +15 -41
- package/templates/native-go/backend/internal/app/delegate_none.go +5 -0
- package/templates/native-go/backend/internal/app/identity.go +20 -0
- package/templates/native-go/backend/internal/app/identity_test.go +15 -0
- package/templates/native-go/backend/internal/app/routes.go +12 -36
- package/templates/native-go/backend/internal/app/routes_test.go +16 -40
- package/templates/native-go/backend/internal/app/session_files.go +4 -10
- package/templates/native-go/backend/internal/app/session_files_test.go +8 -20
- package/templates/native-go/backend/internal/app/shared_folder_test.go +4 -4
- package/templates/native-go/backend/internal/background/lock_test.go +131 -0
- package/templates/native-go/backend/internal/background/owner_test.go +12 -20
- package/templates/native-go/backend/internal/background/runner_test.go +1 -1
- package/templates/native-go/backend/internal/background/schedule.go +53 -17
- package/templates/native-go/backend/internal/background/schedule_test.go +42 -9
- package/templates/native-go/backend/internal/background/store.go +115 -99
- package/templates/native-go/backend/internal/background/store_test.go +10 -52
- package/templates/native-go/backend/internal/dsm/admin.go +70 -0
- package/templates/native-go/backend/internal/dsm/admin_linux.go +80 -0
- package/templates/native-go/backend/internal/dsm/admin_linux_test.go +49 -0
- package/templates/native-go/backend/internal/dsm/admin_other.go +12 -0
- package/templates/native-go/backend/internal/dsm/admin_test.go +67 -0
- package/templates/native-go/backend/internal/dsm/auth.go +24 -48
- package/templates/native-go/backend/internal/dsm/auth_test.go +43 -23
- package/templates/native-go/backend/internal/dsm/native/admin-aarch64.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 +28 -0
- package/templates/native-go/backend/internal/dsm/native/build.sh +9 -0
- package/templates/native-go/backend/internal/dsm/native/licenses/GLIBC-NOTICES.txt +400 -0
- package/templates/native-go/backend/internal/dsm/native/licenses/LGPL-2.1.txt +501 -0
- package/templates/native-go/backend/internal/dsm/native/licenses/SOURCE.txt +5 -0
- package/templates/native-go/backend/internal/dsm/native/licenses/ZIG-MIT.txt +21 -0
- package/templates/native-go/backend/internal/dsm/native/provenance.json +12 -0
- package/templates/native-go/backend/internal/filestation/client.go +68 -18
- package/templates/native-go/backend/internal/filestation/client_test.go +7 -7
- package/templates/native-go/backend/internal/filestation/doc.go +1 -1
- package/templates/native-go/backend/internal/filestation/http.go +70 -0
- package/templates/native-go/backend/internal/filestation/http_test.go +188 -0
- package/templates/native-go/backend/internal/filestation/operations_test.go +206 -0
- package/templates/native-go/backend/internal/filestation/read_file_test.go +2 -3
- package/templates/native-go/backend/internal/filestation/service.go +117 -117
- package/templates/native-go/backend/internal/filestation/service_test.go +30 -50
- package/templates/native-go/backend/internal/filestation/upload_stream.go +76 -0
- package/templates/native-go/backend/internal/filestation/upload_stream_test.go +77 -0
- package/templates/native-go/backend/internal/filestation/write.go +0 -40
- package/templates/native-go/backend/internal/filestation/write_test.go +6 -5
- package/templates/native-go/backend/internal/identity/README.md +55 -0
- package/templates/native-go/backend/internal/identity/dsm.go +96 -0
- package/templates/native-go/backend/internal/identity/http.go +291 -0
- package/templates/native-go/backend/internal/identity/identity_test.go +483 -0
- package/templates/native-go/backend/internal/identity/service.go +159 -0
- package/templates/native-go/backend/internal/identity/store.go +109 -0
- package/templates/native-go/backend/internal/jsonlimits/limits.go +48 -0
- package/templates/native-go/backend/internal/jsonlimits/limits_test.go +52 -0
- package/templates/native-go/dsm-package.yaml +8 -17
- package/templates/native-go-delegate/DELEGATE.md +142 -0
- package/templates/native-go-delegate/backend/cmd/background-worker/main.go +41 -0
- package/templates/native-go-delegate/backend/internal/app/delegate.go +15 -0
- package/templates/native-go-delegate/backend/internal/app/delegate_on.go +5 -0
- package/templates/native-go-delegate/backend/internal/app/delegate_routes_test.go +17 -0
- package/templates/native-go-delegate/backend/internal/background/delegate_review_test.go +174 -0
- package/templates/native-go-delegate/backend/internal/background/delegated.go +277 -0
- package/templates/native-go-delegate/backend/internal/background/delegated_test.go +34 -0
- package/templates/native-go-delegate/backend/internal/delegate/busy_review_test.go +15 -0
- package/templates/native-go-delegate/backend/internal/delegate/client.go +143 -0
- package/templates/native-go-delegate/backend/internal/delegate/client_test.go +214 -0
- package/templates/native-go-delegate/backend/internal/delegate/files.go +132 -0
- package/templates/native-go-delegate/backend/internal/delegate/retry.go +106 -0
- package/templates/native-go-delegate/backend/internal/delegate/retry_test.go +143 -0
- package/templates/native-go-delegate/backend/internal/delegate/service.go +323 -0
- package/templates/native-go-delegate/backend/internal/delegate/service_test.go +318 -0
- package/templates/native-go-delegate/backend/internal/delegate/wait_cancel_test.go +101 -0
- package/templates/native-go-delegate/backend/internal/delegate/worker.go +225 -0
- package/templates/native-go-delegate/backend/internal/filestation/files.go +73 -0
- package/templates/native-go-delegate/backend/internal/filestation/files_test.go +59 -0
- package/templates/native-go-delegate/frontend/src/CapabilityPanels.vue +10 -0
- package/templates/native-go-delegate/frontend/src/delegate/DelegatePanel.vue +70 -0
- package/templates/native-go-delegate/frontend/src/delegate/copy.ts +9 -0
- package/templates/native-go-delegate/frontend/src/delegate/i18n/waiting.json +11 -0
- package/templates/native-go-delegate/frontend/test/delegate.test.ts +130 -0
- package/templates/native-go-delegate/test-frontend.sh +12 -0
- package/templates/native-go-delegate/test.sh +17 -0
- package/templates/native-go-jobs/BACKGROUND.md +108 -0
- package/templates/native-go-jobs/backend/internal/app/background_routes_test.go +90 -0
- package/templates/native-go-jobs/frontend/src/background/BackgroundPanel.vue +170 -0
- package/templates/native-go-jobs/frontend/src/background/i18n/de.json +75 -0
- package/templates/native-go-jobs/frontend/src/background/i18n/en.json +75 -0
- package/templates/native-go-jobs/frontend/src/background/i18n/es.json +75 -0
- package/templates/native-go-jobs/frontend/src/background/i18n/fr.json +75 -0
- package/templates/native-go-jobs/frontend/src/background/i18n/it.json +75 -0
- package/templates/native-go-jobs/frontend/src/background/i18n/ja.json +75 -0
- package/templates/native-go-jobs/frontend/src/background/i18n/ko.json +75 -0
- package/templates/native-go-jobs/frontend/src/background/i18n/zh-CN.json +75 -0
- package/templates/native-go-jobs/frontend/src/background/i18n/zh-TW.json +75 -0
- package/templates/native-go-jobs/frontend/src/background/picker-provider.ts +12 -0
- package/templates/native-go-jobs/frontend/src/background/request-key.ts +5 -0
- package/templates/native-go-jobs/frontend/test/background.test.ts +208 -0
- package/templates/native-go-root-ops/backend/internal/app/executor.go +112 -0
- package/templates/native-go-root-ops/backend/internal/app/executor_test.go +53 -0
- package/templates/native-go-root-ops/root/whoami.sh +3 -0
- package/templates/native-go-vue/README.md +36 -248
- package/templates/native-go-vue/frontend/DESIGN.md +20 -49
- package/templates/native-go-vue/frontend/package-lock.json +278 -159
- package/templates/native-go-vue/frontend/package.json +2 -2
- package/templates/native-go-vue/frontend/src/App.vue +55 -151
- package/templates/native-go-vue/frontend/src/CapabilityPanels.vue +6 -0
- package/templates/native-go-vue/frontend/src/context.ts +2 -14
- package/templates/native-go-vue/frontend/src/delegate/ExecutorSettings.vue +25 -0
- package/templates/native-go-vue/frontend/src/delegate/copy.ts +4 -0
- package/templates/native-go-vue/frontend/src/delegate/executor-setup.ts +18 -0
- package/templates/native-go-vue/frontend/src/delegate/i18n/en.json +36 -0
- package/templates/native-go-vue/frontend/src/delegate/i18n/zh-TW.json +36 -0
- package/templates/native-go-vue/frontend/src/files/FileBrowser.vue +131 -0
- package/templates/native-go-vue/frontend/src/files/FilesPage.vue +35 -0
- package/templates/native-go-vue/frontend/src/files/files.test.ts +93 -0
- package/templates/native-go-vue/frontend/src/files/provider.test.ts +48 -0
- package/templates/native-go-vue/frontend/src/files/transfers.test.ts +27 -0
- package/templates/native-go-vue/frontend/src/files/transfers.ts +25 -0
- package/templates/native-go-vue/frontend/src/identity/DESIGN.md +46 -0
- package/templates/native-go-vue/frontend/src/identity/LoginPage.vue +76 -0
- package/templates/native-go-vue/frontend/src/identity/login.test.ts +32 -0
- package/templates/native-go-vue/frontend/src/identity/session.test.ts +29 -0
- package/templates/native-go-vue/frontend/src/identity/session.ts +73 -0
- package/templates/native-go-vue/frontend/src/main.ts +7 -4
- package/templates/native-go-vue/frontend/src/nas/NasPicker.vue +23 -0
- package/templates/native-go-vue/frontend/src/nas/contract.ts +12 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/files/de.json +41 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/files/en.json +41 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/files/es.json +41 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/files/fr.json +41 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/files/it.json +41 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/files/ja.json +41 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/files/ko.json +41 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/files/zh-CN.json +41 -0
- package/templates/native-go-vue/frontend/src/nas/i18n/files/zh-TW.json +41 -0
- package/templates/native-go-vue/frontend/src/nas/i18n.ts +2 -38
- package/templates/native-go-vue/frontend/src/nas/locale.ts +24 -0
- package/templates/native-go-vue/frontend/src/nas/provider.ts +46 -55
- package/templates/native-go-vue/frontend/src/nas/use-request.ts +13 -22
- package/templates/native-go-vue/frontend/src/shell/AppShell.vue +3 -3
- package/templates/native-go-vue/frontend/src/shell/i18n/de.json +1 -7
- package/templates/native-go-vue/frontend/src/shell/i18n/en.json +1 -7
- package/templates/native-go-vue/frontend/src/shell/i18n/es.json +1 -7
- package/templates/native-go-vue/frontend/src/shell/i18n/fr.json +1 -7
- package/templates/native-go-vue/frontend/src/shell/i18n/it.json +1 -7
- package/templates/native-go-vue/frontend/src/shell/i18n/ja.json +1 -7
- package/templates/native-go-vue/frontend/src/shell/i18n/ko.json +1 -7
- package/templates/native-go-vue/frontend/src/shell/i18n/zh-CN.json +1 -7
- package/templates/native-go-vue/frontend/src/shell/i18n/zh-TW.json +1 -7
- package/templates/native-go-vue/frontend/src/shell/pages.ts +3 -22
- package/templates/native-go-vue/frontend/test/apps.test.ts +33 -201
- package/templates/native-go-vue/frontend/test/shell-ui.test.ts +15 -109
- package/templates/native-go-vue/frontend/test/shell.test.ts +4 -19
- package/templates/native-go-vue/frontend/vite.config.ts +2 -2
- package/dist/build-spk/native-payload.d.ts +0 -37
- package/dist/build-spk/native-payload.js +0 -679
- package/dist/native/load.d.ts +0 -8
- package/dist/native/load.js +0 -11
- package/dist/native/types.d.ts +0 -28
- package/dist/native/types.js +0 -3
- package/dist/native/validate.d.ts +0 -6
- package/dist/native/validate.js +0 -143
- package/dist/standalone/authorization.d.ts +0 -48
- package/dist/standalone/authorization.js +0 -116
- package/dist/standalone/helper-inventory.d.ts +0 -31
- package/dist/standalone/helper-inventory.js +0 -11
- package/dist/standalone/helper.d.ts +0 -22
- package/dist/standalone/helper.js +0 -123
- package/dist/standalone/inspect-helper.d.ts +0 -6
- package/dist/standalone/inspect-helper.js +0 -103
- package/dist/standalone/job-diagnostics.d.ts +0 -1
- package/dist/standalone/job-diagnostics.js +0 -49
- package/dist/standalone/lifecycle-helper.d.ts +0 -2
- package/dist/standalone/lifecycle-helper.js +0 -12
- package/dist/standalone/root-messages.d.ts +0 -7
- package/dist/standalone/root-messages.js +0 -259
- package/dist/standalone/worker-contract-json.d.ts +0 -8
- package/dist/standalone/worker-contract-json.js +0 -141
- package/dist/standalone/worker-contract.d.ts +0 -189
- package/dist/standalone/worker-contract.js +0 -175
- package/dist/standalone/worker-registry.d.ts +0 -40
- package/dist/standalone/worker-registry.js +0 -167
- package/dist/templates/_authorization/main.go +0 -104
- package/dist/templates/_authorization/main_test.go +0 -35
- package/dist/templates/_shared/notice-overrides/index.json +0 -14
- package/dist/templates/_shared/notice-overrides/utils-0.4.2-LICENSE +0 -21
- package/dist/templates/_shared/notice-overrides/utils-0.5.0-LICENSE +0 -21
- package/dist/templates/binary/native.yaml +0 -16
- package/dist/templates/binary/synology-app.yaml +0 -7
- package/dist/templates/compose-import/compose.yaml +0 -10
- package/dist/templates/compose-import/synology-app.yaml +0 -15
- package/dist/templates/native-go/backend/cmd/app/sdk_main.go +0 -62
- package/dist/templates/native-go/backend/cmd/dsm-readonly-probe/main_linux.go +0 -46
- package/dist/templates/native-go/backend/cmd/helper/main.go +0 -64
- package/dist/templates/native-go/backend/cmd/helper/sdk_registry.go +0 -19
- package/dist/templates/native-go/backend/internal/api/binary.go +0 -154
- package/dist/templates/native-go/backend/internal/api/binary_test.go +0 -165
- package/dist/templates/native-go/backend/internal/app/authorization_none.go +0 -5
- package/dist/templates/native-go/backend/internal/app/integration_state.go +0 -16
- package/dist/templates/native-go/backend/internal/app/nas_cgi_artifact_test.go +0 -129
- package/dist/templates/native-go/backend/internal/app/nas_refusal_test.go +0 -46
- package/dist/templates/native-go/backend/internal/app/sdk_jobs.go +0 -70
- package/dist/templates/native-go/backend/internal/app/sdk_jobs_test.go +0 -116
- package/dist/templates/native-go/backend/internal/app/sdk_routes.go +0 -177
- package/dist/templates/native-go/backend/internal/dsmprobe/collector_linux.go +0 -335
- package/dist/templates/native-go/backend/internal/dsmprobe/collector_linux_test.go +0 -41
- package/dist/templates/native-go/backend/internal/dsmprobe/protocol.go +0 -179
- package/dist/templates/native-go/backend/internal/dsmprobe/protocol_test.go +0 -29
- package/dist/templates/native-go/backend/internal/filestation/repository.go +0 -207
- package/dist/templates/native-go/backend/internal/filestation/repository_test.go +0 -104
- package/dist/templates/native-go/backend/internal/filestation/sdk_session.go +0 -241
- package/dist/templates/native-go/backend/internal/filestation/sdk_session_test.go +0 -183
- package/dist/templates/native-go/backend/internal/filestation/session_semantics_test.go +0 -383
- package/dist/templates/native-go/backend/internal/helper/background_proof.go +0 -163
- package/dist/templates/native-go/backend/internal/helper/background_proof_contract.go +0 -46
- package/dist/templates/native-go/backend/internal/helper/background_proof_test.go +0 -161
- package/dist/templates/native-go/backend/internal/helper/cohort.go +0 -393
- package/dist/templates/native-go/backend/internal/helper/cohort_publication.go +0 -18
- package/dist/templates/native-go/backend/internal/helper/cohort_publication_test.go +0 -105
- package/dist/templates/native-go/backend/internal/helper/cohort_test.go +0 -372
- package/dist/templates/native-go/backend/internal/helper/control.go +0 -424
- package/dist/templates/native-go/backend/internal/helper/control_test.go +0 -250
- package/dist/templates/native-go/backend/internal/helper/data_contract.go +0 -245
- package/dist/templates/native-go/backend/internal/helper/data_contract_test.go +0 -51
- package/dist/templates/native-go/backend/internal/helper/data_decode.go +0 -184
- package/dist/templates/native-go/backend/internal/helper/data_decode_pointer_test.go +0 -30
- package/dist/templates/native-go/backend/internal/helper/data_protocol.go +0 -419
- package/dist/templates/native-go/backend/internal/helper/data_protocol_test.go +0 -449
- package/dist/templates/native-go/backend/internal/helper/dsm_acl_linux.go +0 -139
- package/dist/templates/native-go/backend/internal/helper/dsm_acl_linux_test.go +0 -121
- package/dist/templates/native-go/backend/internal/helper/dsm_acl_syscall_linux.go +0 -95
- package/dist/templates/native-go/backend/internal/helper/dsm_acl_syscall_linux_test.go +0 -56
- package/dist/templates/native-go/backend/internal/helper/dsm_bridge_linux.go +0 -144
- package/dist/templates/native-go/backend/internal/helper/dsm_bridge_linux_test.go +0 -89
- package/dist/templates/native-go/backend/internal/helper/dsm_home_linux.go +0 -107
- package/dist/templates/native-go/backend/internal/helper/dsm_home_linux_test.go +0 -82
- package/dist/templates/native-go/backend/internal/helper/dsm_probe_transport_linux.go +0 -151
- package/dist/templates/native-go/backend/internal/helper/dsm_probe_transport_linux_test.go +0 -66
- package/dist/templates/native-go/backend/internal/helper/grant_authority.go +0 -519
- package/dist/templates/native-go/backend/internal/helper/grant_authority_contract.go +0 -88
- package/dist/templates/native-go/backend/internal/helper/grant_authority_test.go +0 -510
- package/dist/templates/native-go/backend/internal/helper/grant_cohort.go +0 -389
- package/dist/templates/native-go/backend/internal/helper/grant_cohort_test.go +0 -239
- package/dist/templates/native-go/backend/internal/helper/grant_delivery.go +0 -49
- package/dist/templates/native-go/backend/internal/helper/grant_delivery_methods.go +0 -273
- package/dist/templates/native-go/backend/internal/helper/grant_delivery_test.go +0 -322
- package/dist/templates/native-go/backend/internal/helper/grant_operation_contract.go +0 -47
- package/dist/templates/native-go/backend/internal/helper/grant_readonly_test.go +0 -180
- package/dist/templates/native-go/backend/internal/helper/grant_repository_linux.go +0 -416
- package/dist/templates/native-go/backend/internal/helper/grant_repository_linux_test.go +0 -469
- package/dist/templates/native-go/backend/internal/helper/grant_rpc.go +0 -147
- package/dist/templates/native-go/backend/internal/helper/grant_rpc_test.go +0 -51
- package/dist/templates/native-go/backend/internal/helper/grant_snapshot.go +0 -78
- package/dist/templates/native-go/backend/internal/helper/grant_supervisor_linux.go +0 -134
- package/dist/templates/native-go/backend/internal/helper/grant_supervisor_linux_test.go +0 -254
- package/dist/templates/native-go/backend/internal/helper/jobcontract/bindings.go +0 -48
- package/dist/templates/native-go/backend/internal/helper/jobcontract/contract_test.go +0 -436
- package/dist/templates/native-go/backend/internal/helper/jobcontract/decode.go +0 -185
- package/dist/templates/native-go/backend/internal/helper/jobcontract/digest.go +0 -55
- package/dist/templates/native-go/backend/internal/helper/jobcontract/registry.go +0 -85
- package/dist/templates/native-go/backend/internal/helper/jobcontract/registry_test.go +0 -73
- package/dist/templates/native-go/backend/internal/helper/jobcontract/result.go +0 -53
- package/dist/templates/native-go/backend/internal/helper/jobcontract/stub.go +0 -8
- package/dist/templates/native-go/backend/internal/helper/jobcontract/testdata/input-digests.json +0 -127
- package/dist/templates/native-go/backend/internal/helper/jobcontract/types.go +0 -234
- package/dist/templates/native-go/backend/internal/helper/jobcontract/types_test.go +0 -29
- package/dist/templates/native-go/backend/internal/helper/jobcontract/validate.go +0 -462
- package/dist/templates/native-go/backend/internal/helper/lease.go +0 -112
- package/dist/templates/native-go/backend/internal/helper/lease_linux.go +0 -44
- package/dist/templates/native-go/backend/internal/helper/lease_other.go +0 -8
- package/dist/templates/native-go/backend/internal/helper/legacy_authority_schema_linux_test.go +0 -34
- package/dist/templates/native-go/backend/internal/helper/legacy_authority_schema_test.go +0 -6
- package/dist/templates/native-go/backend/internal/helper/lifecycle.go +0 -234
- package/dist/templates/native-go/backend/internal/helper/lifecycle_test.go +0 -473
- package/dist/templates/native-go/backend/internal/helper/managed_pilot.go +0 -284
- package/dist/templates/native-go/backend/internal/helper/managed_pilot_repository_linux.go +0 -74
- package/dist/templates/native-go/backend/internal/helper/managed_pilot_repository_linux_test.go +0 -40
- package/dist/templates/native-go/backend/internal/helper/managed_pilot_test.go +0 -210
- package/dist/templates/native-go/backend/internal/helper/management.go +0 -86
- package/dist/templates/native-go/backend/internal/helper/nas_shipped_refusal_linux_test.go +0 -97
- package/dist/templates/native-go/backend/internal/helper/native_discovery.go +0 -79
- package/dist/templates/native-go/backend/internal/helper/native_identity.go +0 -89
- package/dist/templates/native-go/backend/internal/helper/native_provider.go +0 -159
- package/dist/templates/native-go/backend/internal/helper/native_provider_test.go +0 -421
- package/dist/templates/native-go/backend/internal/helper/observation.go +0 -244
- package/dist/templates/native-go/backend/internal/helper/observation_health_test.go +0 -127
- package/dist/templates/native-go/backend/internal/helper/observation_reload_budget_test.go +0 -117
- package/dist/templates/native-go/backend/internal/helper/observation_test.go +0 -196
- package/dist/templates/native-go/backend/internal/helper/observer_diagnostic.go +0 -155
- package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_linux.go +0 -76
- package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_linux_test.go +0 -130
- package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_test.go +0 -98
- package/dist/templates/native-go/backend/internal/helper/observer_diagnostic_writer.go +0 -40
- package/dist/templates/native-go/backend/internal/helper/operation_bootstrap_linux.go +0 -193
- package/dist/templates/native-go/backend/internal/helper/operation_credentials_linux.go +0 -56
- package/dist/templates/native-go/backend/internal/helper/operation_linux.go +0 -480
- package/dist/templates/native-go/backend/internal/helper/operation_linux_test.go +0 -528
- package/dist/templates/native-go/backend/internal/helper/peer_linux.go +0 -44
- package/dist/templates/native-go/backend/internal/helper/peer_other.go +0 -7
- package/dist/templates/native-go/backend/internal/helper/process_linux.go +0 -180
- package/dist/templates/native-go/backend/internal/helper/process_other.go +0 -5
- package/dist/templates/native-go/backend/internal/helper/publication_test.go +0 -178
- package/dist/templates/native-go/backend/internal/helper/purge.go +0 -115
- package/dist/templates/native-go/backend/internal/helper/purge_test.go +0 -59
- package/dist/templates/native-go/backend/internal/helper/query_deadline_linux_test.go +0 -115
- package/dist/templates/native-go/backend/internal/helper/query_pending_diagnostic_test.go +0 -254
- package/dist/templates/native-go/backend/internal/helper/read_stream_cohort_linux_test.go +0 -156
- package/dist/templates/native-go/backend/internal/helper/read_transfer.go +0 -40
- package/dist/templates/native-go/backend/internal/helper/read_transfer_linux.go +0 -109
- package/dist/templates/native-go/backend/internal/helper/read_transfer_linux_test.go +0 -118
- package/dist/templates/native-go/backend/internal/helper/read_transfer_test.go +0 -177
- package/dist/templates/native-go/backend/internal/helper/readonly.go +0 -105
- package/dist/templates/native-go/backend/internal/helper/readonly_admission.go +0 -85
- package/dist/templates/native-go/backend/internal/helper/readonly_cohort_linux_test.go +0 -253
- package/dist/templates/native-go/backend/internal/helper/readonly_linux_test.go +0 -378
- package/dist/templates/native-go/backend/internal/helper/readonly_mount_linux.go +0 -65
- package/dist/templates/native-go/backend/internal/helper/readonly_mount_proxy_linux.go +0 -113
- package/dist/templates/native-go/backend/internal/helper/readonly_operations_linux.go +0 -168
- package/dist/templates/native-go/backend/internal/helper/readonly_resolver_linux.go +0 -241
- package/dist/templates/native-go/backend/internal/helper/readonly_test.go +0 -40
- package/dist/templates/native-go/backend/internal/helper/relaxed_identity.go +0 -252
- package/dist/templates/native-go/backend/internal/helper/relaxed_identity_contract.go +0 -105
- package/dist/templates/native-go/backend/internal/helper/relaxed_identity_test.go +0 -406
- package/dist/templates/native-go/backend/internal/helper/relaxed_invalidation.go +0 -203
- package/dist/templates/native-go/backend/internal/helper/repair.go +0 -132
- package/dist/templates/native-go/backend/internal/helper/repair_test.go +0 -271
- package/dist/templates/native-go/backend/internal/helper/revoke.go +0 -109
- package/dist/templates/native-go/backend/internal/helper/revoke_test.go +0 -121
- package/dist/templates/native-go/backend/internal/helper/s1r_actor_acl_linux_test.go +0 -303
- package/dist/templates/native-go/backend/internal/helper/s1r_actor_fixture_linux_test.go +0 -184
- package/dist/templates/native-go/backend/internal/helper/s1r_actor_races_linux_test.go +0 -250
- package/dist/templates/native-go/backend/internal/helper/s1r_fixture_contract_linux_test.go +0 -18
- package/dist/templates/native-go/backend/internal/helper/sdk_assembly_linux.go +0 -51
- package/dist/templates/native-go/backend/internal/helper/sdk_attach.go +0 -83
- package/dist/templates/native-go/backend/internal/helper/sdk_attach_contract.go +0 -32
- package/dist/templates/native-go/backend/internal/helper/sdk_attach_test.go +0 -184
- package/dist/templates/native-go/backend/internal/helper/sdk_authority_schema_test.go +0 -6
- package/dist/templates/native-go/backend/internal/helper/sdk_background_authority.go +0 -832
- package/dist/templates/native-go/backend/internal/helper/sdk_background_authority_test.go +0 -714
- package/dist/templates/native-go/backend/internal/helper/sdk_background_invalidation.go +0 -218
- package/dist/templates/native-go/backend/internal/helper/sdk_background_lease.go +0 -218
- package/dist/templates/native-go/backend/internal/helper/sdk_background_snapshot.go +0 -110
- package/dist/templates/native-go/backend/internal/helper/sdk_background_store_linux_test.go +0 -261
- package/dist/templates/native-go/backend/internal/helper/sdk_background_store_test.go +0 -58
- package/dist/templates/native-go/backend/internal/helper/sdk_bindings.go +0 -60
- package/dist/templates/native-go/backend/internal/helper/sdk_data_contract.go +0 -251
- package/dist/templates/native-go/backend/internal/helper/sdk_data_protocol.go +0 -424
- package/dist/templates/native-go/backend/internal/helper/sdk_dispatch_absence_test.go +0 -51
- package/dist/templates/native-go/backend/internal/helper/sdk_display.go +0 -488
- package/dist/templates/native-go/backend/internal/helper/sdk_display_contract.go +0 -121
- package/dist/templates/native-go/backend/internal/helper/sdk_display_test.go +0 -459
- package/dist/templates/native-go/backend/internal/helper/sdk_grant_authority.go +0 -559
- package/dist/templates/native-go/backend/internal/helper/sdk_grant_repository_linux.go +0 -417
- package/dist/templates/native-go/backend/internal/helper/sdk_grant_snapshot.go +0 -94
- package/dist/templates/native-go/backend/internal/helper/sdk_history.go +0 -80
- package/dist/templates/native-go/backend/internal/helper/sdk_history_test.go +0 -76
- package/dist/templates/native-go/backend/internal/helper/sdk_job.go +0 -697
- package/dist/templates/native-go/backend/internal/helper/sdk_job_child_linux.go +0 -309
- package/dist/templates/native-go/backend/internal/helper/sdk_job_contract.go +0 -122
- package/dist/templates/native-go/backend/internal/helper/sdk_job_linux_test.go +0 -159
- package/dist/templates/native-go/backend/internal/helper/sdk_job_process_linux.go +0 -327
- package/dist/templates/native-go/backend/internal/helper/sdk_job_test.go +0 -501
- package/dist/templates/native-go/backend/internal/helper/sdk_job_vm_linux_test.go +0 -343
- package/dist/templates/native-go/backend/internal/helper/sdk_journal.go +0 -77
- package/dist/templates/native-go/backend/internal/helper/sdk_journal_linux.go +0 -244
- package/dist/templates/native-go/backend/internal/helper/sdk_journal_linux_test.go +0 -295
- package/dist/templates/native-go/backend/internal/helper/sdk_journal_test.go +0 -71
- package/dist/templates/native-go/backend/internal/helper/sdk_picker_test.go +0 -50
- package/dist/templates/native-go/backend/internal/helper/sdk_process_linux.go +0 -184
- package/dist/templates/native-go/backend/internal/helper/sdk_public_vm_linux_test.go +0 -129
- package/dist/templates/native-go/backend/internal/helper/sdk_relaxed_invalidation.go +0 -242
- package/dist/templates/native-go/backend/internal/helper/sdk_rpc.go +0 -299
- package/dist/templates/native-go/backend/internal/helper/sdk_rpc_contract.go +0 -70
- package/dist/templates/native-go/backend/internal/helper/sdk_rpc_test.go +0 -135
- package/dist/templates/native-go/backend/internal/helper/sdk_server_linux.go +0 -161
- package/dist/templates/native-go/backend/internal/helper/sdk_session.go +0 -677
- package/dist/templates/native-go/backend/internal/helper/sdk_session_contract.go +0 -72
- package/dist/templates/native-go/backend/internal/helper/sdk_session_fence_test.go +0 -215
- package/dist/templates/native-go/backend/internal/helper/sdk_session_test.go +0 -475
- package/dist/templates/native-go/backend/internal/helper/sdk_supervisor_frame.go +0 -78
- package/dist/templates/native-go/backend/internal/helper/sdk_supervisor_linux.go +0 -414
- package/dist/templates/native-go/backend/internal/helper/sdk_transport.go +0 -79
- package/dist/templates/native-go/backend/internal/helper/sdk_transport_linux.go +0 -82
- package/dist/templates/native-go/backend/internal/helper/sdk_transport_test.go +0 -64
- package/dist/templates/native-go/backend/internal/helper/server_linux.go +0 -136
- package/dist/templates/native-go/backend/internal/helper/stale_management_linux_test.go +0 -126
- package/dist/templates/native-go/backend/internal/helper/stale_management_test.go +0 -122
- package/dist/templates/native-go/backend/internal/helper/startup_diagnostic.go +0 -68
- package/dist/templates/native-go/backend/internal/helper/startup_diagnostic_linux_test.go +0 -126
- package/dist/templates/native-go/backend/internal/helper/startup_diagnostic_test.go +0 -117
- package/dist/templates/native-go/backend/internal/helper/status.go +0 -343
- package/dist/templates/native-go/backend/internal/helper/status_test.go +0 -333
- package/dist/templates/native-go/backend/internal/helper/supervision.go +0 -107
- package/dist/templates/native-go/backend/internal/helper/supervision_test.go +0 -124
- package/dist/templates/native-go/backend/internal/helper/supervisor_frame.go +0 -79
- package/dist/templates/native-go/backend/internal/helper/supervisor_frame_linux_test.go +0 -69
- package/dist/templates/native-go/backend/internal/helper/supervisor_frame_test.go +0 -107
- package/dist/templates/native-go/backend/internal/helper/supervisor_linux.go +0 -367
- package/dist/templates/native-go/backend/internal/helper/supervisor_linux_test.go +0 -913
- package/dist/templates/native-go/backend/internal/helper/supervisor_socket_eof_test.go +0 -74
- package/dist/templates/native-go/backend/internal/helper/supervisor_socket_test.go +0 -45
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/create.json +0 -23
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/frames.json +0 -67
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/grant-store.json +0 -52
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/intent.json +0 -20
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/list.json +0 -20
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/publish.json +0 -20
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/read.json +0 -22
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/stat.json +0 -22
- package/dist/templates/native-go/backend/internal/helper/testdata/protocol2/write-stream.json +0 -22
- package/dist/templates/native-go/backend/internal/helper/unit_connection.go +0 -75
- package/dist/templates/native-go/backend/internal/helper/unit_connection_linux_test.go +0 -135
- package/dist/templates/native-go/backend/internal/helper/unit_connection_test.go +0 -151
- package/dist/templates/native-go/backend/internal/helper/unit_frame_test.go +0 -32
- package/dist/templates/native-go/backend/internal/helper/unit_linux.go +0 -368
- package/dist/templates/native-go/backend/internal/helper/unit_linux_test.go +0 -46
- package/dist/templates/native-go/backend/internal/helper/unit_mechanisms_linux_test.go +0 -217
- package/dist/templates/native-go/backend/internal/helper/unit_padding_linux_test.go +0 -178
- package/dist/templates/native-go/backend/internal/helper/unit_query_linux.go +0 -115
- package/dist/templates/native-go/backend/internal/helper/unit_reload_linux_test.go +0 -372
- package/dist/templates/native-go/backend/internal/helper/unit_reload_sequence_linux_test.go +0 -232
- package/dist/templates/native-go/backend/internal/helper/write.go +0 -77
- package/dist/templates/native-go/backend/internal/helper/write_admission.go +0 -260
- package/dist/templates/native-go/backend/internal/helper/write_admission_test.go +0 -135
- package/dist/templates/native-go/backend/internal/helper/write_cohort_linux_test.go +0 -218
- package/dist/templates/native-go/backend/internal/helper/write_files_linux.go +0 -205
- package/dist/templates/native-go/backend/internal/helper/write_files_linux_test.go +0 -225
- package/dist/templates/native-go/backend/internal/helper/write_intent_linux.go +0 -116
- package/dist/templates/native-go/backend/internal/helper/write_intent_linux_test.go +0 -74
- package/dist/templates/native-go/backend/internal/helper/write_operation_linux.go +0 -245
- package/dist/templates/native-go/backend/internal/helper/write_test.go +0 -53
- package/dist/templates/native-go-authorization/backend/internal/app/authorization.go +0 -298
- package/dist/templates/native-go-authorization/backend/internal/app/authorization_test.go +0 -96
- package/dist/templates/native-go-authorization/frontend/test/authorization-preview.html +0 -14
- package/dist/templates/native-go-authorization/frontend/test/authorization.test.ts +0 -59
- package/dist/templates/native-go-background/BACKGROUND.md +0 -111
- package/dist/templates/native-go-background/backend/internal/app/background_routes_test.go +0 -32
- package/dist/templates/native-go-background/frontend/src/background/BackgroundPanel.vue +0 -178
- package/dist/templates/native-go-background/frontend/src/background/i18n/de.json +0 -83
- package/dist/templates/native-go-background/frontend/src/background/i18n/en.json +0 -83
- package/dist/templates/native-go-background/frontend/src/background/i18n/es.json +0 -83
- package/dist/templates/native-go-background/frontend/src/background/i18n/fr.json +0 -83
- package/dist/templates/native-go-background/frontend/src/background/i18n/it.json +0 -83
- package/dist/templates/native-go-background/frontend/src/background/i18n/ja.json +0 -83
- package/dist/templates/native-go-background/frontend/src/background/i18n/ko.json +0 -83
- package/dist/templates/native-go-background/frontend/src/background/i18n/zh-CN.json +0 -83
- package/dist/templates/native-go-background/frontend/src/background/i18n/zh-TW.json +0 -83
- package/dist/templates/native-go-background/frontend/src/background/picker-provider.ts +0 -13
- package/dist/templates/native-go-background/frontend/test/background.test.ts +0 -179
- package/dist/templates/native-go-better-auth/backend/internal/app/identity.go +0 -208
- package/dist/templates/native-go-better-auth/backend/internal/app/identity_test.go +0 -113
- package/dist/templates/native-go-better-auth/node/app.mjs +0 -72
- package/dist/templates/native-go-better-auth/node/build.mjs +0 -4
- package/dist/templates/native-go-better-auth/node/package-lock.json +0 -862
- package/dist/templates/native-go-better-auth/node/package.json +0 -1
- package/dist/templates/native-go-better-auth/node/test/auth.test.mjs +0 -31
- package/dist/templates/native-go-integration/backend/internal/app/identity_none.go +0 -6
- package/dist/templates/native-go-integration/backend/internal/app/personal.go +0 -203
- package/dist/templates/native-go-integration/backend/internal/app/personal_test.go +0 -156
- package/dist/templates/native-go-root/backend/internal/app/root.go +0 -107
- package/dist/templates/native-go-root/backend/internal/app/root_test.go +0 -124
- package/dist/templates/native-go-root/root/whoami.sh +0 -6
- package/dist/templates/native-go-vue/frontend/README-JOBS.md +0 -75
- package/dist/templates/native-go-vue/frontend/README-M2.md +0 -64
- package/dist/templates/native-go-vue/frontend/src/M2App.vue +0 -57
- package/dist/templates/native-go-vue/frontend/src/SDKApp.vue +0 -203
- package/dist/templates/native-go-vue/frontend/src/jobs/InteractiveJobForm.vue +0 -70
- package/dist/templates/native-go-vue/frontend/src/jobs/JobsAdminPanel.vue +0 -33
- package/dist/templates/native-go-vue/frontend/src/jobs/JobsPanel.vue +0 -135
- package/dist/templates/native-go-vue/frontend/src/jobs/connected-provider.ts +0 -179
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/de.json +0 -62
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/en.json +0 -62
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/es.json +0 -62
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/fr.json +0 -62
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/it.json +0 -62
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/ja.json +0 -62
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/ko.json +0 -62
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/zh-CN.json +0 -62
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n/zh-TW.json +0 -62
- package/dist/templates/native-go-vue/frontend/src/jobs/i18n.ts +0 -15
- package/dist/templates/native-go-vue/frontend/src/jobs/mock-provider.ts +0 -67
- package/dist/templates/native-go-vue/frontend/src/jobs/provider.ts +0 -60
- package/dist/templates/native-go-vue/frontend/src/jobs/validate.ts +0 -44
- package/dist/templates/native-go-vue/frontend/src/m2-main.ts +0 -21
- package/dist/templates/native-go-vue/frontend/src/m2-style.css +0 -7
- package/dist/templates/native-go-vue/frontend/src/nas/M2Files.vue +0 -94
- package/dist/templates/native-go-vue/frontend/src/nas/M2PathPicker.vue +0 -70
- package/dist/templates/native-go-vue/frontend/src/nas/M2Settings.vue +0 -69
- package/dist/templates/native-go-vue/frontend/src/nas/NasGrantSettings.vue +0 -74
- package/dist/templates/native-go-vue/frontend/src/nas/NasPathPicker.vue +0 -106
- package/dist/templates/native-go-vue/frontend/src/nas/NasUnavailable.vue +0 -20
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/de.json +0 -74
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/en.json +0 -74
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/es.json +0 -74
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/fr.json +0 -74
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/it.json +0 -74
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/ja.json +0 -74
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/ko.json +0 -74
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/de.json +0 -56
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/en.json +0 -56
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/es.json +0 -56
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/fr.json +0 -56
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/it.json +0 -56
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/ja.json +0 -56
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/ko.json +0 -56
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/zh-CN.json +0 -56
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/m2/zh-TW.json +0 -56
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/zh-CN.json +0 -74
- package/dist/templates/native-go-vue/frontend/src/nas/i18n/zh-TW.json +0 -74
- package/dist/templates/native-go-vue/frontend/src/nas/m2-contract.ts +0 -33
- package/dist/templates/native-go-vue/frontend/src/nas/m2-i18n.ts +0 -24
- package/dist/templates/native-go-vue/frontend/src/nas/m2-provider.ts +0 -104
- package/dist/templates/native-go-vue/frontend/src/nas/mock-provider.ts +0 -119
- package/dist/templates/native-go-vue/frontend/src/nas/use-m2-request.ts +0 -18
- package/dist/templates/native-go-vue/frontend/src/sdk-main.ts +0 -39
- package/dist/templates/native-go-vue/frontend/test/jobs-connected.test.ts +0 -163
- package/dist/templates/native-go-vue/frontend/test/jobs-preview.html +0 -22
- package/dist/templates/native-go-vue/frontend/test/jobs.test.ts +0 -176
- package/dist/templates/native-go-vue/frontend/test/m2-preview.html +0 -27
- package/dist/templates/native-go-vue/frontend/test/m2-provider.test.ts +0 -87
- package/dist/templates/native-go-vue/frontend/test/m2-ui.test.ts +0 -209
- package/dist/templates/native-go-vue/frontend/test/nas-provider.test.ts +0 -81
- package/dist/templates/native-go-vue/frontend/test/nas-request.test.ts +0 -21
- package/dist/templates/native-go-vue/frontend/test/nas-ui.test.ts +0 -261
- package/dist/templates/native-go-vue/frontend/test/picker-wire.test.ts +0 -110
- package/dist/templates/native-go-vue/frontend/test/shell-preview.html +0 -19
- package/dist/templates/native-go-vue/frontend/test/shell-sdk.test.ts +0 -73
- package/templates/_authorization/main.go +0 -104
- package/templates/_authorization/main_test.go +0 -35
- package/templates/_shared/notice-overrides/index.json +0 -14
- package/templates/_shared/notice-overrides/utils-0.4.2-LICENSE +0 -21
- package/templates/_shared/notice-overrides/utils-0.5.0-LICENSE +0 -21
- package/templates/binary/native.yaml +0 -16
- package/templates/binary/synology-app.yaml +0 -7
- package/templates/compose-import/compose.yaml +0 -10
- package/templates/compose-import/synology-app.yaml +0 -15
- package/templates/native-go/backend/cmd/app/sdk_main.go +0 -62
- package/templates/native-go/backend/cmd/dsm-readonly-probe/main_linux.go +0 -46
- package/templates/native-go/backend/cmd/helper/main.go +0 -64
- package/templates/native-go/backend/cmd/helper/sdk_registry.go +0 -19
- package/templates/native-go/backend/internal/api/binary.go +0 -154
- package/templates/native-go/backend/internal/api/binary_test.go +0 -165
- package/templates/native-go/backend/internal/app/authorization_none.go +0 -5
- package/templates/native-go/backend/internal/app/integration_state.go +0 -16
- package/templates/native-go/backend/internal/app/nas_cgi_artifact_test.go +0 -129
- package/templates/native-go/backend/internal/app/nas_refusal_test.go +0 -46
- package/templates/native-go/backend/internal/app/sdk_jobs.go +0 -70
- package/templates/native-go/backend/internal/app/sdk_jobs_test.go +0 -116
- package/templates/native-go/backend/internal/app/sdk_routes.go +0 -177
- package/templates/native-go/backend/internal/dsmprobe/collector_linux.go +0 -335
- package/templates/native-go/backend/internal/dsmprobe/collector_linux_test.go +0 -41
- package/templates/native-go/backend/internal/dsmprobe/protocol.go +0 -179
- package/templates/native-go/backend/internal/dsmprobe/protocol_test.go +0 -29
- package/templates/native-go/backend/internal/filestation/repository.go +0 -207
- package/templates/native-go/backend/internal/filestation/repository_test.go +0 -104
- package/templates/native-go/backend/internal/filestation/sdk_session.go +0 -241
- package/templates/native-go/backend/internal/filestation/sdk_session_test.go +0 -183
- package/templates/native-go/backend/internal/filestation/session_semantics_test.go +0 -383
- package/templates/native-go/backend/internal/helper/background_proof.go +0 -163
- package/templates/native-go/backend/internal/helper/background_proof_contract.go +0 -46
- package/templates/native-go/backend/internal/helper/background_proof_test.go +0 -161
- package/templates/native-go/backend/internal/helper/cohort.go +0 -393
- package/templates/native-go/backend/internal/helper/cohort_publication.go +0 -18
- package/templates/native-go/backend/internal/helper/cohort_publication_test.go +0 -105
- package/templates/native-go/backend/internal/helper/cohort_test.go +0 -372
- package/templates/native-go/backend/internal/helper/control.go +0 -424
- package/templates/native-go/backend/internal/helper/control_test.go +0 -250
- package/templates/native-go/backend/internal/helper/data_contract.go +0 -245
- package/templates/native-go/backend/internal/helper/data_contract_test.go +0 -51
- package/templates/native-go/backend/internal/helper/data_decode.go +0 -184
- package/templates/native-go/backend/internal/helper/data_decode_pointer_test.go +0 -30
- package/templates/native-go/backend/internal/helper/data_protocol.go +0 -419
- package/templates/native-go/backend/internal/helper/data_protocol_test.go +0 -449
- package/templates/native-go/backend/internal/helper/dsm_acl_linux.go +0 -139
- package/templates/native-go/backend/internal/helper/dsm_acl_linux_test.go +0 -121
- package/templates/native-go/backend/internal/helper/dsm_acl_syscall_linux.go +0 -95
- package/templates/native-go/backend/internal/helper/dsm_acl_syscall_linux_test.go +0 -56
- package/templates/native-go/backend/internal/helper/dsm_bridge_linux.go +0 -144
- package/templates/native-go/backend/internal/helper/dsm_bridge_linux_test.go +0 -89
- package/templates/native-go/backend/internal/helper/dsm_home_linux.go +0 -107
- package/templates/native-go/backend/internal/helper/dsm_home_linux_test.go +0 -82
- package/templates/native-go/backend/internal/helper/dsm_probe_transport_linux.go +0 -151
- package/templates/native-go/backend/internal/helper/dsm_probe_transport_linux_test.go +0 -66
- package/templates/native-go/backend/internal/helper/grant_authority.go +0 -519
- package/templates/native-go/backend/internal/helper/grant_authority_contract.go +0 -88
- package/templates/native-go/backend/internal/helper/grant_authority_test.go +0 -510
- package/templates/native-go/backend/internal/helper/grant_cohort.go +0 -389
- package/templates/native-go/backend/internal/helper/grant_cohort_test.go +0 -239
- package/templates/native-go/backend/internal/helper/grant_delivery.go +0 -49
- package/templates/native-go/backend/internal/helper/grant_delivery_methods.go +0 -273
- package/templates/native-go/backend/internal/helper/grant_delivery_test.go +0 -322
- package/templates/native-go/backend/internal/helper/grant_operation_contract.go +0 -47
- package/templates/native-go/backend/internal/helper/grant_readonly_test.go +0 -180
- package/templates/native-go/backend/internal/helper/grant_repository_linux.go +0 -416
- package/templates/native-go/backend/internal/helper/grant_repository_linux_test.go +0 -469
- package/templates/native-go/backend/internal/helper/grant_rpc.go +0 -147
- package/templates/native-go/backend/internal/helper/grant_rpc_test.go +0 -51
- package/templates/native-go/backend/internal/helper/grant_snapshot.go +0 -78
- package/templates/native-go/backend/internal/helper/grant_supervisor_linux.go +0 -134
- package/templates/native-go/backend/internal/helper/grant_supervisor_linux_test.go +0 -254
- package/templates/native-go/backend/internal/helper/jobcontract/bindings.go +0 -48
- package/templates/native-go/backend/internal/helper/jobcontract/contract_test.go +0 -436
- package/templates/native-go/backend/internal/helper/jobcontract/decode.go +0 -185
- package/templates/native-go/backend/internal/helper/jobcontract/digest.go +0 -55
- package/templates/native-go/backend/internal/helper/jobcontract/registry.go +0 -85
- package/templates/native-go/backend/internal/helper/jobcontract/registry_test.go +0 -73
- package/templates/native-go/backend/internal/helper/jobcontract/result.go +0 -53
- package/templates/native-go/backend/internal/helper/jobcontract/stub.go +0 -8
- package/templates/native-go/backend/internal/helper/jobcontract/testdata/input-digests.json +0 -127
- package/templates/native-go/backend/internal/helper/jobcontract/types.go +0 -234
- package/templates/native-go/backend/internal/helper/jobcontract/types_test.go +0 -29
- package/templates/native-go/backend/internal/helper/jobcontract/validate.go +0 -462
- package/templates/native-go/backend/internal/helper/lease.go +0 -112
- package/templates/native-go/backend/internal/helper/lease_linux.go +0 -44
- package/templates/native-go/backend/internal/helper/lease_other.go +0 -8
- package/templates/native-go/backend/internal/helper/legacy_authority_schema_linux_test.go +0 -34
- package/templates/native-go/backend/internal/helper/legacy_authority_schema_test.go +0 -6
- package/templates/native-go/backend/internal/helper/lifecycle.go +0 -234
- package/templates/native-go/backend/internal/helper/lifecycle_test.go +0 -473
- package/templates/native-go/backend/internal/helper/managed_pilot.go +0 -284
- package/templates/native-go/backend/internal/helper/managed_pilot_repository_linux.go +0 -74
- package/templates/native-go/backend/internal/helper/managed_pilot_repository_linux_test.go +0 -40
- package/templates/native-go/backend/internal/helper/managed_pilot_test.go +0 -210
- package/templates/native-go/backend/internal/helper/management.go +0 -86
- package/templates/native-go/backend/internal/helper/nas_shipped_refusal_linux_test.go +0 -97
- package/templates/native-go/backend/internal/helper/native_discovery.go +0 -79
- package/templates/native-go/backend/internal/helper/native_identity.go +0 -89
- package/templates/native-go/backend/internal/helper/native_provider.go +0 -159
- package/templates/native-go/backend/internal/helper/native_provider_test.go +0 -421
- package/templates/native-go/backend/internal/helper/observation.go +0 -244
- package/templates/native-go/backend/internal/helper/observation_health_test.go +0 -127
- package/templates/native-go/backend/internal/helper/observation_reload_budget_test.go +0 -117
- package/templates/native-go/backend/internal/helper/observation_test.go +0 -196
- package/templates/native-go/backend/internal/helper/observer_diagnostic.go +0 -155
- package/templates/native-go/backend/internal/helper/observer_diagnostic_linux.go +0 -76
- package/templates/native-go/backend/internal/helper/observer_diagnostic_linux_test.go +0 -130
- package/templates/native-go/backend/internal/helper/observer_diagnostic_test.go +0 -98
- package/templates/native-go/backend/internal/helper/observer_diagnostic_writer.go +0 -40
- package/templates/native-go/backend/internal/helper/operation_bootstrap_linux.go +0 -193
- package/templates/native-go/backend/internal/helper/operation_credentials_linux.go +0 -56
- package/templates/native-go/backend/internal/helper/operation_linux.go +0 -480
- package/templates/native-go/backend/internal/helper/operation_linux_test.go +0 -528
- package/templates/native-go/backend/internal/helper/peer_linux.go +0 -44
- package/templates/native-go/backend/internal/helper/peer_other.go +0 -7
- package/templates/native-go/backend/internal/helper/process_linux.go +0 -180
- package/templates/native-go/backend/internal/helper/process_other.go +0 -5
- package/templates/native-go/backend/internal/helper/publication_test.go +0 -178
- package/templates/native-go/backend/internal/helper/purge.go +0 -115
- package/templates/native-go/backend/internal/helper/purge_test.go +0 -59
- package/templates/native-go/backend/internal/helper/query_deadline_linux_test.go +0 -115
- package/templates/native-go/backend/internal/helper/query_pending_diagnostic_test.go +0 -254
- package/templates/native-go/backend/internal/helper/read_stream_cohort_linux_test.go +0 -156
- package/templates/native-go/backend/internal/helper/read_transfer.go +0 -40
- package/templates/native-go/backend/internal/helper/read_transfer_linux.go +0 -109
- package/templates/native-go/backend/internal/helper/read_transfer_linux_test.go +0 -118
- package/templates/native-go/backend/internal/helper/read_transfer_test.go +0 -177
- package/templates/native-go/backend/internal/helper/readonly.go +0 -105
- package/templates/native-go/backend/internal/helper/readonly_admission.go +0 -85
- package/templates/native-go/backend/internal/helper/readonly_cohort_linux_test.go +0 -253
- package/templates/native-go/backend/internal/helper/readonly_linux_test.go +0 -378
- package/templates/native-go/backend/internal/helper/readonly_mount_linux.go +0 -65
- package/templates/native-go/backend/internal/helper/readonly_mount_proxy_linux.go +0 -113
- package/templates/native-go/backend/internal/helper/readonly_operations_linux.go +0 -168
- package/templates/native-go/backend/internal/helper/readonly_resolver_linux.go +0 -241
- package/templates/native-go/backend/internal/helper/readonly_test.go +0 -40
- package/templates/native-go/backend/internal/helper/relaxed_identity.go +0 -252
- package/templates/native-go/backend/internal/helper/relaxed_identity_contract.go +0 -105
- package/templates/native-go/backend/internal/helper/relaxed_identity_test.go +0 -406
- package/templates/native-go/backend/internal/helper/relaxed_invalidation.go +0 -203
- package/templates/native-go/backend/internal/helper/repair.go +0 -132
- package/templates/native-go/backend/internal/helper/repair_test.go +0 -271
- package/templates/native-go/backend/internal/helper/revoke.go +0 -109
- package/templates/native-go/backend/internal/helper/revoke_test.go +0 -121
- package/templates/native-go/backend/internal/helper/s1r_actor_acl_linux_test.go +0 -303
- package/templates/native-go/backend/internal/helper/s1r_actor_fixture_linux_test.go +0 -184
- package/templates/native-go/backend/internal/helper/s1r_actor_races_linux_test.go +0 -250
- package/templates/native-go/backend/internal/helper/s1r_fixture_contract_linux_test.go +0 -18
- package/templates/native-go/backend/internal/helper/sdk_assembly_linux.go +0 -51
- package/templates/native-go/backend/internal/helper/sdk_attach.go +0 -83
- package/templates/native-go/backend/internal/helper/sdk_attach_contract.go +0 -32
- package/templates/native-go/backend/internal/helper/sdk_attach_test.go +0 -184
- package/templates/native-go/backend/internal/helper/sdk_authority_schema_test.go +0 -6
- package/templates/native-go/backend/internal/helper/sdk_background_authority.go +0 -832
- package/templates/native-go/backend/internal/helper/sdk_background_authority_test.go +0 -714
- package/templates/native-go/backend/internal/helper/sdk_background_invalidation.go +0 -218
- package/templates/native-go/backend/internal/helper/sdk_background_lease.go +0 -218
- package/templates/native-go/backend/internal/helper/sdk_background_snapshot.go +0 -110
- package/templates/native-go/backend/internal/helper/sdk_background_store_linux_test.go +0 -261
- package/templates/native-go/backend/internal/helper/sdk_background_store_test.go +0 -58
- package/templates/native-go/backend/internal/helper/sdk_bindings.go +0 -60
- package/templates/native-go/backend/internal/helper/sdk_data_contract.go +0 -251
- package/templates/native-go/backend/internal/helper/sdk_data_protocol.go +0 -424
- package/templates/native-go/backend/internal/helper/sdk_dispatch_absence_test.go +0 -51
- package/templates/native-go/backend/internal/helper/sdk_display.go +0 -488
- package/templates/native-go/backend/internal/helper/sdk_display_contract.go +0 -121
- package/templates/native-go/backend/internal/helper/sdk_display_test.go +0 -459
- package/templates/native-go/backend/internal/helper/sdk_grant_authority.go +0 -559
- package/templates/native-go/backend/internal/helper/sdk_grant_repository_linux.go +0 -417
- package/templates/native-go/backend/internal/helper/sdk_grant_snapshot.go +0 -94
- package/templates/native-go/backend/internal/helper/sdk_history.go +0 -80
- package/templates/native-go/backend/internal/helper/sdk_history_test.go +0 -76
- package/templates/native-go/backend/internal/helper/sdk_job.go +0 -697
- package/templates/native-go/backend/internal/helper/sdk_job_child_linux.go +0 -309
- package/templates/native-go/backend/internal/helper/sdk_job_contract.go +0 -122
- package/templates/native-go/backend/internal/helper/sdk_job_linux_test.go +0 -159
- package/templates/native-go/backend/internal/helper/sdk_job_process_linux.go +0 -327
- package/templates/native-go/backend/internal/helper/sdk_job_test.go +0 -501
- package/templates/native-go/backend/internal/helper/sdk_job_vm_linux_test.go +0 -343
- package/templates/native-go/backend/internal/helper/sdk_journal.go +0 -77
- package/templates/native-go/backend/internal/helper/sdk_journal_linux.go +0 -244
- package/templates/native-go/backend/internal/helper/sdk_journal_linux_test.go +0 -295
- package/templates/native-go/backend/internal/helper/sdk_journal_test.go +0 -71
- package/templates/native-go/backend/internal/helper/sdk_picker_test.go +0 -50
- package/templates/native-go/backend/internal/helper/sdk_process_linux.go +0 -184
- package/templates/native-go/backend/internal/helper/sdk_public_vm_linux_test.go +0 -129
- package/templates/native-go/backend/internal/helper/sdk_relaxed_invalidation.go +0 -242
- package/templates/native-go/backend/internal/helper/sdk_rpc.go +0 -299
- package/templates/native-go/backend/internal/helper/sdk_rpc_contract.go +0 -70
- package/templates/native-go/backend/internal/helper/sdk_rpc_test.go +0 -135
- package/templates/native-go/backend/internal/helper/sdk_server_linux.go +0 -161
- package/templates/native-go/backend/internal/helper/sdk_session.go +0 -677
- package/templates/native-go/backend/internal/helper/sdk_session_contract.go +0 -72
- package/templates/native-go/backend/internal/helper/sdk_session_fence_test.go +0 -215
- package/templates/native-go/backend/internal/helper/sdk_session_test.go +0 -475
- package/templates/native-go/backend/internal/helper/sdk_supervisor_frame.go +0 -78
- package/templates/native-go/backend/internal/helper/sdk_supervisor_linux.go +0 -414
- package/templates/native-go/backend/internal/helper/sdk_transport.go +0 -79
- package/templates/native-go/backend/internal/helper/sdk_transport_linux.go +0 -82
- package/templates/native-go/backend/internal/helper/sdk_transport_test.go +0 -64
- package/templates/native-go/backend/internal/helper/server_linux.go +0 -136
- package/templates/native-go/backend/internal/helper/stale_management_linux_test.go +0 -126
- package/templates/native-go/backend/internal/helper/stale_management_test.go +0 -122
- package/templates/native-go/backend/internal/helper/startup_diagnostic.go +0 -68
- package/templates/native-go/backend/internal/helper/startup_diagnostic_linux_test.go +0 -126
- package/templates/native-go/backend/internal/helper/startup_diagnostic_test.go +0 -117
- package/templates/native-go/backend/internal/helper/status.go +0 -343
- package/templates/native-go/backend/internal/helper/status_test.go +0 -333
- package/templates/native-go/backend/internal/helper/supervision.go +0 -107
- package/templates/native-go/backend/internal/helper/supervision_test.go +0 -124
- package/templates/native-go/backend/internal/helper/supervisor_frame.go +0 -79
- package/templates/native-go/backend/internal/helper/supervisor_frame_linux_test.go +0 -69
- package/templates/native-go/backend/internal/helper/supervisor_frame_test.go +0 -107
- package/templates/native-go/backend/internal/helper/supervisor_linux.go +0 -367
- package/templates/native-go/backend/internal/helper/supervisor_linux_test.go +0 -913
- package/templates/native-go/backend/internal/helper/supervisor_socket_eof_test.go +0 -74
- package/templates/native-go/backend/internal/helper/supervisor_socket_test.go +0 -45
- package/templates/native-go/backend/internal/helper/testdata/protocol2/create.json +0 -23
- package/templates/native-go/backend/internal/helper/testdata/protocol2/frames.json +0 -67
- package/templates/native-go/backend/internal/helper/testdata/protocol2/grant-store.json +0 -52
- package/templates/native-go/backend/internal/helper/testdata/protocol2/intent.json +0 -20
- package/templates/native-go/backend/internal/helper/testdata/protocol2/list.json +0 -20
- package/templates/native-go/backend/internal/helper/testdata/protocol2/publish.json +0 -20
- package/templates/native-go/backend/internal/helper/testdata/protocol2/read.json +0 -22
- package/templates/native-go/backend/internal/helper/testdata/protocol2/stat.json +0 -22
- package/templates/native-go/backend/internal/helper/testdata/protocol2/write-stream.json +0 -22
- package/templates/native-go/backend/internal/helper/unit_connection.go +0 -75
- package/templates/native-go/backend/internal/helper/unit_connection_linux_test.go +0 -135
- package/templates/native-go/backend/internal/helper/unit_connection_test.go +0 -151
- package/templates/native-go/backend/internal/helper/unit_frame_test.go +0 -32
- package/templates/native-go/backend/internal/helper/unit_linux.go +0 -368
- package/templates/native-go/backend/internal/helper/unit_linux_test.go +0 -46
- package/templates/native-go/backend/internal/helper/unit_mechanisms_linux_test.go +0 -217
- package/templates/native-go/backend/internal/helper/unit_padding_linux_test.go +0 -178
- package/templates/native-go/backend/internal/helper/unit_query_linux.go +0 -115
- package/templates/native-go/backend/internal/helper/unit_reload_linux_test.go +0 -372
- package/templates/native-go/backend/internal/helper/unit_reload_sequence_linux_test.go +0 -232
- package/templates/native-go/backend/internal/helper/write.go +0 -77
- package/templates/native-go/backend/internal/helper/write_admission.go +0 -260
- package/templates/native-go/backend/internal/helper/write_admission_test.go +0 -135
- package/templates/native-go/backend/internal/helper/write_cohort_linux_test.go +0 -218
- package/templates/native-go/backend/internal/helper/write_files_linux.go +0 -205
- package/templates/native-go/backend/internal/helper/write_files_linux_test.go +0 -225
- package/templates/native-go/backend/internal/helper/write_intent_linux.go +0 -116
- package/templates/native-go/backend/internal/helper/write_intent_linux_test.go +0 -74
- package/templates/native-go/backend/internal/helper/write_operation_linux.go +0 -245
- package/templates/native-go/backend/internal/helper/write_test.go +0 -53
- package/templates/native-go-authorization/backend/internal/app/authorization.go +0 -298
- package/templates/native-go-authorization/backend/internal/app/authorization_test.go +0 -96
- package/templates/native-go-authorization/frontend/test/authorization-preview.html +0 -14
- package/templates/native-go-authorization/frontend/test/authorization.test.ts +0 -59
- package/templates/native-go-background/BACKGROUND.md +0 -111
- package/templates/native-go-background/backend/internal/app/background_routes_test.go +0 -32
- package/templates/native-go-background/frontend/src/background/BackgroundPanel.vue +0 -178
- package/templates/native-go-background/frontend/src/background/i18n/de.json +0 -83
- package/templates/native-go-background/frontend/src/background/i18n/en.json +0 -83
- package/templates/native-go-background/frontend/src/background/i18n/es.json +0 -83
- package/templates/native-go-background/frontend/src/background/i18n/fr.json +0 -83
- package/templates/native-go-background/frontend/src/background/i18n/it.json +0 -83
- package/templates/native-go-background/frontend/src/background/i18n/ja.json +0 -83
- package/templates/native-go-background/frontend/src/background/i18n/ko.json +0 -83
- package/templates/native-go-background/frontend/src/background/i18n/zh-CN.json +0 -83
- package/templates/native-go-background/frontend/src/background/i18n/zh-TW.json +0 -83
- package/templates/native-go-background/frontend/src/background/picker-provider.ts +0 -13
- package/templates/native-go-background/frontend/test/background.test.ts +0 -179
- package/templates/native-go-better-auth/backend/internal/app/identity.go +0 -208
- package/templates/native-go-better-auth/backend/internal/app/identity_test.go +0 -113
- package/templates/native-go-better-auth/node/app.mjs +0 -72
- package/templates/native-go-better-auth/node/build.mjs +0 -4
- package/templates/native-go-better-auth/node/package-lock.json +0 -862
- package/templates/native-go-better-auth/node/package.json +0 -1
- package/templates/native-go-better-auth/node/test/auth.test.mjs +0 -31
- package/templates/native-go-integration/backend/internal/app/identity_none.go +0 -6
- package/templates/native-go-integration/backend/internal/app/personal.go +0 -203
- package/templates/native-go-integration/backend/internal/app/personal_test.go +0 -156
- package/templates/native-go-root/backend/internal/app/root.go +0 -107
- package/templates/native-go-root/backend/internal/app/root_test.go +0 -124
- package/templates/native-go-root/root/whoami.sh +0 -6
- package/templates/native-go-vue/frontend/README-JOBS.md +0 -75
- package/templates/native-go-vue/frontend/README-M2.md +0 -64
- package/templates/native-go-vue/frontend/src/M2App.vue +0 -57
- package/templates/native-go-vue/frontend/src/SDKApp.vue +0 -203
- package/templates/native-go-vue/frontend/src/jobs/InteractiveJobForm.vue +0 -70
- package/templates/native-go-vue/frontend/src/jobs/JobsAdminPanel.vue +0 -33
- package/templates/native-go-vue/frontend/src/jobs/JobsPanel.vue +0 -135
- package/templates/native-go-vue/frontend/src/jobs/connected-provider.ts +0 -179
- package/templates/native-go-vue/frontend/src/jobs/i18n/de.json +0 -62
- package/templates/native-go-vue/frontend/src/jobs/i18n/en.json +0 -62
- package/templates/native-go-vue/frontend/src/jobs/i18n/es.json +0 -62
- package/templates/native-go-vue/frontend/src/jobs/i18n/fr.json +0 -62
- package/templates/native-go-vue/frontend/src/jobs/i18n/it.json +0 -62
- package/templates/native-go-vue/frontend/src/jobs/i18n/ja.json +0 -62
- package/templates/native-go-vue/frontend/src/jobs/i18n/ko.json +0 -62
- package/templates/native-go-vue/frontend/src/jobs/i18n/zh-CN.json +0 -62
- package/templates/native-go-vue/frontend/src/jobs/i18n/zh-TW.json +0 -62
- package/templates/native-go-vue/frontend/src/jobs/i18n.ts +0 -15
- package/templates/native-go-vue/frontend/src/jobs/mock-provider.ts +0 -67
- package/templates/native-go-vue/frontend/src/jobs/provider.ts +0 -60
- package/templates/native-go-vue/frontend/src/jobs/validate.ts +0 -44
- package/templates/native-go-vue/frontend/src/m2-main.ts +0 -21
- package/templates/native-go-vue/frontend/src/m2-style.css +0 -7
- package/templates/native-go-vue/frontend/src/nas/M2Files.vue +0 -94
- package/templates/native-go-vue/frontend/src/nas/M2PathPicker.vue +0 -70
- package/templates/native-go-vue/frontend/src/nas/M2Settings.vue +0 -69
- package/templates/native-go-vue/frontend/src/nas/NasGrantSettings.vue +0 -74
- package/templates/native-go-vue/frontend/src/nas/NasPathPicker.vue +0 -106
- package/templates/native-go-vue/frontend/src/nas/NasUnavailable.vue +0 -20
- package/templates/native-go-vue/frontend/src/nas/i18n/de.json +0 -74
- package/templates/native-go-vue/frontend/src/nas/i18n/en.json +0 -74
- package/templates/native-go-vue/frontend/src/nas/i18n/es.json +0 -74
- package/templates/native-go-vue/frontend/src/nas/i18n/fr.json +0 -74
- package/templates/native-go-vue/frontend/src/nas/i18n/it.json +0 -74
- package/templates/native-go-vue/frontend/src/nas/i18n/ja.json +0 -74
- package/templates/native-go-vue/frontend/src/nas/i18n/ko.json +0 -74
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/de.json +0 -56
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/en.json +0 -56
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/es.json +0 -56
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/fr.json +0 -56
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/it.json +0 -56
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/ja.json +0 -56
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/ko.json +0 -56
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/zh-CN.json +0 -56
- package/templates/native-go-vue/frontend/src/nas/i18n/m2/zh-TW.json +0 -56
- package/templates/native-go-vue/frontend/src/nas/i18n/zh-CN.json +0 -74
- package/templates/native-go-vue/frontend/src/nas/i18n/zh-TW.json +0 -74
- package/templates/native-go-vue/frontend/src/nas/m2-contract.ts +0 -33
- package/templates/native-go-vue/frontend/src/nas/m2-i18n.ts +0 -24
- package/templates/native-go-vue/frontend/src/nas/m2-provider.ts +0 -104
- package/templates/native-go-vue/frontend/src/nas/mock-provider.ts +0 -119
- package/templates/native-go-vue/frontend/src/nas/use-m2-request.ts +0 -18
- package/templates/native-go-vue/frontend/src/sdk-main.ts +0 -39
- package/templates/native-go-vue/frontend/test/jobs-connected.test.ts +0 -163
- package/templates/native-go-vue/frontend/test/jobs-preview.html +0 -22
- package/templates/native-go-vue/frontend/test/jobs.test.ts +0 -176
- package/templates/native-go-vue/frontend/test/m2-preview.html +0 -27
- package/templates/native-go-vue/frontend/test/m2-provider.test.ts +0 -87
- package/templates/native-go-vue/frontend/test/m2-ui.test.ts +0 -209
- package/templates/native-go-vue/frontend/test/nas-provider.test.ts +0 -81
- package/templates/native-go-vue/frontend/test/nas-request.test.ts +0 -21
- package/templates/native-go-vue/frontend/test/nas-ui.test.ts +0 -261
- package/templates/native-go-vue/frontend/test/picker-wire.test.ts +0 -110
- package/templates/native-go-vue/frontend/test/shell-preview.html +0 -19
- package/templates/native-go-vue/frontend/test/shell-sdk.test.ts +0 -73
- /package/dist/standalone/{authorization-window.d.ts → native-authorization-window.d.ts} +0 -0
- /package/dist/standalone/{authorization-window.js → native-authorization-window.js} +0 -0
- /package/dist/templates/{hello-files → compose}/compose.yaml +0 -0
- /package/dist/templates/{hello-files → compose}/synology-app.yaml +0 -0
- /package/dist/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/AuthorizationGate.vue +0 -0
- /package/dist/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/de.json +0 -0
- /package/dist/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/en.json +0 -0
- /package/dist/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/es.json +0 -0
- /package/dist/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/fr.json +0 -0
- /package/dist/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/index.ts +0 -0
- /package/dist/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/it.json +0 -0
- /package/dist/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/ja.json +0 -0
- /package/dist/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/ko.json +0 -0
- /package/dist/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/zh-CN.json +0 -0
- /package/dist/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/zh-TW.json +0 -0
- /package/dist/templates/{native-go-background → native-go-jobs}/backend/internal/app/background_on.go +0 -0
- /package/dist/templates/{native-go-background → native-go-jobs}/frontend/src/background/i18n.ts +0 -0
- /package/templates/{hello-files → compose}/compose.yaml +0 -0
- /package/templates/{hello-files → compose}/synology-app.yaml +0 -0
- /package/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/AuthorizationGate.vue +0 -0
- /package/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/de.json +0 -0
- /package/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/en.json +0 -0
- /package/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/es.json +0 -0
- /package/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/fr.json +0 -0
- /package/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/index.ts +0 -0
- /package/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/it.json +0 -0
- /package/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/ja.json +0 -0
- /package/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/ko.json +0 -0
- /package/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/zh-CN.json +0 -0
- /package/templates/{native-go-authorization/frontend/src/authorization → native-authorization}/i18n/zh-TW.json +0 -0
- /package/templates/{native-go-background → native-go-jobs}/backend/internal/app/background_on.go +0 -0
- /package/templates/{native-go-background → native-go-jobs}/frontend/src/background/i18n.ts +0 -0
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
// @vitest-environment jsdom
|
|
2
|
-
import {expect, test, vi} from 'vitest'
|
|
3
|
-
import {nextTick} from 'vue'
|
|
4
|
-
import {mount} from '../src/main'
|
|
5
|
-
import {createMockNasService} from '../src/nas/mock-provider'
|
|
6
|
-
import {catalogs, nasCopy, format, errorCopy} from '../src/nas/i18n'
|
|
7
|
-
import type {NasProvider} from '../src/nas/provider'
|
|
8
|
-
import type {Context} from '../src/context'
|
|
9
|
-
|
|
10
|
-
async function settle() {for(let i=0;i<20;i++){await Promise.resolve();await nextTick()}await new Promise(r=>setTimeout(r,25))}
|
|
11
|
-
function click(root:HTMLElement, text:string) {const b=[...root.querySelectorAll('button')].find(b=>b.textContent?.trim()===text || b.getAttribute('aria-label')===text);expect(b,text).toBeTruthy();b!.click()}
|
|
12
|
-
function fixture(nas:NasProvider | undefined, user='normal1', locale='en') {
|
|
13
|
-
const root=document.createElement('div');document.body.append(root)
|
|
14
|
-
const reopen:Array<()=>void>=[]
|
|
15
|
-
const ctx={locale,reopen(fn:()=>void){reopen.push(fn)},call:vi.fn(async(method:string)=> {
|
|
16
|
-
if(method==='app.status') return {package:'SamePackage',version:'1',user,admin:user==='admin'}
|
|
17
|
-
if(method==='integration.status') return {state:'not-enabled',reason:'not-requested',packageRunning:'unknown',scheduler:'not-probed'}
|
|
18
|
-
throw {code:'unknown_method'}
|
|
19
|
-
})} as Context
|
|
20
|
-
const app=mount(root,ctx,{nasProvider:nas})
|
|
21
|
-
return {root,app,ctx,reopen}
|
|
22
|
-
}
|
|
23
|
-
function cleanup(...fixtures:ReturnType<typeof fixture>[]) {for(const f of fixtures){f.app.unmount();f.root.remove()}}
|
|
24
|
-
|
|
25
|
-
test('managed account pilot stays visibly off with maintenance and approval restrictions',async()=> {
|
|
26
|
-
const f=fixture(createMockNasService().connect('admin'),'admin')
|
|
27
|
-
try {
|
|
28
|
-
await settle()
|
|
29
|
-
expect(f.root.textContent).toContain('Managed account pilot: off')
|
|
30
|
-
expect(f.root.textContent).toContain('Account changes or unverified identity revoke access')
|
|
31
|
-
expect(f.root.textContent).toContain('Enabling this pilot is unavailable in this build')
|
|
32
|
-
expect([...f.root.querySelectorAll('button')].some(b=>b.textContent?.includes('Enable managed'))).toBe(false)
|
|
33
|
-
} finally {cleanup(f)}
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
test('nine complete catalogs resolve DSM locale aliases with English fallback',()=> {
|
|
37
|
-
expect(Object.keys(catalogs)).toEqual(['en','zh-TW','zh-CN','ja','ko','de','fr','es','it'])
|
|
38
|
-
for(const catalog of Object.values(catalogs)) {
|
|
39
|
-
expect(Object.keys(catalog).sort()).toEqual(Object.keys(catalogs.en).sort())
|
|
40
|
-
expect(Object.values(catalog).every(s=>typeof s==='string' && s.trim().length>0)).toBe(true)
|
|
41
|
-
for(const key of Object.keys(catalogs.en) as Array<keyof typeof catalogs.en>) {
|
|
42
|
-
expect(catalog[key].match(/\{\w+\}/g) ?? []).toEqual(catalogs.en[key].match(/\{\w+\}/g) ?? [])
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
expect(nasCopy('cht')).toEqual(catalogs['zh-TW'])
|
|
46
|
-
expect(nasCopy('zh_CN')).toEqual(catalogs['zh-CN'])
|
|
47
|
-
expect(nasCopy('unknown')).toEqual(catalogs.en)
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
test('account changes discard the bound provider UI and its pending candidate context',async()=> {
|
|
51
|
-
const provider=createMockNasService().connect('normal1'), cancel=vi.spyOn(provider,'cancel'), f=fixture(provider)
|
|
52
|
-
try {
|
|
53
|
-
await settle();click(f.root,'Choose my folder');await settle()
|
|
54
|
-
f.ctx.call=vi.fn(async(method:string)=>method==='app.status'?{package:'SamePackage',version:'1',user:'normal2',admin:false}:{state:'not-enabled',reason:'not-requested',packageRunning:'unknown',scheduler:'not-probed'})
|
|
55
|
-
f.reopen.forEach(fn=>fn());await settle()
|
|
56
|
-
expect(f.root.textContent).toContain('normal2')
|
|
57
|
-
expect(f.root.querySelector('[role="dialog"]')).toBeNull()
|
|
58
|
-
expect(f.root.textContent).not.toContain('Choose my folder')
|
|
59
|
-
expect(cancel).toHaveBeenCalled()
|
|
60
|
-
} finally {cleanup(f)}
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
test('all nine locale UIs localize dialog controls and allow keyboard review without mouse-only actions',async()=> {
|
|
64
|
-
for(const locale of Object.keys(catalogs)) {
|
|
65
|
-
const copy=nasCopy(locale), f=fixture(createMockNasService().connect('normal1'),'normal1',locale)
|
|
66
|
-
try {
|
|
67
|
-
await settle();click(f.root,copy.choosePersonal);await settle()
|
|
68
|
-
const selected=[...f.root.querySelectorAll('button')].find(b=>b.getAttribute('aria-label')===format(copy.select,'Projects'))!
|
|
69
|
-
selected.focus();expect(document.activeElement).toBe(selected)
|
|
70
|
-
// Native Button remains a keyboard-activatable button (browser verifies Enter).
|
|
71
|
-
expect(selected.tagName).toBe('BUTTON');selected.click();await settle()
|
|
72
|
-
click(f.root,copy.review);await settle();expect(f.root.textContent).toContain(copy.persistent)
|
|
73
|
-
expect(f.root.querySelector(`button[aria-label="${copy.close}"]`)).toBeTruthy()
|
|
74
|
-
click(f.root,copy.cancel);await settle()
|
|
75
|
-
} finally {cleanup(f)}
|
|
76
|
-
}
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
test('home unavailable is recoverable and native diagnostics are never rendered',async()=> {
|
|
80
|
-
const provider=createMockNasService({homeAvailable:false}).connect('normal1'), f=fixture(provider)
|
|
81
|
-
try {
|
|
82
|
-
await settle();click(f.root,'Choose my folder');await settle()
|
|
83
|
-
expect(f.root.textContent).toContain('Required native identity or permission proof is unavailable')
|
|
84
|
-
provider.begin=async()=>{throw {code:'unknown',message:'/volume1/private-secret stderr'}}
|
|
85
|
-
click(f.root,'Retry');await settle()
|
|
86
|
-
expect(f.root.textContent).toContain('The request failed')
|
|
87
|
-
expect(f.root.textContent).not.toMatch(/private-secret|stderr/)
|
|
88
|
-
} finally {cleanup(f)}
|
|
89
|
-
})
|
|
90
|
-
|
|
91
|
-
test('picker browse, separate selection/summary, cancel, empty and confirm use injected provider only',async()=> {
|
|
92
|
-
const service=createMockNasService(), provider=service.connect('normal1'), cancel=vi.spyOn(provider,'cancel'), f=fixture(provider)
|
|
93
|
-
try {
|
|
94
|
-
await settle();click(f.root,'Choose my folder');await settle()
|
|
95
|
-
expect(f.root.textContent).toContain('Mock preview')
|
|
96
|
-
expect(f.root.querySelector('[role="dialog"]')).toBeTruthy()
|
|
97
|
-
click(f.root,'Select Projects');await settle()
|
|
98
|
-
expect(f.root.textContent).not.toContain('Persistent access')
|
|
99
|
-
click(f.root,'Review access');await settle()
|
|
100
|
-
expect(f.root.textContent).toContain('Persistent access')
|
|
101
|
-
click(f.root,'Cancel');await settle()
|
|
102
|
-
expect(cancel).toHaveBeenCalled()
|
|
103
|
-
expect(await provider.grants(new AbortController().signal)).toEqual([])
|
|
104
|
-
click(f.root,'Choose my folder');await settle();click(f.root,'Open Empty folder');await settle()
|
|
105
|
-
expect(f.root.textContent).toContain('This folder is empty')
|
|
106
|
-
click(f.root,'Back');await settle();click(f.root,'Select Projects');await settle();click(f.root,'Review access');await settle();click(f.root,'Confirm access');await settle()
|
|
107
|
-
expect(f.root.querySelector('[role="dialog"]')).toBeNull()
|
|
108
|
-
expect(f.root.textContent).toContain('Active')
|
|
109
|
-
} finally {cleanup(f)}
|
|
110
|
-
})
|
|
111
|
-
|
|
112
|
-
test('two same-package apps retain local modality, unique ARIA IDs and cancellation isolation',async()=> {
|
|
113
|
-
const service=createMockNasService(), a=fixture(service.connect('normal1')), b=fixture(service.connect('normal2'))
|
|
114
|
-
const body=document.body.getAttribute('style')
|
|
115
|
-
try {
|
|
116
|
-
await settle();click(a.root,'Choose my folder');click(b.root,'Choose my folder');await settle()
|
|
117
|
-
const ids=[...document.querySelectorAll('[id]')].map(n=>n.id).filter(Boolean)
|
|
118
|
-
expect(new Set(ids).size).toBe(ids.length)
|
|
119
|
-
for(const f of [a,b]) {
|
|
120
|
-
const dialog=f.root.querySelector('[role="dialog"]')!
|
|
121
|
-
expect(dialog.hasAttribute('aria-modal')).toBe(false)
|
|
122
|
-
for(const name of ['aria-labelledby','aria-describedby']) expect(f.root.querySelector(`[id="${dialog.getAttribute(name)}"]`)).toBeTruthy()
|
|
123
|
-
}
|
|
124
|
-
expect(getComputedStyle(b.root).pointerEvents).not.toBe('none')
|
|
125
|
-
click(a.root,'Cancel');await settle()
|
|
126
|
-
expect(a.root.querySelector('[role="dialog"]')).toBeNull()
|
|
127
|
-
expect(b.root.querySelector('[role="dialog"]')).toBeTruthy()
|
|
128
|
-
expect(document.body.getAttribute('style')).toBe(body)
|
|
129
|
-
} finally {cleanup(a,b)}
|
|
130
|
-
})
|
|
131
|
-
|
|
132
|
-
test('intent expiry is actionable; revoked but not drained never claims transfers stopped',async()=> {
|
|
133
|
-
let now=1000
|
|
134
|
-
const service=createMockNasService({now:()=>now,drained:false}), provider=service.connect('normal1'), f=fixture(provider)
|
|
135
|
-
try {
|
|
136
|
-
await settle();click(f.root,'Choose my folder');await settle();click(f.root,'Select Projects');await settle();click(f.root,'Review access');await settle()
|
|
137
|
-
now+=30_000;click(f.root,'Confirm access');await settle()
|
|
138
|
-
expect(f.root.textContent).toContain('expired')
|
|
139
|
-
expect(await provider.grants(new AbortController().signal)).toEqual([])
|
|
140
|
-
click(f.root,'Cancel');await settle();click(f.root,'Choose my folder');await settle();click(f.root,'Select Projects');await settle();click(f.root,'Review access');await settle();click(f.root,'Confirm access');await settle()
|
|
141
|
-
click(f.root,'Revoke');await settle()
|
|
142
|
-
expect(f.root.textContent).toContain('already sent or written')
|
|
143
|
-
click(f.root,'Confirm revoke');await settle()
|
|
144
|
-
expect(f.root.textContent).toContain('Revoked; stopping transfers')
|
|
145
|
-
} finally {cleanup(f)}
|
|
146
|
-
})
|
|
147
|
-
|
|
148
|
-
test('unmount aborts late browse and cancels its context without creating a grant',async()=> {
|
|
149
|
-
const provider=createMockNasService().connect('normal1'), base=provider.list.bind(provider)
|
|
150
|
-
let resolve!:()=>void, requestSignal!:AbortSignal
|
|
151
|
-
provider.list=async(...args)=>{requestSignal=args[3];await new Promise<void>(r=>resolve=r);return base(...args)}
|
|
152
|
-
const cancel=vi.spyOn(provider,'cancel'), f=fixture(provider)
|
|
153
|
-
await settle();click(f.root,'Choose my folder');await settle();f.app.unmount()
|
|
154
|
-
expect(requestSignal.aborted).toBe(true);expect(cancel).toHaveBeenCalled()
|
|
155
|
-
resolve();await settle();expect(f.root.childElementCount).toBe(0);f.root.remove()
|
|
156
|
-
})
|
|
157
|
-
|
|
158
|
-
test('late begin after close is canceled and rapid double review consumes one intent',async()=> {
|
|
159
|
-
const provider=createMockNasService().connect('normal1'), begin=provider.begin.bind(provider)
|
|
160
|
-
let release!:()=>void
|
|
161
|
-
provider.begin=async(kind,signal)=>{await new Promise<void>(r=>release=r);return begin(kind,new AbortController().signal)}
|
|
162
|
-
const cancel=vi.spyOn(provider,'cancel'), prepare=vi.spyOn(provider,'prepare'), f=fixture(provider)
|
|
163
|
-
try {
|
|
164
|
-
await settle();click(f.root,'Choose my folder');await settle();click(f.root,'Cancel');await settle()
|
|
165
|
-
release();await settle();expect(cancel).toHaveBeenCalled();expect(f.root.querySelector('[role="dialog"]')).toBeNull()
|
|
166
|
-
provider.begin=begin
|
|
167
|
-
click(f.root,'Choose my folder');await settle();click(f.root,'Select Projects');await settle()
|
|
168
|
-
click(f.root,'Review access');click(f.root,'Review access');await settle()
|
|
169
|
-
expect(prepare).toHaveBeenCalledTimes(1)
|
|
170
|
-
} finally {cleanup(f)}
|
|
171
|
-
})
|
|
172
|
-
|
|
173
|
-
test('long folder names stay text, and revoked without Q uses pending cleanup copy',async()=> {
|
|
174
|
-
const name='<img src=x onerror=alert(1)> '+ '\u5e74\u5ea6\u5831\u544a'.repeat(20)
|
|
175
|
-
const provider=createMockNasService({personalFolders:[name]}).connect('normal1'), f=fixture(provider)
|
|
176
|
-
try {
|
|
177
|
-
await settle();click(f.root,'Choose my folder');await settle()
|
|
178
|
-
expect(f.root.textContent).toContain(name);expect(f.root.querySelector('img')).toBeNull()
|
|
179
|
-
click(f.root,'Cancel');await settle()
|
|
180
|
-
provider.settings=async()=>({canManageShared:false,items:[{grantId:'fixture',revision:2,scopeKind:'user-personal',displayName:name,targetKind:'directory',actions:['nas.files.read'],effectiveState:'revoked',createdAt:1000,canRevoke:true,cleanupRequired:true}]})
|
|
181
|
-
click(f.root,'Refresh access');await settle()
|
|
182
|
-
expect(f.root.textContent).toContain('Revoked; cleanup needs verification')
|
|
183
|
-
expect(f.root.textContent).toContain('Read files')
|
|
184
|
-
expect(f.root.textContent).not.toContain('List folders')
|
|
185
|
-
} finally {cleanup(f)}
|
|
186
|
-
})
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
test('S8 production defaults display unavailable for normal/admin even when lifecycle is ready',async()=> {
|
|
190
|
-
for(const user of ['normal1','admin']) for(const locale of Object.keys(catalogs)) {
|
|
191
|
-
const f=fixture(undefined,user,locale),copy=nasCopy(locale)
|
|
192
|
-
try {
|
|
193
|
-
f.ctx.call=vi.fn(async(method:string)=> {
|
|
194
|
-
if(method==='app.status') return {package:'SamePackage',version:'1',user,admin:user==='admin'}
|
|
195
|
-
if(method==='integration.status') return {state:'ready',packageRunning:'running',scheduler:'ready'}
|
|
196
|
-
if(method==='personal.list') return {items:[]}
|
|
197
|
-
throw {code:'unknown_method'}
|
|
198
|
-
})
|
|
199
|
-
f.reopen.forEach(fn=>fn());await settle()
|
|
200
|
-
expect(f.root.textContent).toContain(copy.unavailableMessage)
|
|
201
|
-
expect(f.root.textContent).toContain(copy.pilotUnavailable)
|
|
202
|
-
expect(f.root.textContent).toContain(copy.noUnlock)
|
|
203
|
-
expect(f.root.textContent).not.toContain(copy.choosePersonal)
|
|
204
|
-
expect(f.root.textContent).not.toContain(copy.chooseShared)
|
|
205
|
-
expect(f.root.textContent).not.toContain(copy.emptyGrant)
|
|
206
|
-
expect(f.ctx.call.mock.calls.some(([method])=>method.startsWith('nas.'))).toBe(false)
|
|
207
|
-
} finally {cleanup(f)}
|
|
208
|
-
}
|
|
209
|
-
})
|
|
210
|
-
|
|
211
|
-
test('S8 unavailable connected providers are ignored; only development mocks have a picker',async()=> {
|
|
212
|
-
const connected=createMockNasService().connect('normal1')
|
|
213
|
-
Object.defineProperty(connected,'mode',{value:'connected'})
|
|
214
|
-
const settings=vi.spyOn(connected,'settings'),f=fixture(connected)
|
|
215
|
-
try {
|
|
216
|
-
await settle()
|
|
217
|
-
expect(f.root.textContent).toContain(nasCopy('en').unavailableMessage)
|
|
218
|
-
expect(f.root.textContent).not.toContain('Choose my folder')
|
|
219
|
-
expect(settings).not.toHaveBeenCalled()
|
|
220
|
-
} finally {cleanup(f)}
|
|
221
|
-
})
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
test('S8 safe error codes distinguish missing proof, denial, missing method and app authentication',()=> {
|
|
225
|
-
for(const copy of Object.values(catalogs)) {
|
|
226
|
-
for(const [code,key] of [['unavailable','errorNativeProof'],['denied','errorDenied'],['unknown_method','errorUnknownMethod'],['unsupported','errorUnsupported'],['session_required','errorSession'],['auth_unavailable','errorAuthentication']] as const) {
|
|
227
|
-
expect(errorCopy({code,message:'/volume1/private cookie=sid'},copy)).toBe(copy[key])
|
|
228
|
-
expect(errorCopy({code,message:'/volume1/private cookie=sid'},copy)).not.toMatch(/volume1|cookie=sid/)
|
|
229
|
-
}
|
|
230
|
-
expect(new Set(['unavailable','denied','unknown_method','unsupported'].map(code=>errorCopy({code},copy))).size).toBe(4)
|
|
231
|
-
}
|
|
232
|
-
})
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
test('S8 app request failures use localized safe-code copy without native diagnostics',async()=> {
|
|
236
|
-
for(const code of ['denied','unknown_method','unavailable','unsupported','session_required','auth_unavailable']) {
|
|
237
|
-
const f=fixture(undefined,'normal1','cht')
|
|
238
|
-
try {
|
|
239
|
-
await settle()
|
|
240
|
-
f.ctx.call=vi.fn(async()=>{throw {code,message:'/volume1/private cookie=sid'}})
|
|
241
|
-
f.reopen.forEach(fn=>fn());await settle()
|
|
242
|
-
expect(f.root.querySelector('[role="alert"]')?.textContent).toBe(errorCopy({code},nasCopy('cht')))
|
|
243
|
-
expect(f.root.textContent).not.toMatch(/volume1|cookie=sid/)
|
|
244
|
-
} finally {cleanup(f)}
|
|
245
|
-
}
|
|
246
|
-
})
|
|
247
|
-
|
|
248
|
-
test('S1R risk and reauthorization are disclosed in nine unavailable UIs without data actions',async()=> {
|
|
249
|
-
for(const locale of Object.keys(catalogs)) {
|
|
250
|
-
const copy=nasCopy(locale) as any, f=fixture(undefined,'normal1',locale)
|
|
251
|
-
try {
|
|
252
|
-
await settle()
|
|
253
|
-
for(const key of ['relaxedRisk','relaxedReauthorize','relaxedPermissions']) {
|
|
254
|
-
expect(copy[key],`${locale}:${key}`).toBeTypeOf('string')
|
|
255
|
-
expect(f.root.textContent).toContain(copy[key])
|
|
256
|
-
}
|
|
257
|
-
expect(f.root.textContent).not.toContain(copy.choosePersonal)
|
|
258
|
-
expect(f.ctx.call.mock.calls.some(([method])=>method.startsWith('nas.'))).toBe(false)
|
|
259
|
-
} finally {cleanup(f)}
|
|
260
|
-
}
|
|
261
|
-
})
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
// @vitest-environment jsdom
|
|
2
|
-
import {expect,test,vi} from 'vitest'
|
|
3
|
-
import {nextTick} from 'vue'
|
|
4
|
-
import {mount} from '../src/sdk-main'
|
|
5
|
-
import {jobCopy,jobCatalogs} from '../src/jobs/i18n'
|
|
6
|
-
import {m2Copy} from '../src/nas/m2-i18n'
|
|
7
|
-
import type {Context} from '../src/context'
|
|
8
|
-
const id=(c:string)=>c.repeat(64)
|
|
9
|
-
async function settle(){for(let i=0;i<35;i++){await Promise.resolve();await nextTick()}await new Promise(r=>setTimeout(r,25))}
|
|
10
|
-
function click(root:HTMLElement,text:string){const b=[...root.querySelectorAll('button')].find(b=>b.textContent?.trim()===text||b.getAttribute('aria-label')===text);expect(b,text).toBeTruthy();b!.click()}
|
|
11
|
-
function fixture(locale='en'){
|
|
12
|
-
let state='running',reason='',lost=false,user='normal1',deny=false
|
|
13
|
-
const reopen:Array<()=>void>=[]
|
|
14
|
-
const wire=()=>({jobId:id('b'),revision:2,mode:'interactive',state,safeReason:reason||undefined,progress:{completedUnits:state==='succeeded'?1:0,totalUnits:1},drained:state==='succeeded',effectsUnknown:false})
|
|
15
|
-
const call=vi.fn(async(method:string,args?:Record<string,unknown>)=>{
|
|
16
|
-
if(method==='app.status')return {package:'t0090',version:'1',user,admin:false}
|
|
17
|
-
if(method==='integration.status')return {state:'ready',packageRunning:'running',scheduler:'ready'}
|
|
18
|
-
if(method==='personal.list')return {items:[]}
|
|
19
|
-
if(method==='jobs.status')return {revision:2,availability:'session-required',workers:[{id:'inspect',revision:7,actions:['nas.files.list','nas.files.stat','nas.files.read'],maxBytes:4096}],items:call.mock.calls.some(([m])=>m==='jobs.submit')?[wire()]:[]}
|
|
20
|
-
if(method==='nas.discovery'){if(deny)throw {code:'denied',message:'Cookie=CANARY'};return {files:args?.folder?[{name:'fixture.txt',path:'/home/fixture.txt',isdir:false,additional:{size:3}}]:null,shares:args?.folder?undefined:[{name:'Home',path:'/home',isdir:true}],total:1,offset:0}}
|
|
21
|
-
if(method==='nas.grants.confirm')return {grantId:id('a'),folder:args!.folder,writable:args!.writable}
|
|
22
|
-
if(method==='jobs.prepare')return {intentId:id('c'),jobId:id('b'),summaryDigest:id('d'),expiresAt:Date.now()+30000}
|
|
23
|
-
if(method==='jobs.submit'){if(lost)throw {code:'timeout'};return {jobId:id('b'),attachId:id('e'),revision:1,renewAfterMs:2000,ttlMs:6000}}
|
|
24
|
-
if(method==='jobs.lookup')return wire()
|
|
25
|
-
if(method==='jobs.cancel'){state='canceled';return {}}
|
|
26
|
-
throw {code:'unknown_method'}
|
|
27
|
-
})
|
|
28
|
-
const root=document.createElement('div');document.body.append(root)
|
|
29
|
-
const ctx={locale,call,reopen(fn:()=>void){reopen.push(fn);return ()=>{}}} as Context
|
|
30
|
-
const app=mount(root,ctx)
|
|
31
|
-
return {root,app,call,reopen,done(){state='succeeded'},fence(){state='canceled';reason='fenced'},lost(){lost=true},deny(){deny=true},switchUser(){user='normal2'},close(){app.unmount();root.remove()}}
|
|
32
|
-
}
|
|
33
|
-
// The UI Select is a Reka combobox: drive it by keyboard (the UI README helper), which also proves it is keyboard operable.
|
|
34
|
-
// Attrs such as data-job-action land on the focusable combobox itself.
|
|
35
|
-
async function choose(root:HTMLElement,marker:string,label:string){
|
|
36
|
-
const trigger=root.querySelector<HTMLElement>(`[${marker}][role=combobox]`)!;expect(trigger,marker).toBeTruthy()
|
|
37
|
-
expect(trigger.id,marker).toBeTruthy();expect(root.querySelector(`label[for="${trigger.id}"]`),marker).toBeTruthy()
|
|
38
|
-
trigger.dispatchEvent(new KeyboardEvent('keydown',{key:'ArrowDown',bubbles:true,cancelable:true}));await settle()
|
|
39
|
-
const option=[...document.querySelectorAll<HTMLElement>('[role=option]')].find(o=>o.textContent?.trim()===label)
|
|
40
|
-
if(!option||option.getAttribute('aria-disabled')==='true')throw new Error(`No enabled option: ${label}`)
|
|
41
|
-
option.focus();option.dispatchEvent(new KeyboardEvent('keydown',{key:'Enter',bubbles:true,cancelable:true}));await settle()
|
|
42
|
-
expect(trigger.textContent).toContain(label)
|
|
43
|
-
}
|
|
44
|
-
async function pick(f:ReturnType<typeof fixture>,file=true){
|
|
45
|
-
const j=jobCopy('en'),n=m2Copy('en')
|
|
46
|
-
click(f.root,j.chooseSource);await settle()
|
|
47
|
-
if(file){click(f.root,'Open Home');await settle();const button=f.root.querySelector<HTMLButtonElement>('button[aria-label="Select fixture.txt"]')!;expect(button.textContent?.trim()).toBe('Select fixture.txt');click(f.root,'Select fixture.txt')}
|
|
48
|
-
else click(f.root,'Select Home')
|
|
49
|
-
await settle();click(f.root,n.confirm);await settle()
|
|
50
|
-
}
|
|
51
|
-
test('SDK mount connects file picker, folder consent, worker revision, single submit and completion/cancel/fence',async()=>{
|
|
52
|
-
const f=fixture(),j=jobCopy('en')
|
|
53
|
-
try{
|
|
54
|
-
await settle();expect(f.call.mock.calls.some(([m])=>m==='personal.list')).toBe(false);await pick(f)
|
|
55
|
-
expect(f.call).toHaveBeenCalledWith('nas.grants.confirm',{folder:'/home',writable:false})
|
|
56
|
-
expect(f.root.textContent).toContain('/home/fixture.txt')
|
|
57
|
-
expect(f.root.textContent).not.toContain('NAS folder grants and file operations are not available yet.')
|
|
58
|
-
click(f.root,j.submitInteractive);click(f.root,j.submitInteractive);await settle()
|
|
59
|
-
expect(f.call).toHaveBeenCalledWith('jobs.prepare',{worker:{id:'inspect',revision:7},parent:{id:id('a'),revision:1},input:{steps:[{action:'nas.files.stat',segments:['fixture.txt']}]}})
|
|
60
|
-
expect(f.call.mock.calls.filter(([m])=>m==='jobs.submit')).toHaveLength(1)
|
|
61
|
-
expect(f.root.querySelector('progress')).toBeTruthy()
|
|
62
|
-
click(f.root,j.cancel);await settle();expect(f.root.textContent).toContain(j.canceled)
|
|
63
|
-
f.fence();click(f.root.querySelector<HTMLElement>('.jobs-panel')!,j.refresh);await settle();expect(f.root.textContent).toContain(j.fenceCanceled)
|
|
64
|
-
f.done();click(f.root.querySelector<HTMLElement>('.jobs-panel')!,j.refresh);await settle();expect(f.root.textContent).toContain(j.succeeded)
|
|
65
|
-
}finally{f.close()}
|
|
66
|
-
})
|
|
67
|
-
test('lost initial submit reply locks the form to original lookup; permissions fail without grant or submit',async()=>{
|
|
68
|
-
const f=fixture(),j=jobCopy('en')
|
|
69
|
-
try{
|
|
70
|
-
await settle();await pick(f);f.lost();click(f.root,j.submitInteractive);await settle()
|
|
71
|
-
expect(f.root.textContent).toContain(j.uncertain)
|
|
72
|
-
const button=[...f.root.querySelectorAll('button')].find(b=>b.textContent?.trim()===j.submitInteractive);expect(button?.disabled).toBe(true)
|
|
73
|
-
click(f.root,j.lookup);await settle()
|
|
74
|
-
expect(f.call).toHaveBeenCalledWith('jobs.lookup',{intentId:id('c')})
|
|
75
|
-
expect(f.call.mock.calls.filter(([m])=>m==='jobs.submit')).toHaveLength(1)
|
|
76
|
-
}finally{f.close()}
|
|
77
|
-
const g=fixture()
|
|
78
|
-
try{await settle();g.deny();click(g.root,j.chooseSource);await settle();expect(g.root.textContent).toContain(m2Copy('en').errorDenied);expect(g.root.textContent).not.toContain('CANARY');expect(g.call.mock.calls.some(([m])=>m==='nas.grants.confirm'||m==='jobs.submit')).toBe(false)}finally{g.close()}
|
|
79
|
-
})
|
|
80
|
-
test('folder list/read bounds and identity switch clear pending input; nine job catalogs stay complete',async()=>{
|
|
81
|
-
const f=fixture(),j=jobCopy('en')
|
|
82
|
-
try{
|
|
83
|
-
await settle();await pick(f,false)
|
|
84
|
-
await choose(f.root,'data-job-action',j.listOperation)
|
|
85
|
-
const limit=f.root.querySelector<HTMLInputElement>('input[data-job-bound]')!;limit.value='101';limit.dispatchEvent(new Event('input',{bubbles:true}));await settle()
|
|
86
|
-
click(f.root,j.submitInteractive);await settle();expect(f.call.mock.calls.some(([m])=>m==='jobs.prepare')).toBe(false)
|
|
87
|
-
limit.value='5';limit.dispatchEvent(new Event('input',{bubbles:true}));await settle();click(f.root,j.submitInteractive);await settle()
|
|
88
|
-
expect(f.call).toHaveBeenCalledWith('jobs.prepare',{worker:{id:'inspect',revision:7},parent:{id:id('a'),revision:1},input:{steps:[{action:'nas.files.list',segments:[],limit:5}]}})
|
|
89
|
-
f.switchUser();f.reopen.forEach(fn=>fn());await settle();expect(f.root.querySelector('[data-job-action]')).toBeNull()
|
|
90
|
-
}finally{f.close()}
|
|
91
|
-
for(const copy of Object.values(jobCatalogs)){expect(Object.keys(copy).sort()).toEqual(Object.keys(jobCatalogs.en).sort());for(const key of Object.keys(copy) as Array<keyof typeof copy>){expect(copy[key].trim()).not.toBe('');expect(copy[key].match(/\{\w+\}/g)??[]).toEqual(jobCatalogs.en[key].match(/\{\w+\}/g)??[])}}
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
test('read input is bounded by the live worker and late prepare cannot submit after account switch',async()=>{
|
|
95
|
-
const f=fixture(),j=jobCopy('en')
|
|
96
|
-
try{
|
|
97
|
-
await settle();await pick(f)
|
|
98
|
-
await choose(f.root,'data-job-action',j.readOperation)
|
|
99
|
-
const bound=f.root.querySelector<HTMLInputElement>('input[data-job-bound]')!;expect(bound.max).toBe('4096');expect(f.root.querySelector<HTMLLabelElement>(`label[for="${bound.id}"]`)?.textContent).toContain(j.byteLimit)
|
|
100
|
-
bound.value='24';bound.dispatchEvent(new Event('input',{bubbles:true}));await settle();click(f.root.querySelector<HTMLElement>('.jobs-panel')!,j.refresh);await settle();expect(bound.value).toBe('24')
|
|
101
|
-
bound.value='4097';bound.dispatchEvent(new Event('input',{bubbles:true}));await settle();click(f.root,j.submitInteractive);await settle();expect(f.call.mock.calls.some(([m])=>m==='jobs.prepare')).toBe(false)
|
|
102
|
-
bound.value='3';bound.dispatchEvent(new Event('input',{bubbles:true}));await settle()
|
|
103
|
-
let done!:(value:unknown)=>void
|
|
104
|
-
const original=f.call.getMockImplementation()!
|
|
105
|
-
f.call.mockImplementation(async(method,args)=>method==='jobs.prepare'?new Promise(resolve=>done=resolve):original(method,args))
|
|
106
|
-
click(f.root,j.submitInteractive);await settle();f.switchUser();f.reopen.forEach(fn=>fn());await settle()
|
|
107
|
-
done({intentId:id('c'),jobId:id('b'),summaryDigest:id('d'),expiresAt:Date.now()+30000});await settle()
|
|
108
|
-
expect(f.call.mock.calls.some(([m])=>m==='jobs.submit')).toBe(false)
|
|
109
|
-
}finally{f.close()}
|
|
110
|
-
})
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Shell local fixture</title><style>html,body{margin:0;height:100%}#root{height:100%}</style></head>
|
|
2
|
-
<body><div id="root"></div><script type="module">
|
|
3
|
-
import {mount} from '../src/main.ts'
|
|
4
|
-
import {createMockNasService} from '../src/nas/mock-provider.ts'
|
|
5
|
-
// Synthetic responses for local browser QA of the DSM shell. No NAS, no credentials.
|
|
6
|
-
const params=new URLSearchParams(location.search),state=params.get('state')||'ready',locale=params.get('locale')||'en'
|
|
7
|
-
mount(document.querySelector('#root'),{
|
|
8
|
-
locale,reopen(){return()=>{}},
|
|
9
|
-
async call(method){
|
|
10
|
-
if(method==='app.status')return {package:'T0133 Sidebar Demo',version:'0.1.0-0001',user:'admin',admin:true}
|
|
11
|
-
if(method==='integration.status')return {state,reason:state==='ready'?'fixture':'not-requested',packageRunning:'running',scheduler:'ready'}
|
|
12
|
-
if(method==='identity.status')return {mode:'better-auth'}
|
|
13
|
-
if(method==='personal.list')return {items:[{id:'demo-private',name:'My sample note'}]}
|
|
14
|
-
if(method==='personal.read')return {id:'demo-private',text:'Remember to check the DSM window layout.'}
|
|
15
|
-
throw {code:'unknown_method'}
|
|
16
|
-
},
|
|
17
|
-
root:{state:async()=> 'missing',authorize:async()=> 'ready',run:async()=>{},remove:async()=> 'missing'},
|
|
18
|
-
},{nasProvider:createMockNasService().connect('admin')})
|
|
19
|
-
</script></body></html>
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
// @vitest-environment jsdom
|
|
2
|
-
import {expect,test,vi} from 'vitest'
|
|
3
|
-
import {createApp,h,nextTick} from 'vue'
|
|
4
|
-
import SDKApp from '../src/SDKApp.vue'
|
|
5
|
-
import {JobsProviderKey,type JobsProvider} from '../src/jobs/provider'
|
|
6
|
-
import {jobCopy} from '../src/jobs/i18n'
|
|
7
|
-
import {createMockNasService} from '../src/nas/mock-provider'
|
|
8
|
-
import {NasProviderKey} from '../src/nas/provider'
|
|
9
|
-
import {shellCopy} from '../src/shell/i18n'
|
|
10
|
-
import type {Context} from '../src/context'
|
|
11
|
-
|
|
12
|
-
async function settle(){for(let i=0;i<16;i++){await Promise.resolve();await nextTick()}await new Promise(resolve=>setTimeout(resolve,25))}
|
|
13
|
-
function navLabels(root:HTMLElement){return [...root.querySelectorAll<HTMLElement>('[data-nav-item]')].map(node=>node.textContent?.trim())}
|
|
14
|
-
function heading(root:HTMLElement){return root.querySelector('h1')?.textContent?.trim()}
|
|
15
|
-
function pageText(root:HTMLElement,page:string){return root.querySelector(`[data-page="${page}"]`)?.textContent??''}
|
|
16
|
-
function clickNav(root:HTMLElement,label:string){const node=[...root.querySelectorAll<HTMLElement>('[data-nav-item]')].find(node=>node.textContent?.trim()===label);expect(node,label).toBeTruthy();node!.click()}
|
|
17
|
-
|
|
18
|
-
// A connected provider advertises interactive workers; the mock used by the
|
|
19
|
-
// standalone preview does not. This stub keeps both modes on one provider so
|
|
20
|
-
// the shell test can exercise both pages.
|
|
21
|
-
function provider():JobsProvider{
|
|
22
|
-
return {
|
|
23
|
-
mode:'mock',
|
|
24
|
-
readiness:{interactive:'ready',background:'ready'},
|
|
25
|
-
interactive:{workers:[],prepareInteractive:async()=>{throw {code:'unavailable'}},submitInteractive:async()=>{throw {code:'unavailable'}}},
|
|
26
|
-
list:async()=>({revision:1,items:[]}),
|
|
27
|
-
prepare:async()=>{throw {code:'unavailable'}},
|
|
28
|
-
confirm:async()=>{},
|
|
29
|
-
lookup:async()=>undefined,
|
|
30
|
-
cancel:async()=>{},
|
|
31
|
-
revoke:async()=>({revoked:true,drained:true}),
|
|
32
|
-
disconnect(){},
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function fixture(admin:boolean,locale='en'){
|
|
36
|
-
const call=vi.fn(async(method:string)=>{
|
|
37
|
-
if(method==='app.status') return {package:'SdkShell',version:'0.1.0-0001',user:admin?'admin':'normal1',admin}
|
|
38
|
-
if(method==='integration.status') return {state:'ready',reason:'fixture',packageRunning:'unknown',scheduler:'not-probed'}
|
|
39
|
-
if(method==='identity.status') return {mode:'none'}
|
|
40
|
-
throw {code:'unknown_method'}
|
|
41
|
-
})
|
|
42
|
-
const ctx={locale,call,reopen:()=>()=>{}} as unknown as Context
|
|
43
|
-
const root=document.createElement('div');document.body.append(root)
|
|
44
|
-
const app=createApp({render:()=>h(SDKApp,{ctx})})
|
|
45
|
-
app.config.idPrefix=`sdk-shell-${Math.random()}`
|
|
46
|
-
app.provide(JobsProviderKey,provider())
|
|
47
|
-
app.provide(NasProviderKey,createMockNasService().connect(admin?'admin':'normal1'))
|
|
48
|
-
app.mount(root)
|
|
49
|
-
return {root,close(){app.unmount();root.remove()}}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
test('interactive and background work get separate pages and the admin page is administrator-only',async()=>{
|
|
53
|
-
const admin=fixture(true),other=fixture(false)
|
|
54
|
-
try{
|
|
55
|
-
await settle()
|
|
56
|
-
expect(navLabels(admin.root)).toEqual(['Status','NAS folder access','Interactive jobs','Background jobs','Job management'])
|
|
57
|
-
expect(navLabels(other.root)).toEqual(['Status','NAS folder access','Interactive jobs','Background jobs'])
|
|
58
|
-
expect(heading(admin.root)).toBe(shellCopy('en').status)
|
|
59
|
-
|
|
60
|
-
clickNav(admin.root,shellCopy('en').interactive);await settle()
|
|
61
|
-
expect(heading(admin.root)).toBe('Interactive jobs')
|
|
62
|
-
expect(pageText(admin.root,'interactive')).toContain(jobCopy('en').interactiveHelp)
|
|
63
|
-
expect(pageText(admin.root,'interactive')).not.toContain(jobCopy('en').backgroundHelp)
|
|
64
|
-
|
|
65
|
-
clickNav(admin.root,shellCopy('en').background);await settle()
|
|
66
|
-
expect(heading(admin.root)).toBe('Background jobs')
|
|
67
|
-
expect(pageText(admin.root,'background')).toContain(jobCopy('en').backgroundHelp)
|
|
68
|
-
expect(pageText(admin.root,'background')).not.toContain(jobCopy('en').interactiveHelp)
|
|
69
|
-
|
|
70
|
-
clickNav(other.root,shellCopy('en').interactive);await settle()
|
|
71
|
-
expect(other.root.textContent).not.toContain(jobCopy('en').adminTitle)
|
|
72
|
-
}finally{admin.close();other.close()}
|
|
73
|
-
})
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
// CLI-owned root bootstrap: accepts only compiled fixed operations. The native
|
|
2
|
-
// task copies and pins this executable before it can run with root authority.
|
|
3
|
-
package main
|
|
4
|
-
|
|
5
|
-
import (
|
|
6
|
-
"crypto/sha256"
|
|
7
|
-
"encoding/base64"
|
|
8
|
-
"encoding/hex"
|
|
9
|
-
"encoding/json"
|
|
10
|
-
"errors"
|
|
11
|
-
"fmt"
|
|
12
|
-
"io"
|
|
13
|
-
"os"
|
|
14
|
-
"os/exec"
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
var inventoryBase64 string
|
|
18
|
-
|
|
19
|
-
type inventory struct {
|
|
20
|
-
Schema int `json:"schema"`
|
|
21
|
-
Package string `json:"package"`
|
|
22
|
-
Version string `json:"version"`
|
|
23
|
-
Operations []struct {
|
|
24
|
-
Name string `json:"name"`
|
|
25
|
-
Body string `json:"body"`
|
|
26
|
-
} `json:"operations"`
|
|
27
|
-
Files []struct {
|
|
28
|
-
Path string `json:"path"`
|
|
29
|
-
Size int64 `json:"size"`
|
|
30
|
-
Hash string `json:"sha256"`
|
|
31
|
-
} `json:"files"`
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
func run(args []string) error {
|
|
35
|
-
if os.Geteuid() != 0 || len(args) != 1 {
|
|
36
|
-
return errors.New("root and one fixed operation required")
|
|
37
|
-
}
|
|
38
|
-
var i inventory
|
|
39
|
-
raw, decode := base64.StdEncoding.DecodeString(inventoryBase64)
|
|
40
|
-
if decode != nil || json.Unmarshal(raw, &i) != nil || i.Schema != 2 || len(i.Operations) == 0 {
|
|
41
|
-
return errors.New("invalid compiled inventory")
|
|
42
|
-
}
|
|
43
|
-
var body string
|
|
44
|
-
for _, op := range i.Operations {
|
|
45
|
-
if op.Name == args[0] {
|
|
46
|
-
body = op.Body
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if body == "" {
|
|
50
|
-
return errors.New("unknown operation")
|
|
51
|
-
}
|
|
52
|
-
// Disable/teardown/repair retain an escape path when UI payload is corrupt;
|
|
53
|
-
// they still execute only compiled, hash-pinned cleanup code.
|
|
54
|
-
cleanup := args[0] == "helper_disable" || args[0] == "helper_teardown" || args[0] == "helper_repair" || args[0] == "helper_purge"
|
|
55
|
-
if !cleanup {
|
|
56
|
-
if e := verifyFiles("/var/packages/"+i.Package+"/target", raw); e != nil {
|
|
57
|
-
return e
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
cmd := exec.Command("/bin/sh", "-eu", "-c", body)
|
|
61
|
-
cmd.Env = []string{"PATH=/usr/sbin:/usr/bin:/sbin:/bin"}
|
|
62
|
-
cmd.Stdout = os.Stdout
|
|
63
|
-
cmd.Stderr = os.Stderr
|
|
64
|
-
return cmd.Run()
|
|
65
|
-
}
|
|
66
|
-
func verifyFiles(dir string, raw []byte) error {
|
|
67
|
-
var i inventory
|
|
68
|
-
if json.Unmarshal(raw, &i) != nil || i.Schema != 2 {
|
|
69
|
-
return errors.New("invalid inventory")
|
|
70
|
-
}
|
|
71
|
-
root, e := os.OpenRoot(dir)
|
|
72
|
-
if e != nil {
|
|
73
|
-
return e
|
|
74
|
-
}
|
|
75
|
-
defer root.Close()
|
|
76
|
-
for _, p := range i.Files {
|
|
77
|
-
if p.Size < 0 || p.Size > 64<<20 {
|
|
78
|
-
return errors.New("invalid size")
|
|
79
|
-
}
|
|
80
|
-
f, e := root.Open(p.Path)
|
|
81
|
-
if e != nil {
|
|
82
|
-
return e
|
|
83
|
-
}
|
|
84
|
-
st, e := f.Stat()
|
|
85
|
-
if e != nil || !st.Mode().IsRegular() || st.Size() != p.Size {
|
|
86
|
-
f.Close()
|
|
87
|
-
return errors.New("untrusted payload")
|
|
88
|
-
}
|
|
89
|
-
h := sha256.New()
|
|
90
|
-
_, e = io.Copy(h, io.LimitReader(f, p.Size+1))
|
|
91
|
-
f.Close()
|
|
92
|
-
if e != nil || hex.EncodeToString(h.Sum(nil)) != p.Hash {
|
|
93
|
-
return errors.New("untrusted payload")
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return nil
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
func main() {
|
|
100
|
-
if e := run(os.Args[1:]); e != nil {
|
|
101
|
-
fmt.Fprintln(os.Stderr, "authorization bootstrap refused:", e)
|
|
102
|
-
os.Exit(1)
|
|
103
|
-
}
|
|
104
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
package main
|
|
2
|
-
|
|
3
|
-
import (
|
|
4
|
-
"crypto/sha256"
|
|
5
|
-
"fmt"
|
|
6
|
-
"os"
|
|
7
|
-
"path/filepath"
|
|
8
|
-
"testing"
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
func TestInventoryRejectsReplacementAndSymlinkEscape(t *testing.T) {
|
|
12
|
-
dir := t.TempDir()
|
|
13
|
-
body := []byte("approved bytes")
|
|
14
|
-
os.WriteFile(filepath.Join(dir, "file"), body, 0600)
|
|
15
|
-
raw := fmt.Sprintf(`{"schema":2,"files":[{"path":"file","size":%d,"sha256":"%x"}]}`, len(body), sha256.Sum256(body))
|
|
16
|
-
if e := verifyFiles(dir, []byte(raw)); e != nil {
|
|
17
|
-
t.Fatal(e)
|
|
18
|
-
}
|
|
19
|
-
os.WriteFile(filepath.Join(dir, "file"), []byte("altered bytes!"), 0600)
|
|
20
|
-
if e := verifyFiles(dir, []byte(raw)); e == nil {
|
|
21
|
-
t.Fatal("accepted replacement")
|
|
22
|
-
}
|
|
23
|
-
os.Remove(filepath.Join(dir, "file"))
|
|
24
|
-
outside := filepath.Join(t.TempDir(), "file")
|
|
25
|
-
os.WriteFile(outside, body, 0600)
|
|
26
|
-
os.Symlink(outside, filepath.Join(dir, "file"))
|
|
27
|
-
if e := verifyFiles(dir, []byte(raw)); e == nil {
|
|
28
|
-
t.Fatal("accepted external symlink")
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
func TestUnknownOperationNeverRuns(t *testing.T) {
|
|
32
|
-
if e := run([]string{"arbitrary"}); e == nil {
|
|
33
|
-
t.Fatal("accepted unknown operation")
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"@better-auth/utils@0.4.2": {
|
|
3
|
-
"integrity": "sha512-AUxrvu+HaaODsUyzDxFgwd/8RZ1yZaYo42LXKSrU2oGgR38pS1ij8nqQKNgtTWoYGpNevNXtCfgTy6loHveW9A==",
|
|
4
|
-
"file": "utils-0.4.2-LICENSE",
|
|
5
|
-
"source": "https://github.com/better-auth/utils/blob/ef522888b7b2ff77ca13f0afb476dfae8f297862/LICENSE",
|
|
6
|
-
"provenance": "Release manifests declare MIT but omit license text; retained upstream project license added in commit ef522888b7b2ff77ca13f0afb476dfae8f297862"
|
|
7
|
-
},
|
|
8
|
-
"@better-auth/utils@0.5.0": {
|
|
9
|
-
"integrity": "sha512-BL8W4EfIZFwlu0r54m3v1ztjDhu6dDe/amLTm0xybmbZaNgYUqhD3SjpAsnq0q8YD6/ki4iwIgxJNLP/N3TxiA==",
|
|
10
|
-
"file": "utils-0.5.0-LICENSE",
|
|
11
|
-
"source": "https://github.com/better-auth/utils/blob/ef522888b7b2ff77ca13f0afb476dfae8f297862/LICENSE",
|
|
12
|
-
"provenance": "Release manifests declare MIT but omit license text; retained upstream project license added in commit ef522888b7b2ff77ca13f0afb476dfae8f297862"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024 - present, Bereket Engida
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|