diff --git a/.github/nightly-signing-policy.json b/.github/nightly-signing-policy.json index cc13648ef..0eb1d65f8 100644 --- a/.github/nightly-signing-policy.json +++ b/.github/nightly-signing-policy.json @@ -88,7 +88,9 @@ } }, "max_artifact_bytes": 2147483648, - "automatic_signer_actors": [], + "automatic_signer_actors": [ + "github-actions[bot]" + ], "platforms": { "windows-x86_64": { "unsigned_artifact_name": "nightly-unsigned-windows-x86_64", diff --git a/.github/workflows/actions.lock b/.github/workflows/actions.lock index 5f9a6d7f1..6bcf04a45 100644 --- a/.github/workflows/actions.lock +++ b/.github/workflows/actions.lock @@ -11,6 +11,7 @@ workflows: '.github/workflows/lockfile.yml': - 'actions/checkout@v7.0.1' - 'step-security/harden-runner@v2.22.4' + '.github/workflows/nightly-dispatch.yml': [] '.github/workflows/nightly-macos.yml': - 'actions/checkout@v7.0.1' - 'step-security/harden-runner@v2.22.4' diff --git a/.github/workflows/nightly-dispatch.yml b/.github/workflows/nightly-dispatch.yml new file mode 100644 index 000000000..cd8166a73 --- /dev/null +++ b/.github/workflows/nightly-dispatch.yml @@ -0,0 +1,72 @@ +name: Dispatch release-ref nightly + +# Transport only, never authorization. No checkout, payload parsing or release environment. +on: + workflow_run: + workflows: [DeckCraft unsigned nightly] + types: [completed] + branches: [main] + +permissions: {} + +jobs: + dispatch: + # Actual context guards only; no checkout, release environment or platform secrets. + if: >- + github.repository == 'storytold/deckcraft' && + github.event_name == 'workflow_run' + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + actions: write + steps: + - name: Dispatch only the exact completed producer run and attempt + shell: python + env: + GH_TOKEN: ${{ github.token }} + run: | + import json + import os + import urllib.request + + def require(value, message): + if not value: + raise RuntimeError(message) + + # These filters reduce noise; the protected signer-branch validator repeats admission + # against authenticated API metadata and required attestation/quality evidence. + require(os.environ.get('GITHUB_REPOSITORY') == 'storytold/deckcraft', 'wrong repository') + require(os.environ.get('GITHUB_EVENT_NAME') == 'workflow_run', 'wrong event') + with open(os.environ['GITHUB_EVENT_PATH'], encoding='utf-8') as stream: + event = json.load(stream) + require(event.get('action') == 'completed', 'producer is not complete') + require(event.get('repository', {}).get('full_name') == 'storytold/deckcraft', 'wrong event repository') + producer = event.get('workflow_run', {}) + require(producer.get('head_repository', {}).get('full_name') == 'storytold/deckcraft', 'foreign producer') + require(producer.get('path') == '.github/workflows/nightly.yml', 'wrong producer path') + require(producer.get('head_branch') == 'main', 'wrong producer branch') + require(producer.get('status') == 'completed' and producer.get('conclusion') == 'success', 'producer did not succeed') + # First scheduled attempt only; reviewed manual/re-run authority belongs to release policy. + require(producer.get('event') == 'schedule', 'not an automatic scheduled producer') + run_id, attempt = producer.get('id'), producer.get('run_attempt') + require(type(run_id) is int and run_id > 0, 'invalid producer run id') + require(type(attempt) is int and attempt == 1, 'invalid automatic producer attempt') + body = json.dumps({'ref': 'refs/heads/nightly-signer', 'inputs': { + 'producer_run_id': str(run_id), 'producer_run_attempt': str(attempt) + }}).encode('utf-8') + request = urllib.request.Request( + 'https://api.github.com/repos/storytold/deckcraft/actions/workflows/nightly-sign.yml/dispatches', + data=body, method='POST', headers={ + 'Authorization': 'Bearer ' + os.environ['GH_TOKEN'], + 'Accept': 'application/vnd.github+json', + 'Content-Type': 'application/json', + 'X-GitHub-Api-Version': '2022-11-28', + 'User-Agent': 'deckcraft-nightly-dispatch' + }) + class NoRedirect(urllib.request.HTTPRedirectHandler): + def redirect_request(self, req, fp, code, msg, headers, newurl): + raise RuntimeError('dispatch redirects are forbidden') + # One bounded request, no retry: duplicate transport is not publication authority. + with urllib.request.build_opener(NoRedirect()).open(request, timeout=20) as response: + require(response.status == 204, 'dispatch was not accepted') + print('Dispatched producer run/attempt to the release-ref validator; not a signing result.') diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index cc006fcf3..68d193e7a 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,8 +1,10 @@ name: DeckCraft unsigned nightly -# Enabled for supervised manual runs by the reviewed manual actor only; no schedule yet. -# A later explicit opt-in may add a cadence (and turn on nightly-dispatch.yml with it). +# Runs on the reviewed nightly schedule (01:00 UTC) and for supervised manual runs +# by the reviewed manual actors. Completed scheduled runs are forwarded by nightly-dispatch.yml. on: + schedule: + - cron: '0 1 * * *' workflow_dispatch: permissions: diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 285fd642f..d0d3ce111 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -10,7 +10,7 @@ permissions: contents: read concurrency: - group: sonarcloud-${{ github.ref }} + group: ${{ github.ref == 'refs/heads/main' && format('sonarcloud-main-{0}', github.sha) || format('sonarcloud-{0}', github.ref) }} # A push to main is the run that publishes coverage; superseded runs there would never finish. cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} diff --git a/Cargo.lock b/Cargo.lock index 14e660345..a033b57a5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -156,12 +156,6 @@ dependencies = [ "equator", ] -[[package]] -name = "alloc-no-stdlib" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2fb6cfd47bf496ff64095c20eaba0c201404ee38714d4142fcfa1dc334fcc7a" - [[package]] name = "allocator-api2" version = "0.2.21" @@ -190,12 +184,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "ambient-authority" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" - [[package]] name = "android-activity" version = "0.6.1" @@ -277,7 +265,7 @@ dependencies = [ "objc2-foundation 0.3.2", "parking_lot", "percent-encoding", - "windows-sys 0.59.0", + "windows-sys 0.61.2", "wl-clipboard-rs", "x11rb", ] @@ -546,30 +534,6 @@ dependencies = [ "v_frame", ] -[[package]] -name = "aws-lc-rs" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "048006790404103c488e6c5616b3e7e702a71292aadda08e8f7698a9e0d2eb53" -dependencies = [ - "aws-lc-sys", - "untrusted 0.7.1", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.47.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bfbe32ac36b3c428696ce315464181bc4029d689fd58e3f2a4e58c252242f52" -dependencies = [ - "cc", - "cmake", - "dunce", - "fs_extra", - "pkg-config", -] - [[package]] name = "base64" version = "0.22.1" @@ -582,12 +546,6 @@ version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" -[[package]] -name = "base64ct" -version = "1.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" - [[package]] name = "bindgen" version = "0.72.1" @@ -689,15 +647,6 @@ dependencies = [ "piper", ] -[[package]] -name = "brotli-decompressor" -version = "6.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75c74c9c51b9140663e196b5fb88bc94c334d7a497c8311cb759d8557874747f" -dependencies = [ - "alloc-no-stdlib", -] - [[package]] name = "built" version = "0.8.1" @@ -802,24 +751,6 @@ dependencies = [ "wayland-client", ] -[[package]] -name = "cap-primitives" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b5f74729fd2f44701d1a8eb47e906cdb3ccd9ec0f02baad85a744b791940b18" -dependencies = [ - "ambient-authority", - "fs-set-times", - "io-extras", - "io-lifetimes 3.0.1", - "ipnet", - "maybe-owned", - "rustix 1.1.6", - "rustix-linux-procfs", - "windows-sys 0.61.2", - "winx", -] - [[package]] name = "cast" version = "0.3.0" @@ -904,7 +835,6 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", - "serde", "wasm-bindgen", "windows-link", ] @@ -929,39 +859,6 @@ dependencies = [ "error-code", ] -[[package]] -name = "cmake" -version = "0.1.58" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0f78a02292a74a88ac736019ab962ece0bc380e3f977bf72e376c5d78ff0678" -dependencies = [ - "cc", -] - -[[package]] -name = "cmpv2" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "961b955a666e25ee5a1091d219128d6e6401e3dab84efb1a2bf6b4035d797b39" -dependencies = [ - "crmf", - "der", - "spki", - "x509-cert", -] - -[[package]] -name = "cms" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b77c319abfd5219629c45c34c89ba945ed3c5e49fcde9d16b6c3885f118a730" -dependencies = [ - "const-oid", - "der", - "spki", - "x509-cert", -] - [[package]] name = "cobs" version = "0.3.0" @@ -1026,12 +923,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - [[package]] name = "cookie-factory" version = "0.3.3" @@ -1174,63 +1065,12 @@ dependencies = [ "libc", ] -[[package]] -name = "craft" -version = "0.1.0" -dependencies = [ - "craft-automation", - "craft-behavior", - "craft-browse", - "craft-color-ui", - "craft-dialogs", - "craft-draw", - "craft-drawingml", - "craft-font-catalog", - "craft-font-manager", - "craft-gpu", - "craft-host", - "craft-i18n", - "craft-imaging", - "craft-keymap", - "craft-layers", - "craft-menu", - "craft-pages", - "craft-platform", - "craft-print", - "craft-quit", - "craft-review", - "craft-settings", - "craft-table", - "craft-text", - "craft-theme", - "craft-theme-editor", - "craft-theme-store", - "craft-timeline", - "craft-ui", - "craft-update", - "craft-web-api", - "craft-web-host", - "craft-window", - "egui", - "toml", -] - -[[package]] -name = "craft-ai-agents" -version = "0.1.0" -source = "git+https://github.com/storytold/craft-ai-integrations?rev=d94a3593adcff504eaaad9e5aee4c84fd2f07a72#d94a3593adcff504eaaad9e5aee4c84fd2f07a72" -dependencies = [ - "dirs", - "serde", - "serde_json", -] - [[package]] name = "craft-appkit" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "block2 0.6.2", - "objc2 0.6.5", "objc2-app-kit 0.3.2", "objc2-foundation 0.3.2", ] @@ -1238,6 +1078,7 @@ dependencies = [ [[package]] name = "craft-atomic" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "rustix 1.1.6", ] @@ -1245,38 +1086,16 @@ dependencies = [ [[package]] name = "craft-audio" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-media", "thiserror 2.0.21", ] -[[package]] -name = "craft-automation" -version = "0.1.0" -dependencies = [ - "base64 0.23.1", - "craft-behavior", - "craft-control", - "craft-host", - "craft-keymap", - "craft-platform", - "craft-theme", - "craft-ui", - "egui", - "getrandom 0.3.4", - "hmac", - "log", - "png 0.17.16", - "serde", - "serde_json", - "sha2", - "thiserror 2.0.21", - "web-time", -] - [[package]] name = "craft-behavior" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "accesskit", "bitflags 2.13.2", @@ -1291,93 +1110,28 @@ dependencies = [ "smallvec", ] -[[package]] -name = "craft-browse" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-docpath", - "craft-host", - "craft-i18n", - "craft-platform", - "craft-settings", - "craft-theme", - "craft-ui", - "egui", - "kurbo", - "serde", -] - [[package]] name = "craft-cfb" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" [[package]] name = "craft-cloud-ui" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "egui", ] -[[package]] -name = "craft-cms" -version = "0.1.0" -dependencies = [ - "md-5", - "rayon", -] - [[package]] name = "craft-codepage" version = "0.1.0" - -[[package]] -name = "craft-color-ui" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-cms", - "craft-drawingml", - "craft-host", - "craft-i18n", - "craft-keymap", - "craft-platform", - "craft-settings", - "craft-theme", - "craft-ui", - "craft-window", - "egui", - "serde", - "serde_json", -] - -[[package]] -name = "craft-control" -version = "0.1.0" -dependencies = [ - "craft-ai-agents", - "craft-atomic", - "craft-control-protocol", - "craft-flags", - "craft-platform", - "dirs", - "log", - "serde", - "serde_json", -] - -[[package]] -name = "craft-control-protocol" -version = "0.1.0" -dependencies = [ - "getrandom 0.3.4", - "serde_json", - "subtle", -] +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" [[package]] name = "craft-deckcraft-format" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-zip", "serde", @@ -1386,59 +1140,18 @@ dependencies = [ "zip 9.1.0", ] -[[package]] -name = "craft-dialogs" -version = "0.1.0" -dependencies = [ - "block2 0.6.2", - "craft-appkit", - "craft-atomic", - "craft-behavior", - "craft-browse", - "craft-host", - "craft-i18n", - "craft-platform", - "craft-ui", - "egui", - "futures-lite", - "log", - "objc2 0.6.5", - "objc2-app-kit 0.3.2", - "objc2-foundation 0.3.2", - "raw-window-handle", - "rfd", - "serde_json", - "zbus", -] - [[package]] name = "craft-docpath" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "serde", ] -[[package]] -name = "craft-draw" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-color-ui", - "craft-host", - "craft-i18n", - "craft-keymap", - "craft-settings", - "craft-theme", - "craft-ui", - "egui", - "kurbo", - "serde", - "serde_json", -] - [[package]] name = "craft-drawingml" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "chrono", "craft-xml", @@ -1447,20 +1160,11 @@ dependencies = [ "serde", ] -[[package]] -name = "craft-flags" -version = "0.1.0" -dependencies = [ - "craft-atomic", - "dirs", - "toml_edit", -] - [[package]] name = "craft-font-catalog" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ - "fontique", "harfrust 0.13.3", "kurbo", "skrifa 0.47.0", @@ -1470,73 +1174,15 @@ dependencies = [ "windows-registry", ] -[[package]] -name = "craft-font-manager" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-font-catalog", - "craft-font-store", - "craft-fonts-build", - "craft-host", - "craft-i18n", - "craft-theme", - "craft-ui", - "egui", - "epaint_default_fonts", - "log", - "serde", - "skrifa 0.47.0", -] - -[[package]] -name = "craft-font-os-windows" -version = "0.1.0" -dependencies = [ - "windows-registry", - "windows-sys 0.61.2", -] - -[[package]] -name = "craft-font-store" -version = "0.1.0" -dependencies = [ - "cap-primitives", - "craft-atomic", - "craft-font-catalog", - "craft-font-os-windows", - "flate2", - "log", - "ruzstd", - "serde", - "serde_json", - "sha2", - "skrifa 0.47.0", - "tar", - "thiserror 2.0.21", - "toml", - "ureq", - "wuff", -] - [[package]] name = "craft-fonts-build" version = "0.1.0" - -[[package]] -name = "craft-gpu" -version = "0.1.0" -dependencies = [ - "egui-wgpu", - "log", - "pollster 1.0.1", - "serde", - "thiserror 2.0.21", -] +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" [[package]] name = "craft-host" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "bitflags 2.13.2", "craft-i18n", @@ -1549,6 +1195,7 @@ dependencies = [ [[package]] name = "craft-i18n" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "chrono", "fixed_decimal", @@ -1573,26 +1220,10 @@ dependencies = [ "writeable", ] -[[package]] -name = "craft-imaging" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-color-ui", - "craft-host", - "craft-i18n", - "craft-keymap", - "craft-theme", - "craft-ui", - "egui", - "kurbo", - "serde", - "serde_json", -] - [[package]] name = "craft-keymap" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-host", "craft-i18n", @@ -1604,22 +1235,10 @@ dependencies = [ "serde_json", ] -[[package]] -name = "craft-layers" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-i18n", - "craft-keymap", - "craft-theme", - "craft-ui", - "egui", - "serde", -] - [[package]] name = "craft-mcp-server" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "serde_json", ] @@ -1627,30 +1246,15 @@ dependencies = [ [[package]] name = "craft-media" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-menu" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-host", - "craft-i18n", - "craft-keymap", - "craft-quit", - "craft-theme", - "craft-ui", - "craft-window", - "egui", - "serde", - "serde_json", -] - [[package]] name = "craft-metafile" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "encoding_rs", "image", @@ -1661,15 +1265,25 @@ dependencies = [ [[package]] name = "craft-mime" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "chrono", "craft-codepage", "encoding_rs", ] +[[package]] +name = "craft-nightly" +version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=1f6c3a21f85ed96f8fd4ddd5a959d4e1edbedb24#1f6c3a21f85ed96f8fd4ddd5a959d4e1edbedb24" +dependencies = [ + "winsafe", +] + [[package]] name = "craft-opc" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-xml", "craft-zip", @@ -1677,24 +1291,10 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-pages" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-keymap", - "craft-text", - "craft-theme", - "craft-ui", - "egui", - "kurbo", - "serde", - "serde_json", -] - [[package]] name = "craft-pdf" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "krilla", "serde", @@ -1704,24 +1304,21 @@ dependencies = [ [[package]] name = "craft-platform" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ - "arboard", "async-channel", "async-io", "async-process", - "clipboard-win", "core-graphics2", "craft-atomic", "craft-docpath", "craft-host", "craft-i18n", "craft-theme", - "fmv-macos-events", "futures-lite", "js-sys", "log", "objc2-app-kit 0.3.2", - "objc2-foundation 0.3.2", "rfd", "serde", "serde_json", @@ -1730,7 +1327,6 @@ dependencies = [ "web-sys", "web-time", "windows 0.62.2", - "wl-clipboard-rs", "x11rb", "xcap", "zbus", @@ -1739,6 +1335,7 @@ dependencies = [ [[package]] name = "craft-pptx" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-drawingml", "craft-opc", @@ -1750,62 +1347,22 @@ dependencies = [ "thiserror 2.0.21", ] -[[package]] -name = "craft-print" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-host", - "craft-theme", - "craft-ui", - "craft-winprint-gdi", - "egui", - "js-sys", - "log", - "miniz_oxide 0.9.1", - "roxmltree", - "serde", - "serde_json", - "tempfile", - "wasm-bindgen", - "web-sys", - "winprint", - "winsafe", -] - [[package]] name = "craft-quit" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "dispatch2", - "egui", "objc2 0.6.5", "objc2-app-kit 0.3.2", "wasm-bindgen", "web-sys", ] -[[package]] -name = "craft-review" -version = "0.1.0" -dependencies = [ - "base64 0.23.1", - "craft-behavior", - "craft-host", - "craft-i18n", - "craft-keymap", - "craft-pages", - "craft-theme", - "craft-ui", - "egui", - "image", - "kurbo", - "serde", -] - [[package]] name = "craft-rtf" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-codepage", "encoding_rs", @@ -1814,6 +1371,7 @@ dependencies = [ [[package]] name = "craft-settings" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-atomic", "craft-host", @@ -1830,6 +1388,7 @@ dependencies = [ [[package]] name = "craft-svg" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-xml", "flate2", @@ -1843,43 +1402,10 @@ dependencies = [ "vectorcraft-pathops", ] -[[package]] -name = "craft-table" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-keymap", - "craft-theme", - "craft-ui", - "egui", -] - -[[package]] -name = "craft-text" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-host", - "craft-keymap", - "craft-theme", - "craft-ui", - "egui", - "hypher", - "miniz_oxide 0.8.9", - "regex", - "regex-syntax", - "serde", - "serde_json", - "unicode-bidi", - "unicode-bidi-mirroring", - "unicode-general-category", - "unicode-linebreak", - "unicode-segmentation", -] - [[package]] name = "craft-theme" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "bitflags 2.13.2", "craft-tracked", @@ -1891,59 +1417,15 @@ dependencies = [ "smallvec", ] -[[package]] -name = "craft-theme-editor" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-theme", - "craft-ui", - "egui", -] - -[[package]] -name = "craft-theme-store" -version = "0.1.0" -dependencies = [ - "craft-atomic", - "craft-behavior", - "craft-theme", - "craft-ui", - "dirs", - "egui", - "serde", - "serde_json", -] - -[[package]] -name = "craft-time" -version = "0.1.0" -dependencies = [ - "serde", - "thiserror 2.0.21", -] - -[[package]] -name = "craft-timeline" -version = "0.1.0" -dependencies = [ - "craft-behavior", - "craft-keymap", - "craft-theme", - "craft-time", - "craft-ui", - "egui", - "serde", - "web-time", -] - [[package]] name = "craft-tracked" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" [[package]] name = "craft-ui" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-cloud-ui", "craft-ui-canvas", @@ -1957,9 +1439,9 @@ dependencies = [ [[package]] name = "craft-ui-canvas" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", - "craft-font-catalog", "craft-i18n", "craft-keymap", "craft-theme", @@ -1973,6 +1455,7 @@ dependencies = [ [[package]] name = "craft-ui-contract" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "accesskit", "craft-behavior", @@ -2010,6 +1493,7 @@ dependencies = [ [[package]] name = "craft-ui-macros" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2020,6 +1504,7 @@ dependencies = [ [[package]] name = "craft-ui-panels" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -2037,6 +1522,7 @@ dependencies = [ [[package]] name = "craft-ui-patterns" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -2057,6 +1543,7 @@ dependencies = [ [[package]] name = "craft-ui-shell" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -2067,7 +1554,6 @@ dependencies = [ "craft-ui-macros", "craft-ui-panels", "craft-window", - "eframe", "egui", "raw-window-handle", "serde", @@ -2077,6 +1563,7 @@ dependencies = [ [[package]] name = "craft-ui-widgets" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-behavior", "craft-host", @@ -2095,14 +1582,13 @@ dependencies = [ [[package]] name = "craft-update" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ - "base64 0.22.1", "chrono", "craft-host", "craft-theme", "craft-ui", "dunce", - "ed25519-dalek", "egui", "flate2", "image", @@ -2115,7 +1601,6 @@ dependencies = [ "sha2", "tar", "tempfile", - "toml", "ureq", "verifysign", "winreg", @@ -2126,6 +1611,7 @@ dependencies = [ [[package]] name = "craft-video" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-media", "rav1e", @@ -2136,6 +1622,7 @@ dependencies = [ [[package]] name = "craft-web-api" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "js-sys", "serde_json", @@ -2146,6 +1633,7 @@ dependencies = [ [[package]] name = "craft-web-host" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-host", "craft-platform", @@ -2157,6 +1645,7 @@ dependencies = [ [[package]] name = "craft-win32" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "winsafe", ] @@ -2164,6 +1653,7 @@ dependencies = [ [[package]] name = "craft-window" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "craft-appkit", "craft-atomic", @@ -2184,17 +1674,10 @@ dependencies = [ "x11rb", ] -[[package]] -name = "craft-winprint-gdi" -version = "0.1.0" -source = "git+https://github.com/storytold/winprint.rs?rev=64e7afd4d1483512385012c340ecaaaf0f3beb7f#64e7afd4d1483512385012c340ecaaaf0f3beb7f" -dependencies = [ - "windows-sys 0.61.2", -] - [[package]] name = "craft-xml" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "quick-xml 0.41.0", "serde", @@ -2204,6 +1687,7 @@ dependencies = [ [[package]] name = "craft-zip" version = "0.1.0" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "flate2", "thiserror 2.0.21", @@ -2219,18 +1703,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crmf" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36fe21b96d5b87f5de4b5b7202ec41c00110ac817ce6728fe75fb2fe5962ed92" -dependencies = [ - "cms", - "der", - "spki", - "x509-cert", -] - [[package]] name = "crossbeam-channel" version = "0.5.17" @@ -2287,33 +1759,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f" -[[package]] -name = "curve25519-dalek" -version = "4.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" -dependencies = [ - "cfg-if", - "cpufeatures 0.2.17", - "curve25519-dalek-derive", - "digest", - "fiat-crypto", - "rustc_version", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "dasp_sample" version = "0.11.0" @@ -2330,15 +1775,17 @@ checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376" name = "deckcraft" version = "0.20.0" dependencies = [ + "arboard", "chrono", "cpal", - "craft", + "craft-nightly", "craft-update", "deckcraft-engine", "deckcraft-media", "deckcraft-ui-egui", "eframe", "egui", + "fmv-macos-events", "image", "log", "rfd", @@ -2362,7 +1809,6 @@ dependencies = [ name = "deckcraft-cli" version = "0.20.0" dependencies = [ - "craft", "deckcraft-engine", "deckcraft-mcp", "serde_json", @@ -2408,7 +1854,6 @@ dependencies = [ name = "deckcraft-fonts" version = "0.20.0" dependencies = [ - "craft", "epaint_default_fonts", "harfrust 0.13.3", "kurbo", @@ -2441,7 +1886,6 @@ dependencies = [ name = "deckcraft-mcp" version = "0.20.0" dependencies = [ - "craft", "craft-mcp-server", "deckcraft-engine", "deckcraft-render", @@ -2552,7 +1996,6 @@ name = "deckcraft-text" version = "0.20.0" dependencies = [ "chrono", - "craft", "deckcraft-color", "deckcraft-fonts", "deckcraft-geom", @@ -2566,9 +2009,12 @@ dependencies = [ name = "deckcraft-ui-egui" version = "0.20.0" dependencies = [ - "chrono", - "craft", + "craft-host", + "craft-keymap", + "craft-theme", + "craft-ui", "craft-update", + "craft-window", "deckcraft-anim", "deckcraft-color", "deckcraft-engine", @@ -2578,15 +2024,14 @@ dependencies = [ "deckcraft-model", "deckcraft-render", "deckcraft-text", - "eframe", "egui", + "egui_extras", "egui_kittest", "log", "serde", "serde_json", "skrifa 0.47.0", "toml", - "ttf-parser", "web-time", ] @@ -2594,43 +2039,21 @@ dependencies = [ name = "deckcraft-web" version = "0.20.0" dependencies = [ - "craft", + "craft-web-api", + "craft-web-host", "deckcraft-engine", "deckcraft-ui-egui", "eframe", "egui", "js-sys", "log", + "rfd", "serde_json", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", ] -[[package]] -name = "der" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" -dependencies = [ - "const-oid", - "der_derive", - "flagset", - "pem-rfc7468", - "zeroize", -] - -[[package]] -name = "der_derive" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8034092389675178f570469e6c3b0465d3d30b4505c294a6550db47f3c17ad18" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "deranged" version = "0.5.9" @@ -2669,7 +2092,6 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", - "subtle", ] [[package]] @@ -2690,7 +2112,7 @@ dependencies = [ "libc", "option-ext", "redox_users", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -2816,38 +2238,16 @@ checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" [[package]] name = "ecolor" version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "bytemuck", "emath", ] -[[package]] -name = "ed25519" -version = "2.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" -dependencies = [ - "pkcs8", - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" -dependencies = [ - "curve25519-dalek", - "ed25519", - "serde", - "sha2", - "subtle", - "zeroize", -] - [[package]] name = "eframe" version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "ahash", "bytemuck", @@ -2882,6 +2282,7 @@ dependencies = [ [[package]] name = "egui" version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "accesskit", "ahash", @@ -2900,6 +2301,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "ahash", "bytemuck", @@ -2918,6 +2320,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "accesskit_winit", "arboard", @@ -2940,9 +2343,23 @@ dependencies = [ "winit", ] +[[package]] +name = "egui_extras" +version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" +dependencies = [ + "ahash", + "egui", + "enum-map", + "itertools 0.15.0", + "log", + "profiling", +] + [[package]] name = "egui_glow" version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "bytemuck", "egui", @@ -2955,6 +2372,7 @@ dependencies = [ [[package]] name = "egui_kittest" version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "dify", "eframe", @@ -2980,6 +2398,7 @@ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be" [[package]] name = "emath" version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "bytemuck", ] @@ -3016,6 +2435,26 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" +[[package]] +name = "enum-map" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4532960034c15ba2f55e9eee631040ecc473c32e6c4b200828c759840f13a06" +dependencies = [ + "enum-map-derive", +] + +[[package]] +name = "enum-map-derive" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7127272f64b3e098f7d81f350d672081b879bff896d219c42370dc858b1af9ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.6", +] + [[package]] name = "enumflags2" version = "0.7.12" @@ -3040,6 +2479,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" dependencies = [ "ahash", "bytemuck", @@ -3065,6 +2505,7 @@ dependencies = [ [[package]] name = "epaint_default_fonts" version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" [[package]] name = "equator" @@ -3099,7 +2540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3170,12 +2611,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b97b65636e5b9ef369943878ac74335ba1c55c1cb6adbf1e2c293c624248d693" -[[package]] -name = "fiat-crypto" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" - [[package]] name = "filetime" version = "0.2.29" @@ -3209,12 +2644,6 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" -[[package]] -name = "flagset" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7ac824320a75a52197e8f2d787f6a38b6718bb6897a35142d749af3c0e8f4fe" - [[package]] name = "flate2" version = "1.1.10" @@ -3235,28 +2664,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "fmt-derive" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cb4a4b45c26455885f8b462db12978e51f60cc914337bccb9a36faf93410169" -dependencies = [ - "fmt-derive-proc", -] - -[[package]] -name = "fmt-derive-proc" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7704da0760734344ce8753f15b21e97c6be85dc5a8f2c3a963fbd042b3380d23" -dependencies = [ - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "fmv-macos-events" version = "0.1.0" @@ -3268,12 +2675,6 @@ dependencies = [ "objc2-foundation 0.3.2", ] -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - [[package]] name = "foldhash" version = "0.1.5" @@ -3304,28 +2705,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "fontique" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6688bc1294fe7117d788937b6c53480169b29c566954af490830d4c09da9516a" -dependencies = [ - "hashbrown 0.17.1", - "linebender_resource_handle", - "memmap2", - "objc2 0.6.5", - "objc2-core-foundation", - "objc2-core-text", - "objc2-foundation 0.3.2", - "parlance", - "read-fonts 0.41.0", - "roxmltree", - "smallvec", - "windows 0.62.2", - "windows-core 0.62.2", - "yeslogic-fontconfig-sys", -] - [[package]] name = "foreign-types" version = "0.5.0" @@ -3362,33 +2741,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs-set-times" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94e7099f6313ecacbe1256e8ff9d617b75d1bcb16a6fddef94866d225a01a14a" -dependencies = [ - "io-lifetimes 2.0.4", - "rustix 1.1.6", - "windows-sys 0.52.0", -] - -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - -[[package]] -name = "futures-channel" -version = "0.3.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" -dependencies = [ - "futures-core", - "futures-sink", -] - [[package]] name = "futures-core" version = "0.3.34" @@ -3425,12 +2777,6 @@ dependencies = [ "syn 3.0.6", ] -[[package]] -name = "futures-sink" -version = "0.3.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" - [[package]] name = "futures-task" version = "0.3.34" @@ -3444,11 +2790,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" dependencies = [ "futures-core", - "futures-io", "futures-macro", - "futures-sink", "futures-task", - "memchr", "pin-project-lite", "slab", ] @@ -3513,10 +2856,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi", - "wasm-bindgen", ] [[package]] @@ -3586,7 +2927,7 @@ dependencies = [ "hashbrown 0.17.1", "log", "peniko", - "png 0.18.1", + "png", "skrifa 0.44.0", "smallvec", "vello_common", @@ -3699,25 +3040,6 @@ dependencies = [ "euclid", ] -[[package]] -name = "h2" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d29020232d6aa3fb1daca64c1127cf662cf97f254ae16c18c05b8ab635fc118" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", -] - [[package]] name = "half" version = "2.7.1" @@ -3786,13 +3108,15 @@ dependencies = [ [[package]] name = "hayro-ccitt" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f4d0e94ddd48749f06bbe4e5389fb9799a0c45bcaf00495042076ef05e3241a" +checksum = "2866f0d976e76497480b853d5e258dab6e4b89ecfe991124e08f15dfa8fd03ad" [[package]] name = "hayro-jbig2" -version = "0.3.0" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "000e025850f4592ddcaee85640db70704151f2bafd43b6f431aa5b6a2c6a35a9" dependencies = [ "hayro-ccitt", ] @@ -3806,12 +3130,13 @@ checksum = "c75ab947623ef4ccaa7acf0579edf7cbb5a73838e3839a7be73335e522f433a1" [[package]] name = "hayro-syntax" version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0edeafd70aa2db743de8ede8637d07ec87db05efe69cde371d03f1b185fcef27" dependencies = [ "hayro-jbig2", "hayro-jpeg2000", "rustc-hash 2.1.3", "smallvec", - "stringprep", "zune-jpeg", ] @@ -3833,15 +3158,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - [[package]] name = "http" version = "1.5.0" @@ -3852,103 +3168,12 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "pin-project-lite", -] - [[package]] name = "httparse" version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" -[[package]] -name = "hyper" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c" -dependencies = [ - "atomic-waker", - "bytes", - "futures-channel", - "futures-core", - "h2", - "http", - "http-body", - "httparse", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.27.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfa8e654703247911e29c23fbeaa261834bd9bb74efba2f9acddc37bfb127f53" -dependencies = [ - "http", - "hyper", - "hyper-util", - "rustls", - "tokio", - "tokio-rustls", - "tower-service", -] - -[[package]] -name = "hyper-util" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" -dependencies = [ - "base64 0.23.1", - "bytes", - "futures-channel", - "futures-util", - "http", - "http-body", - "httparse", - "hyper", - "ipnet", - "libc", - "percent-encoding", - "pin-project-lite", - "socket2", - "system-configuration", - "tokio", - "tower-service", - "tracing", - "windows-registry", -] - -[[package]] -name = "hypher" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45f2b4f6b5da34d400d4c112eadcc14512cc5d04307a8eee182586d9bebd7ce6" - [[package]] name = "i_float" version = "5.0.0" @@ -4302,7 +3527,7 @@ dependencies = [ "image-webp", "moxcms", "num-traits", - "png 0.18.1", + "png", "tiff", "zune-core", "zune-jpeg", @@ -4360,34 +3585,6 @@ dependencies = [ "rustversion", ] -[[package]] -name = "io-extras" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20fd6de4ccfcc187e38bc21cfa543cb5a302cb86a8b114eb7f0bf0dc9f8ac00f" -dependencies = [ - "io-lifetimes 3.0.1", - "windows-sys 0.52.0", -] - -[[package]] -name = "io-lifetimes" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06432fb54d3be7964ecd3649233cddf80db2832f47fec34c01f65b3d9d774983" - -[[package]] -name = "io-lifetimes" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0fb0570afe1fed943c5c3d4102d5358592d8625fda6a0007fdbe65a92fba96" - -[[package]] -name = "ipnet" -version = "2.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" - [[package]] name = "is-docker" version = "0.2.0" @@ -4575,6 +3772,7 @@ dependencies = [ [[package]] name = "krilla" version = "0.8.2" +source = "git+https://github.com/storytold/craft-libs?rev=8fa4db64a9bb943520259ea95331a303ba788f21#8fa4db64a9bb943520259ea95331a303ba788f21" dependencies = [ "base64 0.22.1", "bumpalo", @@ -4585,7 +3783,7 @@ dependencies = [ "imagesize 0.14.0", "indexmap", "pdf-writer", - "png 0.18.1", + "png", "rayon", "rustc-hash 2.1.3", "rustybuzz", @@ -4719,6 +3917,8 @@ checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4" [[package]] name = "linesweeper" version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a25df1b0c5432893f41bba817150e323703ee5f6d974f3a6808ac7fd7f046d18" dependencies = [ "arrayvec", "kurbo", @@ -4775,12 +3975,6 @@ version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" -[[package]] -name = "lru-slab" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4050469837a6ff301cd14c1f8f24f88549e6d548f24f64e2148eb0f72cebc51f" - [[package]] name = "mach2" version = "0.4.3" @@ -4790,12 +3984,6 @@ dependencies = [ "libc", ] -[[package]] -name = "maybe-owned" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4facc753ae494aeb6e3c22f839b158aebd4f9270f55cd3c79906c45476c47ab4" - [[package]] name = "maybe-rayon" version = "0.1.1" @@ -4806,16 +3994,6 @@ dependencies = [ "rayon", ] -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest", -] - [[package]] name = "memchr" version = "2.8.3" @@ -4840,12 +4018,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "mime" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5848f5a9e8117cf94f2f90faac24a87ff81600ff8628c1e3deaab572e76bfa1" - [[package]] name = "minicov" version = "0.3.8" @@ -4882,17 +4054,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "mio" -version = "1.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.61.2", -] - [[package]] name = "moxcms" version = "0.8.1" @@ -4916,7 +4077,7 @@ dependencies = [ "objc2-app-kit 0.3.2", "objc2-core-foundation", "objc2-foundation 0.3.2", - "png 0.18.1", + "png", "thiserror 2.0.21", "windows-sys 0.61.2", ] @@ -5059,7 +4220,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -5743,12 +4904,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "parlance" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73072a9470554c8e794778acece2312661218aaabb635600957d952cf01c716e" - [[package]] name = "paste" version = "1.0.15" @@ -5773,25 +4928,6 @@ dependencies = [ "ryu", ] -[[package]] -name = "pem" -version = "3.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" -dependencies = [ - "base64 0.22.1", - "serde_core", -] - -[[package]] -name = "pem-rfc7468" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" -dependencies = [ - "base64ct", -] - [[package]] name = "peniko" version = "0.6.1" @@ -5933,16 +5069,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - [[package]] name = "pkg-config" version = "0.3.34" @@ -5968,19 +5094,6 @@ dependencies = [ "time", ] -[[package]] -name = "png" -version = "0.17.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "fdeflate", - "flate2", - "miniz_oxide 0.8.9", -] - [[package]] name = "png" version = "0.18.1" @@ -6097,30 +5210,6 @@ dependencies = [ "toml_edit", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro2" version = "1.0.107" @@ -6179,63 +5268,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "quinn" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4051e23e9185c255a7e33ef59cdbca87a22d359052eecd22fc6b901fb37d9d11" -dependencies = [ - "bytes", - "cfg_aliases", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash 2.1.3", - "rustls", - "socket2", - "thiserror 2.0.21", - "tokio", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-proto" -version = "0.11.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe" -dependencies = [ - "aws-lc-rs", - "bytes", - "getrandom 0.4.3", - "lru-slab", - "rand 0.10.4", - "rand_pcg", - "ring", - "rustc-hash 2.1.3", - "rustls", - "rustls-pki-types", - "slab", - "thiserror 2.0.21", - "tinyvec", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-udp" -version = "0.5.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af66907df18639dcf4db56ca65490cabc4b27a97dbadd96f2926cca73298f016" -dependencies = [ - "cfg_aliases", - "libc", - "once_cell", - "socket2", - "tracing", - "windows-sys 0.52.0", -] - [[package]] name = "quote" version = "1.0.47" @@ -6288,15 +5320,6 @@ dependencies = [ "rand_core 0.9.5", ] -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.17", -] - [[package]] name = "rand_core" version = "0.9.5" @@ -6312,15 +5335,6 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" -[[package]] -name = "rand_pcg" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" -dependencies = [ - "rand_core 0.10.1", -] - [[package]] name = "range-alloc" version = "0.1.5" @@ -6514,49 +5528,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832" -[[package]] -name = "reqwest" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029" -dependencies = [ - "base64 0.23.1", - "bytes", - "encoding_rs", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "js-sys", - "log", - "mime", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-pki-types", - "rustls-platform-verifier", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-rustls", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "resvg" version = "0.48.1" @@ -6618,7 +5589,7 @@ dependencies = [ "cfg-if", "getrandom 0.2.17", "libc", - "untrusted 0.9.0", + "untrusted", "windows-sys 0.52.0", ] @@ -6675,17 +5646,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustix-linux-procfs" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056" -dependencies = [ - "once_cell", - "rustix 1.1.6", + "windows-sys 0.61.2", ] [[package]] @@ -6694,7 +5655,6 @@ version = "0.23.46" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" dependencies = [ - "aws-lc-rs", "log", "once_cell", "ring", @@ -6722,7 +5682,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f4925028c7eb5d1fcdaf196971378ed9d2c1c4efc7dc5d011256f76c99c0a96" dependencies = [ - "web-time", "zeroize", ] @@ -6744,7 +5703,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -6759,10 +5718,9 @@ version = "0.103.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4443b1b6d39d7c663139942cc4558262562d2c84123bb6282ef177009ca8b281" dependencies = [ - "aws-lc-rs", "ring", "rustls-pki-types", - "untrusted 0.9.0", + "untrusted", ] [[package]] @@ -6789,24 +5747,12 @@ dependencies = [ "unicode-script", ] -[[package]] -name = "ruzstd" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69e4ce4a039f42bf25920b95667e4d789e98749ab11bbb8d2c2936f788421bb5" - [[package]] name = "ryu" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" -[[package]] -name = "ryu-js" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04d056b875a9d2e6cb9a61d127afee9ac5999b9f87bcb32079d1318e505be714" - [[package]] name = "same-file" version = "1.0.6" @@ -6925,17 +5871,6 @@ dependencies = [ "zmij", ] -[[package]] -name = "serde_json_canonicalizer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe52319a927259afbfa5180c5157cd8167edfd3e8c254f9558c7fef44c5649f2" -dependencies = [ - "ryu-js", - "serde", - "serde_json", -] - [[package]] name = "serde_repr" version = "0.1.21" @@ -6949,36 +5884,13 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.1.3" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c187e0a369471c550af028cba56d4f4fa2a489ad28151ae95a4d340a2a8b782" +checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" dependencies = [ "serde_core", ] -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a978451301f4db1d02937a4ab3ccce137717b81826e79b7d49ffe3244a13c3b8" -dependencies = [ - "cfg-if", - "cpufeatures 0.2.17", - "digest", -] - [[package]] name = "sha2" version = "0.10.9" @@ -7012,175 +5924,6 @@ dependencies = [ "libc", ] -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "sigstore-bundle" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7dc53c8a941858d01479622dbb7650aaa2ee0ca1fb58fb6cdddbfc3064abbb" -dependencies = [ - "base64 0.22.1", - "hex", - "serde", - "serde_json", - "sigstore-crypto", - "sigstore-merkle", - "sigstore-rekor", - "sigstore-tsa", - "sigstore-types", - "thiserror 2.0.21", -] - -[[package]] -name = "sigstore-crypto" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da90c3d9af638898a5fdc347479b18f950bb0dde11ecf2244f94cd28135da53b" -dependencies = [ - "aws-lc-rs", - "base64 0.22.1", - "const-oid", - "der", - "digest", - "pem", - "rand_core 0.10.1", - "sha2", - "signature", - "sigstore-types", - "spki", - "thiserror 2.0.21", - "tracing", - "x509-cert", -] - -[[package]] -name = "sigstore-merkle" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c0d53558825c77716855c13794306fff766854c1bf92948e77d7890da3f2455" -dependencies = [ - "base64 0.22.1", - "hex", - "sigstore-crypto", - "sigstore-types", - "thiserror 2.0.21", -] - -[[package]] -name = "sigstore-rekor" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "641fdaaa40d0cd6e249cf1671c2240beff1a3ece578062cf43e750779e8db2b3" -dependencies = [ - "base64 0.22.1", - "hex", - "reqwest", - "serde", - "serde_json", - "sigstore-crypto", - "sigstore-merkle", - "sigstore-types", - "thiserror 2.0.21", - "url", -] - -[[package]] -name = "sigstore-trust-root" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6b0d2550f05c096400066e858db13d91f9de3b750a7541fb1291c1dc80ca290" -dependencies = [ - "base64 0.22.1", - "chrono", - "hex", - "rustls-pki-types", - "serde", - "serde_json", - "sigstore-crypto", - "sigstore-types", - "thiserror 2.0.21", - "x509-cert", -] - -[[package]] -name = "sigstore-tsa" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bc86c8abc1ece6832236e7e34e9baebb5d4d40490c0332b814a0d8624ca7255" -dependencies = [ - "aws-lc-rs", - "base64 0.22.1", - "chrono", - "cmpv2", - "cms", - "const-oid", - "der", - "hex", - "rand 0.10.4", - "reqwest", - "rustls-pki-types", - "rustls-webpki", - "sigstore-crypto", - "sigstore-types", - "thiserror 2.0.21", - "tracing", - "x509-cert", - "x509-tsp", -] - -[[package]] -name = "sigstore-types" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8d870c9bcfdf83396ac2bd2d6a23c5d09ec02cc9fda50fa1cbb3dd71a9bee53" -dependencies = [ - "base64 0.22.1", - "chrono", - "hex", - "pem", - "serde", - "serde_json", - "thiserror 2.0.21", -] - -[[package]] -name = "sigstore-verify" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d30aff69036e4579b416956e9ba68cec45b793116f78f10842d04c7f8b924bab" -dependencies = [ - "base64 0.22.1", - "chrono", - "cms", - "const-oid", - "hex", - "pem", - "rustls-pki-types", - "rustls-webpki", - "serde", - "serde_json", - "serde_json_canonicalizer", - "sigstore-bundle", - "sigstore-crypto", - "sigstore-merkle", - "sigstore-rekor", - "sigstore-trust-root", - "sigstore-tsa", - "sigstore-types", - "thiserror 2.0.21", - "tls_codec", - "tracing", - "x509-cert", -] - [[package]] name = "simd-adler32" version = "0.3.10" @@ -7353,16 +6096,6 @@ dependencies = [ "serde", ] -[[package]] -name = "socket2" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" -dependencies = [ - "libc", - "windows-sys 0.61.2", -] - [[package]] name = "spirv" version = "0.4.0+sdk-1.4.341.0" @@ -7372,16 +6105,6 @@ dependencies = [ "bitflags 2.13.2", ] -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -7403,38 +6126,6 @@ dependencies = [ "float-cmp", ] -[[package]] -name = "stringprep" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", - "unicode-properties", -] - -[[package]] -name = "strum" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9628de9b8791db39ceda2b119bbe13134770b56c138ec1d3af810d045c04f9bd" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab85eea0270ee17587ed4156089e10b9e6880ee688791d45a905f5b1ca36f664" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "subsetter" version = "0.2.6" @@ -7658,16 +6349,6 @@ dependencies = [ "symphonia-metadata", ] -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.119" @@ -7690,15 +6371,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" -dependencies = [ - "futures-core", -] - [[package]] name = "synstructure" version = "0.14.0" @@ -7722,27 +6394,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "system-configuration" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" -dependencies = [ - "bitflags 2.13.2", - "core-foundation 0.9.4", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "system-deps" version = "7.0.8" @@ -7764,7 +6415,6 @@ checksum = "3f6221d9a6003c78398e3b239969f352578258df48c8eb051caadae0015bc840" dependencies = [ "filetime", "libc", - "xattr", ] [[package]] @@ -7780,10 +6430,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.3", "once_cell", "rustix 1.1.6", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -7899,7 +6549,7 @@ dependencies = [ "bytemuck", "cfg-if", "log", - "png 0.18.1", + "png", "tiny-skia-path", ] @@ -7925,76 +6575,20 @@ dependencies = [ "zerovec", ] -[[package]] -name = "tinyvec" -version = "1.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" - -[[package]] -name = "tls_codec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de2e01245e2bb89d6f05801c564fa27624dbd7b1846859876c7dad82e90bf6b" -dependencies = [ - "tls_codec_derive", - "zeroize", -] - -[[package]] -name = "tls_codec_derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2e76690929402faae40aebdda620a2c0e25dd6d3b9afe48867dfd95991f4bd" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "tokio" version = "1.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e95f91fcc7a621e8b030f6aa23c71fe9838ae2fb4d8118b75602a328f5144044" dependencies = [ - "bytes", - "libc", - "mio", "pin-project-lite", - "socket2", - "windows-sys 0.61.2", -] - -[[package]] -name = "tokio-rustls" -version = "0.26.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9cc2678c2cdd569ef8215e2afd7954ada2ae20b4fdd2c5fe6139a3b02d105db" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "libc", - "pin-project-lite", - "tokio", ] [[package]] name = "toml" -version = "1.1.8+spec-1.1.0" +version = "1.1.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d" +checksum = "920602543f0911ab71da12c50d59701da54c196d1a2bf5cb4b75667f137a406a" dependencies = [ "indexmap", "serde_core", @@ -8007,9 +6601,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.1.3+spec-1.1.0" +version = "1.1.1+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "173f25c883cd2176a2d8212155638c0a60d484a9d84546d270866f40f56b6e49" +checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" dependencies = [ "serde_core", ] @@ -8031,63 +6625,18 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.1.7+spec-1.1.0" +version = "1.1.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb28d6e049a9766c3bd91a8326e6179f5b132dec87906bb97018ef7a2f3431a" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.2.0+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009dbb7700f11c55ef83aebbe4c0e9cf1f1ac0844bd8d6f00dc38f302026e13a" - -[[package]] -name = "tower" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-http" -version = "0.6.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" -dependencies = [ - "bitflags 2.13.2", - "bytes", - "futures-util", - "http", - "http-body", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", - "url", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" +checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" [[package]] name = "tracing" @@ -8132,12 +6681,6 @@ dependencies = [ "petgraph", ] -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - [[package]] name = "ttf-parser" version = "0.25.1" @@ -8221,15 +6764,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" -[[package]] -name = "unicode-normalization" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cd3fb03d5288b3ba9a1ee103ac7e9cbb59f0b03d64f8ddfcc04dd42758a85d" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-properties" version = "0.1.4" @@ -8254,12 +6788,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - [[package]] name = "untrusted" version = "0.9.0" @@ -8281,7 +6809,6 @@ dependencies = [ "rustls-platform-verifier", "ureq-proto", "utf8-zero", - "webpki-roots", ] [[package]] @@ -8399,7 +6926,7 @@ dependencies = [ "guillotiere", "log", "peniko", - "png 0.18.1", + "png", "smallvec", "thiserror 2.0.21", ] @@ -8415,7 +6942,7 @@ dependencies = [ "glifo", "hashbrown 0.17.1", "ordered-channel", - "png 0.18.1", + "png", "rayon", "thread_local", "vello_common", @@ -8453,15 +6980,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "want" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" -dependencies = [ - "try-lock", -] - [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" @@ -8767,15 +7285,6 @@ dependencies = [ "rustls-pki-types", ] -[[package]] -name = "webpki-roots" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5f280bbb2b287bc8e7de7e3852945a0ff50d1bbcb5ed42b6c7a568c546df171" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "weezl" version = "0.1.12" @@ -8977,7 +7486,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -9346,28 +7855,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winprint" -version = "0.2.1" -source = "git+https://github.com/storytold/winprint.rs?rev=8ae097ef941b432b0e7671b1ec3a506800e65e57#8ae097ef941b432b0e7671b1ec3a506800e65e57" -dependencies = [ - "flate2", - "fmt-derive", - "reqwest", - "scopeguard", - "sigstore-trust-root", - "sigstore-types", - "sigstore-verify", - "strum", - "tar", - "thiserror 2.0.21", - "windows 0.62.2", - "windows-core 0.62.2", - "windows-implement", - "windows-numerics", - "xml", -] - [[package]] name = "winreg" version = "0.55.0" @@ -9394,16 +7881,6 @@ version = "0.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ef0ffc427f045c0cc9ebffd6f4f91153dcd2a1547b5c3c29ee3f541e16e95c6" -[[package]] -name = "winx" -version = "0.36.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d" -dependencies = [ - "bitflags 2.13.2", - "windows-sys 0.52.0", -] - [[package]] name = "wit-bindgen" version = "0.57.1" @@ -9456,16 +7933,6 @@ dependencies = [ "either", ] -[[package]] -name = "wuff" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6a992b57b3d1ee972b2e3fd9225e44793104d49818836dd812d5459187712dd" -dependencies = [ - "brotli-decompressor", - "bytes", -] - [[package]] name = "x11-dl" version = "2.21.0" @@ -9498,41 +7965,6 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd" -[[package]] -name = "x509-cert" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1301e935010a701ae5f8655edc0ad17c44bad3ac5ce8c39185f75453b720ae94" -dependencies = [ - "const-oid", - "der", - "sha1", - "signature", - "spki", - "tls_codec", -] - -[[package]] -name = "x509-tsp" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5ceece934a21607055b7ac5c25adb56a2ff559804b10705dc674d1d838c15e1" -dependencies = [ - "cmpv2", - "cms", - "der", -] - -[[package]] -name = "xattr" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" -dependencies = [ - "libc", - "rustix 1.1.6", -] - [[package]] name = "xcap" version = "0.9.8" @@ -9600,12 +8032,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" -[[package]] -name = "xml" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f45bb2c13fec6a6cb4c0f76a7e94839e110a14ec803ec2940777a94c347bc52" - [[package]] name = "xml-rs" version = "0.8.29" @@ -9631,17 +8057,6 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5a4b21e1a62b67a2970e6831bc091d7b87e119e7f9791aef9702e3bef04448" -[[package]] -name = "yeslogic-fontconfig-sys" -version = "6.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8b8abf912b9a29ff112e1671c97c33636903d13a69712037190e6805af4f76" -dependencies = [ - "dlib", - "once_cell", - "pkg-config", -] - [[package]] name = "yoke" version = "0.8.3" @@ -9817,20 +8232,6 @@ name = "zeroize" version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] [[package]] name = "zerotrie" @@ -9982,39 +8383,14 @@ dependencies = [ [[patch.unused]] name = "egui_demo_lib" version = "0.37.0" - -[[patch.unused]] -name = "egui_extras" -version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" [[patch.unused]] name = "egui_inspection" version = "0.37.0" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" [[patch.unused]] name = "egui_system_font_provider" version = "0.37.0" - -[[patch.unused]] -name = "hayro" -version = "0.7.1" - -[[patch.unused]] -name = "hayro-cmap" -version = "0.1.0" - -[[patch.unused]] -name = "hayro-interpret" -version = "0.7.0" - -[[patch.unused]] -name = "hayro-postscript" -version = "0.1.0" - -[[patch.unused]] -name = "vello_common" -version = "0.0.8" - -[[patch.unused]] -name = "vello_cpu" -version = "0.0.8" +source = "git+https://github.com/storytold/egui.git?rev=b9770908e0f304896f9658d239a7b29cf8af1564#b9770908e0f304896f9658d239a7b29cf8af1564" diff --git a/Cargo.toml b/Cargo.toml index ad6250e92..6feeb7dce 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,8 @@ craft-pptx = { git = "https://github.com/storytold/craft-libs", rev = "0b8bbaf4c craft = { git = "https://github.com/storytold/craft-libs", rev = "0b8bbaf4c842da2d47de7b3fddd7170ba6115541", version = "0.1.0" } # Shared MCP stdio framing and protocol constants (craft-libs#778). craft-mcp-server = { git = "https://github.com/storytold/craft-libs", rev = "0b8bbaf4c842da2d47de7b3fddd7170ba6115541", version = "0.1.0" } +# Nightly profile isolation, launch protocol, and security fence. +craft-nightly = { git = "https://github.com/storytold/craft-libs", rev = "1f6c3a21f85ed96f8fd4ddd5a959d4e1edbedb24", version = "=0.1.0" } # internal deckcraft-geom = { path = "crates/geom" } deckcraft-color = { path = "crates/color" } diff --git a/apps/deckcraft/Cargo.toml b/apps/deckcraft/Cargo.toml index 98dabd726..784bff2bc 100644 --- a/apps/deckcraft/Cargo.toml +++ b/apps/deckcraft/Cargo.toml @@ -11,6 +11,7 @@ default-run = "deckcraft" workspace = true [dependencies] +craft-nightly = { workspace = true } deckcraft-engine = { workspace = true } deckcraft-ui-egui = { workspace = true } deckcraft-media = { workspace = true } diff --git a/apps/deckcraft/src/app_dirs.rs b/apps/deckcraft/src/app_dirs.rs index caa250c0e..a97e8ed48 100644 --- a/apps/deckcraft/src/app_dirs.rs +++ b/apps/deckcraft/src/app_dirs.rs @@ -8,29 +8,19 @@ //! `%APPDATA%\DeckCraft`, Linux `$XDG_CONFIG_HOME/deckcraft` or `~/.config/deckcraft`. //! //! DeckCraft has no portable mode and no `DECKCRAFT_CONFIG_DIR` override, so the stable resolution -//! is exactly the one `main.rs` used before the Nightly channel; the fence module -//! ([`crate::profile_root`]) still refuses a `DeckCraftData` folder or a `portable.txt` beside a -//! DeckCraft executable, which a hand-made portable copy could carry. +//! is exactly the one `main.rs` used before the Nightly channel; the `craft-nightly` fence +//! ([`crate::profile_root`]) still refuses a `portable.txt` marker beside a nightly executable. use std::ffi::OsString; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; use std::sync::OnceLock; -/// The portable data folder name a hand-made portable copy could use. No DeckCraft package -/// writes it, but the fence refuses a profile inside one (see [`crate::profile_root`]). -pub const PORTABLE_DATA_DIR: &str = "DeckCraftData"; - /// The marker file of a portable copy, beside its executable. pub const PORTABLE_MARKERS: [&str; 1] = ["portable.txt"]; -/// The portable marker in `dir`, when it is a regular file. -pub fn portable_marker(dir: &Path) -> Option { - PORTABLE_MARKERS.iter().map(|name| dir.join(name)).find(|path| path.is_file()) -} - #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum Mode { - /// The profile root chosen by the Launcher (`--launch-profile nightly-v1`). + /// The isolated Nightly profile root (from `--launch-profile nightly-v1` or direct self-isolation). Override, /// The platform convention (stable). Platform, @@ -95,26 +85,6 @@ pub fn user_dictionary() -> Option { user_dictionary_for(current()) } -/// The app's exclusive write probe: a new file created in `dir` and removed again. It never falls -/// back to another directory, so the Nightly validator can refuse a root it cannot write. -pub fn ensure_writable(dir: &Path) -> std::io::Result<()> { - // A probe left behind by an interrupted launch must not make a writable profile look - // unwritable, so each attempt uses a fresh name and a collision tries the next one. - // `create_new` still guarantees a create rather than a truncation. - for attempt in 0..8u32 { - let probe = dir.join(format!(".deckcraft-write-probe-{}-{attempt}", std::process::id())); - match std::fs::OpenOptions::new().write(true).create_new(true).open(&probe) { - Ok(file) => { - drop(file); - return std::fs::remove_file(probe); - } - Err(error) if error.kind() == std::io::ErrorKind::AlreadyExists => continue, - Err(error) => return Err(error), - } - } - Err(std::io::Error::new(std::io::ErrorKind::AlreadyExists, "no free write-probe name in the profile")) -} - #[cfg(test)] mod tests { use super::*; @@ -158,32 +128,4 @@ mod tests { assert!(std::ptr::eq(resolved, current())); assert_eq!(resolved.dir, config_dir()); } - - #[test] - fn permanent_probe_does_not_replace_an_existing_entry() { - let dir = std::env::temp_dir().join(format!("deckcraft-writable-{}-{}", std::process::id(), line!())); - std::fs::create_dir_all(&dir).unwrap(); - let probe = |attempt: u32| dir.join(format!(".deckcraft-write-probe-{}-{attempt}", std::process::id())); - // An entry already at the probe's name must never be truncated: the probe takes the next - // free name, and it removes only the file it created. - std::fs::write(probe(0), b"someone else's file").unwrap(); - ensure_writable(&dir).unwrap(); - assert_eq!(std::fs::read(probe(0)).unwrap(), b"someone else's file"); - assert!(!probe(1).exists()); - // Every name taken is an error, not a truncation of any of them. - for attempt in 0..8 { - std::fs::write(probe(attempt), b"someone else's file").unwrap(); - } - assert!(ensure_writable(&dir).is_err(), "no free probe name is reported, not truncated"); - for attempt in 0..8 { - assert_eq!(std::fs::read(probe(attempt)).unwrap(), b"someone else's file", "{attempt}"); - } - for attempt in 0..8 { - std::fs::remove_file(probe(attempt)).unwrap(); - } - // A folder whose stale probes were cleared is writable, and the probe leaves nothing behind. - ensure_writable(&dir).unwrap(); - assert_eq!(std::fs::read_dir(&dir).unwrap().count(), 0); - std::fs::remove_dir_all(&dir).unwrap(); - } } diff --git a/apps/deckcraft/src/build_flavor.rs b/apps/deckcraft/src/build_flavor.rs index fb05b758c..04b16966d 100644 --- a/apps/deckcraft/src/build_flavor.rs +++ b/apps/deckcraft/src/build_flavor.rs @@ -1,31 +1,13 @@ //! Build-time channel is distinct from a launch selector. A runtime environment cannot promote a stable build. -use crate::launch_profile::Profile; -use std::ffi::OsString; -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -pub enum BuildFlavor { - Stable, - NightlyV1, -} +pub use craft_nightly::BuildFlavor; pub const COMPILED: BuildFlavor = if cfg!(deckcraft_nightly_v1) { BuildFlavor::NightlyV1 } else { BuildFlavor::Stable }; -pub fn require_profile(flavor: BuildFlavor, profile: &Profile) -> Result<(), String> { - match (flavor, profile.is_nightly()) { - (BuildFlavor::NightlyV1, false) => Err("Open DeckCraft Nightly from ArtCraft Launcher".into()), - (BuildFlavor::Stable, true) => Err("This is a stable DeckCraft build; nightly-v1 requires the nightly build".into()), - _ => Ok(()), - } -} - pub fn needs_native_error(flavor: BuildFlavor, desktop_session: bool) -> bool { desktop_session && flavor == BuildFlavor::NightlyV1 } -pub fn version_query(args: &[OsString]) -> bool { - matches!(args, [arg] if arg == "--version" || arg == "-V") -} - pub fn version(flavor: BuildFlavor, stable: &str) -> String { match flavor { BuildFlavor::Stable => stable.to_owned(), @@ -35,7 +17,10 @@ pub fn version(flavor: BuildFlavor, stable: &str) -> String { #[cfg(test)] mod tests { + use std::ffi::OsString; + use super::*; + #[test] fn only_a_nightly_desktop_refusal_requests_a_native_dialog() { assert!(needs_native_error(BuildFlavor::NightlyV1, true)); @@ -45,28 +30,51 @@ mod tests { } #[test] - fn nightly_build_without_a_profile_is_refused_before_startup() { - let started = std::cell::Cell::new(false); - let result = require_profile(BuildFlavor::NightlyV1, &Profile::Stable).map(|()| started.set(true)); - assert!(result.unwrap_err().contains("ArtCraft Launcher")); - assert!(!started.get()); + fn nightly_direct_launch_self_isolates_into_canonical_profile_root() { + let spec = crate::profile_root::spec(); + let expected_root = craft_nightly::canonical_profile_root(crate::profile_root::APP_ID).unwrap(); + let launch = craft_nightly::parse_startup( + BuildFlavor::NightlyV1, + &spec, + [OsString::from("--sample"), OsString::from("deck.pptx")], + &crate::launch_profile::startup_options(), + ) + .unwrap(); + assert_eq!(launch.profile, craft_nightly::Profile::NightlyV1(expected_root)); + assert_eq!(launch.passthrough_args, [OsString::from("--sample"), OsString::from("deck.pptx")]); } #[test] - fn stable_and_nightly_flavors_accept_only_their_own_profile() { - let nightly = Profile::NightlyV1(std::path::PathBuf::from("already validated root")); - assert!(require_profile(BuildFlavor::Stable, &Profile::Stable).is_ok()); - assert!(require_profile(BuildFlavor::Stable, &nightly).is_err()); - assert!(require_profile(BuildFlavor::NightlyV1, &nightly).is_ok()); + fn stable_flavor_rejects_nightly_launch_flags() { + let spec = crate::profile_root::spec(); + let root = if cfg!(windows) { r"C:\NightlyData\profiles\deckcraft" } else { "/nightly-data/profiles/deckcraft" }; + let result = craft_nightly::parse_startup( + BuildFlavor::Stable, + &spec, + [ + OsString::from(craft_nightly::LAUNCH_PROFILE_FLAG), + OsString::from(craft_nightly::NIGHTLY_V1_CONTRACT), + OsString::from(craft_nightly::PROFILE_ROOT_FLAG), + OsString::from(root), + ], + &crate::launch_profile::startup_options(), + ); + assert!(matches!(result, Err(craft_nightly::ProfileError::NightlyFlagsInStableBuild))); } #[test] fn nightly_version_query_is_unambiguous_and_never_reinterprets_file_arguments() { + let spec = crate::profile_root::spec(); + let opts = crate::launch_profile::startup_options(); assert_eq!(version(BuildFlavor::Stable, "0.19.0"), "0.19.0"); assert_eq!(version(BuildFlavor::NightlyV1, "0.19.0"), "0.19.0 (nightly-v1)"); - assert!(version_query(&["--version".into()])); - assert!(version_query(&["-V".into()])); - assert!(!version_query(&["--".into(), "--version".into()])); - assert!(!version_query(&[])); + assert!(craft_nightly::parse_startup(BuildFlavor::NightlyV1, &spec, [OsString::from("--version")], &opts).unwrap().is_version_query()); + assert!(craft_nightly::parse_startup(BuildFlavor::NightlyV1, &spec, [OsString::from("-V")], &opts).unwrap().is_version_query()); + assert!( + !craft_nightly::parse_startup(BuildFlavor::NightlyV1, &spec, [OsString::from("--"), OsString::from("--version")], &opts) + .unwrap() + .is_version_query() + ); + assert!(!craft_nightly::parse_startup(BuildFlavor::NightlyV1, &spec, Vec::::new(), &opts).unwrap().is_version_query()); } } diff --git a/apps/deckcraft/src/launch_profile.rs b/apps/deckcraft/src/launch_profile.rs index fd95c757a..ce42b27e8 100644 --- a/apps/deckcraft/src/launch_profile.rs +++ b/apps/deckcraft/src/launch_profile.rs @@ -1,221 +1,105 @@ -//! Launcher-owned nightly-v1 bootstrap. Selected before logging, updates, fonts or saved state. -//! Stable launches retain their original arguments and directory policy. No environment mutation. +//! Nightly-v1 bootstrap powered by `craft-nightly`. Selected before logging, updates, fonts or +//! saved state. Stable launches retain their original arguments and directory policy; direct +//! nightly launches self-isolate into [`craft_nightly::canonical_profile_root`]. use std::ffi::OsString; -use std::path::{Component, Path, PathBuf}; -use std::sync::OnceLock; -pub const VERSION: &str = "nightly-v1"; - -#[derive(Clone, Debug, PartialEq, Eq)] -pub enum Profile { - Stable, - NightlyV1(PathBuf), -} - -impl Profile { - pub fn is_nightly(&self) -> bool { - matches!(self, Self::NightlyV1(_)) - } - - pub fn root(&self) -> Option<&Path> { - match self { - Self::Stable => None, - Self::NightlyV1(root) => Some(root), - } - } -} - -#[derive(Debug, PartialEq, Eq)] -pub struct Launch { - pub profile: Profile, - pub args: Vec, -} - -static PROFILE: OnceLock = OnceLock::new(); +use craft_nightly::{BuildFlavor, Launch, Profile, ProfileError, StartupOptions}; pub fn current() -> &'static Profile { - PROFILE.get().unwrap_or(&Profile::Stable) + craft_nightly::current().unwrap_or(&Profile::Stable) } -pub fn install(profile: Profile) -> Result<(), String> { - PROFILE.set(profile).map_err(|_| "the launch profile was already selected".into()) +pub fn startup_options() -> StartupOptions { + StartupOptions::new() } -/// Recognize only the agreed literal selector/root pair before `--`. Everything after it is -/// a file, even when it looks like a profile flag. No filesystem or startup hook runs here. -pub fn parse(args: Vec) -> Result { - let mut selector = None; - let mut root = None; - let mut other = Vec::new(); - let mut files = Vec::new(); - let mut iter = args.iter(); - let mut delimiter = false; - while let Some(arg) = iter.next() { - if arg == "--" { - delimiter = true; - files.extend(iter.cloned()); - break; - } - if arg == "--launch-profile" || arg == "--profile-root" { - let slot = if arg == "--launch-profile" { &mut selector } else { &mut root }; - if slot.is_some() { - return Err("the profile selector and root must each occur exactly once".into()); - } - let value = iter.next().filter(|v| !v.is_empty()).ok_or("the profile selector/root needs a value")?; - if value.to_string_lossy().starts_with("--") { - return Err("the profile selector/root needs a value".into()); - } - *slot = Some(value.clone()); - } else if arg.to_string_lossy().starts_with("--launch-profile=") || arg.to_string_lossy().starts_with("--profile-root=") { - return Err("the nightly protocol requires separate literal selector/root argument tokens".into()); - } else { - other.push(arg.clone()); - } - } - match (selector, root) { - (None, None) => Ok(Launch { profile: Profile::Stable, args }), - (Some(version), Some(root)) if version == VERSION => { - if !delimiter || !other.is_empty() { - return Err("nightly-v1 accepts only its selector/root followed by -- and file names".into()); - } - let root = PathBuf::from(root); - if !root.is_absolute() || root.components().any(|c| matches!(c, Component::ParentDir)) { - return Err("the nightly profile root must be absolute and contain no parent traversal".into()); - } - Ok(Launch { profile: Profile::NightlyV1(root), args: std::iter::once(OsString::from("--")).chain(files).collect() }) - } - (Some(_), Some(_)) => Err("unsupported launch profile (expected nightly-v1)".into()), - _ => Err("--launch-profile and --profile-root must be supplied together".into()), - } -} - -/// The Launcher's version check: the selector/root pair followed by exactly `--version` (or `-V`), -/// answered like a plain version query. Only [`parse`]'s lexical checks apply; the root is never -/// validated or touched, and `-- --version` stays a file name. -pub fn version_query(args: &[OsString]) -> bool { - let Some((last, pair)) = args.split_last() else { return false }; - if last != "--version" && last != "-V" { - return false; - } - let lexical = pair.iter().cloned().chain(std::iter::once(OsString::from("--"))).collect(); - matches!(parse(lexical), Ok(Launch { profile: Profile::NightlyV1(_), args }) if args.len() == 1) -} - -/// Validation finishes before the caller's first startup effect. Stable never calls the nightly -/// root validator, so its old config resolution stays unchanged. -pub fn prepare(mut launch: Launch, validate: impl FnOnce(&Path) -> Result) -> Result { - if let Profile::NightlyV1(root) = &launch.profile { - launch.profile = Profile::NightlyV1(validate(root)?); - } - Ok(launch) -} - -/// Resolve the selected private root before the caller's first startup effect. -pub fn validate_root(root: &Path, env: impl Fn(&str) -> Option, exe: Option<&Path>) -> Result { - crate::profile_root::validate(root, env, exe, crate::app_dirs::ensure_writable) +/// Parses startup arguments for `flavor`, validates and prepares the isolated profile root when +/// running as [`BuildFlavor::NightlyV1`], and installs the resolved profile process-wide. +pub fn prepare(flavor: BuildFlavor, args: impl IntoIterator) -> Result { + let spec = crate::profile_root::spec(); + craft_nightly::prepare_launch(flavor, &spec, args, &startup_options()) } #[cfg(test)] mod tests { + use std::path::PathBuf; + + use craft_nightly::{LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT, PROFILE_ROOT_FLAG, canonical_profile_root, parse_startup}; + use super::*; - use std::cell::Cell; + fn args(values: &[&str]) -> Vec { values.iter().map(OsString::from).collect() } + fn absolute() -> &'static str { if cfg!(windows) { r"C:\NightlyData\profiles\deckcraft" } else { "/nightly-data/profiles/deckcraft" } } - fn nightly() -> Vec { - args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--"]) - } - - /// The process installs one profile; later answers are read-only and a second install fails. - #[test] - fn the_process_installs_its_profile_once() { - assert_eq!(current(), &Profile::Stable, "an unselected process is a stable launch"); - assert!(install(Profile::Stable).is_ok()); - assert_eq!(current(), &Profile::Stable); - assert!(install(Profile::Stable).is_err()); - } #[test] - fn stable_arguments_and_directory_policy_are_unchanged() { + fn stable_arguments_and_profile_are_unchanged() { + let spec = crate::profile_root::spec(); for argv in [args(&[]), args(&["--sample", "a.pptx"]), args(&["--", "--launch-profile", "file.pptx"])] { - let launch = prepare(parse(argv.clone()).unwrap(), |_| panic!("stable must never validate a nightly root")).unwrap(); - assert_eq!(launch, Launch { profile: Profile::Stable, args: argv }); + let launch = parse_startup(BuildFlavor::Stable, &spec, argv.clone(), &startup_options()).unwrap(); + assert_eq!(launch.profile, Profile::Stable); + assert_eq!(launch.passthrough_args, argv); } } #[test] - fn exact_version_and_root_are_parsed_without_reinterpreting_file_names() { - let mut argv = nightly(); - argv.extend(args(&["--profile-root", "talk with spaces.pptx"])); - let launch = parse(argv).unwrap(); + fn explicit_launcher_arguments_are_parsed_without_reinterpreting_file_names() { + let spec = crate::profile_root::spec(); + let argv = args(&[LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT, PROFILE_ROOT_FLAG, absolute(), "--", "--profile-root", "talk with spaces.pptx"]); + let launch = parse_startup(BuildFlavor::NightlyV1, &spec, argv, &startup_options()).unwrap(); assert_eq!(launch.profile, Profile::NightlyV1(PathBuf::from(absolute()))); - assert_eq!(launch.args, args(&["--", "--profile-root", "talk with spaces.pptx"])); + assert_eq!(launch.passthrough_args, args(&["--profile-root", "talk with spaces.pptx"])); } #[test] - fn missing_duplicate_unknown_and_conflicting_profile_arguments_are_refused() { - for argv in [ - args(&["--launch-profile", VERSION]), - args(&["--profile-root", absolute()]), - args(&["--launch-profile", "future-v2", "--profile-root", absolute(), "--"]), - args(&["--launch-profile", VERSION, "--launch-profile", VERSION, "--profile-root", absolute(), "--"]), - args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--profile-root", absolute(), "--"]), - args(&["--launch-profile", VERSION, "--profile-root", "relative", "--"]), - args(&["--launch-profile", VERSION, "--profile-root", "", "--"]), - args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--control", "4242", "--"]), - args(&["--launch-profile", VERSION, "--profile-root", absolute()]), - args(&["--launch-profile=nightly-v1", "--profile-root", absolute(), "--"]), - ] { - assert!(parse(argv).is_err()); - } + fn direct_nightly_launch_self_isolates_and_preserves_user_args() { + let spec = crate::profile_root::spec(); + let expected_root = canonical_profile_root(crate::profile_root::APP_ID).unwrap(); + let launch = parse_startup(BuildFlavor::NightlyV1, &spec, args(&["--show", "deck.ppsx"]), &startup_options()).unwrap(); + assert_eq!(launch.profile, Profile::NightlyV1(expected_root)); + assert_eq!(launch.passthrough_args, args(&["--show", "deck.ppsx"])); } #[test] - fn the_launcher_version_check_is_a_version_query_only_in_its_exact_form() { - let pair = &["--launch-profile", VERSION, "--profile-root", absolute()]; - let reversed = &["--profile-root", absolute(), "--launch-profile", VERSION]; - for flag in ["--version", "-V"] { - for form in [pair, reversed] { - let mut argv = args(form); - argv.push(flag.into()); - assert!(version_query(&argv), "{argv:?}"); - } - } + fn launcher_and_plain_version_queries_are_recognized() { + let spec = crate::profile_root::spec(); for argv in [ args(&["--version"]), - args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--", "--version"]), - args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--version", "--"]), - args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--control", "1", "--version"]), - args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--version", "--version"]), - args(&["--version", "--launch-profile", VERSION, "--profile-root", absolute()]), - args(&["--launch-profile", "future-v2", "--profile-root", absolute(), "--version"]), - args(&["--launch-profile", VERSION, "--profile-root", "relative", "--version"]), - args(&["--launch-profile", VERSION, "--version"]), - args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--help"]), + args(&["-V"]), + args(&[LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT, PROFILE_ROOT_FLAG, absolute(), "--version"]), + args(&[PROFILE_ROOT_FLAG, absolute(), LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT, "-V"]), + args(&[LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT, PROFILE_ROOT_FLAG, absolute(), "--", "--version"]), ] { - assert!(!version_query(&argv), "{argv:?}"); + let launch = parse_startup(BuildFlavor::NightlyV1, &spec, argv.clone(), &startup_options()).unwrap(); + assert!(launch.is_version_query(), "{argv:?}"); + } + for argv in [ + args(&[LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT, PROFILE_ROOT_FLAG, absolute(), "--version", "--version"]), + args(&[LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT, PROFILE_ROOT_FLAG, absolute(), "--help"]), + ] { + let launch = parse_startup(BuildFlavor::NightlyV1, &spec, argv.clone(), &startup_options()).unwrap(); + assert!(!launch.is_version_query(), "{argv:?}"); } - // Outside the query the strict protocol still refuses the version flag. - assert!(parse(args(&["--launch-profile", VERSION, "--profile-root", absolute(), "--version"])).is_err()); } #[test] - fn failed_root_validation_never_reaches_startup_or_falls_back_to_stable() { - let reached = Cell::new(false); - let result = prepare(parse(nightly()).unwrap(), |_| Err("read-only or unsafe profile".into())).map(|_| reached.set(true)); - assert!(result.is_err()); - assert!(!reached.get()); - } - - #[test] - fn successful_root_validation_keeps_the_persistent_root_not_the_binary_tag() { - let checked = PathBuf::from(absolute()).join("checked"); - let launch = prepare(parse(nightly()).unwrap(), |_| Ok(checked.clone())).unwrap(); - assert_eq!(launch.profile.root(), Some(checked.as_path())); - assert!(launch.profile.is_nightly()); + fn missing_duplicate_unknown_and_misplaced_profile_arguments_are_refused() { + let spec = crate::profile_root::spec(); + for argv in [ + args(&[LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT]), + args(&[PROFILE_ROOT_FLAG, absolute()]), + args(&[LAUNCH_PROFILE_FLAG, "future-v2", PROFILE_ROOT_FLAG, absolute(), "--"]), + args(&[LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT, LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT, PROFILE_ROOT_FLAG, absolute(), "--"]), + args(&[LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT, PROFILE_ROOT_FLAG, absolute(), PROFILE_ROOT_FLAG, absolute(), "--"]), + args(&[LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT, PROFILE_ROOT_FLAG, "", "--"]), + args(&["--sample", LAUNCH_PROFILE_FLAG, NIGHTLY_V1_CONTRACT, PROFILE_ROOT_FLAG, absolute()]), + ] { + assert!(parse_startup(BuildFlavor::NightlyV1, &spec, argv.clone(), &startup_options()).is_err(), "{argv:?}"); + } } } diff --git a/apps/deckcraft/src/main.rs b/apps/deckcraft/src/main.rs index 8f487e485..23c2fee51 100644 --- a/apps/deckcraft/src/main.rs +++ b/apps/deckcraft/src/main.rs @@ -187,42 +187,44 @@ fn app_icon() -> Option { /// Select the immutable launch profile before any startup service or side effect. fn prepare_launch() -> Option> { - // The trusted Launcher protocol is decided before logger/crash/update/font/prefs access. + // The trusted Launcher protocol (or direct nightly self-isolation) is decided before + // logger/crash/update/font/prefs access. let argv: Vec<_> = std::env::args_os().skip(1).collect(); - // Plain `--version`, or the Launcher's `--launch-profile nightly-v1 --profile-root - // --version`: answered before root validation, process identity, IPC or any window. - if build_flavor::COMPILED == build_flavor::BuildFlavor::NightlyV1 && (build_flavor::version_query(&argv) || launch_profile::version_query(&argv)) + // Preserve standalone version probes in environments without a resolvable profile directory. + if build_flavor::COMPILED == build_flavor::BuildFlavor::NightlyV1 + && argv.len() == 1 + && argv.first().is_some_and(|arg| arg == "--version" || arg == "-V") { use std::io::Write as _; let _ = writeln!(std::io::stdout(), "DeckCraft {}", build_flavor::version(build_flavor::COMPILED, deckcraft_ui_egui::flavor::version())); return None; } - let early = launch_profile::parse(argv) - .and_then(|launch| { - build_flavor::require_profile(build_flavor::COMPILED, &launch.profile)?; - initialize_nightly_process_identity().map_err(|error| error.to_string())?; - Ok(launch) - }) - .and_then(|launch| { - launch_profile::prepare(launch, |root| { - launch_profile::validate_root(root, |key| std::env::var_os(key), std::env::current_exe().ok().as_deref()) - }) - }) - .unwrap_or_else(|error| { - report_launch_profile_error(&error); - std::process::exit(2) - }); + let early = launch_profile::prepare(build_flavor::COMPILED, argv).unwrap_or_else(|error| { + report_launch_profile_error(&error.to_string()); + std::process::exit(2) + }); + // Plain `--version`, or the Launcher's `--launch-profile nightly-v1 --profile-root + // [--] --version`: answered before process identity, IPC or any window. + if build_flavor::COMPILED == build_flavor::BuildFlavor::NightlyV1 && early.is_version_query() { + use std::io::Write as _; + let _ = writeln!(std::io::stdout(), "DeckCraft {}", build_flavor::version(build_flavor::COMPILED, deckcraft_ui_egui::flavor::version())); + return None; + } + if let Err(error) = initialize_nightly_process_identity() { + report_launch_profile_error(&error.to_string()); + std::process::exit(2); + } let identity = if early.profile.is_nightly() { deckcraft_ui_egui::os_window::LaunchIdentity::NightlyV1 } else { deckcraft_ui_egui::os_window::LaunchIdentity::Stable }; - if let Err(error) = launch_profile::install(early.profile).and_then(|()| deckcraft_ui_egui::os_window::select_identity(identity)) { + if let Err(error) = deckcraft_ui_egui::os_window::select_identity(identity) { report_launch_profile_error(&error); std::process::exit(2); } - Some(early.args) + Some(early.passthrough_args) } fn initialize_nightly_process_identity() -> Result<(), process_identity::IdentityError> { diff --git a/apps/deckcraft/src/profile_root.rs b/apps/deckcraft/src/profile_root.rs index 3880b31ef..10a816b60 100644 --- a/apps/deckcraft/src/profile_root.rs +++ b/apps/deckcraft/src/profile_root.rs @@ -1,697 +1,238 @@ -//! App-owned nightly profile fences; no stable fallback, migration or process environment changes. +//! DeckCraft's nightly profile specification and extra forbidden-root fence for `craft-nightly`. use std::ffi::OsString; +use std::path::PathBuf; -use crate::app_dirs::{PORTABLE_DATA_DIR, portable_marker}; -use std::path::{Component, Path, PathBuf}; +use craft_nightly::AppProfileSpec; -/// The DeckCraft Nightly Flatpak app id (`packaging/linux/flatpak-bundle.sh`), the one Flatpak -/// instance a Nightly profile may inherit. -pub const NIGHTLY_FLATPAK_ID: &str = "ai.storyteller.deckcraft.nightly"; +/// Canonical application identifier for DeckCraft nightly profile isolation. +pub const APP_ID: &str = "deckcraft"; -#[derive(Clone, Copy, Debug, PartialEq, Eq)] -enum Platform { - Windows, - Linux, - Mac, +const STABLE_DIR_NAMES: &[&str] = &["DeckCraft", "deckcraft"]; +const FOLDER_ONLY_ENTRIES: &[&str] = &["Recovery", "Dictionaries", crate::LOG_DIR]; + +/// Builds DeckCraft's [`AppProfileSpec`] for `craft-nightly`, preserving DeckCraft's exact +/// stable directory names, portable markers, folder-only entries, and OS-specific extra +/// forbidden roots. +pub fn spec() -> AppProfileSpec { + spec_with(|k| std::env::var_os(k)) } -impl Platform { - fn current() -> Result { - match std::env::consts::OS { - "windows" => Ok(Self::Windows), - "linux" => Ok(Self::Linux), - "macos" => Ok(Self::Mac), - _ => Err("nightly-v1 is not defined for this operating system".into()), +fn spec_with(env: impl Fn(&str) -> Option) -> AppProfileSpec { + AppProfileSpec { + app_id: APP_ID, + display_name: "DeckCraft", + stable_dir_names: STABLE_DIR_NAMES, + stable_package_id: "ai.storyteller.deckcraft", + nightly_package_id: "ai.storyteller.deckcraft.nightly", + profile_root_env: None, + forbidden_env_vars: &[], + portable_markers: &crate::app_dirs::PORTABLE_MARKERS, + folder_only_entries: FOLDER_ONLY_ENTRIES, + extra_forbidden_roots: extra_forbidden_roots(env), + } +} + +#[cfg(any(unix, target_os = "windows"))] +fn non_empty_abs(env: &impl Fn(&str) -> Option, key: &str) -> Option { + let value = env(key)?; + if value.is_empty() { + return None; + } + let path = PathBuf::from(value); + path.is_absolute().then_some(path) +} + +fn extra_forbidden_roots(env: impl Fn(&str) -> Option) -> Vec { + #[cfg(target_os = "windows")] + { + let mut roots = Vec::new(); + // The MSI's default per-user and per-machine folders (install-policy.wxi). + if let Some(local) = non_empty_abs(&env, "LOCALAPPDATA") { + roots.push(local.join("Programs").join("ArtCraft").join("DeckCraft")); } - } - - fn ignores_case(self) -> bool { - self != Self::Linux - } -} - -fn absolute(path: PathBuf, label: &str) -> Result { - if !path.is_absolute() || path.components().any(|c| matches!(c, Component::ParentDir)) { - return Err(format!("{label} must be absolute and contain no parent traversal")); - } - Ok(path) -} - -fn required_base(env: &impl Fn(&str) -> Option, key: &str) -> Result { - let value = env(key).filter(|v| !v.is_empty()).ok_or_else(|| format!("cannot establish the stable {key} boundary"))?; - absolute(PathBuf::from(value), key) -} - -fn xdg_base(env: &impl Fn(&str) -> Option, key: &str, fallback: &str) -> Result { - match env(key).filter(|v| !v.is_empty()) { - Some(value) => absolute(PathBuf::from(value), key), - None => Ok(required_base(env, "HOME")?.join(fallback)), - } -} - -/// Resolve existing ancestors before creating anything. A dangling link or inaccessible ancestor -/// is not a missing directory that may be replaced or followed later. -fn canonical_future(path: &Path) -> Result { - let mut parent = path; - let mut missing = Vec::new(); - loop { - match std::fs::symlink_metadata(parent) { - Ok(_) => break, - Err(error) if error.kind() == std::io::ErrorKind::NotFound => { - missing.push(parent.file_name().ok_or("the profile root has no existing ancestor")?.to_os_string()); - parent = parent.parent().ok_or("the profile root has no existing ancestor")?; + for key in ["ProgramW6432", "ProgramFiles", "ProgramFiles(x86)"] { + if let Some(base) = non_empty_abs(&env, key) { + roots.push(base.join("ArtCraft").join("DeckCraft")); } - Err(error) => return Err(format!("cannot inspect the profile boundary: {error}")), } + roots } - let mut resolved = std::fs::canonicalize(parent).map_err(|e| format!("cannot resolve the profile boundary: {e}"))?; - for part in missing.into_iter().rev() { - resolved.push(part); - } - Ok(resolved) -} - -fn overlaps(a: &Path, b: &Path, platform: Platform) -> bool { - let parts = |p: &Path| { - p.components() - .map(|c| { - let value = c.as_os_str().to_string_lossy().into_owned(); - if platform.ignores_case() { value.to_lowercase() } else { value } - }) - .collect::>() - }; - let (a, b) = (parts(a), parts(b)); - a.starts_with(&b) || b.starts_with(&a) -} - -fn installation_boundary(platform: Platform, exe: &Path) -> Result { - let parent = exe.parent().ok_or("cannot establish the installation boundary")?; - if platform == Platform::Mac { - // A profile in Resources is still inside the versioned install, not beside MacOS. - if let Some(bundle) = exe.ancestors().find(|p| p.extension().is_some_and(|ext| ext.eq_ignore_ascii_case("app"))) { - return Ok(bundle.to_path_buf()); - } - } - Ok(parent.to_path_buf()) -} - -fn forbidden_roots(platform: Platform, env: &impl Fn(&str) -> Option, exe: &Path) -> Result, String> { - let mut roots = match platform { - Platform::Windows => { - let mut roots = ["APPDATA", "LOCALAPPDATA"] - .into_iter() - .map(|key| required_base(env, key).map(|p| p.join("DeckCraft"))) - .collect::, _>>()?; - // The MSI's default per-user and per-machine folders (install-policy.wxi). A custom - // install folder is not known here; the executable's own folder is fenced below. - roots.push(required_base(env, "LOCALAPPDATA")?.join("Programs").join("ArtCraft").join("DeckCraft")); - for key in ["ProgramW6432", "ProgramFiles", "ProgramFiles(x86)"] { - if let Some(base) = env(key).filter(|v| !v.is_empty()) { - roots.push(absolute(PathBuf::from(base), key)?.join("ArtCraft").join("DeckCraft")); - } - } - roots - } - Platform::Linux => { - let mut roots = - [("XDG_CONFIG_HOME", ".config"), ("XDG_DATA_HOME", ".local/share"), ("XDG_CACHE_HOME", ".cache"), ("XDG_STATE_HOME", ".local/state")] - .into_iter() - .map(|(key, fallback)| xdg_base(env, key, fallback).map(|p| p.join("deckcraft"))) - .collect::, _>>()?; - roots.extend(["/usr/bin/deckcraft", "/usr/local/bin/deckcraft", "/opt/deckcraft"].map(PathBuf::from)); - // The stable Flatpak keeps its data in its own per-app folder. - roots.push(required_base(env, "HOME")?.join(".var/app/ai.storyteller.deckcraft")); - roots - } - Platform::Mac => { - let home = required_base(env, "HOME")?; + #[cfg(target_os = "macos")] + { + let mut roots = vec![PathBuf::from("/Applications/DeckCraft.app")]; + if let Some(home) = non_empty_abs(&env, "HOME") { let library = home.join("Library"); - vec![ - library.join("Application Support/DeckCraft"), - library.join("Caches/DeckCraft"), - library.join("Caches/ai.storyteller.deckcraft"), - library.join("Preferences/DeckCraft"), - library.join("Preferences/ai.storyteller.deckcraft.plist"), - library.join("Saved Application State/ai.storyteller.deckcraft.savedState"), - home.join("Applications/DeckCraft.app"), - PathBuf::from("/Applications/DeckCraft.app"), - ] + roots.push(library.join("Preferences/ai.storyteller.deckcraft.plist")); + roots.push(library.join("Saved Application State/ai.storyteller.deckcraft.savedState")); + roots.push(home.join("Applications/DeckCraft.app")); } - }; - roots.push(installation_boundary(platform, exe)?); - roots.into_iter().map(|p| canonical_future(&p)).collect() -} - -fn private_subdirectory(root: &Path, name: impl AsRef, label: &str) -> Result { - let chosen = canonical_future(&absolute(root.to_path_buf(), "the nightly profile root")?)?; - let child = canonical_future(&chosen.join(name))?; - if child == chosen || !child.starts_with(&chosen) { - return Err(format!("the nightly {label} must stay inside its selected profile")); + roots } - Ok(child) -} - -/// Every existing entry directly in the profile (Dictionaries, logs, settings and so on) must -/// resolve inside it, so a link there cannot point Nightly's writes at another app's data. -fn entries_stay_inside(root: &Path) -> Result<(), String> { - let entries = match std::fs::read_dir(root) { - Ok(entries) => entries, - Err(error) if error.kind() == std::io::ErrorKind::NotFound => return Ok(()), - Err(error) => return Err(format!("cannot inspect the nightly profile: {error}")), - }; - for entry in entries { - let entry = entry.map_err(|e| format!("cannot inspect the nightly profile: {e}"))?; - let path = entry.path(); - let metadata = std::fs::symlink_metadata(&path).map_err(|e| format!("cannot inspect the nightly profile: {e}"))?; - // Settings and session state are ordinary files, not directories. Keep the existing - // directory-boundary check for folders (including the known folder-only entries). - let folder_only = PROFILE_FOLDERS.iter().any(|name| entry.file_name().eq_ignore_ascii_case(name)); - if metadata.is_file() { - if folder_only { - return Err(format!("the nightly {} must be a directory", entry.file_name().to_string_lossy())); - } - private_regular_file(&path, &metadata)?; - } else { - private_subdirectory(root, entry.file_name(), "profile entry")?; - } - } - // The one nested file Nightly writes itself: a link at Dictionaries/user.dic would append - // "add to dictionary" words to the stable app's file instead of this profile's. - private_subdirectory(root, std::path::Path::new("Dictionaries").join("user.dic"), "user dictionary")?; - Ok(()) -} - -/// Persisted files must have their own ordinary file identity, not an alias to other data. -fn private_regular_file(path: &Path, metadata: &std::fs::Metadata) -> Result<(), String> { - #[cfg(unix)] + #[cfg(all(unix, not(target_os = "macos")))] { - use std::os::unix::fs::MetadataExt as _; - if metadata.nlink() != 1 { - return Err("the nightly profile file must not be shared".into()); + let mut roots = vec![PathBuf::from("/usr/bin/deckcraft"), PathBuf::from("/usr/local/bin/deckcraft"), PathBuf::from("/opt/deckcraft")]; + // The stable Flatpak keeps its data in its own per-app folder. + if let Some(home) = non_empty_abs(&env, "HOME") { + roots.push(home.join(".var/app/ai.storyteller.deckcraft")); } + roots } - #[cfg(windows)] + #[cfg(not(any(unix, target_os = "windows")))] { - use winsafe::{HFILE, co}; - let (file, _) = HFILE::CreateFile( - path.to_str().ok_or("the nightly profile file path is not textual")?, - co::GENERIC::default(), - Some(co::FILE_SHARE::READ | co::FILE_SHARE::WRITE | co::FILE_SHARE::DELETE), - None, - co::DISPOSITION::OPEN_EXISTING, - co::FILE_ATTRIBUTE::NORMAL, - Some(co::FILE_FLAG::OPEN_REPARSE_POINT), - None, - None, - ) - .map_err(|e| e.to_string())?; - let info = file.GetFileInformationByHandle().map_err(|e| e.to_string())?; - if info.dwFileAttributes.has(co::FILE_ATTRIBUTE::REPARSE_POINT | co::FILE_ATTRIBUTE::DIRECTORY) { - return Err("the nightly profile file must not be an alias or directory".into()); - } - if info.nNumberOfLinks != 1 { - return Err("the nightly profile file must not be shared".into()); - } + let _ = env; + Vec::new() } - let _ = (path, metadata); - Ok(()) } -/// Recognise a portable data namespace in both the supplied and resolved path. DeckCraft ships no -/// portable package, so this only refuses a hand-made copy; it is not an inventory of arbitrary -/// custom Stable overrides or a Launcher ownership proof. -fn is_portable_layout(path: &Path, platform: Platform) -> bool { - // Above the chosen folder itself, a marker only counts beside a DeckCraft executable, so an - // unrelated portable.txt higher up (in a user folder or at a drive root) does not refuse it. - path.ancestors().enumerate().any(|(depth, ancestor)| { - portable_marker(ancestor).is_some() && (depth == 0 || ["deckcraft.exe", "deckcraft"].iter().any(|exe| ancestor.join(exe).is_file())) - }) || path.components().any(|component| match component { - Component::Normal(name) if platform.ignores_case() => name.to_string_lossy().eq_ignore_ascii_case(PORTABLE_DATA_DIR), - Component::Normal(name) => name == PORTABLE_DATA_DIR, - _ => false, - }) -} - -/// The writable hook is the app's existing exclusive probe. Keeping it injected lets filesystem -/// boundary tests exercise the real policy without starting the app or changing global state. -pub fn validate( - root: &Path, - env: impl Fn(&str) -> Option, - exe: Option<&Path>, - writable: impl FnOnce(&Path) -> std::io::Result<()>, -) -> Result { - validate_for(Platform::current()?, root, env, exe, writable) -} - -fn validate_for( - platform: Platform, - root: &Path, - env: impl Fn(&str) -> Option, - exe: Option<&Path>, - writable: impl FnOnce(&Path) -> std::io::Result<()>, -) -> Result { - absolute(root.to_path_buf(), "the nightly profile root")?; - if let Some(id) = env("FLATPAK_ID").filter(|v| !v.is_empty()) { - // The native tar and app-bundle rows are not Flatpak packages: inheriting a Flatpak - // runtime could point another profile at the stable app's data. DeckCraft Nightly's own - // Flatpak (packaging/linux/flatpak-bundle.sh) is the one allowed instance, matched by its - // exact id; the stable id and any other app are refused. - if platform == Platform::Windows || id != NIGHTLY_FLATPAK_ID { - return Err("nightly-v1 accepts only the DeckCraft Nightly Flatpak instance; launch through the native Launcher".into()); - } - } - let chosen = canonical_future(root)?; - if is_portable_layout(root, platform) || is_portable_layout(&chosen, platform) { - return Err("the nightly root must not use a portable DeckCraft copy or its DeckCraftData settings folder".into()); - } - let exe = absolute(exe.ok_or("cannot establish the installation boundary")?.to_path_buf(), "the executable")?; - let forbidden = forbidden_roots(platform, &env, &exe)?; - if forbidden.iter().any(|stable| overlaps(&chosen, stable, platform)) { - return Err("the nightly root must not overlap stable data or an installation".into()); - } - entries_stay_inside(&chosen)?; - // Recovery can read, adopt, overwrite and sweep entries. Never let its alias leave this - // private profile, including toward a Stable portable directory not in our known roots. - private_subdirectory(&chosen, "Recovery", "recovery folder")?; - private_subdirectory(&chosen, "Dictionaries", "dictionary folder")?; - let mut create = std::fs::DirBuilder::new(); - create.recursive(true); - #[cfg(unix)] - { - use std::os::unix::fs::DirBuilderExt as _; - create.mode(0o700); - } - create.create(&chosen).map_err(|e| format!("cannot create the nightly profile: {e}"))?; - let confirmed = std::fs::canonicalize(&chosen).map_err(|e| format!("cannot resolve the created nightly profile: {e}"))?; - if confirmed != chosen || forbidden.iter().any(|stable| overlaps(&confirmed, stable, platform)) { - return Err("the nightly profile changed while it was being validated".into()); - } - private_subdirectory(&confirmed, "Recovery", "recovery folder")?; - private_subdirectory(&confirmed, "Dictionaries", "dictionary folder")?; - entries_stay_inside(&confirmed)?; - writable(&confirmed).map_err(|e| format!("the nightly profile is not writable: {e}"))?; - Ok(confirmed) -} - -const PROFILE_FOLDERS: [&str; 3] = ["Recovery", "Dictionaries", crate::LOG_DIR]; - #[cfg(test)] mod tests { - use super::*; use std::collections::BTreeMap; + use std::path::Path; use std::sync::atomic::{AtomicU64, Ordering}; - struct Fixture { - root: PathBuf, - env: BTreeMap, - exe: PathBuf, - } + use craft_nightly::{ProfileError, validate_and_prepare_root}; - impl Fixture { - fn new() -> Self { + use super::*; + + struct TempDir(PathBuf); + + impl TempDir { + fn new(label: &str) -> Self { static NEXT: AtomicU64 = AtomicU64::new(0); let root = loop { - let candidate = - std::env::temp_dir().join(format!("deckcraft-profile-policy-{}-{}", std::process::id(), NEXT.fetch_add(1, Ordering::Relaxed))); + let candidate = std::env::temp_dir().join(format!( + "deckcraft-profile-spec-{label}-{}-{}", + std::process::id(), + NEXT.fetch_add(1, Ordering::Relaxed) + )); match std::fs::create_dir(&candidate) { Ok(()) => break std::fs::canonicalize(candidate).unwrap(), Err(error) if error.kind() == std::io::ErrorKind::AlreadyExists => continue, - Err(error) => panic!("cannot create owned fixture: {error}"), + Err(error) => panic!("cannot create temp dir: {error}"), } }; - let home = root.join("home"); - let exe = root.join("install/deckcraft"); - std::fs::create_dir_all(&home).unwrap(); - std::fs::create_dir_all(exe.parent().unwrap()).unwrap(); - std::fs::write(&exe, b"fixture executable, never run").unwrap(); - let env = [("HOME", home), ("APPDATA", root.join("roaming")), ("LOCALAPPDATA", root.join("local"))] - .into_iter() - .map(|(key, value)| (key.into(), value.into_os_string())) - .collect(); - Self { root, env, exe } + Self(root) } - fn get(&self, key: &str) -> Option { - self.env.get(key).cloned() - } - - fn check(&self, platform: Platform, root: &Path) -> Result { - validate_for( - platform, - root, - |key| self.get(key), - Some(&self.exe), - |dir| { - let probe = dir.join("exclusive-test-probe"); - let file = std::fs::OpenOptions::new().write(true).create_new(true).open(&probe)?; - drop(file); - std::fs::remove_file(probe) - }, - ) - } - - fn home(&self) -> PathBuf { - PathBuf::from(self.get("HOME").unwrap()) + fn path(&self) -> &Path { + &self.0 } } - impl Drop for Fixture { + impl Drop for TempDir { fn drop(&mut self) { - // Only the directory successfully created by this fixture is owned for removal. - std::fs::remove_dir_all(&self.root).unwrap(); + let _ = std::fs::remove_dir_all(&self.0); } } #[test] - fn portable_settings_from_another_install_are_refused_before_any_probe() { - let fixture = Fixture::new(); - let stable_install = fixture.root.join("stable portable install"); - let stable_data = stable_install.join(PORTABLE_DATA_DIR); - std::fs::create_dir_all(&stable_data).unwrap(); - std::fs::write(stable_install.join("portable.txt"), b"owned portable fixture").unwrap(); - std::fs::write(stable_data.join("settings.json"), b"stable settings must not change").unwrap(); - for platform in [Platform::Windows, Platform::Linux, Platform::Mac] { - for candidate in [&stable_data, &stable_data.join("nested nightly")] { - let probed = std::cell::Cell::new(false); - let result = validate_for( - platform, - candidate, - |key| fixture.get(key), - Some(&fixture.exe), - |_| { - probed.set(true); - Ok(()) - }, - ); - assert!(result.is_err(), "a different portable install is not a private Nightly profile"); - assert!(!probed.get(), "reject portable data before a writable probe"); - assert!(!stable_data.join("nested nightly").exists()); - assert_eq!(std::fs::read(stable_data.join("settings.json")).unwrap(), b"stable settings must not change"); - } + fn spec_preserves_deckcraft_isolation_constants() { + let s = spec(); + assert_eq!(s.app_id, "deckcraft"); + assert_eq!(s.display_name, "DeckCraft"); + assert_eq!(s.stable_dir_names, &["DeckCraft", "deckcraft"]); + assert_eq!(s.stable_package_id, "ai.storyteller.deckcraft"); + assert_eq!(s.nightly_package_id, "ai.storyteller.deckcraft.nightly"); + assert_eq!(s.profile_root_env, None); + assert!(s.forbidden_env_vars.is_empty()); + assert_eq!(s.portable_markers, &["portable.txt"]); + assert_eq!(s.folder_only_entries, &["Recovery", "Dictionaries", "logs"]); + } + + #[test] + fn extra_forbidden_roots_cover_platform_install_and_stable_paths() { + let mut env = BTreeMap::::new(); + if cfg!(target_os = "windows") { + env.insert("LOCALAPPDATA".into(), r"C:\Users\me\AppData\Local".into()); + env.insert("ProgramFiles".into(), r"C:\Program Files".into()); + } else { + env.insert("HOME".into(), "/home/me".into()); } - let private = fixture.root.join("DeckCraftData-backup-name/nightly"); - assert!(fixture.check(Platform::Linux, &private).is_ok(), "a merely similar name is not a portable settings component"); + let roots = extra_forbidden_roots(|key| env.get(key).cloned()); + #[cfg(target_os = "windows")] + { + assert!(roots.contains(&PathBuf::from(r"C:\Users\me\AppData\Local\Programs\ArtCraft\DeckCraft"))); + assert!(roots.contains(&PathBuf::from(r"C:\Program Files\ArtCraft\DeckCraft"))); + } + #[cfg(target_os = "macos")] + { + assert!(roots.contains(&PathBuf::from("/Applications/DeckCraft.app"))); + assert!(roots.contains(&PathBuf::from("/home/me/Applications/DeckCraft.app"))); + assert!(roots.contains(&PathBuf::from("/home/me/Library/Preferences/ai.storyteller.deckcraft.plist"))); + assert!(roots.contains(&PathBuf::from("/home/me/Library/Saved Application State/ai.storyteller.deckcraft.savedState"))); + } + #[cfg(all(unix, not(target_os = "macos")))] + { + assert!(roots.contains(&PathBuf::from("/usr/bin/deckcraft"))); + assert!(roots.contains(&PathBuf::from("/usr/local/bin/deckcraft"))); + assert!(roots.contains(&PathBuf::from("/opt/deckcraft"))); + assert!(roots.contains(&PathBuf::from("/home/me/.var/app/ai.storyteller.deckcraft"))); + } + } + + #[test] + fn valid_profile_root_reopens_and_enforces_folder_only_entries() { + let tmp = TempDir::new("reopen"); + let profile = tmp.path().join("nightly-profile"); + let s = spec(); + + let prepared = validate_and_prepare_root(&profile, &s).unwrap(); + assert_eq!(prepared, profile); + + for file_name in ["ui.json", "prefs.json", "nightly-session.lock", "nightly-session.json"] { + std::fs::write(prepared.join(file_name), b"saved profile data").unwrap(); + } + for dir_name in FOLDER_ONLY_ENTRIES { + std::fs::create_dir(prepared.join(dir_name)).unwrap(); + } + assert_eq!(validate_and_prepare_root(&profile, &s).unwrap(), prepared); + for name in ["ui.json", "prefs.json", "nightly-session.lock", "nightly-session.json"] { + assert_eq!(std::fs::read(prepared.join(name)).unwrap(), b"saved profile data", "{name} changed when reopening"); + } + + for dir_name in FOLDER_ONLY_ENTRIES { + let entry = prepared.join(dir_name); + std::fs::remove_dir(&entry).unwrap(); + std::fs::write(&entry, b"not a directory").unwrap(); + assert!(matches!(validate_and_prepare_root(&profile, &s), Err(ProfileError::ExpectedDirectoryEntry(_)))); + std::fs::remove_file(&entry).unwrap(); + std::fs::create_dir(&entry).unwrap(); + } + } + + #[test] + fn a_non_directory_profile_stops_startup_without_installing_a_profile() { + let temp = TempDir::new("invalid-root"); + let root = temp.path().join("ordinary-file"); + std::fs::write(&root, b"existing file").unwrap(); + let argv = craft_nightly::launch_arguments(&root, &[]); + assert!(craft_nightly::current().is_none()); + let result = crate::launch_profile::prepare(craft_nightly::BuildFlavor::NightlyV1, argv); + assert!(matches!(result, Err(ProfileError::NotADirectory(_)))); + assert!(craft_nightly::current().is_none()); + assert_eq!(std::fs::read(root).unwrap(), b"existing file"); + } + + #[test] + fn relative_and_traversal_profile_roots_are_refused() { + let tmp = TempDir::new("lexical"); + let s = spec(); + assert!(matches!(validate_and_prepare_root(Path::new("relative/nightly"), &s), Err(ProfileError::RelativeProfileRoot(_)))); + assert!(matches!(validate_and_prepare_root(&tmp.path().join("nightly/../escape"), &s), Err(ProfileError::ParentTraversalInProfileRoot(_)))); } #[cfg(unix)] #[test] - fn recovery_aliases_cannot_redirect_to_stable_missing_or_profile_root_data() { - let fixture = Fixture::new(); - let stable = fixture.home().join(".local/share/deckcraft/recovery"); - std::fs::create_dir_all(&stable).unwrap(); - std::fs::write(stable.join("stable-autosave"), b"stable recovery bytes").unwrap(); - for (index, target) in [stable.clone(), fixture.root.join("missing recovery target")].into_iter().enumerate() { - let private = fixture.root.join(format!("nightly-{index}")); - std::fs::create_dir(&private).unwrap(); - std::os::unix::fs::symlink(&target, private.join("Recovery")).unwrap(); - let probed = std::cell::Cell::new(false); - let result = validate_for( - Platform::Linux, - &private, - |key| fixture.get(key), - Some(&fixture.exe), - |_| { - probed.set(true); - Ok(()) - }, - ); - assert!(result.is_err(), "Recovery must not escape the private profile or follow a dangling alias"); - assert!(!probed.get()); - } - let private = fixture.root.join("nightly-self"); - std::fs::create_dir(&private).unwrap(); - std::os::unix::fs::symlink(&private, private.join("Recovery")).unwrap(); - assert!(fixture.check(Platform::Linux, &private).is_err(), "Recovery cannot treat all profile settings as recovery entries"); - assert_eq!(std::fs::read(stable.join("stable-autosave")).unwrap(), b"stable recovery bytes"); - } + fn symlink_inside_profile_root_is_refused() { + let tmp = TempDir::new("symlink"); + let outside = tmp.path().join("outside"); + let profile = tmp.path().join("nightly-profile"); + std::fs::create_dir_all(&outside).unwrap(); + std::fs::create_dir_all(&profile).unwrap(); + std::os::unix::fs::symlink(&outside, profile.join("Recovery")).unwrap(); - #[cfg(unix)] - #[test] - fn recovery_alias_to_a_private_subfolder_keeps_the_profile_usable() { - let fixture = Fixture::new(); - let private = fixture.root.join("nightly-private"); - let recovery = private.join("private-recovery"); - std::fs::create_dir_all(&recovery).unwrap(); - std::os::unix::fs::symlink(&recovery, private.join("Recovery")).unwrap(); - assert!(fixture.check(Platform::Linux, &private).is_ok()); - assert_eq!(std::fs::canonicalize(private.join("Recovery")).unwrap(), recovery); - } - - /// The public entry point reads the host platform and refuses a relative root before probing. - #[cfg(target_os = "linux")] - #[test] - fn the_public_validator_uses_the_host_platform_and_creates_only_the_profile() { - let fixture = Fixture::new(); - let root = fixture.home().join("nightly/profiles/deckcraft"); - let created = validate(&root, |key| fixture.get(key), Some(&fixture.exe), crate::app_dirs::ensure_writable) - .expect("a private profile under HOME is valid on Linux"); - assert_eq!(created, root); - assert!(created.is_dir()); - let probed = std::cell::Cell::new(false); - let refused = validate( - Path::new("relative/profile"), - |key| fixture.get(key), - Some(&fixture.exe), - |_| { - probed.set(true); - Ok(()) - }, - ); - assert!(refused.is_err()); - assert!(!probed.get(), "a relative root is refused before the write probe"); - } - - #[test] - fn overlap_check_handles_ancestor_descendant_and_prefix_lookalikes() { - let fixture = Fixture::new(); - let root = fixture.home().join("nightly/profiles/deckcraft"); - for platform in [Platform::Windows, Platform::Linux, Platform::Mac] { - assert!(overlaps(&root, &root.join("Recovery"), platform)); - assert!(overlaps(&root.join("Recovery"), &root, platform)); - assert!(!overlaps(&root, &root.with_file_name("deckcraft-other"), platform)); - } - } - - #[test] - fn linux_fences_app_xdg_subtrees_but_allows_launcher_sibling() { - let mut fixture = Fixture::new(); - for key in ["XDG_CONFIG_HOME", "XDG_DATA_HOME", "XDG_CACHE_HOME", "XDG_STATE_HOME"] { - fixture.env.insert(key.into(), fixture.root.join(key).into_os_string()); - } - for key in ["XDG_CONFIG_HOME", "XDG_DATA_HOME", "XDG_CACHE_HOME", "XDG_STATE_HOME"] { - let stable = PathBuf::from(fixture.get(key).unwrap()).join("deckcraft"); - std::fs::create_dir_all(&stable).unwrap(); - std::fs::write(stable.join("stable-sentinel"), b"stable bytes").unwrap(); - for candidate in [stable.clone(), stable.join("nightly"), stable.parent().unwrap().to_path_buf()] { - assert!(fixture.check(Platform::Linux, &candidate).unwrap_err().contains("overlap")); - } - assert_eq!(std::fs::read(stable.join("stable-sentinel")).unwrap(), b"stable bytes"); - } - let data = PathBuf::from(fixture.get("XDG_DATA_HOME").unwrap()); - let nightly = data.join("ArtCraftLauncher/nightly/profiles/deckcraft"); - assert_eq!(fixture.check(Platform::Linux, &nightly).unwrap(), nightly); - assert_eq!(std::fs::read_dir(nightly).unwrap().count(), 0); - } - - #[test] - fn nightly_profile_reopens_after_saving_settings_and_session_state() { - let fixture = Fixture::new(); - for platform in [Platform::Mac, Platform::Linux, Platform::Windows] { - let private = fixture.root.join(format!("nightly-reopen-{platform:?}")); - assert_eq!(fixture.check(platform, &private).unwrap(), private); - for name in ["ui.json", "prefs.json", "nightly-session.lock", "nightly-session.json"] { - std::fs::write(private.join(name), b"saved profile data").unwrap(); - } - for name in PROFILE_FOLDERS { - std::fs::create_dir(private.join(name)).unwrap(); - } - assert_eq!(fixture.check(platform, &private).unwrap(), private); - assert_eq!(std::fs::read(private.join("ui.json")).unwrap(), b"saved profile data"); - for name in PROFILE_FOLDERS { - let path = private.join(name); - std::fs::remove_dir(&path).unwrap(); - std::fs::write(&path, b"not a directory").unwrap(); - assert!(fixture.check(platform, &private).is_err(), "{name} must stay a directory"); - std::fs::remove_file(&path).unwrap(); - std::fs::create_dir(&path).unwrap(); - } - } - } - - #[test] - fn mac_fences_only_app_library_subtrees_and_the_entire_bundle() { - let mut fixture = Fixture::new(); - fixture.exe = fixture.root.join("install/DeckCraft Nightly.app/Contents/MacOS/DeckCraft"); - std::fs::create_dir_all(fixture.exe.parent().unwrap()).unwrap(); - std::fs::write(&fixture.exe, b"fixture executable, never run").unwrap(); - let library = fixture.home().join("Library"); - for suffix in [ - "Application Support/DeckCraft", - "Caches/DeckCraft", - "Caches/ai.storyteller.deckcraft", - "Preferences/DeckCraft", - "Saved Application State/ai.storyteller.deckcraft.savedState", - ] { - let stable = library.join(suffix); - assert!(fixture.check(Platform::Mac, &stable.join("nightly")).unwrap_err().contains("overlap")); - assert!(!stable.exists()); - } - let inside_resources = fixture.exe.parent().unwrap().parent().unwrap().join("Resources/profile"); - assert!(fixture.check(Platform::Mac, &inside_resources).unwrap_err().contains("overlap")); - assert!(!inside_resources.exists()); - let valid = library.join("Application Support/ArtCraftLauncher/nightly/profiles/deckcraft"); - assert_eq!(fixture.check(Platform::Mac, &valid).unwrap(), valid); - } - - #[test] - fn windows_roaming_local_and_install_fences_remain_active() { - let fixture = Fixture::new(); - for key in ["APPDATA", "LOCALAPPDATA"] { - let stable = PathBuf::from(fixture.get(key).unwrap()).join("DeckCraft"); - assert!(fixture.check(Platform::Windows, &stable.join("nightly")).unwrap_err().contains("overlap")); - assert!(!stable.exists()); - } - assert!(fixture.check(Platform::Windows, &fixture.exe.parent().unwrap().join("profile")).is_err()); - assert!(fixture.check(Platform::Windows, &fixture.root.join("Launcher/profiles/deckcraft")).is_ok()); - } - - #[test] - fn windows_default_msi_install_folders_are_fenced() { - let mut fixture = Fixture::new(); - let local = PathBuf::from(fixture.get("LOCALAPPDATA").unwrap()); - let per_user = local.join("Programs").join("ArtCraft").join("DeckCraft"); - assert!(fixture.check(Platform::Windows, &per_user.join("nightly")).unwrap_err().contains("overlap")); - for key in ["ProgramW6432", "ProgramFiles", "ProgramFiles(x86)"] { - let base = fixture.root.join(format!("machine {key}")); - fixture.env.insert(key.into(), base.clone().into_os_string()); - let machine = base.join("ArtCraft").join("DeckCraft"); - assert!(fixture.check(Platform::Windows, &machine.join("nightly")).unwrap_err().contains("overlap")); - assert!(!machine.exists()); - } - let sibling = local.join("Programs").join("ArtCraft").join("ArtCraftLauncher").join("nightly").join("deckcraft"); - assert!(fixture.check(Platform::Windows, &sibling).is_ok(), "the Launcher's own Programs sibling is not DeckCraft's install"); - } - - #[test] - fn folders_under_a_stable_portable_copy_are_refused_before_any_probe() { - let fixture = Fixture::new(); - let portable = fixture.root.join("D/DC"); - std::fs::create_dir_all(&portable).unwrap(); - std::fs::write(portable.join("portable.txt"), b"stable portable copy").unwrap(); - std::fs::write(portable.join("deckcraft.exe"), b"stable portable executable, never run").unwrap(); - for platform in [Platform::Windows, Platform::Linux, Platform::Mac] { - for candidate in [portable.join("nightly"), portable.join("deeper/nightly")] { - let probed = std::cell::Cell::new(false); - let result = validate_for( - platform, - &candidate, - |key| fixture.get(key), - Some(&fixture.exe), - |_| { - probed.set(true); - Ok(()) - }, - ); - assert!(result.unwrap_err().contains("portable")); - assert!(!probed.get()); - assert!(!candidate.exists()); - } - } - // A portable.txt that no DeckCraft executable sits beside is someone else's file. - let unrelated = fixture.root.join("user folder"); - std::fs::create_dir_all(&unrelated).unwrap(); - std::fs::write(unrelated.join("portable.txt"), b"another app's marker").unwrap(); - assert!(fixture.check(Platform::Windows, &unrelated.join("Launcher/nightly/deckcraft")).is_ok()); - } - - #[test] - fn linux_fences_the_stable_flatpak_data_folder() { - let fixture = Fixture::new(); - let flatpak = fixture.home().join(".var/app/ai.storyteller.deckcraft"); - for candidate in [flatpak.clone(), flatpak.join("data/nightly")] { - assert!(fixture.check(Platform::Linux, &candidate).unwrap_err().contains("overlap")); - } - assert!(!flatpak.exists()); - assert!(fixture.check(Platform::Linux, &fixture.home().join(".var/app/ai.storyteller.launcher/nightly")).is_ok()); - } - - #[cfg(unix)] - #[test] - fn any_profile_entry_alias_must_stay_inside_the_profile() { - let fixture = Fixture::new(); - let stable = fixture.home().join(".config/deckcraft/logs"); - std::fs::create_dir_all(&stable).unwrap(); - std::fs::write(stable.join("stable-log"), b"stable log bytes").unwrap(); - for name in ["Dictionaries", "logs", "ui.json"] { - let private = fixture.root.join(format!("nightly-{name}")); - std::fs::create_dir(&private).unwrap(); - std::os::unix::fs::symlink(&stable, private.join(name)).unwrap(); - let probed = std::cell::Cell::new(false); - let result = validate_for( - Platform::Linux, - &private, - |key| fixture.get(key), - Some(&fixture.exe), - |_| { - probed.set(true); - Ok(()) - }, - ); - assert!(result.is_err(), "{name} must not lead outside the profile"); - assert!(!probed.get()); - } - let private = fixture.root.join("nightly-inside"); - std::fs::create_dir_all(private.join("real-dictionaries")).unwrap(); - std::fs::write(private.join("ui.json"), b"{}").unwrap(); - std::os::unix::fs::symlink(private.join("real-dictionaries"), private.join("Dictionaries")).unwrap(); - assert!(fixture.check(Platform::Linux, &private).is_ok(), "regular files and links that stay inside are fine"); - assert_eq!(std::fs::read(stable.join("stable-log")).unwrap(), b"stable log bytes"); - } - - #[test] - fn ambiguous_environment_and_non_native_sandbox_are_refused_before_creation() { - let mut fixture = Fixture::new(); - let candidate = fixture.home().join("nightly/profiles/deckcraft"); - fixture.env.insert("XDG_CACHE_HOME".into(), "relative/cache".into()); - assert!(fixture.check(Platform::Linux, &candidate).unwrap_err().contains("absolute")); - fixture.env.remove("XDG_CACHE_HOME"); - // The stable Flatpak instance, or any other app's, is not a Nightly launch. - fixture.env.insert("FLATPAK_ID".into(), "ai.storyteller.deckcraft".into()); - assert!(fixture.check(Platform::Linux, &candidate).unwrap_err().contains("Flatpak")); - fixture.env.insert("FLATPAK_ID".into(), "org.example.other".into()); - assert!(fixture.check(Platform::Linux, &candidate).unwrap_err().contains("Flatpak")); - // DeckCraft Nightly's own Flatpak is the one allowed instance. - fixture.env.insert("FLATPAK_ID".into(), NIGHTLY_FLATPAK_ID.into()); - assert!(fixture.check(Platform::Linux, &candidate).is_ok()); - fixture.env.remove("FLATPAK_ID"); - fixture.env.remove("HOME"); - assert!(fixture.check(Platform::Linux, &candidate).unwrap_err().contains("HOME")); - } - - #[test] - fn non_directory_and_failed_write_probe_never_fall_back_to_stable() { - let fixture = Fixture::new(); - let file = fixture.home().join("not-a-directory"); - std::fs::write(&file, b"regular file").unwrap(); - assert!(fixture.check(Platform::Linux, &file.join("nightly")).is_err()); - let candidate = fixture.home().join("nightly/profiles/deckcraft"); - let result = validate_for( - Platform::Linux, - &candidate, - |key| fixture.get(key), - Some(&fixture.exe), - |_| Err(std::io::Error::new(std::io::ErrorKind::PermissionDenied, "read-only")), - ); - assert!(result.unwrap_err().contains("not writable")); - assert!(!candidate.join("Recovery").exists(), "a failed probe leaves no stable fallback behind"); - } - - #[test] - fn relative_roots_and_parent_traversal_are_refused() { - let fixture = Fixture::new(); - for candidate in [PathBuf::from("relative/nightly"), fixture.home().join("nightly/../escape")] { - assert!(fixture.check(Platform::Linux, &candidate).unwrap_err().contains("absolute")); - } + let s = spec(); + assert!(matches!(validate_and_prepare_root(&profile, &s), Err(ProfileError::SymlinkEntry(_)))); } } diff --git a/packaging/nightly-release-tests.py b/packaging/nightly-release-tests.py index 1b597f963..a4df007c3 100755 --- a/packaging/nightly-release-tests.py +++ b/packaging/nightly-release-tests.py @@ -184,7 +184,7 @@ class TrustedSourcePreparation(unittest.TestCase): producer_platforms(source.replace(" " + current + "\n", "")) def test_continuation_lines_of_any_scalar_form_reach_the_guard_checks(self): - for name in ("nightly.yml", "nightly-sign.yml"): + for name in ("nightly.yml", "nightly-sign.yml", "nightly-dispatch.yml"): source = (ROOT / ".github/workflows" / name).read_text() expected = NightlyEnabledCallers.GUARDS[name] guard = re.search(r"(?m)^ if: >-\n(?: [^\n]*\n)+", source)[0] @@ -194,15 +194,39 @@ class TrustedSourcePreparation(unittest.TestCase): (indicator, expression), = job_conditions(jobs) self.assertFalse(indicator == ">-" and " ".join(expression.split()) == expected) - def test_no_nightly_schedule_is_registered(self): - for name, event in (("nightly.yml", "workflow_dispatch"), - ("nightly-sign.yml", "workflow_dispatch")): + def test_nightly_triggers_match_reviewed_schedule_and_dispatch(self): + expected = { + "nightly.yml": [" schedule:", " workflow_dispatch:"], + "nightly-sign.yml": [" workflow_dispatch:"], + "nightly-dispatch.yml": [" workflow_run:"], + } + for name, expected_triggers in expected.items(): source = (ROOT / ".github/workflows" / name).read_text() events = source.split("\non:\n", 1)[1].split("\npermissions:", 1)[0] triggers = [line for line in events.splitlines() if line.startswith(" ") and not line.startswith(" ") and line.strip() and not line.lstrip().startswith("#")] with self.subTest(workflow=name): - self.assertEqual(triggers, [f" {event}:"], "schedule/activation needs explicit review") + self.assertEqual(triggers, expected_triggers, "schedule/activation needs explicit review") + producer = (ROOT / ".github/workflows/nightly.yml").read_text() + self.assertEqual(re.findall(r"(?m)^ - cron: (.+)$", producer), ["'0 1 * * *'"], + "nightly schedule must stay pinned to 01:00 UTC") + producer_name = re.findall(r"(?m)^name: (.+)$", producer) + dispatch = (ROOT / ".github/workflows/nightly-dispatch.yml").read_text() + self.assertEqual(producer_name, ["DeckCraft unsigned nightly"]) + self.assertIn(f" workflows: [{producer_name[0]}]\n", dispatch) + self.assertIn(" types: [completed]\n", dispatch) + self.assertIn(" branches: [main]\n", dispatch) + + def test_dispatch_workflow_stays_transport_only(self): + dispatch = (ROOT / ".github/workflows/nightly-dispatch.yml").read_text() + assert_caller_secrets(dispatch, "dispatch", set()) + self.assertIn("\npermissions: {}\n", dispatch) + self.assertNotRegex(dispatch, r"(?m)^\s*(?:-\s*)?uses:") + self.assertIn(f"'ref': 'refs/heads/{SIGNER_BRANCH}'", dispatch) + self.assertIn("https://api.github.com/repos/storytold/deckcraft/actions/workflows/nightly-sign.yml/dispatches", + dispatch) + self.assertIn("require(producer.get('event') == 'schedule'", dispatch) + self.assertIn("require(type(attempt) is int and attempt == 1", dispatch) def test_signer_serialization_contract_is_enforced(self): assert_nightly_serialization((ROOT / ".github/workflows/nightly-sign.yml").read_text()) @@ -232,7 +256,7 @@ class TrustedSourcePreparation(unittest.TestCase): assert_nightly_serialization(source.replace(old, new)) def test_no_cache_actions_or_cache_setup_options_in_app_trusted_closure(self): - for name in ("nightly.yml", "nightly-sign.yml"): + for name in ("nightly.yml", "nightly-sign.yml", "nightly-dispatch.yml"): source = (ROOT / ".github/workflows" / name).read_text() executable = "\n".join(line for line in source.splitlines() if not line.lstrip().startswith("#")) @@ -307,6 +331,7 @@ class NightlyEnabledCallers(unittest.TestCase): "github.event_name == 'workflow_dispatch')", "nightly-sign.yml": "github.repository == 'storytold/deckcraft' && github.event_name == 'workflow_dispatch' && " "github.ref == 'refs/heads/" + SIGNER_BRANCH + "' && github.ref_type == 'branch'", + "nightly-dispatch.yml": "github.repository == 'storytold/deckcraft' && github.event_name == 'workflow_run'", } def test_enabled_jobs_keep_exact_context_guards(self): @@ -323,7 +348,8 @@ class NightlyEnabledCallers(unittest.TestCase): source = (ROOT / ".github/workflows/nightly.yml").read_text() policy = json.loads(INSTALLED_POLICY.read_text()) self.assertEqual(reviewed_manual_actors(source, policy), RELEASE_MANAGERS) - self.assertEqual(policy["automatic_signer_actors"], [], "no automatic signer without a schedule") + self.assertEqual(policy["automatic_signer_actors"], ["github-actions[bot]"], + "automatic signer actor must be github-actions[bot]") def test_an_actor_outside_the_release_managers_is_refused(self): source = (ROOT / ".github/workflows/nightly.yml").read_text()