From 273ce31fa52877af37e2bae19890ba7e705f3c10 Mon Sep 17 00:00:00 2001 From: Dominik Spitzli Date: Thu, 12 Nov 2026 13:07:36 +0100 Subject: [PATCH] chore: use canonical Spitzli plugin SDK and binaries --- Cargo.lock | 350 +++++++++++++-------------- Cargo.toml | 46 ++-- Dockerfile | 8 +- NAMESPACE-MIGRATION.json | 64 +++++ NOTICE | 4 +- scripts/plugin-release/release.mjs | 2 +- src/backend.rs | 4 +- src/engine.rs | 18 +- src/fixture.rs | 4 +- src/lib.rs | 6 +- src/main.rs | 26 +- src/model.rs | 16 +- src/producer.rs | 4 +- src/sources.rs | 14 +- src/store.rs | 8 +- standalone.json | 38 +-- tests/buildlog_bytes.rs | 10 +- tests/diagnostics.rs | 2 +- tests/lifecycle.rs | 6 +- tests/manifest.rs | 10 +- tests/source.rs | 4 +- tools/manifest-validator/Cargo.lock | 52 ++-- tools/manifest-validator/Cargo.toml | 8 +- tools/manifest-validator/src/main.rs | 2 +- ui/index.tsx | 2 +- 25 files changed, 386 insertions(+), 322 deletions(-) create mode 100644 NAMESPACE-MIGRATION.json diff --git a/Cargo.lock b/Cargo.lock index 32a340a..b843fe1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4066,6 +4066,181 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "023a211cb3138dbc438680b32560ad89f699977624c9f8dbb95a47d5b4c07dd3" +[[package]] +name = "spitzli-archives" +version = "0.3.0" +dependencies = [ + "async-trait", + "aws-sdk-s3", + "chrono", + "ed25519-dalek", + "flate2", + "futures-util", + "hex", + "rcgen", + "rustix", + "rustls 0.23.46", + "sea-orm", + "serde", + "serde_json", + "sha2 0.10.9", + "spitzli-export-protocol", + "spitzli-object-storage", + "spitzli-plugin-http", + "spitzli-plugin-kit", + "spitzli-plugin-protocol", + "spitzli-plugin-runtime", + "spitzli-repository-protocol", + "tempfile", + "tokio", + "tokio-postgres", + "tokio-stream", + "tonic", + "url", + "uuid", +] + +[[package]] +name = "spitzli-export-protocol" +version = "0.1.0" +source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8019f3df67dba3fed3083f22635e4725028c1b5e#8019f3df67dba3fed3083f22635e4725028c1b5e" +dependencies = [ + "base64 0.22.1", + "hex", + "hmac 0.12.1", + "prost", + "prost-build", + "serde", + "serde_json", + "sha2 0.10.9", + "tonic", + "tonic-prost", + "tonic-prost-build", +] + +[[package]] +name = "spitzli-object-storage" +version = "0.1.0" +source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8019f3df67dba3fed3083f22635e4725028c1b5e#8019f3df67dba3fed3083f22635e4725028c1b5e" +dependencies = [ + "bytes", + "futures-util", + "hex", + "object_store", + "reqwest 0.13.5", + "rustls 0.23.46", + "serde", + "sha2 0.10.9", + "thiserror 2.0.21", + "tokio", + "url", + "uuid", +] + +[[package]] +name = "spitzli-plugin-http" +version = "0.1.0" +source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8019f3df67dba3fed3083f22635e4725028c1b5e#8019f3df67dba3fed3083f22635e4725028c1b5e" +dependencies = [ + "futures-util", + "reqwest 0.12.28", + "serde", + "thiserror 2.0.21", + "url", +] + +[[package]] +name = "spitzli-plugin-kit" +version = "0.1.0" +source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8019f3df67dba3fed3083f22635e4725028c1b5e#8019f3df67dba3fed3083f22635e4725028c1b5e" +dependencies = [ + "aes-gcm", + "getrandom 0.2.17", + "hex", + "rustix", + "rustls 0.23.46", + "rustls-pemfile", + "serde", + "serde_json", + "spitzli-plugin-protocol", + "spitzli-plugin-runtime", + "tokio", + "tokio-postgres", + "tokio-postgres-rustls", + "tonic", + "url", + "uuid", +] + +[[package]] +name = "spitzli-plugin-protocol" +version = "0.1.0" +source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8019f3df67dba3fed3083f22635e4725028c1b5e#8019f3df67dba3fed3083f22635e4725028c1b5e" +dependencies = [ + "base64 0.22.1", + "chrono", + "ed25519-dalek", + "jsonschema", + "node-semver", + "regex", + "serde", + "serde_json", + "sha2 0.10.9", + "url", + "uuid", +] + +[[package]] +name = "spitzli-plugin-runtime" +version = "0.1.0" +source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8019f3df67dba3fed3083f22635e4725028c1b5e#8019f3df67dba3fed3083f22635e4725028c1b5e" +dependencies = [ + "ed25519-dalek", + "hex", + "hyper-util", + "prost", + "rustix", + "rustls 0.23.46", + "rustls-pemfile", + "serde", + "serde_json", + "sha2 0.10.9", + "spitzli-plugin-protocol", + "tokio", + "tokio-rustls 0.26.6", + "tokio-stream", + "tonic", + "tonic-prost", + "tonic-prost-build", + "tower", + "url", + "x509-parser", +] + +[[package]] +name = "spitzli-repository-protocol" +version = "0.1.0" +source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8019f3df67dba3fed3083f22635e4725028c1b5e#8019f3df67dba3fed3083f22635e4725028c1b5e" +dependencies = [ + "async-trait", + "base64 0.22.1", + "ed25519-dalek", + "hex", + "prost", + "rustix", + "serde", + "serde_json", + "sha2 0.10.9", + "spitzli-plugin-protocol", + "spitzli-plugin-runtime", + "tokio", + "tokio-stream", + "tonic", + "tonic-prost", + "tonic-prost-build", + "uuid", +] + [[package]] name = "spki" version = "0.7.3" @@ -5072,181 +5247,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webdock-archives" -version = "0.3.0" -dependencies = [ - "async-trait", - "aws-sdk-s3", - "chrono", - "ed25519-dalek", - "flate2", - "futures-util", - "hex", - "rcgen", - "rustix", - "rustls 0.23.46", - "sea-orm", - "serde", - "serde_json", - "sha2 0.10.9", - "tempfile", - "tokio", - "tokio-postgres", - "tokio-stream", - "tonic", - "url", - "uuid", - "webdock-export-protocol", - "webdock-object-storage", - "webdock-plugin-http", - "webdock-plugin-kit", - "webdock-plugin-protocol", - "webdock-plugin-runtime", - "webdock-repository-protocol", -] - -[[package]] -name = "webdock-export-protocol" -version = "0.1.0" -source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6#8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -dependencies = [ - "base64 0.22.1", - "hex", - "hmac 0.12.1", - "prost", - "prost-build", - "serde", - "serde_json", - "sha2 0.10.9", - "tonic", - "tonic-prost", - "tonic-prost-build", -] - -[[package]] -name = "webdock-object-storage" -version = "0.1.0" -source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6#8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -dependencies = [ - "bytes", - "futures-util", - "hex", - "object_store", - "reqwest 0.13.5", - "rustls 0.23.46", - "serde", - "sha2 0.10.9", - "thiserror 2.0.21", - "tokio", - "url", - "uuid", -] - -[[package]] -name = "webdock-plugin-http" -version = "0.1.0" -source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6#8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -dependencies = [ - "futures-util", - "reqwest 0.12.28", - "serde", - "thiserror 2.0.21", - "url", -] - -[[package]] -name = "webdock-plugin-kit" -version = "0.1.0" -source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6#8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -dependencies = [ - "aes-gcm", - "getrandom 0.2.17", - "hex", - "rustix", - "rustls 0.23.46", - "rustls-pemfile", - "serde", - "serde_json", - "tokio", - "tokio-postgres", - "tokio-postgres-rustls", - "tonic", - "url", - "uuid", - "webdock-plugin-protocol", - "webdock-plugin-runtime", -] - -[[package]] -name = "webdock-plugin-protocol" -version = "0.1.0" -source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6#8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -dependencies = [ - "base64 0.22.1", - "chrono", - "ed25519-dalek", - "jsonschema", - "node-semver", - "regex", - "serde", - "serde_json", - "sha2 0.10.9", - "url", - "uuid", -] - -[[package]] -name = "webdock-plugin-runtime" -version = "0.1.0" -source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6#8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -dependencies = [ - "ed25519-dalek", - "hex", - "hyper-util", - "prost", - "rustix", - "rustls 0.23.46", - "rustls-pemfile", - "serde", - "serde_json", - "sha2 0.10.9", - "tokio", - "tokio-rustls 0.26.6", - "tokio-stream", - "tonic", - "tonic-prost", - "tonic-prost-build", - "tower", - "url", - "webdock-plugin-protocol", - "x509-parser", -] - -[[package]] -name = "webdock-repository-protocol" -version = "0.1.0" -source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6#8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -dependencies = [ - "async-trait", - "base64 0.22.1", - "ed25519-dalek", - "hex", - "prost", - "rustix", - "serde", - "serde_json", - "sha2 0.10.9", - "tokio", - "tokio-stream", - "tonic", - "tonic-prost", - "tonic-prost-build", - "uuid", - "webdock-plugin-protocol", - "webdock-plugin-runtime", -] - [[package]] name = "webpki-root-certs" version = "1.0.11" diff --git a/Cargo.toml b/Cargo.toml index 8368b8c..a652ce7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ ["package"] -"name" = "webdock-archives" +"name" = "spitzli-archives" "version" = "0.3.0" "edition" = "2024" "rust-version" = "1.94" @@ -18,10 +18,10 @@ "async-trait" = "0.1" "tempfile" = "3" -["dependencies"."webdock-export-protocol"] +["dependencies"."spitzli-export-protocol"] "git" = "https://github.com/spitzli/cloud-plugin-sdk" -"rev" = "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -"package" = "webdock-export-protocol" +"rev" = "8019f3df67dba3fed3083f22635e4725028c1b5e" +"package" = "spitzli-export-protocol" ["dependencies"."serde"] "version" = "1" @@ -31,20 +31,20 @@ "version" = "1" "features" = ["macros", "rt-multi-thread", "signal", "time", "process", "io-util", "fs"] -["dependencies"."webdock-plugin-protocol"] +["dependencies"."spitzli-plugin-protocol"] "git" = "https://github.com/spitzli/cloud-plugin-sdk" -"rev" = "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -"package" = "webdock-plugin-protocol" +"rev" = "8019f3df67dba3fed3083f22635e4725028c1b5e" +"package" = "spitzli-plugin-protocol" -["dependencies"."webdock-plugin-runtime"] +["dependencies"."spitzli-plugin-runtime"] "git" = "https://github.com/spitzli/cloud-plugin-sdk" -"rev" = "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -"package" = "webdock-plugin-runtime" +"rev" = "8019f3df67dba3fed3083f22635e4725028c1b5e" +"package" = "spitzli-plugin-runtime" -["dependencies"."webdock-plugin-kit"] +["dependencies"."spitzli-plugin-kit"] "git" = "https://github.com/spitzli/cloud-plugin-sdk" -"rev" = "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -"package" = "webdock-plugin-kit" +"rev" = "8019f3df67dba3fed3083f22635e4725028c1b5e" +"package" = "spitzli-plugin-kit" ["dependencies"."tonic"] "version" = "0.14.6" @@ -58,10 +58,10 @@ "version" = "0.7" "features" = ["with-uuid-1"] -["dependencies"."webdock-object-storage"] +["dependencies"."spitzli-object-storage"] "git" = "https://github.com/spitzli/cloud-plugin-sdk" -"rev" = "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -"package" = "webdock-object-storage" +"rev" = "8019f3df67dba3fed3083f22635e4725028c1b5e" +"package" = "spitzli-object-storage" ["dependencies"."aws-sdk-s3"] "version" = "=1.137.0" @@ -79,17 +79,17 @@ ["features"] "local-native-fixture" = [] -"local-test" = ["webdock-object-storage/local-test"] +"local-test" = ["spitzli-object-storage/local-test"] ["dev-dependencies"] "chrono" = "0.4" "rcgen" = "0.14" "futures-util" = "0.3" -["dev-dependencies"."webdock-repository-protocol"] +["dev-dependencies"."spitzli-repository-protocol"] "git" = "https://github.com/spitzli/cloud-plugin-sdk" -"rev" = "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -"package" = "webdock-repository-protocol" +"rev" = "8019f3df67dba3fed3083f22635e4725028c1b5e" +"package" = "spitzli-repository-protocol" ["dev-dependencies"."tokio-stream"] "version" = "0.1" @@ -100,10 +100,10 @@ "default-features" = false "features" = ["macros", "sqlx-postgres", "runtime-tokio-rustls", "with-json", "with-chrono"] -["dev-dependencies"."webdock-plugin-http"] +["dev-dependencies"."spitzli-plugin-http"] "git" = "https://github.com/spitzli/cloud-plugin-sdk" -"rev" = "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -"package" = "webdock-plugin-http" +"rev" = "8019f3df67dba3fed3083f22635e4725028c1b5e" +"package" = "spitzli-plugin-http" ["lints"] diff --git a/Dockerfile b/Dockerfile index 50cd87a..52abe05 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,15 +6,15 @@ WORKDIR /src COPY . . # Shared only among reviewed Spitzli platform sources; never customer build code. FROM source AS check -RUN --mount=type=cache,id=spitzli-native-sdk-8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6-registry,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6-git,target=/usr/local/cargo/git,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6-target,target=/src/target,sharing=locked cargo check --locked --all-targets --jobs 3 && cargo test --locked --all-targets --jobs 3 +RUN --mount=type=cache,id=spitzli-native-sdk-8019f3df67dba3fed3083f22635e4725028c1b5e-registry,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8019f3df67dba3fed3083f22635e4725028c1b5e-git,target=/usr/local/cargo/git,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8019f3df67dba3fed3083f22635e4725028c1b5e-target,target=/src/target,sharing=locked cargo check --locked --all-targets --jobs 3 && cargo test --locked --all-targets --jobs 3 FROM source AS build -RUN --mount=type=cache,id=spitzli-native-sdk-8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6-registry,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6-git,target=/usr/local/cargo/git,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6-target,target=/src/target,sharing=locked cargo build --locked --release --bins --jobs 3 && mkdir /out && install -m 0555 /src/target/release/webdock-archives /out/webdock-archives +RUN --mount=type=cache,id=spitzli-native-sdk-8019f3df67dba3fed3083f22635e4725028c1b5e-registry,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8019f3df67dba3fed3083f22635e4725028c1b5e-git,target=/usr/local/cargo/git,sharing=locked --mount=type=cache,id=spitzli-native-sdk-8019f3df67dba3fed3083f22635e4725028c1b5e-target,target=/src/target,sharing=locked cargo build --locked --release --bins --jobs 3 && mkdir /out && install -m 0555 /src/target/release/spitzli-archives /out/spitzli-archives FROM docker.io/library/postgres:18-trixie@sha256:edb0c08dc33befd0262ab3b5cf1c4f3f8cfd8b09e88c05b45adee29d6761ddb6 COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt COPY LICENSE COMMERCIAL-LICENSING.md NOTICE /usr/share/licenses/spitzli-cloud/ -COPY --from=build --chown=65532:65532 --chmod=0555 /out/webdock-archives /usr/local/bin/webdock-archives +COPY --from=build --chown=65532:65532 --chmod=0555 /out/spitzli-archives /usr/local/bin/spitzli-archives ENV HOME=/tmp USER 65532:65532 -ENTRYPOINT ["/usr/local/bin/webdock-archives"] +ENTRYPOINT ["/usr/local/bin/spitzli-archives"] diff --git a/NAMESPACE-MIGRATION.json b/NAMESPACE-MIGRATION.json new file mode 100644 index 0000000..2394179 --- /dev/null +++ b/NAMESPACE-MIGRATION.json @@ -0,0 +1,64 @@ +{ + "baseSource": "9442431dd49b8fb8ad3aa3c18f62e67fa6c29342", + "date": "2026-11-12", + "formatVersion": 1, + "licenseUnchanged": true, + "originalSourceSnapshotRetained": true, + "package": "spitzli-archives", + "preservedBindingFilesSHA256": { + "COMMERCIAL-LICENSING.md": "5b8832f5014f16e2cf4f7ee295de32760eed20981495d184bd9f1517be256a09", + "EXPORT-PROVENANCE.json": "6f2491af998965cb7d0210bf44c666301537efaf01f9e51c6f02668c05c1d74e", + "LICENSE": "0d96a4ff68ad6d4b6f1f30f713b18d5184912ba8dd389f86aa7710db079abcb0", + "manifest.json": "b2688a1484875bc00dc7143c6a17dbf35e86dbe8a5873f8e9b6a0a1a4b70bde2", + "migrations/0001_metadata.sql": "7989f3975f78e5088105dff404f326849705a06b7d8f656b0f54b203fd1d8a7b" + }, + "qualifiedChangedSourceSHA256": { + "Cargo.lock": "62387d2f7bbb4f92fbfd36b233298a834217d0a4a4f28f413f33cdee0eb86b18", + "Cargo.toml": "fa23fb1ab9c8241541ac4d4c058f3da2477bae82f072d30b8ab3694f115d82c8", + "Dockerfile": "25803faeb16df3465cd5304a5305d6863e24b1e7c9c5b861dd9c9a7713a1ccce", + "NOTICE": "4949ccd63735c148d2fd1f1423772d11938087ba0bdbcf4aad81c576bcfa09b8", + "scripts/plugin-release/release.mjs": "30462a348f238bc78dab840688199574ad4fc5e9b039310306d6210f4c433890", + "src/backend.rs": "d127dcdece41058252e035a5a3de7d72baae7959fa8b5a2fc26dd9282ef1b4cc", + "src/engine.rs": "59170634b67ef810ed7025d3fc97e041b7e88adf964a76326758c6abc087cfbc", + "src/fixture.rs": "51f0c98a3abeea65f69540279d34d6348e64fc3cc93e46f20d1b5c97beb502a4", + "src/lib.rs": "def9c53bcd0d589120e25bffe9e911377e302d9059c1ad653e42ee91aa534260", + "src/main.rs": "cdb8de5f8232140fb796701cff93be9cf27e62f7558ba3d1a29ef52e63d51c25", + "src/model.rs": "d6bff1b87b170c6097b9bed7ad5498bb9ce4e65c4b7579b8656b39a35c408975", + "src/producer.rs": "f02831f5fa02e73a46f14790a69136e00774a33bbdab88508922b640df8f04c0", + "src/sources.rs": "aa4dd39f35bd3fcb4960c66d1714455064c399ebd29d58ede47d243f53e52407", + "src/store.rs": "0415c991dc6724548c6ef8c56a443bce0eee81ddb0b4b96a75ebc4b60b0e2d8c", + "standalone.json": "3f03cdb0a6cc7a27556031a8b323eb33b7498d82ca5dea1acd5a22781cabef8a", + "tests/buildlog_bytes.rs": "a1e9c0a1e193bfb80c1328782cdbb78bcc23459245e6cd44b9c0951d54fa94da", + "tests/diagnostics.rs": "42d3d89f7f65ddeffc5e11e4648b92488e4e89b513c5cef3a1a42faff8799217", + "tests/lifecycle.rs": "7714de58ac54439a3dccc531a83f297ec90eb2cc2e4b718aa1321b01a9f33f27", + "tests/manifest.rs": "d5376b4fd2958573b786cb1322831ad4d67934b5760c49b6615df270ee4ffee6", + "tests/source.rs": "b6b7a3517fe727c07d8b80f50040af2c9b0699f5ea0e4c83bcc8819f5308052d", + "tools/manifest-validator/Cargo.lock": "ae2cb28761abf9ce99c9f5c4df246d47d61955a9919907fd222f511d13d84ba6", + "tools/manifest-validator/Cargo.toml": "81aa8724804a7f701f7b312c8851937369409d029071d2034dbd6f535b86df6a", + "tools/manifest-validator/src/main.rs": "bb5f5ab38c63e2c28aa64a329696e923aa747e62de2d058e2de734ada06e72b4", + "ui/index.tsx": "a849b3b4b678689578843e001cc26744181fe3eb3746a4c4b737796222f054c5" + }, + "runtimeArtifactsReplaced": false, + "scope": "Rust package/import and binary namespace, host UI import namespace, paired test environment variables and exact SDK pin", + "sdkGit": "https://github.com/spitzli/cloud-plugin-sdk", + "sdkRevision": "8019f3df67dba3fed3083f22635e4725028c1b5e", + "sourceChecks": { + "allRegistryLockfilesPreserved": [ + "Cargo.lock", + "tools/manifest-validator/Cargo.lock" + ], + "format": true, + "releaseContract": true, + "rustLiteralFilesChecked": 16, + "strictClippy": true, + "testsIgnored": 0, + "testsPassed": 12, + "ui": { + "component": "archives", + "hostConsoleSource": "a9fa78a6264a64a5e3e9405a49d94da189f7638b", + "typecheckPassed": true + } + }, + "version": "0.3.0", + "wireStoredCryptographicAndExternalResourceBindings": "retained for coordinated migration" +} diff --git a/NOTICE b/NOTICE index 8f8f4fb..69c129f 100644 --- a/NOTICE +++ b/NOTICE @@ -1,7 +1,7 @@ -Webdock +Spitzli Cloud Copyright (c) 2026 Spitzli Development and contributors. -Original Webdock code is licensed under AGPL-3.0-only unless separately noted. +Original Spitzli Cloud code is licensed under AGPL-3.0-only unless separately noted. Alternative written licenses may be available from the relevant rights holder. See LICENSE and COMMERCIAL-LICENSING.md. diff --git a/scripts/plugin-release/release.mjs b/scripts/plugin-release/release.mjs index 11b4590..4f227e7 100644 --- a/scripts/plugin-release/release.mjs +++ b/scripts/plugin-release/release.mjs @@ -78,7 +78,7 @@ export function validateDockerfile(raw) { export function validateSDKDependencies(dependencies) { const sources = new Set(); - for (const dependency of dependencies.filter(dep => dep.name.startsWith('webdock-'))) { + for (const dependency of dependencies.filter(dep => dep.name.startsWith('spitzli-') || dep.name.startsWith('webdock-'))) { requireValue(typeof dependency.source === 'string' && /\?rev=[a-f0-9]{40}(?:#|$)/.test(dependency.source), 'Every SDK crate must use a reviewed Git revision'); sources.add(dependency.source.split('#')[0]); } diff --git a/src/backend.rs b/src/backend.rs index 2b24d71..57c2c93 100644 --- a/src/backend.rs +++ b/src/backend.rs @@ -7,8 +7,8 @@ use aws_sdk_s3::{ types::ExpirationStatus, }; use serde::Deserialize; +use spitzli_object_storage::{ObjectReceipt, S3Config, Store}; use std::time::Duration; -use webdock_object_storage::{ObjectReceipt, S3Config, Store}; #[derive(Deserialize)] #[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct BackendConfig { @@ -52,7 +52,7 @@ impl Backend { }; #[cfg(not(feature = "local-native-fixture"))] let fixture_deadline: Option = None; - let credentials = webdock_object_storage::Credentials::new( + let credentials = spitzli_object_storage::Credentials::new( c.credentials.access_key_id.clone(), c.credentials.secret_access_key.clone(), ) diff --git a/src/engine.rs b/src/engine.rs index 925411e..3868d7f 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -10,12 +10,12 @@ use crate::{ use serde::Deserialize; use serde_json::{Value, json}; use sha2::{Digest, Sha256}; +use spitzli_plugin_protocol::storage::{ + Attachment, StorageAuthorization, StorageDirection, StoragePlan, +}; use std::{os::unix::fs::MetadataExt, path::PathBuf, sync::Arc}; use tokio::sync::Semaphore; use uuid::Uuid; -use webdock_plugin_protocol::storage::{ - Attachment, StorageAuthorization, StorageDirection, StoragePlan, -}; #[derive(Deserialize)] #[serde(deny_unknown_fields)] struct Create { @@ -71,17 +71,17 @@ impl Engine { customer: &str, project: &str, input: Value, - core_source: Option, + core_source: Option, ) -> Result { let c: Create = serde_json::from_value(input.clone()).map_err(|_| "Invalid archive request")?; if let Some(source) = &core_source { source.validate()?; let expected = match c.kind { - Kind::Postgres => webdock_export_protocol::SourceKind::Postgres, - Kind::Project => webdock_export_protocol::SourceKind::Project, - Kind::Report => webdock_export_protocol::SourceKind::Report, - Kind::BuildLog => webdock_export_protocol::SourceKind::BuildLog, + Kind::Postgres => spitzli_export_protocol::SourceKind::Postgres, + Kind::Project => spitzli_export_protocol::SourceKind::Project, + Kind::Report => spitzli_export_protocol::SourceKind::Report, + Kind::BuildLog => spitzli_export_protocol::SourceKind::BuildLog, Kind::Diagnostics => return Err("Invalid source kind"), }; if source.kind != expected || c.source_id.as_deref() != Some(source.id.as_str()) { @@ -160,7 +160,7 @@ impl Engine { customer: &str, project: &str, id: Uuid, - ) -> Result> { + ) -> Result> { let archive = self.owned(customer, project, id).await?; Ok(archive.source()?.cloned()) } diff --git a/src/fixture.rs b/src/fixture.rs index 3ba45cf..17d5608 100644 --- a/src/fixture.rs +++ b/src/fixture.rs @@ -8,7 +8,7 @@ pub struct NativeProfile { pub ca_sha256: String, } impl NativeProfile { - pub fn validate(&self, c: &webdock_object_storage::S3Config, now: i64) -> crate::Result<()> { + pub fn validate(&self, c: &spitzli_object_storage::S3Config, now: i64) -> crate::Result<()> { let endpoint = url::Url::parse(&c.endpoint).map_err(|_| "Invalid archive fixture target")?; if self.run_id.len() != 12 @@ -64,7 +64,7 @@ mod tests { expires_at: 2000, ca_sha256: "a".repeat(64), }; - let c = webdock_object_storage::S3Config { + let c = spitzli_object_storage::S3Config { id: "fixture".into(), endpoint: "https://123456abcdef.native-archives.test:19443".into(), region: "us-east-1".into(), diff --git a/src/lib.rs b/src/lib.rs index 56993cb..3ce3783 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,9 +16,9 @@ pub mod store; pub use engine::Engine; use serde_json::{Value, json}; +use spitzli_plugin_protocol::{ErrorCode, InvocationClaims, Manifest, PluginError}; +use spitzli_plugin_runtime::{ActionHandler, HostClient, JobHandler}; use std::sync::Arc; -use webdock_plugin_protocol::{ErrorCode, InvocationClaims, Manifest, PluginError}; -use webdock_plugin_runtime::{ActionHandler, HostClient, JobHandler}; pub fn validate_manifest(manifest: &Manifest) -> std::result::Result<(), PluginError> { let mut actual = manifest.as_json().clone(); @@ -58,7 +58,7 @@ pub struct Handler { impl ActionHandler for Handler { async fn authorize_storage( &self, - a: &webdock_plugin_protocol::storage::StorageAuthorization, + a: &spitzli_plugin_protocol::storage::StorageAuthorization, ) -> std::result::Result<(), PluginError> { self.engine .authorize(a) diff --git a/src/main.rs b/src/main.rs index d74c41e..4416da0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,8 @@ //! Protected export/diagnostic producer; no production activation is implicit. use serde::Deserialize; +use spitzli_plugin_kit::transport::{CoreTls, ListenTls, RuntimeTransport}; +use spitzli_plugin_runtime::{self as runtime}; use std::{path::PathBuf, process::ExitCode, sync::Arc}; -use webdock_plugin_kit::transport::{CoreTls, ListenTls, RuntimeTransport}; -use webdock_plugin_runtime::{self as runtime}; type Error = Box; #[derive(Debug)] struct StartupFailure(&'static str); @@ -26,20 +26,20 @@ struct Configuration { core_peers: Vec, storage_url: String, storage_ca: Option, - backend: webdock_archives::backend::BackendConfig, + backend: spitzli_archives::backend::BackendConfig, staging_directory: PathBuf, #[serde(default)] - database_sources: Vec, + database_sources: Vec, } async fn run() -> Result<(), Error> { - webdock_archives::initialize_crypto(); + spitzli_archives::initialize_crypto(); let mut args = std::env::args_os().skip(1); let path = PathBuf::from(args.next().ok_or("configuration path required")?); if args.next().is_some() { return Err("unexpected argument".into()); } let config: Configuration = serde_json::from_slice( - &webdock_plugin_kit::read_file(&path, true) + &spitzli_plugin_kit::read_file(&path, true) .map_err(|_| StartupFailure("configuration_file"))?, ) .map_err(|_| StartupFailure("configuration"))?; @@ -55,20 +55,20 @@ async fn run() -> Result<(), Error> { transport .validate() .map_err(|_| StartupFailure("transport_configuration"))?; - let manifest = webdock_plugin_protocol::Manifest::parse(&webdock_plugin_kit::read_file( + let manifest = spitzli_plugin_protocol::Manifest::parse(&spitzli_plugin_kit::read_file( &config.manifest, false, )?)?; - webdock_archives::validate_manifest(&manifest).map_err(|_| StartupFailure("manifest"))?; + spitzli_archives::validate_manifest(&manifest).map_err(|_| StartupFailure("manifest"))?; let ca = config .storage_ca .as_ref() - .map(|path| webdock_plugin_kit::read_file(path, false)) + .map(|path| spitzli_plugin_kit::read_file(path, false)) .transpose()?; - webdock_archives::prepare_staging(&config.staging_directory) + spitzli_archives::prepare_staging(&config.staging_directory) .map_err(|_| StartupFailure("staging"))?; let backend = Arc::new( - webdock_archives::backend::Backend::new(config.backend) + spitzli_archives::backend::Backend::new(config.backend) .await .map_err(|code| { StartupFailure(match code { @@ -85,7 +85,7 @@ async fn run() -> Result<(), Error> { })?, ); let engine = Arc::new( - webdock_archives::Engine::connect( + spitzli_archives::Engine::connect( &config.storage_url, ca.as_deref(), backend, @@ -99,7 +99,7 @@ async fn run() -> Result<(), Error> { .core_client() .await .map_err(|_| StartupFailure("core_tls"))?; - let plugin = Arc::new(webdock_archives::Handler { + let plugin = Arc::new(spitzli_archives::Handler { engine, host: client.clone(), }); diff --git a/src/model.rs b/src/model.rs index 2e1c64f..8939342 100644 --- a/src/model.rs +++ b/src/model.rs @@ -1,5 +1,5 @@ use serde::{Deserialize, Serialize}; -use webdock_plugin_protocol::storage::StorageAuthorization; +use spitzli_plugin_protocol::storage::StorageAuthorization; #[derive(Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "kebab-case")] pub enum Kind { @@ -61,10 +61,10 @@ pub struct Archive { pub epoch: String, pub expires_at: i64, pub source_binding: Option, - pub core_source: Option, + pub core_source: Option, pub job: Option, pub failure: Option, - pub receipt: Option, + pub receipt: Option, pub diagnostics: Option, } impl Archive { @@ -78,8 +78,8 @@ impl Archive { Ok(()) } /// Historical unqualified exports stay inspectable/deletable, never byte-readable. - pub fn source(&self) -> crate::Result> { - use webdock_export_protocol::SourceKind; + pub fn source(&self) -> crate::Result> { + use spitzli_export_protocol::SourceKind; let expected = match self.kind { Kind::Diagnostics if self.core_source.is_none() => return Ok(None), Kind::Diagnostics => return Err("Invalid source kind"), @@ -100,7 +100,7 @@ impl Archive { } Ok(Some(source)) } - pub fn ready(&self, now: i64) -> crate::Result<&webdock_object_storage::ObjectReceipt> { + pub fn ready(&self, now: i64) -> crate::Result<&spitzli_object_storage::ObjectReceipt> { if self.state != State::Ready || self.expires_at <= now { return Err("Archive unavailable"); } @@ -109,7 +109,7 @@ impl Archive { } let receipt = self.receipt.as_ref().ok_or("Archive unavailable")?; if self.kind == Kind::BuildLog - && receipt.size_bytes > webdock_export_protocol::MAX_BUILD_LOG_GZIP_BYTES + && receipt.size_bytes > spitzli_export_protocol::MAX_BUILD_LOG_GZIP_BYTES { return Err("Build log output limit"); } @@ -120,7 +120,7 @@ impl Archive { self.owned(&a.customer_id, &a.project_id)?; if a.plugin_id != "archives" || a.action != "archives.download" - || a.direction != webdock_plugin_protocol::storage::StorageDirection::Download + || a.direction != spitzli_plugin_protocol::storage::StorageDirection::Download || a.resource_id != self.id.to_string() || a.resource_epoch != self.epoch || a.exact_bytes != r.size_bytes diff --git a/src/producer.rs b/src/producer.rs index dcc7dc2..8a21496 100644 --- a/src/producer.rs +++ b/src/producer.rs @@ -12,7 +12,7 @@ pub struct DatabaseSource { } /// Remote material only comes from the private Core source RPC, never user-selected URL/SQL. pub async fn dump_managed( - material: webdock_export_protocol::wire::DatabaseMaterial, + material: spitzli_export_protocol::wire::DatabaseMaterial, root: &Path, ) -> Result { use tokio::io::AsyncWriteExt; @@ -45,7 +45,7 @@ pub async fn dump_managed( .map_err(|_| "Private source trust staging unavailable")?; std::fs::write(ca.path(), material.ca_certificate.as_bytes()) .map_err(|_| "Private source trust staging unavailable")?; - let client = webdock_plugin_kit::postgres::connect( + let client = spitzli_plugin_kit::postgres::connect( uri.as_str(), Some(material.ca_certificate.as_bytes()), ) diff --git a/src/sources.rs b/src/sources.rs index 7e19479..44724d1 100644 --- a/src/sources.rs +++ b/src/sources.rs @@ -1,11 +1,11 @@ //! Existing pinned Core channel; no public transport can ask for private source material. use crate::{MAX_BYTES, Result, now}; -use std::path::Path; -use tokio::io::{AsyncSeekExt, AsyncWriteExt}; -use webdock_export_protocol::{ +use spitzli_export_protocol::{ SourceKind, SourceRef, wire::{self, export_sources_client::ExportSourcesClient}, }; +use std::path::Path; +use tokio::io::{AsyncSeekExt, AsyncWriteExt}; #[derive(Clone)] pub struct Sources { client: ExportSourcesClient, @@ -66,7 +66,7 @@ impl Sources { } pub async fn validate_download( &self, - a: &webdock_plugin_protocol::storage::StorageAuthorization, + a: &spitzli_plugin_protocol::storage::StorageAuthorization, source: Option<&SourceRef>, job: &str, ) -> Result<()> { @@ -151,12 +151,12 @@ impl Sources { let file = tempfile::tempfile_in(root).map_err(|_| "Private source staging unavailable")?; let mut file = tokio::fs::File::from_std(file); let source_limit = if source.kind == SourceKind::BuildLog { - webdock_export_protocol::MAX_BUILD_LOG_BYTES as u64 + spitzli_export_protocol::MAX_BUILD_LOG_BYTES as u64 } else { MAX_BYTES }; let archive_limit = if source.kind == SourceKind::BuildLog { - webdock_export_protocol::MAX_BUILD_LOG_GZIP_BYTES + spitzli_export_protocol::MAX_BUILD_LOG_GZIP_BYTES } else { MAX_BYTES }; @@ -167,7 +167,7 @@ impl Sources { .map_err(|_| "Export source interrupted")? { if !chunk.reference_json.is_empty() - || chunk.data.len() > webdock_export_protocol::CHUNK_BYTES + || chunk.data.len() > spitzli_export_protocol::CHUNK_BYTES { return Err("Invalid export source frame"); } diff --git a/src/store.rs b/src/store.rs index 04cc873..3cd10eb 100644 --- a/src/store.rs +++ b/src/store.rs @@ -13,12 +13,12 @@ impl Store { pub async fn connect(url: &str, ca: Option<&[u8]>) -> Result { let migrations = [include_str!("../migrations/0001_metadata.sql")]; let client = match ca { - Some(ca) => webdock_plugin_kit::storage_tls(url, ca, "archives", &migrations) + Some(ca) => spitzli_plugin_kit::storage_tls(url, ca, "archives", &migrations) .await .map_err(|_| "Archive metadata unavailable")?, None => { - webdock_plugin_kit::loopback(url).map_err(|_| "Private metadata TLS required")?; - webdock_plugin_kit::storage(url, "archives", &migrations) + spitzli_plugin_kit::loopback(url).map_err(|_| "Private metadata TLS required")?; + spitzli_plugin_kit::storage(url, "archives", &migrations) .await .map_err(|_| "Archive metadata unavailable")? } @@ -37,7 +37,7 @@ impl Store { }) } async fn connection(&self) -> Result { - let c = webdock_plugin_kit::postgres::connect(&self.url, self.ca.as_deref()) + let c = spitzli_plugin_kit::postgres::connect(&self.url, self.ca.as_deref()) .await .map_err(|_| "Archive metadata unavailable")?; c.batch_execute("SET statement_timeout='500ms'; SET synchronous_commit=on") diff --git a/standalone.json b/standalone.json index b1e7849..b714d10 100644 --- a/standalone.json +++ b/standalone.json @@ -1,17 +1,17 @@ { "binaries": [ - "webdock-archives" + "spitzli-archives" ], "connectionsOwner": "Core", "coreIntegrationDependencies": [ - "webdock-browser-session", - "webdock-build", - "webdock-databases", - "webdock-hosting", - "webdock-identity", - "webdock-ids", - "webdock-persistence", - "webdock-plugin-host" + "spitzli-browser-session", + "spitzli-build", + "spitzli-databases", + "spitzli-hosting", + "spitzli-identity", + "spitzli-ids", + "spitzli-persistence", + "spitzli-plugin-host" ], "coreIntegrationTests": [ "connected_export_compile.rs", @@ -21,10 +21,10 @@ "reports.rs", "repository.rs" ], - "entrypoint": "webdock-archives", + "entrypoint": "spitzli-archives", "lockfileRequiresRegeneration": true, "name": "archives", - "package": "webdock-archives", + "package": "spitzli-archives", "release": { "mode": "native-extension", "protocol": "webdock.plugin.v2", @@ -33,15 +33,15 @@ "version": "0.3.0" }, "sdkDependencies": [ - "webdock-export-protocol", - "webdock-object-storage", - "webdock-plugin-http", - "webdock-plugin-kit", - "webdock-plugin-protocol", - "webdock-plugin-runtime", - "webdock-repository-protocol" + "spitzli-export-protocol", + "spitzli-object-storage", + "spitzli-plugin-http", + "spitzli-plugin-kit", + "spitzli-plugin-protocol", + "spitzli-plugin-runtime", + "spitzli-repository-protocol" ], "sdkGit": "https://github.com/spitzli/cloud-plugin-sdk", - "sdkRevision": "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6", + "sdkRevision": "8019f3df67dba3fed3083f22635e4725028c1b5e", "source": "plugins/archives" } diff --git a/tests/buildlog_bytes.rs b/tests/buildlog_bytes.rs index 2fa45ff..ff349cd 100644 --- a/tests/buildlog_bytes.rs +++ b/tests/buildlog_bytes.rs @@ -1,6 +1,6 @@ //! Offline private-RPC byte-contract tests; this mock does not qualify Core authority. +use spitzli_export_protocol::{SourceKind, SourceRef, wire}; use std::pin::Pin; -use webdock_export_protocol::{SourceKind, SourceRef, wire}; #[derive(Clone)] struct Source { bytes: Vec, @@ -76,7 +76,7 @@ async fn produce( active: bool, ) -> ( tempfile::TempDir, - webdock_archives::Result<(SourceRef, tokio::fs::File)>, + spitzli_archives::Result<(SourceRef, tokio::fs::File)>, ) { use std::os::unix::fs::PermissionsExt; let directory = tempfile::Builder::new() @@ -84,7 +84,7 @@ async fn produce( .tempdir() .unwrap(); let path = directory.path().join("core.sock"); - let mut socket = webdock_plugin_runtime::UnixSocket::bind(&path).unwrap(); + let mut socket = spitzli_plugin_runtime::UnixSocket::bind(&path).unwrap(); let incoming = socket.incoming().unwrap(); let service = wire::export_sources_server::ExportSourcesServer::new(Source { bytes, active }); let _server = Server(tokio::spawn(async move { @@ -95,8 +95,8 @@ async fn produce( .await .unwrap(); })); - let channel = webdock_plugin_runtime::unix_channel(&path).await.unwrap(); - let result = webdock_archives::sources::Sources::new(channel) + let channel = spitzli_plugin_runtime::unix_channel(&path).await.unwrap(); + let result = spitzli_archives::sources::Sources::new(channel) .produce("offline-typed-byte-fixture", &reference(), directory.path()) .await; (directory, result) diff --git a/tests/diagnostics.rs b/tests/diagnostics.rs index 957a0ff..817977f 100644 --- a/tests/diagnostics.rs +++ b/tests/diagnostics.rs @@ -1,6 +1,6 @@ use serde_json::json; +use spitzli_archives::diagnostics::Diagnostics; use std::io::Read; -use webdock_archives::diagnostics::Diagnostics; fn sample() -> serde_json::Value { json!({"version":1,"state":"finished","builds":[{"id":"123","outcome":"succeeded","duration_ms":12,"output_bytes":42}],"checks":[{"component":"storage","outcome":"healthy","duration_ms":3}]}) diff --git a/tests/lifecycle.rs b/tests/lifecycle.rs index 4c58afe..56e658f 100644 --- a/tests/lifecycle.rs +++ b/tests/lifecycle.rs @@ -1,11 +1,11 @@ use serde_json::json; -use webdock_archives::{ +use spitzli_archives::{ diagnostics::Diagnostics, model::{Archive, Kind, State}, }; -use webdock_plugin_protocol::storage::{StorageAuthorization, StorageDirection}; +use spitzli_plugin_protocol::storage::{StorageAuthorization, StorageDirection}; fn archive() -> Archive { - Archive { id:uuid::Uuid::parse_str("11111111-1111-4111-8111-111111111111").unwrap(), customer:"123".into(),project:"124".into(),kind:Kind::Diagnostics,state:State::Ready,epoch:uuid::Uuid::new_v4().to_string(),expires_at:2000,source_binding:None,core_source:None,failure:None,job:Some("job-example".into()),receipt:Some(webdock_object_storage::ObjectReceipt {backend_id:"owned".into(),binding:"a".repeat(64),object_key:"archives/123/124/11111111-1111-4111-8111-111111111111/22222222-2222-4222-8222-222222222222".into(),size_bytes:42,sha256:"b".repeat(64)}),diagnostics:Some(Diagnostics::parse(json!({"version":1,"state":"finished","builds":[],"checks":[]})).unwrap()) } + Archive { id:uuid::Uuid::parse_str("11111111-1111-4111-8111-111111111111").unwrap(), customer:"123".into(),project:"124".into(),kind:Kind::Diagnostics,state:State::Ready,epoch:uuid::Uuid::new_v4().to_string(),expires_at:2000,source_binding:None,core_source:None,failure:None,job:Some("job-example".into()),receipt:Some(spitzli_object_storage::ObjectReceipt {backend_id:"owned".into(),binding:"a".repeat(64),object_key:"archives/123/124/11111111-1111-4111-8111-111111111111/22222222-2222-4222-8222-222222222222".into(),size_bytes:42,sha256:"b".repeat(64)}),diagnostics:Some(Diagnostics::parse(json!({"version":1,"state":"finished","builds":[],"checks":[]})).unwrap()) } } fn auth(r: &Archive) -> StorageAuthorization { StorageAuthorization { diff --git a/tests/manifest.rs b/tests/manifest.rs index 44700ee..fd5af52 100644 --- a/tests/manifest.rs +++ b/tests/manifest.rs @@ -1,8 +1,8 @@ -use webdock_plugin_protocol::Manifest; +use spitzli_plugin_protocol::Manifest; #[test] fn compiled_native_contract_keeps_bytes_on_core_storage_and_jobs_on_core() { let manifest = Manifest::parse(include_bytes!("../manifest.json")).unwrap(); - webdock_archives::validate_manifest(&manifest).unwrap(); + spitzli_archives::validate_manifest(&manifest).unwrap(); assert_eq!( manifest.action("archives.download").unwrap()["storage"], "download" @@ -14,7 +14,7 @@ fn compiled_native_contract_keeps_bytes_on_core_storage_and_jobs_on_core() { #[test] fn normal_runtime_configuration_cannot_enable_native_minio_exceptions() { let value = serde_json::json!({"config":{"id":"fixture","endpoint":"https://123456abcdef.native-archives.test:19443","region":"us-east-1","bucket":"wd-archives-123456abcdef","namespace":"archives"},"credentials":{"accessKeyId":"test-only","secretAccessKey":"test-only"},"fixtureProfile":{"runId":"123456abcdef","expiresAt":2000,"caSha256":"a".repeat(64)}}); - assert!(serde_json::from_value::(value).is_err()); + assert!(serde_json::from_value::(value).is_err()); } #[test] @@ -22,12 +22,12 @@ fn buildlog_public_requests_select_only_core_ids_never_log_bytes() { let manifest = Manifest::parse(include_bytes!("../manifest.json")).unwrap(); let action = manifest.action("archives.create").unwrap(); let base = serde_json::json!({"request_id":"11111111-1111-4111-8111-111111111111","kind":"buildlog","source_id":"125","retention_seconds":3600}); - assert!(webdock_plugin_protocol::validate_value(action.get("input"), &base).is_ok()); + assert!(spitzli_plugin_protocol::validate_value(action.get("input"), &base).is_ok()); for field in ["logs", "log", "content", "bytes", "url", "path"] { let mut forged = base.clone(); forged[field] = serde_json::json!("untrusted body"); assert!( - webdock_plugin_protocol::validate_value(action.get("input"), &forged).is_err(), + spitzli_plugin_protocol::validate_value(action.get("input"), &forged).is_err(), "{field} must never become a buildlog source" ); } diff --git a/tests/source.rs b/tests/source.rs index dcea1dc..3758265 100644 --- a/tests/source.rs +++ b/tests/source.rs @@ -1,5 +1,5 @@ -use webdock_archives::model::{Archive, Kind, State}; -use webdock_export_protocol::{SourceKind, SourceRef}; +use spitzli_archives::model::{Archive, Kind, State}; +use spitzli_export_protocol::{SourceKind, SourceRef}; #[test] fn every_observed_producer_requires_its_exact_managed_source_kind_and_binding() { let mut archive = Archive { diff --git a/tools/manifest-validator/Cargo.lock b/tools/manifest-validator/Cargo.lock index dd69a41..26ce02b 100644 --- a/tools/manifest-validator/Cargo.lock +++ b/tools/manifest-validator/Cargo.lock @@ -991,6 +991,32 @@ version = "1.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0d5d4b1981b8bbbb7aed204cae5726d683d5d6ac7e74ec54122ea28f315e7c8" +[[package]] +name = "spitzli-plugin-protocol" +version = "0.1.0" +source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8019f3df67dba3fed3083f22635e4725028c1b5e#8019f3df67dba3fed3083f22635e4725028c1b5e" +dependencies = [ + "base64", + "chrono", + "ed25519-dalek", + "jsonschema", + "node-semver", + "regex", + "serde", + "serde_json", + "sha2", + "url", + "uuid", +] + +[[package]] +name = "spitzli-registry-manifest-validator" +version = "0.1.0" +dependencies = [ + "serde_json", + "spitzli-plugin-protocol", +] + [[package]] name = "spki" version = "0.7.3" @@ -1239,32 +1265,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "webdock-plugin-protocol" -version = "0.1.0" -source = "git+https://github.com/spitzli/cloud-plugin-sdk?rev=8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6#8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -dependencies = [ - "base64", - "chrono", - "ed25519-dalek", - "jsonschema", - "node-semver", - "regex", - "serde", - "serde_json", - "sha2", - "url", - "uuid", -] - -[[package]] -name = "webdock-registry-manifest-validator" -version = "0.1.0" -dependencies = [ - "serde_json", - "webdock-plugin-protocol", -] - [[package]] name = "windows-link" version = "0.2.1" diff --git a/tools/manifest-validator/Cargo.toml b/tools/manifest-validator/Cargo.toml index 3d08d68..e4c3b1d 100644 --- a/tools/manifest-validator/Cargo.toml +++ b/tools/manifest-validator/Cargo.toml @@ -1,5 +1,5 @@ ["package"] -"name" = "webdock-registry-manifest-validator" +"name" = "spitzli-registry-manifest-validator" "version" = "0.1.0" "edition" = "2024" "rust-version" = "1.94" @@ -11,10 +11,10 @@ ["dependencies"] "serde_json" = "1" -["dependencies"."webdock-plugin-protocol"] +["dependencies"."spitzli-plugin-protocol"] "git" = "https://github.com/spitzli/cloud-plugin-sdk" -"rev" = "8ed57d89c3263b050f126e4c2ba7f6cdebb0daa6" -"package" = "webdock-plugin-protocol" +"rev" = "8019f3df67dba3fed3083f22635e4725028c1b5e" +"package" = "spitzli-plugin-protocol" ["profile"] diff --git a/tools/manifest-validator/src/main.rs b/tools/manifest-validator/src/main.rs index efb848a..6453517 100644 --- a/tools/manifest-validator/src/main.rs +++ b/tools/manifest-validator/src/main.rs @@ -1,5 +1,5 @@ use std::io::{self, Read, Write}; -use webdock_plugin_protocol::Manifest; +use spitzli_plugin_protocol::Manifest; const MAX_REGISTRY_BYTES: usize = 64 * 1024; diff --git a/ui/index.tsx b/ui/index.tsx index f997521..006f43e 100644 --- a/ui/index.tsx +++ b/ui/index.tsx @@ -1,6 +1,6 @@ import { useCallback, useEffect, useRef, useState } from "react"; import { z } from "zod"; -import { ui, usePluginScope, type CreateProps, type ResourceProps, type PluginUI, type TransferDescriptor } from "@webdock/plugin-ui"; +import { ui, usePluginScope, type CreateProps, type ResourceProps, type PluginUI, type TransferDescriptor } from "@spitzli/plugin-ui"; const sourceSchema=z.object({sources:z.array(z.object({id:z.string().regex(/^[1-9][0-9]{0,18}$/),kind:z.enum(["postgres","project","report","buildlog"]),state:z.literal("ready")})).max(301),maxBytes:z.number(),maxRetentionSeconds:z.number(),pgSourceRequiresReadonlyRole:z.boolean()}); const statusSchema=z.object({state:z.enum(["pending","producing","ready","failed","deleting","deleted","expired"]),kind:z.enum(["postgres","project","report","buildlog","diagnostics"]),expires_at:z.number(),source:z.object({version:z.literal(1),kind:z.enum(["postgres","project","report","buildlog"]),id:z.string(),binding:z.string(),commit:z.string().nullable()}).nullable().optional(),failure:z.enum(["readonly_source_unavailable","source_access_changed","output_limit","storage_unavailable","export_failed"]).nullable().optional(),bytes:z.number().nullable(),sha256:z.string().nullable(),jobID:z.string().nullable().optional(),job:z.object({id:z.string(),name:z.string(),state:z.enum(["waiting","active","completed","failed","cancelled"]),attempts:z.number()}).optional()});