From 3a687eb1fd1ab430793bbd9f6520b67b6aa0df00 Mon Sep 17 00:00:00 2001 From: Lisa Jetton Date: Tue, 1 Oct 2024 18:07:33 -0500 Subject: [PATCH] feat: integrate DPKI (#236) * Optional agent key for app installation * make compatibile with signal changes and pubkey as optional * update hc v; start dpki addition * add no-dpki flag * make compatibile with signal changes and pubkey as optional * fix types and tests * assert type check * lint * lint * fix lints * update holonix * build: fix js client dependency * style: fix ts type * Update Holochain version and fix some tests * fix(local): no-dpki option * feat(local): dpki network seed option * feat(local): set shared dpki settings in scenario * temporarily add nix flake to test * fix: make dpki and dpki-network-seed mutually exclusive * build(nix): update flake & add system configuration pkg for macos * build: update JS client * test: fix signal types * test(trycp): fix no_dpki option * ci: add trycp to test workflow * build: update hdk & hdi in workspace * ci: run trycp intergration test in release mode * tests: fix clone cell management * ci: fix trycp cache * refactor(trycp_server): run lair in-process * build(trycp_server): always build in release mode * remove lair stderr from logs * fix: bring back shared range of admin ports * fix(trycp): multi server test * refactor(trycp): log error when removing player dir * fix(trycp): handle startup errors * test: refactor integration * refactor default config * fix reset error type * feat(trycp: add call to revoke agent call * test(local): add revoke agent key test * docs: update changelog * test: fix multi server scenario * write errors to stdout * address comments from review * Apply suggestions from code review Co-authored-by: David Braden --------- Co-authored-by: Michael Dougherty Co-authored-by: Jost Schulte Co-authored-by: ThetaSinner Co-authored-by: David Braden --- .github/workflows/test.yml | 9 +- CHANGELOG.md | 2 + Cargo.lock | 2880 +++++++++++------ build-trycp.sh | 2 +- crates/trycp_api/src/lib.rs | 2 - crates/trycp_server/Cargo.toml | 6 + crates/trycp_server/src/configure_player.rs | 113 +- crates/trycp_server/src/download_logs.rs | 8 +- crates/trycp_server/src/main.rs | 19 +- crates/trycp_server/src/reset.rs | 28 +- crates/trycp_server/src/startup.rs | 215 +- crates/trycp_server/tests/integration.rs | 181 ++ docs/tryorama.conductoroptions.md | 19 + docs/tryorama.conductoroptions.nodpki.md | 13 + docs/tryorama.createconductoroptions.md | 2 +- docs/tryorama.trycpconductoroptions.md | 21 + docs/tryorama.trycpconductoroptions.nodpki.md | 15 + flake.lock | 66 +- flake.nix | 2 +- package-lock.json | 511 +-- package.json | 2 +- ts/src/local/conductor.ts | 42 +- ts/src/local/scenario.ts | 6 + ts/src/trycp/conductor/conductor.ts | 156 +- ts/src/trycp/conductor/scenario.ts | 105 +- ts/src/trycp/types.ts | 13 + ts/src/trycp/util.ts | 1 - ts/test/local/conductor.ts | 139 +- ts/test/local/scenario.ts | 98 +- ts/test/trycp/client.ts | 17 +- ts/test/trycp/conductor.ts | 112 +- ts/test/trycp/scenario.ts | 134 +- 32 files changed, 3254 insertions(+), 1685 deletions(-) create mode 100644 crates/trycp_server/tests/integration.rs create mode 100644 docs/tryorama.conductoroptions.nodpki.md create mode 100644 docs/tryorama.trycpconductoroptions.nodpki.md diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9d7b71ad..d9fbd348 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: Install nix - uses: cachix/install-nix-action@v27 + uses: cachix/install-nix-action@v29 - name: Set up cachix uses: cachix/cachix-action@v15 @@ -36,16 +36,19 @@ jobs: uses: actions/cache/restore@v4 with: path: crates/trycp_server/target - key: ${{ runner.os }}-build-trycp-${{ hashFiles('crates/trycp_server/Cargo.lock') }} + key: ${{ runner.os }}-build-trycp-${{ hashFiles('Cargo.lock') }} - name: Build TryCP server run: nix develop -c $SHELL -c "./build-trycp.sh" + - name: Run TryCP integration tests + run: nix develop -c $SHELL -c "cargo test -p trycp_server --release --target-dir crates/trycp_server/target" + - name: Save TryCP build to cache uses: actions/cache/save@v4 with: path: crates/trycp_server/target - key: ${{ runner.os }}-build-trycp-${{ hashFiles('crates/trycp_server/Cargo.lock') }} + key: ${{ runner.os }}-build-trycp-${{ hashFiles('Cargo.lock') }} - name: Restore test zome build uses: actions/cache/restore@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index df6303ea..c6f7c507 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ## \[Unreleased\] ### Added +- Support for DPKI in Holochain. DPKI is a Holochain conductor service to manage agent keys. Within a scenario there are two new member properties `noDpki` and `dpkiNetworkSeed`. Set `noDpki` to `true` to disable DPKI for the scenario. If DPKI is enabled, a network seed for the DPKI service can be set with `dpkiNetworkSeed`. +- Admin API call `RevokeAgentKey` to revoke an agent key. Once revoked, all cells of the app are read-only and the agent can no longer write to it. ### Removed ### Changed ### Fixed diff --git a/Cargo.lock b/Cargo.lock index 3909b0d6..3c9df899 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8,7 +8,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ - "gimli 0.29.0", + "gimli", ] [[package]] @@ -17,15 +17,23 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler32" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" + [[package]] name = "ahash" -version = "0.7.8" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ + "cfg-if 1.0.0", "getrandom", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -37,6 +45,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" + [[package]] name = "android-tzdata" version = "0.1.1" @@ -61,12 +75,79 @@ dependencies = [ "winapi", ] +[[package]] +name = "anstream" +version = "0.6.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" + +[[package]] +name = "anstyle-parse" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +dependencies = [ + "anstyle", + "windows-sys 0.52.0", +] + [[package]] name = "anyhow" version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +[[package]] +name = "approx" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab112f0a86d568ea0e627cc1d6be74a1e9cd55214684db5561995f6dad897c6" +dependencies = [ + "num-traits", +] + +[[package]] +name = "arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" +dependencies = [ + "derive_arbitrary", +] + [[package]] name = "arrayref" version = "0.3.7" @@ -79,6 +160,23 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "async-trait" +version = "0.1.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +dependencies = [ + "proc-macro2 1.0.85", + "quote 1.0.36", + "syn 2.0.79", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "atty" version = "0.2.14" @@ -96,6 +194,18 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +[[package]] +name = "automap" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b99d887f4066f8a1b4a713a8121fab07ff543863ac86177ebdee6b5cb18acf12" +dependencies = [ + "cfg-if 1.0.0", + "derive_more", + "serde", + "shrinkwraprs", +] + [[package]] name = "backtrace" version = "0.3.73" @@ -104,7 +214,7 @@ checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", "miniz_oxide", "object", @@ -113,9 +223,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.7" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" @@ -155,21 +265,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" - -[[package]] -name = "bitvec" -version = "1.0.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "blake2b_simd" @@ -198,26 +296,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] -name = "bytecheck" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" -dependencies = [ - "bytecheck_derive", - "ptr_meta", - "simdutf8", -] - -[[package]] -name = "bytecheck_derive" -version = "0.6.12" +name = "bytemuck" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" -dependencies = [ - "proc-macro2 1.0.85", - "quote 1.0.36", - "syn 1.0.109", -] +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" [[package]] name = "byteorder" @@ -230,18 +312,6 @@ name = "bytes" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" -dependencies = [ - "serde", -] - -[[package]] -name = "bytesize" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" -dependencies = [ - "serde", -] [[package]] name = "camino" @@ -263,13 +333,13 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.15.4" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "semver 1.0.23", + "semver", "serde", "serde_json", "thiserror", @@ -277,9 +347,18 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.99" +version = "1.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" @@ -301,8 +380,10 @@ checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", + "js-sys", "num-traits", "serde", + "wasm-bindgen", "windows-targets 0.52.5", ] @@ -321,6 +402,52 @@ dependencies = [ "vec_map", ] +[[package]] +name = "clap" +version = "4.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0956a43b323ac1afaffc053ed5c4b7c1f1800bacd1683c353aabbb752515dd3" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d72166dd41634086d5803a47eb71ae740e61d84709c36f3c34110173db3961b" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim 0.11.1", +] + +[[package]] +name = "clap_derive" +version = "4.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +dependencies = [ + "heck 0.5.0", + "proc-macro2 1.0.85", + "quote 1.0.36", + "syn 2.0.79", +] + +[[package]] +name = "clap_lex" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" + +[[package]] +name = "colorchoice" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" + [[package]] name = "colored" version = "2.1.0" @@ -369,16 +496,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] -name = "corosensei" -version = "0.1.4" +name = "core2" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80128832c58ea9cbd041d2a759ec449224487b2c1e400453d99d244eead87a8e" +checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" dependencies = [ - "autocfg", - "cfg-if", - "libc", - "scopeguard", - "windows-sys 0.33.0", + "memchr", ] [[package]] @@ -391,95 +514,21 @@ dependencies = [ ] [[package]] -name = "cranelift-bforest" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2ab4512dfd3a6f4be184403a195f76e81a8a9f9e6c898e19d2dc3ce20e0115" -dependencies = [ - "cranelift-entity", -] - -[[package]] -name = "cranelift-codegen" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98b022ed2a5913a38839dfbafe6cf135342661293b08049843362df4301261dc" -dependencies = [ - "arrayvec", - "bumpalo", - "cranelift-bforest", - "cranelift-codegen-meta", - "cranelift-codegen-shared", - "cranelift-egraph", - "cranelift-entity", - "cranelift-isle", - "gimli 0.26.2", - "log", - "regalloc2", - "smallvec", - "target-lexicon", -] - -[[package]] -name = "cranelift-codegen-meta" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "639307b45434ad112a98f8300c0f0ab085cbefcd767efcdef9ef19d4c0756e74" -dependencies = [ - "cranelift-codegen-shared", -] - -[[package]] -name = "cranelift-codegen-shared" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "278e52e29c53fcf32431ef08406c295699a70306d05a0715c5b1bf50e33a9ab7" - -[[package]] -name = "cranelift-egraph" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624b54323b06e675293939311943ba82d323bb340468ce1889be5da7932c8d73" -dependencies = [ - "cranelift-entity", - "fxhash", - "hashbrown 0.12.3", - "indexmap 1.9.3", - "log", - "smallvec", -] - -[[package]] -name = "cranelift-entity" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a59bcbca89c3f1b70b93ab3cbba5e5e0cbf3e63dadb23c7525cb142e21a9d4c" - -[[package]] -name = "cranelift-frontend" -version = "0.91.1" +name = "crc32fast" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d70abacb8cfef3dc8ff7e8836e9c1d70f7967dfdac824a4cd5e30223415aca6" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cranelift-codegen", - "log", - "smallvec", - "target-lexicon", + "cfg-if 1.0.0", ] [[package]] -name = "cranelift-isle" -version = "0.91.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "393bc73c451830ff8dbb3a07f61843d6cb41a084f9996319917c0b291ed785bb" - -[[package]] -name = "crc32fast" -version = "1.4.2" +name = "crossbeam-channel" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ - "cfg-if", + "crossbeam-utils", ] [[package]] @@ -501,15 +550,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "crossbeam-queue" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" -dependencies = [ - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" version = "0.8.20" @@ -570,7 +610,8 @@ dependencies = [ "ident_case", "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "strsim 0.11.1", + "syn 2.0.79", ] [[package]] @@ -592,16 +633,23 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ "darling_core 0.20.9", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", ] +[[package]] +name = "dary_heap" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7762d17f1241643615821a8455a0b2c3e803784b058693d990b11f2dce25a0ca" + [[package]] name = "dashmap" -version = "5.5.3" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", + "crossbeam-utils", "hashbrown 0.14.5", "lock_api", "once_cell", @@ -614,6 +662,16 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +[[package]] +name = "deranged" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" +dependencies = [ + "powerfmt", + "serde", +] + [[package]] name = "derivative" version = "2.2.0" @@ -625,35 +683,46 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_arbitrary" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" +dependencies = [ + "proc-macro2 1.0.85", + "quote 1.0.36", + "syn 2.0.79", +] + [[package]] name = "derive_builder" -version = "0.12.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" +checksum = "cd33f37ee6a119146a1781d3356a7c26028f83d779b2e04ecd45fdc75c76877b" dependencies = [ "derive_builder_macro", ] [[package]] name = "derive_builder_core" -version = "0.12.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" +checksum = "7431fa049613920234f22c47fdc33e6cf3ee83067091ea4277a3f8c4587aae38" dependencies = [ - "darling 0.14.4", + "darling 0.20.9", "proc-macro2 1.0.85", "quote 1.0.36", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] name = "derive_builder_macro" -version = "0.12.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" +checksum = "4abae7035bf79b9877b779505d8cf3749285b80c43941eda66604841889451dc" dependencies = [ "derive_builder_core", - "syn 1.0.109", + "syn 2.0.79", ] [[package]] @@ -669,6 +738,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + [[package]] name = "digest" version = "0.10.7" @@ -687,7 +762,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", ] [[package]] @@ -696,27 +771,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" -[[package]] -name = "document-features" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef5282ad69563b5fc40319526ba27e0e7363d552a896f0297d54f767717f9b95" -dependencies = [ - "litrs", -] - [[package]] name = "dunce" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" -[[package]] -name = "dyn-clone" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" - [[package]] name = "either" version = "1.12.0" @@ -724,44 +784,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" [[package]] -name = "enum-iterator" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eeac5c5edb79e4e39fe8439ef35207780a11f69c52cbe424ce3dfad4cb78de6" -dependencies = [ - "enum-iterator-derive", -] - -[[package]] -name = "enum-iterator-derive" -version = "0.7.0" +name = "encoding_rs" +version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c134c37760b27a871ba422106eedbb8247da973a09e82558bf26d619c882b159" +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ - "proc-macro2 1.0.85", - "quote 1.0.36", - "syn 1.0.109", + "cfg-if 1.0.0", ] [[package]] -name = "enumset" -version = "1.1.3" +name = "env_filter" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226c0da7462c13fb57e5cc9e0dc8f0635e7d27f276a3a7fd30054647f669007d" +checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" dependencies = [ - "enumset_derive", + "log", ] [[package]] -name = "enumset_derive" -version = "0.8.1" +name = "env_logger" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" +checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" dependencies = [ - "darling 0.20.9", - "proc-macro2 1.0.85", - "quote 1.0.36", - "syn 2.0.66", + "env_filter", + "log", ] [[package]] @@ -782,9 +829,15 @@ dependencies = [ [[package]] name = "fallible-iterator" -version = "0.2.0" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" [[package]] name = "fastrand" @@ -798,20 +851,37 @@ version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall 0.4.1", "windows-sys 0.52.0", ] [[package]] -name = "flate2" -version = "1.0.30" +name = "fixt" +version = "0.4.0-dev.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "193caf94296b18355f2ce2845ce03e42d0dd8db252147ab110c2c309fb1e13a5" dependencies = [ - "crc32fast", - "miniz_oxide", + "holochain_serialized_bytes", + "lazy_static", + "parking_lot", + "paste", + "rand", + "rand_core", + "serde", + "strum", + "strum_macros", +] + +[[package]] +name = "flate2" +version = "1.0.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +dependencies = [ + "crc32fast", + "miniz_oxide", ] [[package]] @@ -820,6 +890,21 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foreign-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +dependencies = [ + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" + [[package]] name = "form_urlencoded" version = "1.2.1" @@ -829,12 +914,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - [[package]] name = "futures" version = "0.3.30" @@ -891,7 +970,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", ] [[package]] @@ -924,15 +1003,6 @@ dependencies = [ "slab", ] -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "gcollections" version = "1.5.0" @@ -961,22 +1031,24 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if", - "js-sys", + "cfg-if 1.0.0", "libc", "wasi", - "wasm-bindgen", ] [[package]] -name = "gimli" -version = "0.26.2" +name = "ghost_actor" +version = "0.3.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "8a34addaffa7d2c80637807444f171c646cad7549fcdac8019544034678f76d5" dependencies = [ - "fallible-iterator", - "indexmap 1.9.3", - "stable_deref_trait", + "futures", + "must_future", + "paste", + "thiserror", + "tokio", + "tracing", + "tracing-futures", ] [[package]] @@ -986,31 +1058,80 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] -name = "half" -version = "1.8.3" +name = "h2" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b43ede17f21864e81be2fa654110bf1e793774238d86ef8555c37e6519c0403" +checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap 2.2.6", + "slab", + "tokio", + "tokio-util", + "tracing", +] [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash", -] [[package]] name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", + "allocator-api2", +] + +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown 0.14.5", +] + +[[package]] +name = "hc_r2d2_sqlite" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4044c2cadf3d960fa91a7ef91590da202797fe82cf687b029235f98be5ff49" +dependencies = [ + "r2d2", + "rusqlite", + "uuid", +] + +[[package]] +name = "hc_seed_bundle" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f930e251000e258ff14c36c4d045c9ec1dcbf2a6fff53b1432342b9a34df5ae" +dependencies = [ + "futures", + "one_err", + "rmp-serde", + "rmpv", + "serde", + "serde_bytes", + "sodoken", +] [[package]] name = "hdi" -version = "0.5.0-dev.6" +version = "0.5.0-dev.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a7a257dd74cd5b11e26a4495379e11cffc8bd2b669258924ae1f250ab1995fa" +checksum = "628eca7a3ad5aa3330e87e08bf0365aaf694e8e23fa59ccd31eb5d625219462c" dependencies = [ "getrandom", "hdk_derive", @@ -1026,9 +1147,9 @@ dependencies = [ [[package]] name = "hdk" -version = "0.4.0-dev.7" +version = "0.4.0-dev.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3be88df080a3da8c7cc04367e9f9378a615d2cadfec0790cd852d7aaba58e72" +checksum = "75f54d920bd32eba7d8ac8c16baa5b0f3bb94e48b0cdee7a01ace5badbc38da9" dependencies = [ "getrandom", "hdi", @@ -1046,9 +1167,9 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.4.0-dev.6" +version = "0.4.0-dev.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3801676865125c14219efcd8dd8ebf8281706fb54d5fa761bc403971c304671" +checksum = "eea1c46fbe682e26f55189825eb5fa2c83636099c0700b9a33e627978f1ea760" dependencies = [ "darling 0.14.4", "heck 0.5.0", @@ -1069,12 +1190,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -1096,6 +1211,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hex" version = "0.4.3" @@ -1104,28 +1225,58 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "holo_hash" -version = "0.4.0-dev.6" +version = "0.4.0-dev.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed531011529e515e7b235c53c42defb691f49ebc4bdece631c73c8bb0e9769f" +checksum = "78093a721f73f0b9d7aded3219330c40a021e90fe161f6a212dd44f7b1e5cb56" dependencies = [ "base64 0.22.1", "blake2b_simd", "derive_more", + "fixt", + "futures", "holochain_serialized_bytes", "holochain_util", "holochain_wasmer_common", "kitsune_p2p_dht_arc", + "must_future", + "rand", + "rusqlite", "serde", "serde_bytes", "thiserror", ] +[[package]] +name = "holochain_conductor_api" +version = "0.4.0-dev.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba10951922070c991e1ec047caa089d2e4c6136487a114d4c6ade9133ff97259" +dependencies = [ + "derive_more", + "holo_hash", + "holochain_keystore", + "holochain_serialized_bytes", + "holochain_state_types", + "holochain_types", + "holochain_zome_types", + "kitsune_p2p_bin_data", + "kitsune_p2p_types", + "nanoid", + "serde", + "serde_yaml", + "shrinkwraprs", + "thiserror", + "tracing", + "url2", +] + [[package]] name = "holochain_integrity_types" -version = "0.4.0-dev.6" +version = "0.4.0-dev.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9c667ca9786545ec4c724b598b62c2b0679e1252f4c0a3d7dfbd1f6673e20b" +checksum = "af9bd9d3f3f3a75c1e5ed6f65c9e3281cf1983e83780f9f24658f3b5c169ec2f" dependencies = [ + "derive_builder", "holo_hash", "holochain_secure_primitive", "holochain_serialized_bytes", @@ -1134,14 +1285,44 @@ dependencies = [ "serde", "serde_bytes", "subtle", + "subtle-encoding", + "tracing", +] + +[[package]] +name = "holochain_keystore" +version = "0.4.0-dev.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1374e4539572ebe6a9e97154f910eada4fc60453a4f6d2abdf1f0bbf231b7fcd" +dependencies = [ + "base64 0.22.1", + "derive_more", + "futures", + "holo_hash", + "holochain_secure_primitive", + "holochain_serialized_bytes", + "holochain_util", + "holochain_zome_types", + "kitsune_p2p_types", + "lair_keystore", + "must_future", + "nanoid", + "one_err", + "parking_lot", + "serde", + "serde_bytes", + "shrinkwraprs", + "sodoken", + "thiserror", + "tokio", "tracing", ] [[package]] name = "holochain_nonce" -version = "0.4.0-dev.4" +version = "0.4.0-dev.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d338a69a1d074d7ecc58e028bd3962c98741f5448830b0dcf7a853bbb6515f0" +checksum = "3bee65dd7e2558659687d7c8a02646739f1a6a9ebdc35015241a0bfdecf7fe5c" dependencies = [ "getrandom", "holochain_secure_primitive", @@ -1184,39 +1365,167 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "holochain_sqlite" +version = "0.4.0-dev.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41c7072812ba7f0f7abe7db6fda69aa75cfa1f7f20ebea4e716c6855289d3304" +dependencies = [ + "anyhow", + "async-trait", + "base64 0.22.1", + "derive_more", + "fallible-iterator", + "futures", + "getrandom", + "hc_r2d2_sqlite", + "holo_hash", + "holochain_nonce", + "holochain_serialized_bytes", + "holochain_util", + "holochain_zome_types", + "kitsune_p2p_bin_data", + "kitsune_p2p_dht", + "kitsune_p2p_dht_arc", + "kitsune_p2p_timestamp", + "kitsune_p2p_types", + "nanoid", + "num_cpus", + "once_cell", + "opentelemetry_api", + "parking_lot", + "pretty_assertions", + "r2d2", + "rmp-serde", + "rusqlite", + "scheduled-thread-pool", + "serde", + "serde_json", + "shrinkwraprs", + "sodoken", + "sqlformat", + "tempfile", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "holochain_state_types" +version = "0.4.0-dev.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97b8938b11be4938bf686caee3f97bbbb6f3e1be7c26d408fe4708afbdddb53b" +dependencies = [ + "holo_hash", + "holochain_integrity_types", + "serde", +] + +[[package]] +name = "holochain_trace" +version = "0.4.0-dev.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d337ddc8dd6bdabe6a39c08ec7e6a64135724fcbbd49b3b5f154b5e6b3a66fb" +dependencies = [ + "chrono", + "derive_more", + "inferno", + "once_cell", + "serde_json", + "thiserror", + "tracing", + "tracing-core", + "tracing-serde", + "tracing-subscriber", +] + +[[package]] +name = "holochain_types" +version = "0.4.0-dev.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e062e52ac6a2104ceb2a18f5e2dd2d17fbb480f1ba8b14d8104566ffb943a2" +dependencies = [ + "anyhow", + "async-trait", + "automap", + "backtrace", + "base64 0.13.1", + "cfg-if 0.1.10", + "chrono", + "derive_builder", + "derive_more", + "fixt", + "flate2", + "futures", + "getrandom", + "holo_hash", + "holochain_keystore", + "holochain_nonce", + "holochain_serialized_bytes", + "holochain_sqlite", + "holochain_trace", + "holochain_util", + "holochain_zome_types", + "itertools 0.12.1", + "kitsune_p2p_dht", + "mr_bundle", + "must_future", + "nanoid", + "one_err", + "parking_lot", + "rand", + "regex", + "rusqlite", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "serde_with", + "serde_yaml", + "shrinkwraprs", + "strum", + "strum_macros", + "tempfile", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "holochain_util" -version = "0.4.0-dev.1" +version = "0.4.0-dev.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e2622406b6150319518901f1d4ecbb58a3f16ec097cba3ac898a18ff7900c1" +checksum = "57f1cb30b20d3b0bf1d84e697c3d95fb6b1ec74c9178e7c5e7fd4f1c051695d8" dependencies = [ - "cfg-if", + "backtrace", + "cfg-if 1.0.0", "colored", "dunce", "futures", "once_cell", - "tracing", + "rpassword", + "sodoken", + "tokio", ] [[package]] name = "holochain_wasmer_common" -version = "0.0.95" +version = "0.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81862ba8234412864273d21983c99af4e8b97739a5e4c354030470acdc6b431c" +checksum = "8c6dc4e75554cf8e0306f8e429a6112f734de74467a0a2c810f97c7b7036b689" dependencies = [ "holochain_serialized_bytes", "serde", "serde_bytes", "test-fuzz", "thiserror", - "wasmer", ] [[package]] name = "holochain_wasmer_guest" -version = "0.0.95" +version = "0.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce20cd8eb137a355394e57612cf2cf7836dab57948d56af9f9fe080ea168d41" +checksum = "aa3d0105471c4f0fa2d9644c7113e4f7ed5385ed5dbb980eab14eb7c6efaff8a" dependencies = [ "holochain_serialized_bytes", "holochain_wasmer_common", @@ -1228,10 +1537,11 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.4.0-dev.7" +version = "0.4.0-dev.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65c9372b7bf675ffadf48d9b6fce36eb0b22e430af964fbec90a39641ed32393" +checksum = "6d33d51ba7af1de0cb911211702443d49d8cdc71e1bc891591dc29259bbc8566" dependencies = [ + "derive_builder", "derive_more", "holo_hash", "holochain_integrity_types", @@ -1239,23 +1549,20 @@ dependencies = [ "holochain_serialized_bytes", "holochain_wasmer_common", "kitsune_p2p_block", + "kitsune_p2p_dht", "kitsune_p2p_timestamp", + "nanoid", + "num_enum", + "rusqlite", "serde", "serde_bytes", + "serde_yaml", + "shrinkwraprs", "subtle", "thiserror", "tracing", ] -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "http" version = "1.1.0" @@ -1305,6 +1612,7 @@ dependencies = [ "bytes", "futures-channel", "futures-util", + "h2", "http", "http-body", "httparse", @@ -1325,13 +1633,29 @@ dependencies = [ "http", "hyper", "hyper-util", - "rustls", + "rustls 0.22.4", "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", ] +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + [[package]] name = "hyper-util" version = "0.1.5" @@ -1490,7 +1814,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", ] [[package]] @@ -1511,12 +1835,6 @@ dependencies = [ "utf8_iter", ] -[[package]] -name = "if_chain" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb56e1aa765b4b4f3aadfab769793b7087bb03a4ea4920644a6d238e2df5b9ed" - [[package]] name = "indexmap" version = "1.9.3" @@ -1539,6 +1857,29 @@ dependencies = [ "serde", ] +[[package]] +name = "inferno" +version = "0.11.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "232929e1d75fe899576a3d5c7416ad0d88dbfbb3c3d6aa00873a7408a50ddb88" +dependencies = [ + "ahash", + "clap 4.5.18", + "crossbeam-channel", + "crossbeam-utils", + "dashmap", + "env_logger", + "indexmap 2.2.6", + "is-terminal", + "itoa", + "log", + "num-format", + "once_cell", + "quick-xml", + "rgb", + "str_stack", +] + [[package]] name = "integrity" version = "0.1.0" @@ -1568,6 +1909,23 @@ version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +[[package]] +name = "is-terminal" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" +dependencies = [ + "hermit-abi 0.4.0", + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.8.2" @@ -1577,6 +1935,24 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -1594,9 +1970,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_bin_data" -version = "0.4.0-dev.6" +version = "0.4.0-dev.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac73a427e32c148036bb09187a75a761f7f6775302582448a2bd60148ff93fcb" +checksum = "63c91ce3185b0e533db622a9f4fecd15bb4c400f09b3798cb9f8973973f6ea9c" dependencies = [ "base64 0.22.1", "derive_more", @@ -1609,50 +1985,151 @@ dependencies = [ [[package]] name = "kitsune_p2p_block" -version = "0.4.0-dev.6" +version = "0.4.0-dev.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a099279b4020e0b887eb3376d360a443359b0e49e7e8f9e243c797a5dfd80065" +checksum = "dc97c168e96d21e8638b6b5b89d13f7a83ccf43443553219b0969d550c9e33b0" dependencies = [ "kitsune_p2p_bin_data", "kitsune_p2p_timestamp", "serde", ] +[[package]] +name = "kitsune_p2p_dht" +version = "0.4.0-dev.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17cfb5e0bd26b559d2c2f85b02e6b81838577d146c7871c1688768142dbc763" +dependencies = [ + "arbitrary", + "colored", + "derivative", + "derive_more", + "futures", + "kitsune_p2p_dht_arc", + "kitsune_p2p_timestamp", + "must_future", + "num-traits", + "proptest", + "proptest-derive", + "rand", + "serde", + "statrs", + "thiserror", + "tracing", +] + [[package]] name = "kitsune_p2p_dht_arc" -version = "0.4.0-dev.6" +version = "0.4.0-dev.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73c84d983eff94d6d25b8836c855597f2ac38b80a4d29ba0a628b29368942ba0" +checksum = "ee8192d3f5534dcb2aebf38432e001b2b458f30364b6f26e84dc267c08188808" dependencies = [ + "arbitrary", "derive_more", "gcollections", "intervallum", "kitsune_p2p_timestamp", "num-traits", + "proptest", + "proptest-derive", + "rusqlite", "serde", ] [[package]] name = "kitsune_p2p_timestamp" -version = "0.4.0-dev.2" +version = "0.4.0-dev.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f75c6b5bdc4e3a9514c949975ab2a68f977e612bb638bd961ccab948d134af7a" +checksum = "27e44de630f9a0c27edb0c123d12cafe09d3b719845f966c742e9b2043efea07" dependencies = [ + "arbitrary", "chrono", + "once_cell", + "proptest", + "proptest-derive", + "rand", + "rusqlite", "serde", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "kitsune_p2p_types" +version = "0.4.0-dev.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "804723a2aa21d96161cee620ede247550009662e632c92f8b83d00ad28239354" +dependencies = [ + "base64 0.22.1", + "derive_more", + "futures", + "ghost_actor", + "holochain_trace", + "kitsune_p2p_bin_data", + "kitsune_p2p_dht", + "kitsune_p2p_dht_arc", + "kitsune_p2p_timestamp", + "lair_keystore_api", + "once_cell", + "parking_lot", + "paste", + "rmp-serde", + "rustls 0.21.12", + "serde", + "serde_bytes", + "serde_json", + "sysinfo", + "thiserror", + "tokio", + "url", + "url2", +] [[package]] -name = "leb128" -version = "0.2.5" +name = "lair_keystore" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" +checksum = "64d28639d61fce26c920ba0a786cd662d609cd40832762c74716df1355cf53db" +dependencies = [ + "lair_keystore_api", + "pretty_assertions", + "rpassword", + "rusqlite", + "sqlformat", + "structopt 0.3.26", + "sysinfo", + "tracing-subscriber", +] + +[[package]] +name = "lair_keystore_api" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20b5bd4a14c91039d6d28aaffe11c36060ec0e542123c81f901f661e3cfcb94f" +dependencies = [ + "base64 0.22.1", + "dunce", + "hc_seed_bundle", + "lru", + "nanoid", + "once_cell", + "parking_lot", + "rcgen", + "serde", + "serde_json", + "serde_yaml", + "time", + "tokio", + "toml", + "tracing", + "url", + "winapi", + "zeroize", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" @@ -1660,6 +2137,64 @@ version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +[[package]] +name = "libflate" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45d9dfdc14ea4ef0900c1cddbc8dcd553fbaacd8a4a282cf4018ae9dd04fb21e" +dependencies = [ + "adler32", + "core2", + "crc32fast", + "dary_heap", + "libflate_lz77", +] + +[[package]] +name = "libflate_lz77" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e0d73b369f386f1c44abd9c570d5318f55ccde816ff4b562fa452e5182863d" +dependencies = [ + "core2", + "hashbrown 0.14.5", + "rle-decode-fast", +] + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" + +[[package]] +name = "libsodium-sys-stable" +version = "1.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fd1882b85f01cdd4021c0664fd897710a04c5d01b593a5a70e1b0baa999c1f8" +dependencies = [ + "cc", + "libc", + "libflate", + "minisign-verify", + "pkg-config", + "tar", + "ureq", + "vcpkg", + "zip", +] + +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -1672,12 +2207,6 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" -[[package]] -name = "litrs" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ce301924b7887e9d637144fdade93f9dfff9b60981d4ac161db09720d39aa5" - [[package]] name = "lock_api" version = "0.4.12" @@ -1688,6 +2217,12 @@ dependencies = [ "scopeguard", ] +[[package]] +name = "lockfree-object-pool" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" + [[package]] name = "log" version = "0.4.21" @@ -1695,61 +2230,56 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] -name = "mach" -version = "0.3.2" +name = "lru" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +checksum = "37ee39891760e7d94734f6f63fedc29a2e4a152f836120753a72503f09fcf904" dependencies = [ - "libc", + "hashbrown 0.14.5", ] [[package]] -name = "mach2" -version = "0.4.2" +name = "matchers" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "libc", + "regex-automata 0.1.10", ] [[package]] -name = "memchr" -version = "2.7.2" +name = "matrixmultiply" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "9380b911e3e96d10c1f415da0876389aaf1b56759054eeb0de7df940c456ba1a" +dependencies = [ + "autocfg", + "rawpointer", +] [[package]] -name = "memmap2" -version = "0.5.10" +name = "memchr" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] -name = "memmap2" -version = "0.6.2" +name = "mime" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d28bba84adfe6646737845bc5ebbfa2c08424eb1c37e94a1fd2a82adb56a872" -dependencies = [ - "libc", -] +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] -name = "memoffset" -version = "0.9.1" +name = "minimal-lexical" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] -name = "mime" -version = "0.3.17" +name = "minisign-verify" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +checksum = "a05b5d0594e0cb1ad8cee3373018d2b84e25905dc75b2468114cc9a8e86cfc20" [[package]] name = "miniz_oxide" @@ -1772,10 +2302,87 @@ dependencies = [ ] [[package]] -name = "more-asserts" -version = "0.2.2" +name = "mr_bundle" +version = "0.4.0-dev.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" +checksum = "438162278a3b42da506ee9d250435e20af44aa8a4b256356bcbad99a55b6d162" +dependencies = [ + "derive_more", + "flate2", + "futures", + "holochain_util", + "reqwest", + "rmp-serde", + "serde", + "serde_bytes", + "serde_yaml", + "thiserror", +] + +[[package]] +name = "must_future" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a160ffed3c2f98d2906c67a9b6e4e1f09cca7e17e3f780286a349061459eeebe" +dependencies = [ + "futures", + "pin-utils", +] + +[[package]] +name = "nalgebra" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d506eb7e08d6329505faa8a3a00a5dcc6de9f76e0c77e4b75763ae3c770831ff" +dependencies = [ + "approx", + "matrixmultiply", + "nalgebra-macros", + "num-complex", + "num-rational", + "num-traits", + "rand", + "rand_distr", + "simba", + "typenum", +] + +[[package]] +name = "nalgebra-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" +dependencies = [ + "proc-macro2 1.0.85", + "quote 1.0.36", + "syn 1.0.109", +] + +[[package]] +name = "nanoid" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ffa00dec017b5b1a8b7cf5e2c008bfda1aa7e0697ac1508b491fdf2622fb4d8" +dependencies = [ + "rand", +] + +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] [[package]] name = "nix" @@ -1783,12 +2390,66 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.5.0", - "cfg-if", + "bitflags 2.6.0", + "cfg-if 1.0.0", "cfg_aliases", "libc", ] +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + +[[package]] +name = "ntapi" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" +dependencies = [ + "winapi", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-complex" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-format" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" +dependencies = [ + "arrayvec", + "itoa", +] + [[package]] name = "num-integer" version = "0.1.46" @@ -1798,6 +2459,16 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-rational" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" +dependencies = [ + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -1805,6 +2476,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -1818,25 +2490,128 @@ dependencies = [ ] [[package]] -name = "object" -version = "0.36.0" +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro-crate", + "proc-macro2 1.0.85", + "quote 1.0.36", + "syn 2.0.79", +] + +[[package]] +name = "object" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "one_err" +version = "0.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e81851974d8bb6cc9a643cca68afdce7f0a3b80e08a4620388836bb99a680554" +dependencies = [ + "indexmap 1.9.3", + "libc", + "serde", + "serde_json", +] + +[[package]] +name = "openssl" +version = "0.10.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +dependencies = [ + "bitflags 2.6.0", + "cfg-if 1.0.0", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2 1.0.85", + "quote 1.0.36", + "syn 2.0.79", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-src" +version = "300.3.2+3.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" +dependencies = [ + "cc", +] + +[[package]] +name = "openssl-sys" +version = "0.9.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +dependencies = [ + "cc", + "libc", + "openssl-src", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "opentelemetry_api" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +checksum = "8a81f725323db1b1206ca3da8bb19874bbd3f57c3bcd59471bfb04525b265b9b" dependencies = [ - "memchr", + "futures-channel", + "futures-util", + "indexmap 1.9.3", + "js-sys", + "once_cell", + "pin-project-lite", + "thiserror", + "urlencoding", ] [[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "openssl-probe" -version = "0.1.5" +name = "overload" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "parking_lot" @@ -1854,7 +2629,7 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "redox_syscall 0.5.1", "smallvec", @@ -1868,21 +2643,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] -name = "percent-encoding" -version = "2.3.1" +name = "pem" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] [[package]] -name = "pest" -version = "2.7.10" +name = "percent-encoding" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" -dependencies = [ - "memchr", - "thiserror", - "ucd-trie", -] +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pin-project" @@ -1901,7 +2674,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", ] [[package]] @@ -1916,12 +2689,53 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "pretty_assertions" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" +dependencies = [ + "diff", + "yansi", +] + +[[package]] +name = "prettyplease" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +dependencies = [ + "proc-macro2 1.0.85", + "syn 2.0.79", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + [[package]] name = "proc-macro-error" version = "1.0.4" @@ -1965,23 +2779,49 @@ dependencies = [ ] [[package]] -name = "ptr_meta" -version = "0.1.4" +name = "proptest" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ - "ptr_meta_derive", + "bit-set", + "bit-vec", + "bitflags 2.6.0", + "lazy_static", + "num-traits", + "rand", + "rand_chacha", + "rand_xorshift", + "regex-syntax 0.8.4", + "rusty-fork", + "tempfile", + "unarray", ] [[package]] -name = "ptr_meta_derive" -version = "0.1.4" +name = "proptest-derive" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" +checksum = "6ff7ff745a347b87471d859a377a9a404361e7efc2a971d73424a6d183c0fc77" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 1.0.109", + "syn 2.0.79", +] + +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + +[[package]] +name = "quick-xml" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" +dependencies = [ + "memchr", ] [[package]] @@ -2003,10 +2843,15 @@ dependencies = [ ] [[package]] -name = "radium" -version = "0.7.0" +name = "r2d2" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" +dependencies = [ + "log", + "parking_lot", + "scheduled-thread-pool", +] [[package]] name = "rand" @@ -2038,6 +2883,31 @@ dependencies = [ "getrandom", ] +[[package]] +name = "rand_distr" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" +dependencies = [ + "num-traits", + "rand", +] + +[[package]] +name = "rand_xorshift" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" +dependencies = [ + "rand_core", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + [[package]] name = "rayon" version = "1.10.0" @@ -2059,33 +2929,34 @@ dependencies = [ ] [[package]] -name = "redox_syscall" -version = "0.4.1" +name = "rcgen" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" dependencies = [ - "bitflags 1.3.2", + "pem", + "ring 0.16.20", + "time", + "yasna", + "zeroize", ] [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags 2.5.0", + "bitflags 1.3.2", ] [[package]] -name = "regalloc2" +name = "redox_syscall" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" dependencies = [ - "fxhash", - "log", - "slice-group-by", - "smallvec", + "bitflags 2.6.0", ] [[package]] @@ -2096,8 +2967,17 @@ checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", ] [[package]] @@ -2108,35 +2988,20 @@ checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.4", ] [[package]] name = "regex-syntax" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" - -[[package]] -name = "region" -version = "3.0.2" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b6ebd13bc009aef9cd476c1310d49ac354d36e240cf1bd753290f3dc7199a7" -dependencies = [ - "bitflags 1.3.2", - "libc", - "mach2", - "windows-sys 0.52.0", -] +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] -name = "rend" -version = "0.4.2" +name = "regex-syntax" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" -dependencies = [ - "bytecheck", -] +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "reqwest" @@ -2146,23 +3011,27 @@ checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" dependencies = [ "base64 0.22.1", "bytes", + "encoding_rs", "futures-channel", "futures-core", "futures-util", + "h2", "http", "http-body", "http-body-util", "hyper", "hyper-rustls", + "hyper-tls", "hyper-util", "ipnet", "js-sys", "log", "mime", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", - "rustls", + "rustls 0.22.4", "rustls-native-certs", "rustls-pemfile", "rustls-pki-types", @@ -2170,7 +3039,9 @@ dependencies = [ "serde_json", "serde_urlencoded", "sync_wrapper", + "system-configuration", "tokio", + "tokio-native-tls", "tokio-rustls", "tower-service", "url", @@ -2180,50 +3051,50 @@ dependencies = [ "winreg", ] +[[package]] +name = "rgb" +version = "0.8.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57397d16646700483b67d2dd6511d79318f9d057fdbd21a4066aeac8b41d310a" +dependencies = [ + "bytemuck", +] + [[package]] name = "ring" -version = "0.17.8" +version = "0.16.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ "cc", - "cfg-if", - "getrandom", "libc", - "spin", - "untrusted", - "windows-sys 0.52.0", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi", ] [[package]] -name = "rkyv" -version = "0.7.44" +name = "ring" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cba464629b3394fc4dbc6f940ff8f5b4ff5c7aef40f29166fd4ad12acbc99c0" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ - "bitvec", - "bytecheck", - "bytes", - "hashbrown 0.12.3", - "indexmap 1.9.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", - "tinyvec", - "uuid", + "cc", + "cfg-if 1.0.0", + "getrandom", + "libc", + "spin 0.9.8", + "untrusted 0.9.0", + "windows-sys 0.52.0", ] [[package]] -name = "rkyv_derive" -version = "0.7.44" +name = "rle-decode-fast" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7dddfff8de25e6f62b9d64e6e432bf1c6736c57d20323e15ee10435fbda7c65" -dependencies = [ - "proc-macro2 1.0.85", - "quote 1.0.36", - "syn 1.0.109", -] +checksum = "3582f63211428f83597b51b2ddb88e2a91a9d52d12831f9d08f5e624e8977422" [[package]] name = "rmp" @@ -2247,6 +3118,53 @@ dependencies = [ "serde", ] +[[package]] +name = "rmpv" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58450723cd9ee93273ce44a20b6ec4efe17f8ed2e3631474387bfdecf18bb2a9" +dependencies = [ + "num-traits", + "rmp", + "serde", + "serde_bytes", +] + +[[package]] +name = "rpassword" +version = "7.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" +dependencies = [ + "libc", + "rtoolbox", + "windows-sys 0.48.0", +] + +[[package]] +name = "rtoolbox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "rusqlite" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" +dependencies = [ + "bitflags 2.6.0", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + [[package]] name = "rustc-demangle" version = "0.1.24" @@ -2259,7 +3177,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.23", + "semver", ] [[package]] @@ -2268,13 +3186,25 @@ version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", "windows-sys 0.52.0", ] +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-webpki 0.101.7", + "sct", +] + [[package]] name = "rustls" version = "0.22.4" @@ -2282,9 +3212,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" dependencies = [ "log", - "ring", + "ring 0.17.8", "rustls-pki-types", - "rustls-webpki", + "rustls-webpki 0.102.4", "subtle", "zeroize", ] @@ -2318,22 +3248,38 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + [[package]] name = "rustls-webpki" version = "0.102.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" dependencies = [ - "ring", + "ring 0.17.8", "rustls-pki-types", - "untrusted", + "untrusted 0.9.0", ] [[package]] -name = "rustversion" -version = "1.0.17" +name = "rusty-fork" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" +dependencies = [ + "fnv", + "quick-error", + "tempfile", + "wait-timeout", +] [[package]] name = "ryu" @@ -2342,12 +3288,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] -name = "same-file" -version = "1.0.6" +name = "safe_arch" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +checksum = "c3460605018fdc9612bce72735cba0d27efbcd9904780d44c7e3a9948f96148a" dependencies = [ - "winapi-util", + "bytemuck", ] [[package]] @@ -2360,28 +3306,12 @@ dependencies = [ ] [[package]] -name = "schemars" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09c024468a378b7e36765cd36702b7a90cc3cba11654f6685c8f233408e89e92" -dependencies = [ - "dyn-clone", - "schemars_derive", - "serde", - "serde_json", - "url", -] - -[[package]] -name = "schemars_derive" -version = "0.8.21" +name = "scheduled-thread-pool" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" +checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" dependencies = [ - "proc-macro2 1.0.85", - "quote 1.0.36", - "serde_derive_internals", - "syn 2.0.66", + "parking_lot", ] [[package]] @@ -2391,10 +3321,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "seahash" -version = "4.1.0" +name = "sct" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] [[package]] name = "security-framework" @@ -2402,7 +3336,7 @@ version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -2419,21 +3353,6 @@ dependencies = [ "libc", ] -[[package]] -name = "self_cell" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - [[package]] name = "semver" version = "1.0.23" @@ -2443,15 +3362,6 @@ dependencies = [ "serde", ] -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - [[package]] name = "serde" version = "1.0.203" @@ -2470,17 +3380,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde-wasm-bindgen" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b4c031cd0d9014307d82b8abf653c0290fbdaeb4c02d00c63cf52f728628bf" -dependencies = [ - "js-sys", - "serde", - "wasm-bindgen", -] - [[package]] name = "serde_bytes" version = "0.11.14" @@ -2490,16 +3389,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_cbor" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5" -dependencies = [ - "half", - "serde", -] - [[package]] name = "serde_derive" version = "1.0.203" @@ -2508,18 +3397,7 @@ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", -] - -[[package]] -name = "serde_derive_internals" -version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" -dependencies = [ - "proc-macro2 1.0.85", - "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", ] [[package]] @@ -2555,6 +3433,36 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" +dependencies = [ + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.2.6", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" +dependencies = [ + "darling 0.20.9", + "proc-macro2 1.0.85", + "quote 1.0.36", + "syn 2.0.79", +] + [[package]] name = "serde_yaml" version = "0.9.34+deprecated" @@ -2568,48 +3476,31 @@ dependencies = [ "unsafe-libyaml", ] -[[package]] -name = "sha-1" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5058ada175748e33390e40e872bd0fe59a19f265d0158daa551c5a88a76009c" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - [[package]] name = "sha1" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest", ] [[package]] -name = "sha2" -version = "0.10.8" +name = "sharded-slab" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ - "cfg-if", - "cpufeatures", - "digest", + "lazy_static", ] [[package]] -name = "shared-buffer" -version = "0.1.4" +name = "shlex" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6c99835bad52957e7aa241d3975ed17c1e5f8c92026377d117a606f36b84b16" -dependencies = [ - "bytes", - "memmap2 0.6.2", -] +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "shrinkwraprs" @@ -2618,7 +3509,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e63e6744142336dfb606fe2b068afa2e1cca1ee6a5d8377277a92945d81fa331" dependencies = [ "bitflags 1.3.2", - "itertools", + "itertools 0.8.2", "proc-macro2 1.0.85", "quote 1.0.36", "syn 1.0.109", @@ -2634,10 +3525,23 @@ dependencies = [ ] [[package]] -name = "simdutf8" -version = "0.1.4" +name = "simba" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0b7840f121a46d63066ee7a99fc81dcabbc6105e437cae43528cea199b5a05f" +dependencies = [ + "approx", + "num-complex", + "num-traits", + "paste", + "wide", +] + +[[package]] +name = "simd-adler32" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "slab" @@ -2648,12 +3552,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "slice-group-by" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" - [[package]] name = "smallvec" version = "1.13.2" @@ -2691,18 +3589,68 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "sodoken" +version = "0.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "907e0ea9699b846c2586ea5685e9abf5963fca64a5179a406e6ac02b94564e30" +dependencies = [ + "libc", + "libsodium-sys-stable", + "num_cpus", + "once_cell", + "one_err", + "parking_lot", + "tokio", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "spin" version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "sqlformat" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" +dependencies = [ + "nom", + "unicode_categories", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "statrs" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35a062dbadac17a42e0fc64c27f419b25d6fae98572eb43c8814c9e873d7721" +dependencies = [ + "approx", + "lazy_static", + "nalgebra", + "num-traits", + "rand", +] + +[[package]] +name = "str_stack" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9091b6114800a5f2141aee1d1b9d6ca3592ac062dc5decb3764ec5895a47b4eb" + [[package]] name = "strsim" version = "0.8.0" @@ -2715,14 +3663,31 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "structopt" version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16c2cdbf9cc375f15d1b4141bc48aeef444806655cd0e904207edc8d68d86ed7" dependencies = [ - "clap", - "structopt-derive", + "clap 2.34.0", + "structopt-derive 0.2.18", +] + +[[package]] +name = "structopt" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" +dependencies = [ + "clap 2.34.0", + "lazy_static", + "structopt-derive 0.4.18", ] [[package]] @@ -2738,26 +3703,34 @@ dependencies = [ ] [[package]] -name = "strum_macros" -version = "0.24.3" +name = "structopt-derive" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ - "heck 0.4.1", + "heck 0.3.3", + "proc-macro-error", "proc-macro2 1.0.85", "quote 1.0.36", - "rustversion", "syn 1.0.109", ] [[package]] -name = "subprocess" -version = "0.2.9" +name = "strum" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" + +[[package]] +name = "strum_macros" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2e86926081dda636c546d8c5e641661049d7562a68f5488be4a1f7f66f6086" +checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" dependencies = [ - "libc", - "winapi", + "heck 0.3.3", + "proc-macro2 1.0.85", + "quote 1.0.36", + "syn 1.0.109", ] [[package]] @@ -2766,6 +3739,15 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +[[package]] +name = "subtle-encoding" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" +dependencies = [ + "zeroize", +] + [[package]] name = "syn" version = "0.15.44" @@ -2790,9 +3772,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", @@ -2813,14 +3795,44 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", ] [[package]] -name = "tap" -version = "1.0.1" +name = "sysinfo" +version = "0.30.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" +dependencies = [ + "cfg-if 1.0.0", + "core-foundation-sys", + "libc", + "ntapi", + "once_cell", + "rayon", + "windows", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] [[package]] name = "tar" @@ -2833,19 +3845,13 @@ dependencies = [ "xattr", ] -[[package]] -name = "target-lexicon" -version = "0.12.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" - [[package]] name = "tempfile" version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fastrand", "rustix", "windows-sys 0.52.0", @@ -2853,9 +3859,9 @@ dependencies = [ [[package]] name = "test-fuzz" -version = "3.0.4" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "125df852011c4f8f31df5620f4aea38ecddb5dfb4d9bc569b30485b15ffc3d4e" +checksum = "3ab7a9bb33d134e863862ab9dad2ac7e022ac89707914627f498fe0f29248d9b" dependencies = [ "serde", "test-fuzz-internal", @@ -2865,46 +3871,41 @@ dependencies = [ [[package]] name = "test-fuzz-internal" -version = "3.0.4" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58071dc2471840e9f374eeb0f6e405a31bccb3cc5d59bb4598f02cafc274b5c4" +checksum = "d0bef5dd380747bd7b6e636a8032a24aa34fcecaf843e59fc97d299681922e86" dependencies = [ + "bincode", "cargo_metadata", - "proc-macro2 1.0.85", - "quote 1.0.36", "serde", - "strum_macros", ] [[package]] name = "test-fuzz-macro" -version = "3.0.4" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856bbca0314c328004691b9c0639fb198ca764d1ce0e20d4dd8b78f2697c2a6f" +checksum = "a7e6b4c7391a38f0f026972ec2200bcfd1ec45533aa266fdae5858d011afc500" dependencies = [ - "darling 0.14.4", - "if_chain", - "lazy_static", + "darling 0.20.9", + "heck 0.5.0", + "itertools 0.13.0", + "once_cell", + "prettyplease", "proc-macro2 1.0.85", "quote 1.0.36", - "subprocess", - "syn 1.0.109", - "test-fuzz-internal", - "toolchain_find", - "unzip-n", + "syn 2.0.79", ] [[package]] name = "test-fuzz-runtime" -version = "3.0.4" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "303774eb17994c2ddb59c460369f4c3a55496f013380278d78eeebd2deb896ac" +checksum = "c9fbe6fb7481ec6d9bf64ae2c5d49cb1b40f8da624a91031482af7b08168c679" dependencies = [ - "bincode", "hex", "num-traits", "serde", - "sha-1", + "sha1", "test-fuzz-internal", ] @@ -2934,33 +3935,59 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", ] [[package]] -name = "tinystr" -version = "0.7.6" +name = "thread_local" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ - "displaydoc", - "zerovec", + "cfg-if 1.0.0", + "once_cell", ] [[package]] -name = "tinyvec" -version = "1.6.0" +name = "time" +version = "0.3.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" dependencies = [ - "tinyvec_macros", + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", ] [[package]] -name = "tinyvec_macros" -version = "0.1.1" +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] [[package]] name = "tokio" @@ -2989,7 +4016,17 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", ] [[package]] @@ -2998,7 +4035,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" dependencies = [ - "rustls", + "rustls 0.22.4", "rustls-pki-types", "tokio", ] @@ -3016,15 +4053,16 @@ dependencies = [ ] [[package]] -name = "toml" -version = "0.7.8" +name = "tokio-util" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" +checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.19.15", + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", ] [[package]] @@ -3050,13 +4088,11 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap 2.2.6", - "serde", - "serde_spanned", "toml_datetime", "winnow 0.5.40", ] @@ -3074,19 +4110,6 @@ dependencies = [ "winnow 0.6.13", ] -[[package]] -name = "toolchain_find" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e85654a10e7a07a47c6f19d93818f3f343e22927f2fa280c84f7c8042743413" -dependencies = [ - "home", - "lazy_static", - "regex", - "semver 0.11.0", - "walkdir", -] - [[package]] name = "tower" version = "0.4.13" @@ -3133,17 +4156,70 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "pin-project", + "tracing", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-serde" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" +dependencies = [ + "serde", + "tracing-core", ] [[package]] -name = "tracing-core" -version = "0.1.32" +name = "tracing-subscriber" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" dependencies = [ + "matchers", + "nu-ansi-term", "once_cell", - "valuable", + "regex", + "serde", + "serde_json", + "sharded-slab", + "smallvec", + "thread_local", + "time", + "tracing", + "tracing-core", + "tracing-log", + "tracing-serde", ] [[package]] @@ -3184,19 +4260,23 @@ name = "trycp_server" version = "0.17.0-dev.5" dependencies = [ "futures", + "holochain_conductor_api", "nix", "once_cell", "parking_lot", + "rand", "reqwest", "rmp-serde", "serde", "serde_bytes", + "serde_yaml", "slab", "snafu", - "structopt", + "structopt 0.2.18", "tokio", "tokio-tungstenite", "trycp_api", + "trycp_client", "url", ] @@ -3226,10 +4306,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] -name = "ucd-trie" -version = "0.1.6" +name = "unarray" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicode-ident" @@ -3255,12 +4335,24 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +[[package]] +name = "unicode_categories" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" + [[package]] name = "unsafe-libyaml" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" +[[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" @@ -3268,14 +4360,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] -name = "unzip-n" -version = "0.1.2" +name = "ureq" +version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e7e85a0596447f0f2ac090e16bc4c516c6fe91771fb0c0ccf7fa3dae896b9c" +checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" dependencies = [ - "proc-macro2 1.0.85", - "quote 1.0.36", - "syn 1.0.109", + "base64 0.22.1", + "log", + "once_cell", + "url", ] [[package]] @@ -3290,6 +4383,22 @@ dependencies = [ "serde", ] +[[package]] +name = "url2" +version = "0.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c89cd13f1de9862d363308f5ffdadcd2b64b2a4a812fb296a80b7d3e80011b1e" +dependencies = [ + "serde", + "url", +] + +[[package]] +name = "urlencoding" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" + [[package]] name = "utf-8" version = "0.7.6" @@ -3308,11 +4417,21 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + [[package]] name = "uuid" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +dependencies = [ + "getrandom", + "rand", +] [[package]] name = "valuable" @@ -3320,6 +4439,12 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "vec_map" version = "0.8.2" @@ -3333,13 +4458,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "walkdir" -version = "2.5.0" +name = "wait-timeout" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" dependencies = [ - "same-file", - "winapi-util", + "libc", ] [[package]] @@ -3363,7 +4487,7 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "wasm-bindgen-macro", ] @@ -3378,7 +4502,7 @@ dependencies = [ "once_cell", "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", "wasm-bindgen-shared", ] @@ -3388,7 +4512,7 @@ version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -3412,7 +4536,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3423,206 +4547,6 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" -[[package]] -name = "wasm-encoder" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ba64e81215916eaeb48fee292f29401d69235d62d8b8fd92a7b2844ec5ae5f7" -dependencies = [ - "leb128", -] - -[[package]] -name = "wasmer" -version = "4.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce4a267a570e121c9375136adefa2c48810273907de9c6817bc19db4d6144bc" -dependencies = [ - "bytes", - "cfg-if", - "derivative", - "indexmap 1.9.3", - "js-sys", - "more-asserts", - "rustc-demangle", - "serde", - "serde-wasm-bindgen", - "shared-buffer", - "target-lexicon", - "thiserror", - "tracing", - "wasm-bindgen", - "wasmer-compiler", - "wasmer-compiler-cranelift", - "wasmer-derive", - "wasmer-types", - "wasmer-vm", - "wat", - "winapi", -] - -[[package]] -name = "wasmer-compiler" -version = "4.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9c23098e86ef1038155684fe50f0c1079a0e2a2e70f115b789df17e6ba98d20" -dependencies = [ - "backtrace", - "bytes", - "cfg-if", - "enum-iterator", - "enumset", - "lazy_static", - "leb128", - "memmap2 0.5.10", - "more-asserts", - "region", - "rkyv", - "self_cell", - "shared-buffer", - "smallvec", - "thiserror", - "wasmer-types", - "wasmer-vm", - "wasmparser", - "winapi", - "xxhash-rust", -] - -[[package]] -name = "wasmer-compiler-cranelift" -version = "4.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95287b79973ad5f485215733ef9f0d4bb951a6b7e655585d2bd3d4a4ba1253c9" -dependencies = [ - "cranelift-codegen", - "cranelift-entity", - "cranelift-frontend", - "gimli 0.26.2", - "more-asserts", - "rayon", - "smallvec", - "target-lexicon", - "tracing", - "wasmer-compiler", - "wasmer-types", -] - -[[package]] -name = "wasmer-config" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a0f70c177b1c5062cfe0f5308c3317751796fef9403c22a0cd7b4cacd4ccd8" -dependencies = [ - "anyhow", - "bytesize", - "derive_builder", - "hex", - "indexmap 2.2.6", - "schemars", - "semver 1.0.23", - "serde", - "serde_cbor", - "serde_json", - "serde_yaml", - "thiserror", - "toml 0.8.14", - "url", -] - -[[package]] -name = "wasmer-derive" -version = "4.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48f36aeeecb655f15fdd358bdf6e4cec27df181468fa4226084157e8462bd5e" -dependencies = [ - "proc-macro-error", - "proc-macro2 1.0.85", - "quote 1.0.36", - "syn 1.0.109", -] - -[[package]] -name = "wasmer-types" -version = "4.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83cb97b6b20084757a2a8d548dc0d4179c3fe9e2d711740423a1e6aa3f8b9091" -dependencies = [ - "bytecheck", - "enum-iterator", - "enumset", - "getrandom", - "hex", - "indexmap 1.9.3", - "more-asserts", - "rkyv", - "sha2", - "target-lexicon", - "thiserror", - "webc", - "xxhash-rust", -] - -[[package]] -name = "wasmer-vm" -version = "4.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc1e19d986844b17b927ec8b0c7f3da6a7a2c2cb3b0f8ca5d4cb1a1f71bfb124" -dependencies = [ - "backtrace", - "cc", - "cfg-if", - "corosensei", - "crossbeam-queue", - "dashmap", - "derivative", - "enum-iterator", - "fnv", - "indexmap 1.9.3", - "lazy_static", - "libc", - "mach", - "memoffset", - "more-asserts", - "region", - "scopeguard", - "thiserror", - "wasmer-types", - "winapi", -] - -[[package]] -name = "wasmparser" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" -dependencies = [ - "bitflags 2.5.0", - "indexmap 2.2.6", - "semver 1.0.23", -] - -[[package]] -name = "wast" -version = "64.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a259b226fd6910225aa7baeba82f9d9933b6d00f2ce1b49b80fa4214328237cc" -dependencies = [ - "leb128", - "memchr", - "unicode-width", - "wasm-encoder", -] - -[[package]] -name = "wat" -version = "1.0.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53253d920ab413fca1c7dc2161d601c79b4fdf631d0ba51dd4343bf9b556c3f6" -dependencies = [ - "wast", -] - [[package]] name = "web-sys" version = "0.3.69" @@ -3634,32 +4558,13 @@ dependencies = [ ] [[package]] -name = "webc" -version = "6.0.0-rc1" +name = "wide" +version = "0.7.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fc686c7b43c9bc630a499f6ae1f0a4c4bd656576a53ae8a147b0cc9bc983ad" +checksum = "b828f995bf1e9622031f8009f8481a85406ce1f4d4588ff746d872043e855690" dependencies = [ - "anyhow", - "base64 0.21.7", - "bytes", - "cfg-if", - "document-features", - "flate2", - "indexmap 1.9.3", - "libc", - "once_cell", - "semver 1.0.23", - "serde", - "serde_cbor", - "serde_json", - "sha2", - "shared-buffer", - "tar", - "tempfile", - "thiserror", - "toml 0.7.8", - "url", - "wasmer-config", + "bytemuck", + "safe_arch", ] [[package]] @@ -3678,15 +4583,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -[[package]] -name = "winapi-util" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -3694,25 +4590,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "windows-core" +name = "windows" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ + "windows-core", "windows-targets 0.52.5", ] [[package]] -name = "windows-sys" -version = "0.33.0" +name = "windows-core" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43dbb096663629518eb1dfa72d80243ca5a6aca764cae62a2df70af760a9be75" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows_aarch64_msvc 0.33.0", - "windows_i686_gnu 0.33.0", - "windows_i686_msvc 0.33.0", - "windows_x86_64_gnu 0.33.0", - "windows_x86_64_msvc 0.33.0", + "windows-targets 0.52.5", ] [[package]] @@ -3776,12 +4669,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" -[[package]] -name = "windows_aarch64_msvc" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd761fd3eb9ab8cc1ed81e56e567f02dd82c4c837e48ac3b2181b9ffc5060807" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -3794,12 +4681,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" -[[package]] -name = "windows_i686_gnu" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab0cf703a96bab2dc0c02c0fa748491294bf9b7feb27e1f4f96340f208ada0e" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -3818,12 +4699,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" -[[package]] -name = "windows_i686_msvc" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cfdbe89cc9ad7ce618ba34abc34bbb6c36d99e96cae2245b7943cd75ee773d0" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -3836,12 +4711,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" -[[package]] -name = "windows_x86_64_gnu" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4dd9b0c0e9ece7bb22e84d70d01b71c6d6248b81a3c60d11869451b4cb24784" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -3866,12 +4735,6 @@ version = "0.52.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" -[[package]] -name = "windows_x86_64_msvc" -version = "0.33.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1e4aa646495048ec7f3ffddc411e1d829c026a2ec62b39da15c1055e406eaa" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -3908,7 +4771,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "windows-sys 0.48.0", ] @@ -3924,15 +4787,6 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - [[package]] name = "xattr" version = "1.3.1" @@ -3945,10 +4799,19 @@ dependencies = [ ] [[package]] -name = "xxhash-rust" -version = "0.8.10" +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + +[[package]] +name = "yasna" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] [[package]] name = "yoke" @@ -3970,10 +4833,30 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", "synstructure", ] +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2 1.0.85", + "quote 1.0.36", + "syn 2.0.79", +] + [[package]] name = "zerofrom" version = "0.1.4" @@ -3991,7 +4874,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", "synstructure", ] @@ -4020,5 +4903,36 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2 1.0.85", "quote 1.0.36", - "syn 2.0.66", + "syn 2.0.79", +] + +[[package]] +name = "zip" +version = "2.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40dd8c92efc296286ce1fbd16657c5dbefff44f1b4ca01cc5f517d8b7b3d3e2e" +dependencies = [ + "arbitrary", + "crc32fast", + "crossbeam-utils", + "displaydoc", + "flate2", + "indexmap 2.2.6", + "memchr", + "thiserror", + "zopfli", +] + +[[package]] +name = "zopfli" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5019f391bac5cf252e93bbcc53d039ffd62c7bfb7c150414d61369afe57e946" +dependencies = [ + "bumpalo", + "crc32fast", + "lockfree-object-pool", + "log", + "once_cell", + "simd-adler32", ] diff --git a/build-trycp.sh b/build-trycp.sh index 587168ce..2f3a6f4b 100755 --- a/build-trycp.sh +++ b/build-trycp.sh @@ -2,4 +2,4 @@ set -e # build TryCP server -cargo build --release --manifest-path crates/trycp_server/Cargo.toml +cargo build -p trycp_server --release --target-dir crates/trycp_server/target diff --git a/crates/trycp_api/src/lib.rs b/crates/trycp_api/src/lib.rs index a3265f9b..a078711c 100644 --- a/crates/trycp_api/src/lib.rs +++ b/crates/trycp_api/src/lib.rs @@ -171,8 +171,6 @@ pub enum TryCpServerResponse { /// The successful response type for a [Request::DownloadLogs] request. #[derive(Debug, serde::Serialize, serde::Deserialize)] pub struct DownloadLogsResponse { - /// The lair keystore stderr log. - pub lair_stderr: Vec, /// The holochain conductor stdout log. pub conductor_stdout: Vec, /// The holochain conductor stderr log. diff --git a/crates/trycp_server/Cargo.toml b/crates/trycp_server/Cargo.toml index 21183db0..47c661a3 100644 --- a/crates/trycp_server/Cargo.toml +++ b/crates/trycp_server/Cargo.toml @@ -35,3 +35,9 @@ tokio = { workspace = true, features = [ tokio-tungstenite = { workspace = true } trycp_api = { workspace = true } url = { workspace = true } + +[dev-dependencies] +holochain_conductor_api = "0.4.0-dev.26" +rand = "0.8" +serde_yaml = "0.9" +trycp_client = { path = "../trycp_client" } diff --git a/crates/trycp_server/src/configure_player.rs b/crates/trycp_server/src/configure_player.rs index 0ed96684..2d1e67c9 100644 --- a/crates/trycp_server/src/configure_player.rs +++ b/crates/trycp_server/src/configure_player.rs @@ -1,31 +1,22 @@ -use std::{ - io::{self, Write}, - path::PathBuf, - process::{Command, Stdio}, - sync::atomic, -}; +use std::{io, net::TcpListener, path::PathBuf, sync::atomic::Ordering}; use parking_lot::Mutex; use snafu::{ensure, ResultExt, Snafu}; use std::str; use crate::{ - get_player_dir, player_config_exists, Player, CONDUCTOR_CONFIG_FILENAME, LAIR_PASSPHRASE, - LAIR_STDERR_LOG_FILENAME, NEXT_ADMIN_PORT, PLAYERS, + get_player_dir, player_config_exists, Player, ADMIN_PORT_RANGE, CONDUCTOR_CONFIG_FILENAME, + NEXT_ADMIN_PORT, PLAYERS, }; #[derive(Debug, Snafu)] pub(crate) enum ConfigurePlayerError { #[snafu(display("Could not create directory for at {}: {}", path.display(), source))] CreateDir { path: PathBuf, source: io::Error }, - #[snafu(display("Could not create lair-keystore config: {}", source))] - CreateLairConfig { path: PathBuf, source: io::Error }, #[snafu(display("Could not create config file at {}: {}", path.display(), source))] CreateConfig { path: PathBuf, source: io::Error }, #[snafu(display("Ran out of possible admin ports"))] OutOfPorts, - #[snafu(display("Could not write to config file at {}: {}", path.display(), source))] - WriteConfig { path: PathBuf, source: io::Error }, #[snafu(display("Player with ID {} has already been configured", id))] PlayerAlreadyConfigured { id: String }, } @@ -43,11 +34,17 @@ pub(crate) fn configure_player( ensure!(!player_config_exists(&id), PlayerAlreadyConfigured { id }); - ensure!( - NEXT_ADMIN_PORT.load(atomic::Ordering::SeqCst) != 0, - OutOfPorts - ); - let port = NEXT_ADMIN_PORT.fetch_add(1, atomic::Ordering::SeqCst); + let mut admin_port = NEXT_ADMIN_PORT.fetch_add(1, Ordering::SeqCst); + loop { + ensure!(ADMIN_PORT_RANGE.contains(&admin_port), OutOfPorts); + let listener = TcpListener::bind(format!("localhost:{admin_port}")); + if let Ok(p) = listener { + admin_port = p.local_addr().unwrap().port(); + break; + } + admin_port = NEXT_ADMIN_PORT.fetch_add(1, Ordering::SeqCst); + } + println!("Admin port {admin_port} assigned to player {id}."); { let mut players_guard = PLAYERS.write(); @@ -57,88 +54,28 @@ pub(crate) fn configure_player( players_guard.insert( id.clone(), Player { - admin_port: port, + admin_port, processes: Mutex::default(), }, ); } - let lair_stderr_log_path = player_dir.join(LAIR_STDERR_LOG_FILENAME); - let mut lair = Command::new("lair-keystore") - .current_dir(&player_dir) - .env("RUST_BACKTRACE", "full") - .args(["init", "--piped"]) - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) - .stderr( - std::fs::OpenOptions::new() - .append(true) - .create(true) - .open(&lair_stderr_log_path) - .context(CreateLairConfig { - path: lair_stderr_log_path.clone(), - })?, - ) - .spawn() - .context(CreateLairConfig { - path: lair_stderr_log_path.clone(), - })?; - if let Some(mut lair_stdin) = lair.stdin.take() { - lair_stdin - .write_all(LAIR_PASSPHRASE.as_bytes()) - .context(CreateLairConfig { - path: lair_stderr_log_path.clone(), - })?; - } - lair.wait().context(CreateLairConfig { - path: lair_stderr_log_path.clone(), - })?; - - // get connection url from lair config - let lair_url = Command::new("lair-keystore") - .current_dir(&player_dir) - .env("RUST_BACKTRACE", "full") - .arg("url") - .stdout(Stdio::piped()) - .stderr( - std::fs::OpenOptions::new() - .append(true) - .create(true) - .open(&lair_stderr_log_path) - .context(CreateLairConfig { - path: lair_stderr_log_path.clone(), - })?, - ) - .spawn() - .context(CreateLairConfig { - path: lair_stderr_log_path.clone(), - })?; - let connection_url_output = lair_url.wait_with_output().context(CreateLairConfig { - path: lair_stderr_log_path.clone(), - })?; - let connection_url = std::str::from_utf8(connection_url_output.stdout.as_slice()).unwrap(); - - let mut config_file = std::fs::File::create(&config_path).with_context(|| CreateConfig { - path: config_path.clone(), - })?; - - writeln!( - config_file, + let config = format!( "\ --- data_root_path: environment keystore: - type: lair_server - connection_url: {} + type: lair_server_in_proc admin_interfaces: - - driver: - type: websocket - port: {} - allowed_origins: \"*\" +- driver: + type: websocket + port: {} + allowed_origins: \"*\" {}", - connection_url, port, partial_config - ) - .with_context(|| WriteConfig { + admin_port, partial_config + ); + + std::fs::write(config_path.clone(), config.clone()).with_context(|| CreateConfig { path: config_path.clone(), })?; diff --git a/crates/trycp_server/src/download_logs.rs b/crates/trycp_server/src/download_logs.rs index 5401723d..59457379 100644 --- a/crates/trycp_server/src/download_logs.rs +++ b/crates/trycp_server/src/download_logs.rs @@ -1,6 +1,6 @@ use crate::{ get_player_dir, player_config_exists, CONDUCTOR_STDERR_LOG_FILENAME, - CONDUCTOR_STDOUT_LOG_FILENAME, LAIR_STDERR_LOG_FILENAME, + CONDUCTOR_STDOUT_LOG_FILENAME, }; use snafu::{ResultExt, Snafu}; use trycp_api::{DownloadLogsResponse, MessageResponse, TryCpServerResponse}; @@ -9,8 +9,6 @@ use trycp_api::{DownloadLogsResponse, MessageResponse, TryCpServerResponse}; pub(crate) enum DownloadLogsError { #[snafu(display("No player with this ID is configured {}", id))] PlayerNotConfigured { id: String }, - #[snafu(display("Could not read lair stderr log for player with ID {}: {}", id, source))] - LairStdErr { id: String, source: std::io::Error }, #[snafu(display( "Could not read holochain stdout log for player with ID {}: {}", id, @@ -34,9 +32,6 @@ pub(crate) fn download_logs(id: String) -> Result Result = 9100..9200; -static NEXT_ADMIN_PORT: AtomicU16 = AtomicU16::new(FIRST_ADMIN_PORT); +static NEXT_ADMIN_PORT: AtomicU16 = AtomicU16::new(ADMIN_PORT_RANGE.start); static PLAYERS: Lazy>> = Lazy::new(RwLock::default); #[tokio::main] @@ -105,7 +103,6 @@ struct Player { } struct PlayerProcesses { - lair: Child, holochain: Child, } @@ -224,11 +221,9 @@ async fn ws_message( .await .map_err(|e| e.to_string()), ), - Request::Reset => spawn_blocking(move || { - serialize_resp(request_id, reset::reset().map_err(|e| e.to_string())) - }) - .await - .unwrap(), + Request::Reset => spawn_blocking(move || serialize_resp(request_id, reset::reset())) + .await + .unwrap(), Request::CallAdminInterface { id, message } => serialize_resp( request_id, admin_call::admin_call(id, message) @@ -306,8 +301,6 @@ fn player_config_exists(id: &str) -> bool { enum KillError { #[snafu(display("Could not kill holochain: {}", source))] KillHolochain { source: nix::Error }, - #[snafu(display("Could not kill lair: {}", source))] - KillLair { source: nix::Error }, } fn kill_player( @@ -324,8 +317,6 @@ fn kill_player( signal::kill(Pid::from_raw(player.holochain.id() as i32), signal).context(KillHolochain)?; player.holochain.wait().unwrap(); - signal::kill(Pid::from_raw(player.lair.id() as i32), signal).context(KillLair)?; - player.lair.wait().unwrap(); *player_cell = None; Ok(()) diff --git a/crates/trycp_server/src/reset.rs b/crates/trycp_server/src/reset.rs index a9d37ef4..b6e5b6cf 100644 --- a/crates/trycp_server/src/reset.rs +++ b/crates/trycp_server/src/reset.rs @@ -1,35 +1,18 @@ -use std::{io, sync::atomic}; +use std::sync::atomic; use nix::sys::signal::Signal; -use snafu::{IntoError, Snafu}; use crate::{ - app_interface, kill_player, FIRST_ADMIN_PORT, NEXT_ADMIN_PORT, PLAYERS, PLAYERS_DIR_PATH, + app_interface, kill_player, ADMIN_PORT_RANGE, NEXT_ADMIN_PORT, PLAYERS, PLAYERS_DIR_PATH, }; -#[derive(Debug, Snafu)] -pub(crate) enum ResetError { - #[snafu(display( - "Could not clear out players directory at {}: {}", - PLAYERS_DIR_PATH, - source - ))] - RemoveDir { source: io::Error }, -} - -pub(crate) fn reset() -> Result<(), ResetError> { +pub(crate) fn reset() -> Result<(), String> { let (players, app_connections, admin_connections) = { let mut players_guard = PLAYERS.write(); let mut app_connections_guard = futures::executor::block_on(app_interface::APP_CONNECTIONS.lock()); let mut admin_connections_guard = futures::executor::block_on(crate::admin_call::ADMIN_CONNECTIONS.lock()); - NEXT_ADMIN_PORT.store(FIRST_ADMIN_PORT, atomic::Ordering::SeqCst); - match std::fs::remove_dir_all(PLAYERS_DIR_PATH) { - Ok(()) => {} - Err(e) if e.kind() == io::ErrorKind::NotFound => {} - Err(e) => return Err(RemoveDir.into_error(e)), - } ( std::mem::take(&mut *players_guard), std::mem::take(&mut *app_connections_guard), @@ -58,5 +41,10 @@ pub(crate) fn reset() -> Result<(), ResetError> { } } + NEXT_ADMIN_PORT.store(ADMIN_PORT_RANGE.start, atomic::Ordering::SeqCst); + if let Err(err) = std::fs::remove_dir_all(PLAYERS_DIR_PATH) { + println!("warn: could not remove directory {PLAYERS_DIR_PATH}: {err}"); + } + Ok(()) } diff --git a/crates/trycp_server/src/startup.rs b/crates/trycp_server/src/startup.rs index 6dccd6cf..4b8f319f 100644 --- a/crates/trycp_server/src/startup.rs +++ b/crates/trycp_server/src/startup.rs @@ -1,7 +1,6 @@ use crate::{ get_player_dir, PlayerProcesses, CONDUCTOR_CONFIG_FILENAME, CONDUCTOR_MAGIC_STRING, - CONDUCTOR_STDERR_LOG_FILENAME, CONDUCTOR_STDOUT_LOG_FILENAME, LAIR_MAGIC_STRING, - LAIR_PASSPHRASE, LAIR_STDERR_LOG_FILENAME, PLAYERS, + CONDUCTOR_STDERR_LOG_FILENAME, CONDUCTOR_STDOUT_LOG_FILENAME, LAIR_PASSPHRASE, PLAYERS, }; use snafu::{OptionExt, ResultExt, Snafu}; use std::io::Lines; @@ -16,131 +15,98 @@ use std::{ pub enum Error { #[snafu(display("Could not find a configuration for player with ID {:?}", id))] PlayerNotConfigured { id: String }, - #[snafu(display( - "Could not create log file at {} for lair-keystore's stdout: {}", path.display(), source - ))] - CreateLairStdoutFile { path: PathBuf, source: io::Error }, #[snafu(display("Could not spawn lair-keystore: {}", source))] SpawnLair { source: io::Error }, - #[snafu(display( - "Could not check lair-keystore's output to confirm that it's ready: {}", - source - ))] - CheckLairReady { source: io::Error }, #[snafu(display("Could not spawn holochain: {}", source))] SpawnHolochain { source: io::Error }, - #[snafu(display( - "Could not check holochain's output to confirm that it's ready: {}", - source - ))] - CheckHolochainReady { source: io::Error }, + #[snafu(display("Holochain startup failed: {}", reason))] + HolochainStartupFailed { reason: String }, } pub fn startup(id: String, log_level: Option) -> Result<(), Error> { let rust_log = log_level.unwrap_or_else(|| "error".to_string()); let player_dir = get_player_dir(&id); + let players = PLAYERS.read(); + let player = players + .get(&id) + .context(PlayerNotConfigured { id: id.clone() })?; - let conductor_stdout; - let conductor_stderr; - { - let players = PLAYERS.read(); - let player = players - .get(&id) - .context(PlayerNotConfigured { id: id.clone() })?; + let mut processes = player.processes.lock(); - let mut processes = player.processes.lock(); - - if processes.is_some() { - return Ok(()); - } + if processes.is_some() { + return Ok(()); + } - println!("starting player with id: {}", id); - - let lair_stderr_log_path = player_dir.join(LAIR_STDERR_LOG_FILENAME); - let mut lair = Command::new("lair-keystore") - .current_dir(&player_dir) - .env("RUST_BACKTRACE", "full") - .args(["server", "--piped"]) - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) - .stderr( - std::fs::OpenOptions::new() - .append(true) - .create(true) - .open(&lair_stderr_log_path) - .context(CreateLairStdoutFile { - path: lair_stderr_log_path, - })?, - ) - .spawn() + println!("starting player with id: {}", id); + + let mut conductor = Command::new("holochain") + .current_dir(&player_dir) + .arg("--piped") + .arg("-c") + .arg(CONDUCTOR_CONFIG_FILENAME) + // Disable ANSI color codes in Holochain output, which should be set any time the output + // is being written to a file. + // See https://docs.rs/tracing-subscriber/0.3.18/tracing_subscriber/fmt/struct.Layer.html#method.with_ansi + .env("NO_COLOR", "1") + .env("RUST_BACKTRACE", "full") + .env("RUST_LOG", rust_log) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .stderr(Stdio::piped()) + .spawn() + .context(SpawnHolochain)?; + + if let Some(mut holochain_stdin) = conductor.stdin.take() { + holochain_stdin + .write_all(LAIR_PASSPHRASE.as_bytes()) .context(SpawnLair)?; - - if let Some(mut lair_stdin) = lair.stdin.take() { - lair_stdin - .write_all(LAIR_PASSPHRASE.as_bytes()) - .context(SpawnLair)?; - } - - { - // Wait until lair begins to output before starting conductor. - stream_output_with_ready( - lair.stdout.take().unwrap(), - LAIR_MAGIC_STRING, - None, - format!("lair-keystore({id})"), - ) - .context(CheckLairReady)?; - } - - let mut conductor = Command::new("holochain") - .current_dir(&player_dir) - .arg("--piped") - .arg("-c") - .arg(CONDUCTOR_CONFIG_FILENAME) - // Disable ANSI color codes in Holochain output, which should be set any time the output - // is being written to a file. - // See https://docs.rs/tracing-subscriber/0.3.18/tracing_subscriber/fmt/struct.Layer.html#method.with_ansi - .env("NO_COLOR", "1") - .env("RUST_BACKTRACE", "full") - .env("RUST_LOG", rust_log) - .stdin(Stdio::piped()) - .stdout(Stdio::piped()) - .stderr(Stdio::piped()) - .spawn() - .context(SpawnHolochain)?; - - if let Some(mut holochain_stdin) = conductor.stdin.take() { - holochain_stdin - .write_all(LAIR_PASSPHRASE.as_bytes()) - .context(SpawnLair)?; - } - - conductor_stdout = conductor.stdout.take().unwrap(); - conductor_stderr = conductor.stderr.take().unwrap(); - - *processes = Some(PlayerProcesses { - holochain: conductor, - lair, - }); } - stream_output_with_ready( + let conductor_stdout = conductor.stdout.take().unwrap(); + let conductor_stderr = conductor.stderr.take().unwrap(); + + let ready_rx = log_stdout( conductor_stdout, CONDUCTOR_MAGIC_STRING, Some(player_dir.join(CONDUCTOR_STDOUT_LOG_FILENAME)), format!("holochain({id})"), - ) - .context(CheckHolochainReady)?; + ); - stream_output( + log_stderr( BufReader::new(conductor_stderr).lines(), Some(player_dir.join(CONDUCTOR_STDERR_LOG_FILENAME)), format!("holochain({id})"), ); - println!("conductor started up for {}", id); - Ok(()) + let error = match futures::executor::block_on(tokio::time::timeout( + std::time::Duration::from_secs(10), + ready_rx, + )) { + Err(err) => Err::<(), _>(Error::HolochainStartupFailed { + reason: err.to_string(), + }), + Ok(Err(err)) => Err(Error::HolochainStartupFailed { + reason: err.to_string(), + }), + Ok(Ok(Err(()))) => Err(Error::HolochainStartupFailed { + reason: "Holochain ready message not found.".to_string(), + }), + Ok(Ok(Ok(()))) => { + *processes = Some(PlayerProcesses { + holochain: conductor, + }); + + println!("conductor started up for {}", id); + return Ok(()); + } + } + .unwrap_err(); + + if let Err(err) = conductor.kill() { + println!("could not kill Holochain process: {err}"); + } + Err(error) } fn open_log_file(path: PathBuf) -> io::Result { @@ -150,34 +116,43 @@ fn open_log_file(path: PathBuf) -> io::Result { .open(path) } -fn stream_output_with_ready( +fn log_stdout( stdout: ChildStdout, ready_line: &str, into_file: Option, context: String, -) -> io::Result<()> { - let mut f = into_file.clone().map(open_log_file).transpose()?; - - let mut reader = BufReader::new(stdout).lines(); - for line in &mut reader { - let line = line?; - if let Some(f) = &mut f { - writeln!(f, "{}: {}", context, line)?; - } - println!("{context}: {line}"); - if line == ready_line { - if let Some(f) = f { - drop(f); +) -> tokio::sync::oneshot::Receiver> { + let mut f = into_file.clone().map(open_log_file).transpose().unwrap(); + + let (tx, rx) = tokio::sync::oneshot::channel(); + let mut tx = Some(tx); + tokio::spawn({ + let ready_line = ready_line.to_string(); + async move { + let mut reader = BufReader::new(stdout).lines(); + while let Some(Ok(line)) = reader.next() { + if let Some(f) = &mut f { + if let Err(err) = writeln!(f, "{}: {}", context, line) { + println!("could not write to log file: {err}"); + } + } + println!("{context}: {line}"); + if line == ready_line { + if let Some(tx) = tx.take() { + let _ = tx.send(Ok(())); + } + } + } + if let Some(tx) = tx { + let _ = tx.send(Err(())); } - stream_output(reader, into_file, context); - break; } - } + }); - Ok(()) + rx } -fn stream_output( +fn log_stderr( mut reader: Lines, into_file: Option, context: String, diff --git a/crates/trycp_server/tests/integration.rs b/crates/trycp_server/tests/integration.rs new file mode 100644 index 00000000..1652ea82 --- /dev/null +++ b/crates/trycp_server/tests/integration.rs @@ -0,0 +1,181 @@ +use std::process::Stdio; + +use holochain_conductor_api::conductor::ConductorConfig; +use tokio::{ + io::{AsyncBufReadExt, BufReader}, + process::Child, + sync::oneshot::Receiver, +}; +use trycp_api::Request; + +const ONE_MIN: std::time::Duration = std::time::Duration::from_secs(60); + +#[tokio::test(flavor = "multi_thread")] +async fn multiple_conductors_on_same_machine_are_assigned_different_admin_ports() { + let port_1 = 9000; + let port_2 = 9001; + let id_player_1 = "player_1"; + let id_player_2 = "player_2"; + + // Start 1 server. + let (_trycp_server_1, config_path_rx_1) = start_server(port_1).await; + + // Connect client to server 1 and configure a conductor. + let (trycp_client_1, _) = + trycp_client::TrycpClient::connect(format!("ws://localhost:{port_1}")) + .await + .unwrap(); + let join_handle_1 = tokio::spawn(async move { + trycp_client_1 + .request( + Request::ConfigurePlayer { + id: id_player_1.to_string(), + partial_config: "dpki: + dna_path: ~ + network_seed: test + allow_throwaway_random_dpki_agent_key: true + no_dpki: false" + .to_string(), + }, + ONE_MIN, + ) + .await + .unwrap(); + trycp_client_1 + }); + + let config_path_1 = config_path_rx_1.await.unwrap(); + + let trycp_client_1 = join_handle_1.await.unwrap(); + + let config_1 = + serde_yaml::from_str::(&std::fs::read_to_string(config_path_1).unwrap()) + .unwrap(); + + let admin_port_1 = config_1 + .admin_interfaces + .unwrap() + .first() + .unwrap() + .driver + .port(); + + // Start up conductor on server 1. + trycp_client_1 + .request( + Request::Startup { + id: id_player_1.to_string(), + log_level: None, + }, + ONE_MIN, + ) + .await + .unwrap(); + + // Start server 2 on same machine. + let (_trycp_server_2, config_path_rx_2) = start_server(port_2).await; + + // Connect client to server 2 and configure a conductor. + let (trycp_client_2, _) = + trycp_client::TrycpClient::connect(format!("ws://localhost:{port_2}")) + .await + .unwrap(); + let join_handle_2 = tokio::spawn(async move { + trycp_client_2 + .request( + Request::ConfigurePlayer { + id: id_player_2.to_string(), + partial_config: "dpki: + dna_path: ~ + network_seed: test + allow_throwaway_random_dpki_agent_key: true + no_dpki: false" + .to_string(), + }, + ONE_MIN, + ) + .await + .unwrap(); + trycp_client_2 + }); + + let config_path_2 = config_path_rx_2.await.unwrap(); + + let trycp_client_2 = join_handle_2.await.unwrap(); + + let config_2 = + serde_yaml::from_str::(&std::fs::read_to_string(config_path_2).unwrap()) + .unwrap(); + + let admin_port_2 = config_2 + .admin_interfaces + .unwrap() + .first() + .unwrap() + .driver + .port(); + + // The two admin ports should be different. + assert_ne!( + admin_port_1, admin_port_2, + "conductors were not assigned different admin ports" + ); + + drop(trycp_client_2); + trycp_client_1 + .request(Request::Reset, ONE_MIN) + .await + .unwrap(); +} + +async fn start_server(port: u16) -> (tokio::process::Child, Receiver) { + let mut server = tokio::process::Command::new("cargo") + .arg("run") + .arg("--release") + .arg("--target-dir") + .arg("crates/trycp_server/target") + .arg("--") + .arg("-p") + .arg(port.to_string()) + .stdout(Stdio::piped()) + .stderr(Stdio::inherit()) + .kill_on_drop(true) + .spawn() + .expect("trycp server could not be started"); + let (server_running, config_path_rx) = spawn_output(&mut server); + server_running.await.unwrap(); + (server, config_path_rx) +} + +fn spawn_output( + trycp_server: &mut Child, +) -> ( + tokio::sync::oneshot::Receiver<()>, + tokio::sync::oneshot::Receiver, +) { + let stdout = trycp_server.stdout.take().unwrap(); + let (tx, rx) = tokio::sync::oneshot::channel(); + let (config_path_tx, config_path_rx) = tokio::sync::oneshot::channel(); + // Wrap in an Option because it is used in a loop and cannot be cloned. + let mut tx = Some(tx); + let mut config_path_tx = Some(config_path_tx); + tokio::task::spawn(async move { + let mut reader = BufReader::new(stdout).lines(); + while let Ok(Some(line)) = reader.next_line().await { + println!("trycp_server stdout: {}", &line); + if let Some(_) = line.strip_prefix("Listening on ") { + if let Some(tx) = tx.take() { + let _ = tx.send(()); + } + } else { + if let Some(config_output) = line.strip_prefix("wrote config for player") { + if let Some(config_path_tx) = config_path_tx.take() { + let config_path = config_output.rsplit(" ").next().unwrap(); + let _ = config_path_tx.send(config_path.to_string()); + } + } + } + } + }); + (rx, config_path_rx) +} diff --git a/docs/tryorama.conductoroptions.md b/docs/tryorama.conductoroptions.md index 91b83f8c..4bdb4d3e 100644 --- a/docs/tryorama.conductoroptions.md +++ b/docs/tryorama.conductoroptions.md @@ -71,6 +71,25 @@ _(Optional)_ A bootstrap server URL for peers to discover each other. _(Optional)_ The network type the conductor should use. + + + +[noDpki?](./tryorama.conductoroptions.nodpki.md) + + + + + + + +boolean + + + + +_(Optional)_ Exclude dpki in the conductor instance. + + diff --git a/docs/tryorama.conductoroptions.nodpki.md b/docs/tryorama.conductoroptions.nodpki.md new file mode 100644 index 00000000..eb46d1e7 --- /dev/null +++ b/docs/tryorama.conductoroptions.nodpki.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@holochain/tryorama](./tryorama.md) > [ConductorOptions](./tryorama.conductoroptions.md) > [noDpki](./tryorama.conductoroptions.nodpki.md) + +## ConductorOptions.noDpki property + +Exclude dpki in the conductor instance. + +**Signature:** + +```typescript +noDpki?: boolean; +``` diff --git a/docs/tryorama.createconductoroptions.md b/docs/tryorama.createconductoroptions.md index 306e913a..d56a364d 100644 --- a/docs/tryorama.createconductoroptions.md +++ b/docs/tryorama.createconductoroptions.md @@ -9,7 +9,7 @@ Options for using the conductor factory. **Signature:** ```typescript -export type CreateConductorOptions = Pick; +export type CreateConductorOptions = Pick; ``` **References:** [ConductorOptions](./tryorama.conductoroptions.md) diff --git a/docs/tryorama.trycpconductoroptions.md b/docs/tryorama.trycpconductoroptions.md index a4e3e7dd..474fc2d3 100644 --- a/docs/tryorama.trycpconductoroptions.md +++ b/docs/tryorama.trycpconductoroptions.md @@ -73,6 +73,27 @@ _(Optional)_ Log level of the conductor (optional). default: "error" + + + +[noDpki?](./tryorama.trycpconductoroptions.nodpki.md) + + + + + + + +boolean + + + + +_(Optional)_ Exclude dpki in the conductor instance. + +default: false // defaults to using the dpki + + diff --git a/docs/tryorama.trycpconductoroptions.nodpki.md b/docs/tryorama.trycpconductoroptions.nodpki.md new file mode 100644 index 00000000..7336793e --- /dev/null +++ b/docs/tryorama.trycpconductoroptions.nodpki.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [@holochain/tryorama](./tryorama.md) > [TryCpConductorOptions](./tryorama.trycpconductoroptions.md) > [noDpki](./tryorama.trycpconductoroptions.nodpki.md) + +## TryCpConductorOptions.noDpki property + +Exclude dpki in the conductor instance. + +default: false // defaults to using the dpki + +**Signature:** + +```typescript +noDpki?: boolean; +``` diff --git a/flake.lock b/flake.lock index e8c12e15..0e075dae 100644 --- a/flake.lock +++ b/flake.lock @@ -1,18 +1,12 @@ { "nodes": { "crane": { - "inputs": { - "nixpkgs": [ - "holonix", - "nixpkgs" - ] - }, "locked": { - "lastModified": 1724006180, - "narHash": "sha256-PVxPj0Ga2fMYMtcT9ARCthF+4U71YkOT7ZjgD/vf1Aw=", + "lastModified": 1727316705, + "narHash": "sha256-/mumx8AQ5xFuCJqxCIOFCHTVlxHkMT21idpbgbm/TIE=", "owner": "ipetkov", "repo": "crane", - "rev": "7ce92819802bc583b7e82ebc08013a530f22209f", + "rev": "5b03654ce046b5167e7b0bccbd8244cb56c16f0e", "type": "github" }, "original": { @@ -26,11 +20,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1719994518, - "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", "type": "github" }, "original": { @@ -42,11 +36,11 @@ "hc-launch": { "flake": false, "locked": { - "lastModified": 1720810416, - "narHash": "sha256-PgykEezr0yrUAPQcmVJdR8M4PiKDzLCL/RS67RFeu/A=", + "lastModified": 1726473709, + "narHash": "sha256-WjuSEtK9odQsrAIbS7TxQEYPyjYgJheMZmVj7Aentyg=", "owner": "holochain", "repo": "hc-launch", - "rev": "b788d346491f4749949ae1710d51508920b6ea07", + "rev": "c6fb9cf6d4b8e548c960527a8fc88d2ead051394", "type": "github" }, "original": { @@ -59,11 +53,11 @@ "hc-scaffold": { "flake": false, "locked": { - "lastModified": 1723558677, - "narHash": "sha256-s5WjtXlu8d7U/zY2Kv4daaH0TlSiVc+D+UqR6B7+qj4=", + "lastModified": 1725629251, + "narHash": "sha256-23TjhOgXdLOX05yGDK8ZVTZxovbFiGz2Mu+H45YLpAA=", "owner": "holochain", "repo": "scaffolding", - "rev": "80edba8c2f5512ba0babcc8d84b78c1d79f0d1d8", + "rev": "d415a38e686faf38c91689e176b62a93bd51b188", "type": "github" }, "original": { @@ -76,16 +70,16 @@ "holochain": { "flake": false, "locked": { - "lastModified": 1723718736, - "narHash": "sha256-f8Hi7HvANahU5lJjtWk+XpnCcIjfMiV0yFxGqzqEXqU=", + "lastModified": 1727364075, + "narHash": "sha256-VNgxDgeq2sX/L7D8J7F3QErqMVKdZTCX6SR3Cs5YKgM=", "owner": "holochain", "repo": "holochain", - "rev": "a3384305850735b1b71fa0ab6f36f2318ec56d28", + "rev": "116f88d9baaf2b710c7cbbb7776a4b09e311b076", "type": "github" }, "original": { "owner": "holochain", - "ref": "holochain-0.4.0-dev.18", + "ref": "holochain-0.4.0-dev.27", "repo": "holochain", "type": "github" } @@ -106,11 +100,11 @@ ] }, "locked": { - "lastModified": 1723737493, - "narHash": "sha256-zP22A91tT/i+chslSATQvjKrZTXelwTcDqeNTLLTcyc=", + "lastModified": 1727381822, + "narHash": "sha256-wa8racInCgydxkm9KOv4DQzqldAMLPnrEisl3jT0ofw=", "owner": "holochain", "repo": "holonix", - "rev": "6438098657b9441e65db1543f0200f22453238de", + "rev": "e78f71a0bf90ff538792d5b9a60c476dc87096bd", "type": "github" }, "original": { @@ -123,16 +117,16 @@ "lair-keystore": { "flake": false, "locked": { - "lastModified": 1717684904, - "narHash": "sha256-vcXt67Tl1qwVUkx8CBevdQocqZXUEeoXjaYw86ljsYo=", + "lastModified": 1726865440, + "narHash": "sha256-+ARQs+Sfmh8QXMyjjHjm6Ib8Ag86Jm2vnyB6l3zTCgA=", "owner": "holochain", "repo": "lair", - "rev": "6a84ed490fc7074d107e38bbb4a8d707e9b8e066", + "rev": "9f306efed597765b70da704e1739ecc67f2510e0", "type": "github" }, "original": { "owner": "holochain", - "ref": "lair_keystore-v0.4.5", + "ref": "lair_keystore-v0.5.2", "repo": "lair", "type": "github" } @@ -155,14 +149,14 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1719876945, - "narHash": "sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI=", + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/5daf0514482af3f97abaefc78a6606365c9108e2.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, "root": { @@ -184,11 +178,11 @@ ] }, "locked": { - "lastModified": 1724293269, - "narHash": "sha256-x/XhOAszT/ejditCHUtGOjQcVg2AQhrC/QVew3i7kTI=", + "lastModified": 1727404165, + "narHash": "sha256-kZCiYpQJBZ3kL9QymS88mCxpQwqo8KqvZeHk6LATuY8=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "6dc6d34a3a217457d7044dcce32b6d537480a6a1", + "rev": "76f0a61e733259e1034dd6523e039d04932ffefc", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c06659e3..632ad9a1 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,6 @@ # lib to build a nix package from a rust crate crane = { url = "github:ipetkov/crane"; - inputs.nixpkgs.follows = "holonix/nixpkgs"; }; # Rust toolchain @@ -44,6 +43,7 @@ pkgs.libiconv pkgs.darwin.apple_sdk.frameworks.CoreFoundation pkgs.darwin.apple_sdk.frameworks.Security + pkgs.darwin.apple_sdk.frameworks.SystemConfiguration ]) ]; diff --git a/package-lock.json b/package-lock.json index 47fed3eb..9ff167e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "0.17.0-dev.5", "license": "MIT", "dependencies": { - "@holochain/client": "^0.18.0-dev.10", + "@holochain/client": "^0.18.0-dev.13", "get-port": "^6.1.2", "lodash": "^4.17.21", "uuid": "^8.3.2", @@ -45,7 +45,7 @@ }, "../holochain-client-js": { "name": "@holochain/client", - "version": "0.18.0-dev.3", + "version": "0.18.0-dev.8", "extraneous": true, "license": "CAL-1.0", "dependencies": { @@ -124,9 +124,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.1.tgz", + "integrity": "sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==", "cpu": [ "ppc64" ], @@ -136,13 +136,13 @@ "aix" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.1.tgz", + "integrity": "sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==", "cpu": [ "arm" ], @@ -152,13 +152,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.1.tgz", + "integrity": "sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==", "cpu": [ "arm64" ], @@ -168,13 +168,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.1.tgz", + "integrity": "sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==", "cpu": [ "x64" ], @@ -184,13 +184,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.1.tgz", + "integrity": "sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==", "cpu": [ "arm64" ], @@ -200,13 +200,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.1.tgz", + "integrity": "sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==", "cpu": [ "x64" ], @@ -216,13 +216,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.1.tgz", + "integrity": "sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==", "cpu": [ "arm64" ], @@ -232,13 +232,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.1.tgz", + "integrity": "sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==", "cpu": [ "x64" ], @@ -248,13 +248,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.1.tgz", + "integrity": "sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==", "cpu": [ "arm" ], @@ -264,13 +264,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.1.tgz", + "integrity": "sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==", "cpu": [ "arm64" ], @@ -280,13 +280,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.1.tgz", + "integrity": "sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==", "cpu": [ "ia32" ], @@ -296,13 +296,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.1.tgz", + "integrity": "sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==", "cpu": [ "loong64" ], @@ -312,13 +312,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.1.tgz", + "integrity": "sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==", "cpu": [ "mips64el" ], @@ -328,13 +328,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.1.tgz", + "integrity": "sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==", "cpu": [ "ppc64" ], @@ -344,13 +344,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.1.tgz", + "integrity": "sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==", "cpu": [ "riscv64" ], @@ -360,13 +360,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.1.tgz", + "integrity": "sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==", "cpu": [ "s390x" ], @@ -376,13 +376,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.1.tgz", + "integrity": "sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==", "cpu": [ "x64" ], @@ -392,13 +392,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.1.tgz", + "integrity": "sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==", "cpu": [ "x64" ], @@ -408,13 +408,29 @@ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.1.tgz", + "integrity": "sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.1.tgz", + "integrity": "sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==", "cpu": [ "x64" ], @@ -424,13 +440,13 @@ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.1.tgz", + "integrity": "sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==", "cpu": [ "x64" ], @@ -440,13 +456,13 @@ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.1.tgz", + "integrity": "sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==", "cpu": [ "arm64" ], @@ -456,13 +472,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.1.tgz", + "integrity": "sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==", "cpu": [ "ia32" ], @@ -472,13 +488,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.1.tgz", + "integrity": "sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==", "cpu": [ "x64" ], @@ -488,7 +504,7 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@eslint-community/eslint-utils": { @@ -507,9 +523,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", - "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -600,9 +616,10 @@ } }, "node_modules/@holochain/client": { - "version": "0.18.0-dev.10", - "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.18.0-dev.10.tgz", - "integrity": "sha512-70LkUb//tHb+g4oPJQFqyi7axJlrQyXy86W9WFG/lAoVFo4NBBFvVOee8oOg+JxvgxJnevlLPsKePzU3I2tnNw==", + "version": "0.18.0-dev.13", + "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.18.0-dev.13.tgz", + "integrity": "sha512-pwmqsVRhzERt036Ms3Nch7UT94u1+kEPnGF1rcYParrx8lE5aol5XxW5UqS1wiIoadd5iYjYXJE8CJI2fga0Sg==", + "license": "CAL-1.0", "dependencies": { "@bitgo/blake2b": "^3.2.4", "@holochain/serialization": "^0.1.0-beta-rc.3", @@ -684,16 +701,16 @@ } }, "node_modules/@microsoft/api-documenter": { - "version": "7.25.3", - "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.25.3.tgz", - "integrity": "sha512-xigAN2KPukckFhXMp+Zv8UhIh8lRpu5RXoM+Pl1HRHAVtIWN0oWMIeGU1bU79W+bCRTuo5zsQ98NvN6DHFMXaQ==", + "version": "7.25.12", + "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.25.12.tgz", + "integrity": "sha512-iGucfnoJsbNcMeUZgODvA91sYG9uNy/pnyDiVHjO8++A91Fp1vECAEd1qaqqeCP3ImgJ9HcJuUnwlRvS93QNXw==", "dev": true, "dependencies": { - "@microsoft/api-extractor-model": "7.29.2", + "@microsoft/api-extractor-model": "7.29.6", "@microsoft/tsdoc": "~0.15.0", - "@rushstack/node-core-library": "5.4.1", - "@rushstack/terminal": "0.13.0", - "@rushstack/ts-command-line": "4.22.0", + "@rushstack/node-core-library": "5.7.0", + "@rushstack/terminal": "0.14.0", + "@rushstack/ts-command-line": "4.22.6", "js-yaml": "~3.13.1", "resolve": "~1.22.1" }, @@ -702,18 +719,18 @@ } }, "node_modules/@microsoft/api-extractor": { - "version": "7.47.0", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.47.0.tgz", - "integrity": "sha512-LT8yvcWNf76EpDC+8/ArTVSYePvuDQ+YbAUrsTcpg3ptiZ93HIcMCozP/JOxDt+rrsFfFHcpfoselKfPyRI0GQ==", + "version": "7.47.7", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.47.7.tgz", + "integrity": "sha512-fNiD3G55ZJGhPOBPMKD/enozj8yxJSYyVJWxRWdcUtw842rvthDHJgUWq9gXQTensFlMHv2wGuCjjivPv53j0A==", "dev": true, "dependencies": { - "@microsoft/api-extractor-model": "7.29.2", + "@microsoft/api-extractor-model": "7.29.6", "@microsoft/tsdoc": "~0.15.0", "@microsoft/tsdoc-config": "~0.17.0", - "@rushstack/node-core-library": "5.4.1", - "@rushstack/rig-package": "0.5.2", - "@rushstack/terminal": "0.13.0", - "@rushstack/ts-command-line": "4.22.0", + "@rushstack/node-core-library": "5.7.0", + "@rushstack/rig-package": "0.5.3", + "@rushstack/terminal": "0.14.0", + "@rushstack/ts-command-line": "4.22.6", "lodash": "~4.17.15", "minimatch": "~3.0.3", "resolve": "~1.22.1", @@ -726,14 +743,14 @@ } }, "node_modules/@microsoft/api-extractor-model": { - "version": "7.29.2", - "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.29.2.tgz", - "integrity": "sha512-hAYajOjQan3uslhKJRwvvHIdLJ+ZByKqdSsJ/dgHFxPtEbdKpzMDO8zuW4K5gkSMYl5D0LbNwxkhxr51P2zsmw==", + "version": "7.29.6", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.29.6.tgz", + "integrity": "sha512-gC0KGtrZvxzf/Rt9oMYD2dHvtN/1KPEYsrQPyMKhLHnlVuO/f4AFN3E4toqZzD2pt4LhkKoYmL2H9tX3yCOyRw==", "dev": true, "dependencies": { "@microsoft/tsdoc": "~0.15.0", "@microsoft/tsdoc-config": "~0.17.0", - "@rushstack/node-core-library": "5.4.1" + "@rushstack/node-core-library": "5.7.0" } }, "node_modules/@microsoft/api-extractor/node_modules/typescript": { @@ -811,9 +828,9 @@ } }, "node_modules/@rushstack/node-core-library": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-5.4.1.tgz", - "integrity": "sha512-WNnwdS8r9NZ/2K3u29tNoSRldscFa7SxU0RT+82B6Dy2I4Hl2MeCSKm4EXLXPKeNzLGvJ1cqbUhTLviSF8E6iA==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-5.7.0.tgz", + "integrity": "sha512-Ff9Cz/YlWu9ce4dmqNBZpA45AEya04XaBFIjV7xTVeEf+y/kTjEasmozqFELXlNG4ROdevss75JrrZ5WgufDkQ==", "dev": true, "dependencies": { "ajv": "~8.13.0", @@ -851,9 +868,9 @@ } }, "node_modules/@rushstack/rig-package": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.5.2.tgz", - "integrity": "sha512-mUDecIJeH3yYGZs2a48k+pbhM6JYwWlgjs2Ca5f2n1G2/kgdgP9D/07oglEGf6mRyXEnazhEENeYTSNDRCwdqA==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.5.3.tgz", + "integrity": "sha512-olzSSjYrvCNxUFZowevC3uz8gvKr3WTpHQ7BkpjtRpA3wK+T0ybep/SRUMfr195gBzJm5gaXw0ZMgjIyHqJUow==", "dev": true, "dependencies": { "resolve": "~1.22.1", @@ -861,12 +878,12 @@ } }, "node_modules/@rushstack/terminal": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@rushstack/terminal/-/terminal-0.13.0.tgz", - "integrity": "sha512-Ou44Q2s81BqJu3dpYedAX54am9vn245F0HzqVrfJCMQk5pGgoKKOBOjkbfZC9QKcGNaECh6pwH2s5noJt7X6ew==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@rushstack/terminal/-/terminal-0.14.0.tgz", + "integrity": "sha512-juTKMAMpTIJKudeFkG5slD8Z/LHwNwGZLtU441l/u82XdTBfsP+LbGKJLCNwP5se+DMCT55GB8x9p6+C4UL7jw==", "dev": true, "dependencies": { - "@rushstack/node-core-library": "5.4.1", + "@rushstack/node-core-library": "5.7.0", "supports-color": "~8.1.1" }, "peerDependencies": { @@ -879,12 +896,12 @@ } }, "node_modules/@rushstack/ts-command-line": { - "version": "4.22.0", - "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.22.0.tgz", - "integrity": "sha512-Qj28t6MO3HRgAZ72FDeFsrpdE6wBWxF3VENgvrXh7JF2qIT+CrXiOJIesW80VFZB9QwObSpkB1ilx794fGQg6g==", + "version": "4.22.6", + "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.22.6.tgz", + "integrity": "sha512-QSRqHT/IfoC5nk9zn6+fgyqOPXHME0BfchII9EUPR19pocsNp/xSbeBCbD3PIR2Lg+Q5qk7OFqk1VhWPMdKHJg==", "dev": true, "dependencies": { - "@rushstack/terminal": "0.13.0", + "@rushstack/terminal": "0.14.0", "@types/argparse": "1.0.38", "argparse": "~1.0.9", "string-argv": "~0.3.1" @@ -903,18 +920,18 @@ "dev": true }, "node_modules/@types/lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==", + "version": "4.17.7", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.7.tgz", + "integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==", "dev": true }, "node_modules/@types/node": { - "version": "20.14.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", - "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "version": "22.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.0.tgz", + "integrity": "sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==", "dev": true, "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, "node_modules/@types/ramda": { @@ -972,9 +989,9 @@ "dev": true }, "node_modules/@types/ws": { - "version": "8.5.10", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", - "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", + "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", "dev": true, "dependencies": { "@types/node": "*" @@ -1175,9 +1192,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.11.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", - "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1342,9 +1359,9 @@ } }, "node_modules/async": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", - "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==" }, "node_modules/available-typed-arrays": { "version": "1.0.7", @@ -1574,9 +1591,9 @@ } }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -1868,41 +1885,42 @@ } }, "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.1.tgz", + "integrity": "sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" + "@esbuild/aix-ppc64": "0.23.1", + "@esbuild/android-arm": "0.23.1", + "@esbuild/android-arm64": "0.23.1", + "@esbuild/android-x64": "0.23.1", + "@esbuild/darwin-arm64": "0.23.1", + "@esbuild/darwin-x64": "0.23.1", + "@esbuild/freebsd-arm64": "0.23.1", + "@esbuild/freebsd-x64": "0.23.1", + "@esbuild/linux-arm": "0.23.1", + "@esbuild/linux-arm64": "0.23.1", + "@esbuild/linux-ia32": "0.23.1", + "@esbuild/linux-loong64": "0.23.1", + "@esbuild/linux-mips64el": "0.23.1", + "@esbuild/linux-ppc64": "0.23.1", + "@esbuild/linux-riscv64": "0.23.1", + "@esbuild/linux-s390x": "0.23.1", + "@esbuild/linux-x64": "0.23.1", + "@esbuild/netbsd-x64": "0.23.1", + "@esbuild/openbsd-arm64": "0.23.1", + "@esbuild/openbsd-x64": "0.23.1", + "@esbuild/sunos-x64": "0.23.1", + "@esbuild/win32-arm64": "0.23.1", + "@esbuild/win32-ia32": "0.23.1", + "@esbuild/win32-x64": "0.23.1" } }, "node_modules/escape-string-regexp": { @@ -2201,9 +2219,9 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -2527,9 +2545,9 @@ } }, "node_modules/get-tsconfig": { - "version": "4.7.5", - "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.5.tgz", - "integrity": "sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==", + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.6.tgz", + "integrity": "sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==", "dev": true, "dependencies": { "resolve-pkg-maps": "^1.0.0" @@ -2756,9 +2774,9 @@ } }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" @@ -2906,12 +2924,15 @@ } }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3269,16 +3290,16 @@ } }, "node_modules/libsodium": { - "version": "0.7.13", - "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.13.tgz", - "integrity": "sha512-mK8ju0fnrKXXfleL53vtp9xiPq5hKM0zbDQtcxQIsSmxNgSxqCj6R7Hl9PkrNe2j29T4yoDaF7DJLK9/i5iWUw==" + "version": "0.7.15", + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.15.tgz", + "integrity": "sha512-sZwRknt/tUpE2AwzHq3jEyUU5uvIZHtSssktXq7owd++3CSgn8RGrv6UZJJBpP7+iBghBqe7Z06/2M31rI2NKw==" }, "node_modules/libsodium-wrappers": { - "version": "0.7.13", - "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.13.tgz", - "integrity": "sha512-kasvDsEi/r1fMzKouIDv7B8I6vNmknXwGiYodErGuESoFTohGSKZplFtVxZqHaoQ217AynyIFgnOVRitpHs0Qw==", + "version": "0.7.15", + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.15.tgz", + "integrity": "sha512-E4anqJQwcfiC6+Yrl01C1m8p99wEhLmJSs0VQqST66SbQXXBoaJY0pF4BNjRYa/sOQAxx6lXAaAFIlx+15tXJQ==", "dependencies": { - "libsodium": "^0.7.13" + "libsodium": "^0.7.15" } }, "node_modules/locate-path": { @@ -3313,9 +3334,9 @@ "dev": true }, "node_modules/logform": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", - "integrity": "sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.1.tgz", + "integrity": "sha512-CdaO738xRapbKIMVn2m4F6KTj4j7ooJ8POVnebSgKo3KBz5axNXRAL7ZdRjIV6NOr2Uf4vjtRkxrFETOioCqSA==", "dependencies": { "@colors/colors": "1.6.0", "@types/triple-beam": "^1.3.2", @@ -3350,9 +3371,9 @@ } }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { "braces": "^3.0.3", @@ -3393,17 +3414,18 @@ } }, "node_modules/mock-property": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/mock-property/-/mock-property-1.0.3.tgz", - "integrity": "sha512-2emPTb1reeLLYwHxyVx993iYyCHEiRRO+y8NFXFPL5kl5q14sgTK76cXyEKkeKCHeRw35SfdkUJ10Q1KfHuiIQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mock-property/-/mock-property-1.1.0.tgz", + "integrity": "sha512-1/JjbLoGwv87xVsutkX0XJc0M0W4kb40cZl/K41xtTViBOD9JuFPKfyMNTrLJ/ivYAd0aPqu/vduamXO0emTFQ==", "dev": true, "dependencies": { - "define-data-property": "^1.1.1", + "define-data-property": "^1.1.4", "functions-have-names": "^1.2.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "hasown": "^2.0.0", - "isarray": "^2.0.5" + "has-property-descriptors": "^1.0.2", + "hasown": "^2.0.2", + "isarray": "^2.0.5", + "object-inspect": "^1.13.2" }, "engines": { "node": ">= 0.4" @@ -3435,10 +3457,13 @@ "dev": true }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4144,14 +4169,14 @@ } }, "node_modules/tape": { - "version": "5.7.5", - "resolved": "https://registry.npmjs.org/tape/-/tape-5.7.5.tgz", - "integrity": "sha512-C5Gm1MR8ujZmNrsmOiHSkKFfY2thrnUrFw/fFtcva9FABbN7LrHuQPi3MTS0Z0i/SLfYSJtRIcJYDUpwPsQ8yA==", + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/tape/-/tape-5.8.1.tgz", + "integrity": "sha512-pUzADXBVYm5Jkneh9hfXnirADrzQrDA3vddKbPOc/ZLORj4dFQ6GR1KdGWX0/NvOLDcYkVgeMdw78Uf6BzO3KA==", "dev": true, "dependencies": { - "@ljharb/resumer": "^0.1.2", - "@ljharb/through": "^2.3.12", - "array.prototype.every": "^1.1.5", + "@ljharb/resumer": "^0.1.3", + "@ljharb/through": "^2.3.13", + "array.prototype.every": "^1.1.6", "call-bind": "^1.0.7", "deep-equal": "^2.2.3", "defined": "^1.0.1", @@ -4160,17 +4185,17 @@ "get-package-type": "^0.1.0", "glob": "^7.2.3", "has-dynamic-import": "^2.1.0", - "hasown": "^2.0.1", + "hasown": "^2.0.2", "inherits": "^2.0.4", "is-regex": "^1.1.4", "minimist": "^1.2.8", "mock-property": "^1.0.3", "object-inspect": "^1.13.1", - "object-is": "^1.1.5", + "object-is": "^1.1.6", "object-keys": "^1.1.1", "object.assign": "^4.1.5", "resolve": "^2.0.0-next.5", - "string.prototype.trim": "^1.2.8" + "string.prototype.trim": "^1.2.9" }, "bin": { "tape": "bin/tape" @@ -4265,12 +4290,12 @@ } }, "node_modules/tsx": { - "version": "4.15.2", - "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.15.2.tgz", - "integrity": "sha512-kIZTOCmR37nEw0qxQks2dR+eZWSXydhTGmz7yx94vEiJtJGBTkUl0D/jt/5fey+CNdm6i3Cp+29WKRay9ScQUw==", + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.17.0.tgz", + "integrity": "sha512-eN4mnDA5UMKDt4YZixo9tBioibaMBpoxBkD+rIPAjVmYERSG0/dWEY1CEFuV89CgASlKL499q8AhmkMnnjtOJg==", "dev": true, "dependencies": { - "esbuild": "~0.21.4", + "esbuild": "~0.23.0", "get-tsconfig": "^4.7.5" }, "bin": { @@ -4409,9 +4434,9 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true }, "node_modules/universalify": { @@ -4514,15 +4539,15 @@ } }, "node_modules/winston": { - "version": "3.13.0", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.13.0.tgz", - "integrity": "sha512-rwidmA1w3SE4j0E5MuIufFhyJPBDG7Nu71RkZor1p2+qHvJSZ9GYDA81AyleQcZbh/+V6HjeBdfnTZJm9rSeQQ==", + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.14.2.tgz", + "integrity": "sha512-CO8cdpBB2yqzEf8v895L+GNKYJiEq8eKlHU38af3snQBQ+sdAIUepjMSguOIJC7ICbzm0ZI+Af2If4vIJrtmOg==", "dependencies": { "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.2", "async": "^3.2.3", "is-stream": "^2.0.0", - "logform": "^2.4.0", + "logform": "^2.6.0", "one-time": "^1.0.0", "readable-stream": "^3.4.0", "safe-stable-stringify": "^2.3.1", @@ -4535,12 +4560,12 @@ } }, "node_modules/winston-transport": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.7.0.tgz", - "integrity": "sha512-ajBj65K5I7denzer2IYW6+2bNIVqLGDHqDw3Ow8Ohh+vdW+rv4MZ6eiDvHoKhfJFZ2auyN8byXieDDJ96ViONg==", + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.7.1.tgz", + "integrity": "sha512-wQCXXVgfv/wUPOfb2x0ruxzwkcZfxcktz6JIMUaPLmcNhO4bZTwA/WtDWK74xV3F2dKu8YadrFv0qhwYjVEwhA==", "dependencies": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", + "logform": "^2.6.1", + "readable-stream": "^3.6.2", "triple-beam": "^1.3.0" }, "engines": { @@ -4563,9 +4588,9 @@ "dev": true }, "node_modules/ws": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", - "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "engines": { "node": ">=10.0.0" }, diff --git a/package.json b/package.json index 6fb2a0e5..275166eb 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "prepublishOnly": "npm run build" }, "dependencies": { - "@holochain/client": "^0.18.0-dev.10", + "@holochain/client": "^0.18.0-dev.13", "get-port": "^6.1.2", "lodash": "^4.17.21", "uuid": "^8.3.2", diff --git a/ts/src/local/conductor.ts b/ts/src/local/conductor.ts index 571f93f8..fcbc7de1 100644 --- a/ts/src/local/conductor.ts +++ b/ts/src/local/conductor.ts @@ -8,6 +8,7 @@ import { InstallAppRequest, AppAuthenticationToken, AppCallZomeRequest, + NetworkSeed, } from "@holochain/client"; import getPort, { portNumbers } from "get-port"; import pick from "lodash/pick.js"; @@ -59,6 +60,18 @@ export interface ConductorOptions { */ bootstrapServerUrl?: URL; + /** + * Disable DPKI in the conductor instance. + */ + noDpki?: boolean; + + /** + * Set a DPKI network seed in the conductor instance. + * + * Defaults to "deepkey-test". + */ + dpkiNetworkSeed?: NetworkSeed; + /** * Timeout for requests to Admin and App API. */ @@ -72,7 +85,11 @@ export interface ConductorOptions { */ export type CreateConductorOptions = Pick< ConductorOptions, - "bootstrapServerUrl" | "networkType" | "timeout" + | "bootstrapServerUrl" + | "networkType" + | "noDpki" + | "dpkiNetworkSeed" + | "timeout" >; /** @@ -90,6 +107,8 @@ export const createConductor = async ( const createConductorOptions: CreateConductorOptions = pick(options, [ "bootstrapServerUrl", "networkType", + "noDpki", + "dpkiNetworkSeed", "timeout", ]); const conductor = await Conductor.create( @@ -133,6 +152,12 @@ export class Conductor implements IConductor { signalingServerUrl: URL, options?: CreateConductorOptions ) { + if (options?.noDpki && options?.dpkiNetworkSeed) { + throw new Error( + "DPKI network seed can not be set when DPKI is disabled. Enable DPKI or do not provide a DPKI network seed." + ); + } + const networkType = options?.networkType ?? NetworkType.WebRtc; if (options?.bootstrapServerUrl && networkType !== NetworkType.WebRtc) { throw new Error( @@ -140,13 +165,14 @@ export class Conductor implements IConductor { ); } - const args = [ - "sandbox", - "--piped", - "create", - "--in-process-lair", - "network", - ]; + const args = ["sandbox", "--piped", "create", "--in-process-lair"]; + if (options?.noDpki) { + args.push("--no-dpki"); + } + if (options?.dpkiNetworkSeed) { + args.push("--dpki-network-seed", options.dpkiNetworkSeed); + } + args.push("network"); if (options?.bootstrapServerUrl) { args.push("--bootstrap", options.bootstrapServerUrl.href); } diff --git a/ts/src/local/scenario.ts b/ts/src/local/scenario.ts index 4a15957a..694a180b 100644 --- a/ts/src/local/scenario.ts +++ b/ts/src/local/scenario.ts @@ -38,6 +38,8 @@ export interface ScenarioOptions { */ export class Scenario { private timeout: number | undefined; + noDpki: boolean; + dpkiNetworkSeed: string; networkSeed: string; serviceProcess: ChildProcessWithoutNullStreams | undefined; bootstrapServerUrl: URL | undefined; @@ -51,6 +53,8 @@ export class Scenario { */ constructor(options?: ScenarioOptions) { this.timeout = options?.timeout; + this.noDpki = false; + this.dpkiNetworkSeed = uuidv4(); this.networkSeed = uuidv4(); this.serviceProcess = undefined; this.bootstrapServerUrl = undefined; @@ -70,6 +74,8 @@ export class Scenario { const conductor = await createConductor(this.signalingServerUrl, { timeout: this.timeout, bootstrapServerUrl: this.bootstrapServerUrl, + noDpki: this.noDpki, + dpkiNetworkSeed: this.noDpki ? "" : this.dpkiNetworkSeed, }); this.conductors.push(conductor); return conductor; diff --git a/ts/src/trycp/conductor/conductor.ts b/ts/src/trycp/conductor/conductor.ts index 8f87eb8e..b403502c 100644 --- a/ts/src/trycp/conductor/conductor.ts +++ b/ts/src/trycp/conductor/conductor.ts @@ -45,6 +45,7 @@ import { StorageInfoRequest, UninstallAppRequest, UpdateCoordinatorsRequest, + RevokeAgentKeyRequest, } from "@holochain/client"; import getPort, { portNumbers } from "get-port"; import assert from "node:assert"; @@ -53,30 +54,8 @@ import { v4 as uuidv4 } from "uuid"; import { _ALLOWED_ORIGIN } from "../../common.js"; import { makeLogger } from "../../logger.js"; import { AgentsAppsOptions, AppOptions, IConductor } from "../../types.js"; +import { TryCpClient, TryCpConductorLogLevel } from "../index.js"; import { - AdminApiResponseAppAuthenticationTokenIssued, - TryCpClient, - TryCpConductorLogLevel, -} from "../index.js"; -import { - AdminApiResponseAgentInfo, - AdminApiResponseAgentPubKeyGenerated, - AdminApiResponseAppDisabled, - AdminApiResponseAppEnabled, - AdminApiResponseAppInstalled, - AdminApiResponseAppInterfaceAttached, - AdminApiResponseAppInterfacesListed, - AdminApiResponseAppsListed, - AdminApiResponseAppStarted, - AdminApiResponseAppUninstalled, - AdminApiResponseCellIdsListed, - AdminApiResponseCoordinatorsUpdated, - AdminApiResponseDnaRegistered, - AdminApiResponseDnasDefinitionReturned, - AdminApiResponseDnasListed, - AdminApiResponseFullStateDumped, - AdminApiResponseNetworkStatsDumped, - AdminApiResponseStorageInfo, AppApiResponseAppInfo, AppApiResponseCloneCellCreated, AppApiResponseCloneCellDisabled, @@ -91,9 +70,10 @@ import { deserializeZomeResponsePayload } from "../util.js"; const logger = makeLogger("TryCP conductor"); const HOLO_SIGNALING_SERVER = new URL("wss://sbd-0.main.infra.holo.host"); -const HOLO_BOOTSTRAP_SERVEr = new URL("https://devnet-bootstrap.holo.host"); +const HOLO_BOOTSTRAP_SERVER = new URL("https://devnet-bootstrap.holo.host"); const BOOTSTRAP_SERVER_PLACEHOLDER = ""; const SIGNALING_SERVER_PLACEHOLDER = ""; +const DPKI_CONFIG_PLACEHOLDER = ""; /** * The default partial config for a TryCP conductor. @@ -103,7 +83,9 @@ const SIGNALING_SERVER_PLACEHOLDER = ""; export const DEFAULT_PARTIAL_PLAYER_CONFIG = `signing_service_uri: ~ encryption_service_uri: ~ decryption_service_uri: ~ -dpki: ~ +device_seed_lair_tag: null +danger_generate_throwaway_device_seed: false +${DPKI_CONFIG_PLACEHOLDER} network: network_type: "quic_bootstrap" bootstrap_service: ${BOOTSTRAP_SERVER_PLACEHOLDER} @@ -111,6 +93,34 @@ network: - type: webrtc signal_url: ${SIGNALING_SERVER_PLACEHOLDER}`; +const getPartialConfig = ( + noDpki = false, + dpkiNetworkSeed = "deepkey-test", + bootstrapServerUrl?: URL, + signalingServerUrl?: URL +) => { + const dpkiConfig = noDpki + ? `dpki: + dna_path: ~ + network_seed: ~ + no_dpki: true` + : `dpki: + dna_path: ~ + network_seed: ${dpkiNetworkSeed} + allow_throwaway_random_dpki_agent_key: true + no_dpki: false`; + const partialConfig = DEFAULT_PARTIAL_PLAYER_CONFIG.replace( + BOOTSTRAP_SERVER_PLACEHOLDER, + (bootstrapServerUrl ?? HOLO_BOOTSTRAP_SERVER).href + ) + .replace( + SIGNALING_SERVER_PLACEHOLDER, + (signalingServerUrl ?? HOLO_SIGNALING_SERVER).href + ) + .replace(DPKI_CONFIG_PLACEHOLDER, dpkiConfig); + return partialConfig; +}; + /** * @public */ @@ -130,6 +140,18 @@ export interface TryCpConductorOptions { */ partialConfig?: string; + /** + * Disable DPKI in the conductor instance. + * + * default: false // defaults to using DPKI + */ + noDpki?: boolean; + + /** + * Set a DPKI network seed. + */ + dpkiNetworkSeed?: string; + /** * Start up conductor after creation. * @@ -163,7 +185,11 @@ export const createTryCpConductor = async ( const conductor = new TryCpConductor(tryCpClient, options?.id); if (options?.startup !== false) { // configure and startup conductor by default - await conductor.configure(options?.partialConfig); + await conductor.configure( + options?.partialConfig, + options?.noDpki, + options?.dpkiNetworkSeed + ); await conductor.startUp({ logLevel: options?.logLevel }); } return conductor; @@ -183,22 +209,32 @@ export class TryCpConductor implements IConductor { this.id = id || `conductor-${uuidv4()}`; } + static defaultPartialConfig() { + return getPartialConfig(); + } + /** * Create conductor configuration. * * @param partialConfig - The configuration to add to the default configuration. + * @param noDpki - Disable the DPKI service on this conductor. + * @param dpkiNetworkSeed - Set DPKI network seed. * @returns An empty success response. */ - async configure(partialConfig?: string) { + async configure( + partialConfig?: string, + noDpki = false, + dpkiNetworkSeed = "deepkey-test" + ) { if (!partialConfig) { - partialConfig = DEFAULT_PARTIAL_PLAYER_CONFIG.replace( - BOOTSTRAP_SERVER_PLACEHOLDER, - (this.tryCpClient.bootstrapServerUrl || HOLO_BOOTSTRAP_SERVEr).href - ).replace( - SIGNALING_SERVER_PLACEHOLDER, - (this.tryCpClient.signalingServerUrl || HOLO_SIGNALING_SERVER).href + partialConfig = getPartialConfig( + noDpki, + dpkiNetworkSeed, + this.tryCpClient.bootstrapServerUrl, + this.tryCpClient.signalingServerUrl ); } + const response = await this.tryCpClient.call({ type: "configure_player", id: this.id, @@ -384,7 +420,7 @@ export class TryCpConductor implements IConductor { data: request, }); assert(response.type === "dna_registered"); - return (response as AdminApiResponseDnaRegistered).data; + return response.data; }; /** @@ -401,7 +437,7 @@ export class TryCpConductor implements IConductor { data: dnaHash, }); assert(response.type === "dna_definition_returned"); - return (response as AdminApiResponseDnasDefinitionReturned).data; + return response.data; }; /** @@ -447,7 +483,22 @@ export class TryCpConductor implements IConductor { type: "generate_agent_pub_key", }); assert(response.type === "agent_pub_key_generated"); - return (response as AdminApiResponseAgentPubKeyGenerated).data; + return response.data; + }; + + /** + * Revoke an agent key for an app in DPKI. + * + * @param data - {@link RevokeAgentKeyRequest} + * @returns A list of errors of the cells where deletion was unsuccessful. + */ + const revokeAgentKey = async (data: RevokeAgentKeyRequest) => { + const response = await this.callAdminApi({ + type: "revoke_agent_key", + data, + }); + assert(response.type === "agent_key_revoked"); + return response.data; }; /** @@ -462,7 +513,7 @@ export class TryCpConductor implements IConductor { data, }); assert(response.type === "app_installed"); - return (response as AdminApiResponseAppInstalled).data; + return response.data; }; /** @@ -477,7 +528,7 @@ export class TryCpConductor implements IConductor { data: request, }); assert(response.type === "app_enabled"); - return (response as AdminApiResponseAppEnabled).data; + return response.data; }; /** @@ -492,7 +543,7 @@ export class TryCpConductor implements IConductor { data: request, }); assert(response.type === "app_disabled"); - return (response as AdminApiResponseAppDisabled).data; + return response.data; }; /** @@ -507,7 +558,7 @@ export class TryCpConductor implements IConductor { data: request, }); assert(response.type === "app_started"); - return (response as AdminApiResponseAppStarted).data; + return response.data; }; /** @@ -522,7 +573,7 @@ export class TryCpConductor implements IConductor { data: request, }); assert(response.type === "app_uninstalled"); - return (response as AdminApiResponseAppUninstalled).data; + return response.data; }; /** @@ -537,7 +588,7 @@ export class TryCpConductor implements IConductor { data: request, }); assert(response.type === "coordinators_updated"); - return (response as AdminApiResponseCoordinatorsUpdated).data; + return response.data; }; /** @@ -552,7 +603,7 @@ export class TryCpConductor implements IConductor { data: request, }); assert(response.type === "apps_listed"); - return (response as AdminApiResponseAppsListed).data; + return response.data; }; /** @@ -565,7 +616,7 @@ export class TryCpConductor implements IConductor { type: "list_cell_ids", }); assert(response.type === "cell_ids_listed"); - return (response as AdminApiResponseCellIdsListed).data; + return response.data; }; /** @@ -576,7 +627,7 @@ export class TryCpConductor implements IConductor { const listDnas = async () => { const response = await this.callAdminApi({ type: "list_dnas" }); assert(response.type === "dnas_listed"); - return (response as AdminApiResponseDnasListed).data; + return response.data; }; /** @@ -597,7 +648,7 @@ export class TryCpConductor implements IConductor { }); assert(response.type === "app_interface_attached"); return { - port: (response as AdminApiResponseAppInterfaceAttached).data.port, + port: response.data.port, }; }; @@ -611,7 +662,7 @@ export class TryCpConductor implements IConductor { type: "list_app_interfaces", }); assert(response.type === "app_interfaces_listed"); - return (response as AdminApiResponseAppInterfacesListed).data; + return response.data; }; /** @@ -628,7 +679,7 @@ export class TryCpConductor implements IConductor { }, }); assert(response.type === "agent_info"); - return (response as AdminApiResponseAgentInfo).data; + return response.data; }; /** @@ -686,7 +737,7 @@ export class TryCpConductor implements IConductor { data: request, }); assert(response.type === "full_state_dumped"); - return (response as AdminApiResponseFullStateDumped).data; + return response.data; }; /** @@ -701,7 +752,7 @@ export class TryCpConductor implements IConductor { data: request, }); assert(response.type === "network_stats_dumped"); - return (response as AdminApiResponseNetworkStatsDumped).data; + return response.data; }; /** @@ -716,7 +767,7 @@ export class TryCpConductor implements IConductor { data: request, }); assert(response.type === "storage_info"); - return (response as AdminApiResponseStorageInfo).data; + return response.data; }; const issueAppAuthenticationToken = async ( @@ -727,7 +778,7 @@ export class TryCpConductor implements IConductor { data: request, }); assert(response.type === "app_authentication_token_issued"); - return (response as AdminApiResponseAppAuthenticationTokenIssued).data; + return response.data; }; /** @@ -801,6 +852,7 @@ export class TryCpConductor implements IConductor { listCellIds, listDnas, registerDna, + revokeAgentKey, startApp, storageInfo, uninstallApp, diff --git a/ts/src/trycp/conductor/scenario.ts b/ts/src/trycp/conductor/scenario.ts index 6ffa0e1e..6ae5187e 100644 --- a/ts/src/trycp/conductor/scenario.ts +++ b/ts/src/trycp/conductor/scenario.ts @@ -83,6 +83,8 @@ export interface ClientPlayers { * @public */ export class TryCpScenario { + noDpki: boolean; + dpkiNetworkSeed: string; network_seed: string; servicesProcess: ChildProcessWithoutNullStreams | undefined; bootstrapServerUrl: URL | undefined; @@ -90,6 +92,8 @@ export class TryCpScenario { clients: TryCpClient[]; constructor() { + this.noDpki = false; + this.dpkiNetworkSeed = uuidv4(); this.network_seed = uuidv4(); this.clients = []; } @@ -131,62 +135,63 @@ export class TryCpScenario { ).then(async (client) => { const numberOfConductorsPerClient = options?.numberOfConductorsPerClient ?? 1; - const conductorsCreated: Promise<{ + const conductors: { conductor: TryCpConductor; players: TryCpPlayer[]; - }>[] = []; + }[] = []; // create conductors for each client for (let i = 0; i < numberOfConductorsPerClient; i++) { - const conductorCreated = client - .addConductor({ partialConfig: options?.partialConfig }) - .then(async (conductor) => { - const app = options.app; - let appOptions; - if (options.agentPubKeys) { - appOptions = options.agentPubKeys.map((agentPubKey) => ({ - agentPubKey, - app, - })); - } else { - appOptions = [...Array(options.numberOfAgentsPerConductor)].map( - () => ({ app }) - ); - } + // Conductors must be created in sequence to avoid identical admin ports being assigned multiple times. + const conductor = await client.addConductor({ + partialConfig: options?.partialConfig, + noDpki: this.noDpki, + // Set a common unique DPKI network seed. + dpkiNetworkSeed: this.noDpki ? "" : this.dpkiNetworkSeed, + }); + const app = options.app; + let appOptions; + if (options.agentPubKeys) { + appOptions = options.agentPubKeys.map((agentPubKey) => ({ + agentPubKey, + app, + })); + } else { + appOptions = [...Array(options.numberOfAgentsPerConductor)].map( + () => ({ app }) + ); + } - const appInfos = await conductor.installAgentsApps({ - agentsApps: appOptions, - }); - const adminWs = conductor.adminWs(); - const players: TryCpPlayer[] = []; - for (const appInfo of appInfos) { - const { port } = await adminWs.attachAppInterface(); - const issued = await adminWs.issueAppAuthenticationToken({ - installed_app_id: appInfo.installed_app_id, - }); - // This doesn't make a lot of sense... but we are asking the trycp server to create a connection, - // which needs to be authenticated here. - await conductor.connectAppInterface(issued.token, port); - // Then here we are just connecting to the same backend connection, but we don't actually need to - // authenticate. We still have to follow the same interface to 'connect' though, even though this - // isn't establishing a connection. - const appWs = await conductor.connectAppWs(issued.token, port); - const agentApp = await enableAndGetAgentApp( - adminWs, - appWs, - appInfo - ); - players.push({ - conductor, - appWs, - ...agentApp, - }); - } - return { conductor, players }; + const appInfos = await conductor.installAgentsApps({ + agentsApps: appOptions, + }); + const adminWs = conductor.adminWs(); + const players: TryCpPlayer[] = []; + for (const appInfo of appInfos) { + const { port } = await adminWs.attachAppInterface(); + const issued = await adminWs.issueAppAuthenticationToken({ + installed_app_id: appInfo.installed_app_id, }); - conductorsCreated.push(conductorCreated); + // This doesn't make a lot of sense... but we are asking the trycp server to create a connection, + // which needs to be authenticated here. + await conductor.connectAppInterface(issued.token, port); + // Then here we are just connecting to the same backend connection, but we don't actually need to + // authenticate. We still have to follow the same interface to 'connect' though, even though this + // isn't establishing a connection. + const appWs = await conductor.connectAppWs(issued.token, port); + const agentApp = await enableAndGetAgentApp( + adminWs, + appWs, + appInfo + ); + players.push({ + conductor, + appWs, + ...agentApp, + }); + } + conductors.push({ conductor, players }); } - const conductorsForClient = await Promise.all(conductorsCreated); - const playersForClient = conductorsForClient.flatMap( + const playersForClient = conductors.flatMap( (conductorForClient) => conductorForClient.players ); return { client, players: playersForClient }; @@ -212,6 +217,8 @@ export class TryCpScenario { ) { const conductor = await tryCpClient.addConductor({ logLevel: options?.logLevel, + noDpki: this.noDpki, + dpkiNetworkSeed: this.dpkiNetworkSeed, }); options = { ...options, diff --git a/ts/src/trycp/types.ts b/ts/src/trycp/types.ts index a29e6093..804b3208 100644 --- a/ts/src/trycp/types.ts +++ b/ts/src/trycp/types.ts @@ -43,6 +43,8 @@ import { NetworkInfoResponse, ProvideMemproofsRequest, RegisterDnaRequest, + RevokeAgentKeyRequest, + RevokeAgentKeyResponse, StartAppRequest, StartAppResponse, StorageInfoRequest, @@ -557,6 +559,7 @@ export type RequestAdminInterfaceMessageType = | "list_cell_ids" | "list_dnas" | "register_dna" + | "revoke_agent_key" | "start_app" | "storage_info" | "uninstall_app" @@ -586,6 +589,7 @@ export interface RequestAdminInterfaceMessage { | InstallAppRequest | ListAppsRequest | RegisterDnaRequest + | RevokeAgentKeyRequest | StartAppRequest | StorageInfoRequest | UninstallAppRequest @@ -619,6 +623,7 @@ export type AdminApiResponse = | AdminApiResponseDnaRegistered | AdminApiResponseFullStateDumped | AdminApiResponseNetworkStatsDumped + | AdminApiResponseAgentKeyRevoked | AdminApiResponseStateDumped | AdminApiResponseStorageInfo | AdminApiResponseAppAuthenticationTokenIssued @@ -713,6 +718,14 @@ export interface AdminApiResponseAgentPubKeyGenerated { data: HoloHash; } +/** + * @public + */ +export interface AdminApiResponseAgentKeyRevoked { + type: "agent_key_revoked"; + data: RevokeAgentKeyResponse; +} + /** * @public */ diff --git a/ts/src/trycp/util.ts b/ts/src/trycp/util.ts index 9ade20b5..c2d3aca4 100644 --- a/ts/src/trycp/util.ts +++ b/ts/src/trycp/util.ts @@ -2,7 +2,6 @@ import { AppSignal, RawSignal, Signal, SignalType } from "@holochain/client"; import msgpack from "@msgpack/msgpack"; import assert from "node:assert"; import { TryCpApiResponse, _TryCpResponseWrapper } from "./types.js"; -import { inspect } from "util"; /** * Deserialize the binary response from TryCP diff --git a/ts/test/local/conductor.ts b/ts/test/local/conductor.ts index 81cf59c7..87eab785 100644 --- a/ts/test/local/conductor.ts +++ b/ts/test/local/conductor.ts @@ -1,30 +1,30 @@ import { ActionHash, AppBundleSource, - Signal, - SignalCb, + AppSignal, CellProvisioningStrategy, CloneId, EntryHash, + RevokeAgentKeyResponse, + Signal, + SignalCb, SignalType, } from "@holochain/client"; import assert from "node:assert"; import { readFileSync, realpathSync } from "node:fs"; import { URL } from "node:url"; import test from "tape-promise/tape.js"; -import { - enableAndGetAgentApp, - getZomeCaller, - runLocalServices, - stopLocalServices, -} from "../../src"; import { NetworkType, Player, cleanAllConductors, createConductor, + dhtSync, + enableAndGetAgentApp, + getZomeCaller, + runLocalServices, + stopLocalServices, } from "../../src"; -import { dhtSync } from "../../src"; import { FIXTURE_DNA_URL, FIXTURE_HAPP_URL } from "../fixture"; const ROLE_NAME = "test"; @@ -88,6 +88,119 @@ test("Local Conductor - spawn a conductor and check for admin ws", async (t) => await cleanAllConductors(); }); +test("Local Conductor - default conductor has DPKI enabled", async (t) => { + const { servicesProcess, signalingServerUrl } = await runLocalServices(); + const conductor = await createConductor(signalingServerUrl); + const tmpDirPath = conductor.getTmpDirectory(); + const conductorConfig = readFileSync( + tmpDirPath + "/conductor-config.yaml" + ).toString(); + t.assert( + conductorConfig.includes("no_dpki: false"), + "DPKI enabled in conductor config" + ); + + await conductor.shutDown(); + await stopLocalServices(servicesProcess); + await cleanAllConductors(); +}); + +test("Local Conductor - spawn a conductor without DPKI enabled", async (t) => { + const { servicesProcess, signalingServerUrl } = await runLocalServices(); + const conductor = await createConductor(signalingServerUrl, { noDpki: true }); + const tmpDirPath = conductor.getTmpDirectory(); + const conductorConfig = readFileSync( + tmpDirPath + "/conductor-config.yaml" + ).toString(); + t.assert( + conductorConfig.includes("no_dpki: true"), + "DPKI disabled in conductor config" + ); + + await conductor.shutDown(); + await stopLocalServices(servicesProcess); + await cleanAllConductors(); +}); + +test("Local Conductor - default conductor has test DPKI network seed", async (t) => { + const { servicesProcess, signalingServerUrl } = await runLocalServices(); + const conductor = await createConductor(signalingServerUrl); + const tmpDirPath = conductor.getTmpDirectory(); + const conductorConfig = readFileSync( + tmpDirPath + "/conductor-config.yaml" + ).toString(); + t.assert( + conductorConfig.includes("network_seed: deepkey-test"), + "default DPKI network seed set in conductor config" + ); + + await conductor.shutDown(); + await stopLocalServices(servicesProcess); + await cleanAllConductors(); +}); + +test("Local Conductor - set a DPKI network seed", async (t) => { + const { servicesProcess, signalingServerUrl } = await runLocalServices(); + const networkSeed = "tryorama-test-dpki"; + const conductor = await createConductor(signalingServerUrl, { + dpkiNetworkSeed: networkSeed, + }); + const tmpDirPath = conductor.getTmpDirectory(); + const conductorConfig = readFileSync( + tmpDirPath + "/conductor-config.yaml" + ).toString(); + t.assert( + conductorConfig.includes(`network_seed: ${networkSeed}`), + "DPKI network seed set in conductor config" + ); + + await conductor.shutDown(); + await stopLocalServices(servicesProcess); + await cleanAllConductors(); +}); + +test("Local Conductor - revoke agent key", async (t) => { + const { servicesProcess, signalingServerUrl } = await runLocalServices(); + const conductor = await createConductor(signalingServerUrl); + const app = await conductor.installApp({ + path: FIXTURE_HAPP_URL.pathname, + }); + const adminWs = conductor.adminWs(); + const port = await conductor.attachAppInterface(); + const issued = await adminWs.issueAppAuthenticationToken({ + installed_app_id: app.installed_app_id, + }); + const appWs = await conductor.connectAppWs(issued.token, port); + const alice = await enableAndGetAgentApp(adminWs, appWs, app); + + // Alice can create an entry before revoking agent key. + const entryContent = "test-content"; + const createEntryResponse: EntryHash = await alice.cells[0].callZome({ + zome_name: "coordinator", + fn_name: "create", + payload: entryContent, + }); + t.ok(createEntryResponse, "created entry successfully"); + + const response: RevokeAgentKeyResponse = await conductor + .adminWs() + .revokeAgentKey({ app_id: alice.appId, agent_key: alice.agentPubKey }); + t.deepEqual(response, [], "revoked key on all cells"); + + // After revoking her key, Alice should no longer be able to create an entry. + await t.rejects( + alice.cells[0].callZome({ + zome_name: "coordinator", + fn_name: "create", + payload: entryContent, + }) + ); + + await conductor.shutDown(); + await stopLocalServices(servicesProcess); + await cleanAllConductors(); +}); + test("Local Conductor - get app info with app ws", async (t) => { const { servicesProcess, signalingServerUrl } = await runLocalServices(); const conductor = await createConductor(signalingServerUrl); @@ -437,7 +550,7 @@ test("Local Conductor - clone cell management", async (t) => { }); await appWs.disableCloneCell({ - clone_cell_id: cloneCell.cell_id, + clone_cell_id: cloneCell.clone_id, }); await t.rejects( appWs.callZome({ @@ -473,11 +586,11 @@ test("Local Conductor - clone cell management", async (t) => { t.equal(readEntryResponse, testContent, "enabled clone cell can be called"); await appWs.disableCloneCell({ - clone_cell_id: cloneCell.cell_id, + clone_cell_id: cloneCell.cell_id[0], }); await conductor .adminWs() - .deleteCloneCell({ app_id: appId, clone_cell_id: cloneCell.cell_id }); + .deleteCloneCell({ app_id: appId, clone_cell_id: cloneCell.cell_id[0] }); await t.rejects( appWs.enableCloneCell({ clone_cell_id: cloneCell.clone_id }), "deleted clone cell cannot be enabled" @@ -616,7 +729,7 @@ test("Local Conductor - create and read an entry, 2 conductors, 2 cells, 2 agent test("Local Conductor - Receive a signal", async (t) => { const { servicesProcess, signalingServerUrl } = await runLocalServices(); let signalHandler: SignalCb | undefined; - const signalReceived = new Promise((resolve) => { + const signalReceived = new Promise((resolve) => { signalHandler = (signal: Signal) => { assert(SignalType.App in signal); resolve(signal[SignalType.App]); diff --git a/ts/test/local/scenario.ts b/ts/test/local/scenario.ts index a2be083c..910624b2 100644 --- a/ts/test/local/scenario.ts +++ b/ts/test/local/scenario.ts @@ -1,19 +1,19 @@ import { ActionHash, AppBundleSource, - Signal, - SignalCb, + AppSignal, AppWebsocket, EntryHash, + PreflightResponse, + Signal, + SignalCb, SignalType, } from "@holochain/client"; import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; import test from "tape-promise/tape.js"; -import { getZomeCaller } from "../../src"; -import { Scenario, runScenario } from "../../src"; +import { Scenario, dhtSync, getZomeCaller, runScenario } from "../../src"; import { FIXTURE_HAPP_URL } from "../fixture"; -import { dhtSync } from "../../src"; -import { PreflightResponse } from "@holochain/client/lib/lib"; const TEST_ZOME_NAME = "coordinator"; @@ -113,6 +113,88 @@ test("Local Scenario - Add players with hApp bundles", async (t) => { await scenario.cleanUp(); }); +test("Local Scenario - All players have DPKI enabled", async (t) => { + const scenario = new Scenario(); + await scenario.addPlayersWithApps([ + { appBundleSource: { path: FIXTURE_HAPP_URL.pathname } }, + { appBundleSource: { path: FIXTURE_HAPP_URL.pathname } }, + ]); + scenario.conductors.every((conductor) => { + const tmpDirPath = conductor.getTmpDirectory(); + const conductorConfig = readFileSync( + tmpDirPath + "/conductor-config.yaml" + ).toString(); + t.assert( + conductorConfig.includes("no_dpki: false"), + "DPKI enabled in conductor config" + ); + }); + + await scenario.cleanUp(); +}); + +test("Local Scenario - All players have DPKI disabled", async (t) => { + const scenario = new Scenario(); + scenario.noDpki = true; + await scenario.addPlayersWithApps([ + { appBundleSource: { path: FIXTURE_HAPP_URL.pathname } }, + { appBundleSource: { path: FIXTURE_HAPP_URL.pathname } }, + ]); + scenario.conductors.every((conductor) => { + const tmpDirPath = conductor.getTmpDirectory(); + const conductorConfig = readFileSync( + tmpDirPath + "/conductor-config.yaml" + ).toString(); + t.assert( + conductorConfig.includes("no_dpki: true"), + "DPKI disabled in conductor config" + ); + }); + + await scenario.cleanUp(); +}); + +test("Local Scenario - All players have a custom DPKI network seed", async (t) => { + const scenario = new Scenario(); + scenario.dpkiNetworkSeed = "tryorama-dpki-test"; + await scenario.addPlayersWithApps([ + { appBundleSource: { path: FIXTURE_HAPP_URL.pathname } }, + { appBundleSource: { path: FIXTURE_HAPP_URL.pathname } }, + ]); + scenario.conductors.every((conductor) => { + const tmpDirPath = conductor.getTmpDirectory(); + const conductorConfig = readFileSync( + tmpDirPath + "/conductor-config.yaml" + ).toString(); + t.assert( + conductorConfig.includes(`network_seed: ${scenario.dpkiNetworkSeed}`), + "default DPKI network seed set in conductor config" + ); + }); + + await scenario.cleanUp(); +}); + +test("Local Scenario - All players have a random DPKI network seed", async (t) => { + const scenario = new Scenario(); + await scenario.addPlayersWithApps([ + { appBundleSource: { path: FIXTURE_HAPP_URL.pathname } }, + { appBundleSource: { path: FIXTURE_HAPP_URL.pathname } }, + ]); + scenario.conductors.every((conductor) => { + const tmpDirPath = conductor.getTmpDirectory(); + const conductorConfig = readFileSync( + tmpDirPath + "/conductor-config.yaml" + ).toString(); + t.assert( + conductorConfig.includes(`network_seed: ${scenario.dpkiNetworkSeed}`), + "DPKI network seed set in conductor config" + ); + }); + + await scenario.cleanUp(); +}); + test("Local Scenario - Create and read an entry, 2 conductors", async (t) => { // The wrapper takes care of creating a scenario and shutting down or deleting // all conductors involved in the test scenario. @@ -201,7 +283,7 @@ test("Local Scenario - Receive signals with 2 conductors", async (t) => { const scenario = new Scenario(); let signalHandlerAlice: SignalCb | undefined; - const signalReceivedAlice = new Promise((resolve) => { + const signalReceivedAlice = new Promise((resolve) => { signalHandlerAlice = (signal: Signal) => { assert(SignalType.App in signal); resolve(signal[SignalType.App]); @@ -209,7 +291,7 @@ test("Local Scenario - Receive signals with 2 conductors", async (t) => { }); let signalHandlerBob: SignalCb | undefined; - const signalReceivedBob = new Promise((resolve) => { + const signalReceivedBob = new Promise((resolve) => { signalHandlerBob = (signal: Signal) => { assert(SignalType.App in signal); resolve(signal[SignalType.App]); diff --git a/ts/test/trycp/client.ts b/ts/test/trycp/client.ts index 78b46e9e..ae7e608a 100644 --- a/ts/test/trycp/client.ts +++ b/ts/test/trycp/client.ts @@ -6,6 +6,7 @@ import { _ALLOWED_ORIGIN, enableAndGetAgentApp } from "../../src/common.js"; import { createTryCpConductor, DEFAULT_PARTIAL_PLAYER_CONFIG, + TryCpConductor, } from "../../src/trycp/index.js"; import { TryCpClient } from "../../src/trycp/trycp-client.js"; import { @@ -59,7 +60,6 @@ test("TryCP Server - download DNA from web", async (t) => { type: "download_dna", url, }); - console.log("actual url", actualUrl); t.ok(typeof actualUrl === "string" && actualUrl.endsWith(expectedUrl)); await tryCpClient.close(); @@ -105,7 +105,7 @@ test("TryCP Server - configure player", async (t) => { const actual = await tryCpClient.call({ type: "configure_player", id: "player-1", - partial_config: DEFAULT_PARTIAL_PLAYER_CONFIG, + partial_config: TryCpConductor.defaultPartialConfig(), }); t.equal(actual, TRYCP_SUCCESS_RESPONSE); @@ -121,12 +121,12 @@ test("TryCP Server - 2 parallel calls from one client return corresponding respo tryCpClient.call({ type: "configure_player", id: "player-1", - partial_config: DEFAULT_PARTIAL_PLAYER_CONFIG, + partial_config: TryCpConductor.defaultPartialConfig(), }), tryCpClient.call({ type: "configure_player", id: "player-2", - partial_config: DEFAULT_PARTIAL_PLAYER_CONFIG, + partial_config: TryCpConductor.defaultPartialConfig(), }), ]; const [response1, response2] = await Promise.all(parallelCallPromises); @@ -146,12 +146,12 @@ test("TryCP Server - 2 parallel calls from two clients return correct responses" tryCpClient1.call({ type: "configure_player", id: "player-1", - partial_config: DEFAULT_PARTIAL_PLAYER_CONFIG, + partial_config: TryCpConductor.defaultPartialConfig(), }), tryCpClient2.call({ type: "configure_player", id: "player-2", - partial_config: DEFAULT_PARTIAL_PLAYER_CONFIG, + partial_config: TryCpConductor.defaultPartialConfig(), }), ]; const [response1, response2] = await Promise.all(parallelCallPromises); @@ -171,7 +171,7 @@ test("TryCP Server - startup and shutdown", async (t) => { await tryCpClient.call({ type: "configure_player", id: playerId, - partial_config: DEFAULT_PARTIAL_PLAYER_CONFIG, + partial_config: TryCpConductor.defaultPartialConfig(), }); const actualStartup = await tryCpClient.call({ type: "startup", @@ -197,7 +197,7 @@ test("TryCP Server - reset", async (t) => { await tryCpClient.call({ type: "configure_player", id: playerId, - partial_config: DEFAULT_PARTIAL_PLAYER_CONFIG, + partial_config: TryCpConductor.defaultPartialConfig(), }); await tryCpClient.call({ type: "startup", @@ -321,7 +321,6 @@ test("TryCP Client - download logs", async (t) => { const conductor = await createTryCpConductor(tryCpClient); const logs = await conductor.downloadLogs(); - t.true(logs.lair_stderr.length === 0, "lair stderr logs are empty"); t.true( logs.conductor_stdout.length > 0, "conductor stdout logs are not empty" diff --git a/ts/test/trycp/conductor.ts b/ts/test/trycp/conductor.ts index 8f711758..466a4d3d 100644 --- a/ts/test/trycp/conductor.ts +++ b/ts/test/trycp/conductor.ts @@ -2,7 +2,6 @@ import { ActionHash, AppBundleSource, Signal, - AppSignal, CellProvisioningStrategy, CellType, CloneId, @@ -10,6 +9,7 @@ import { EntryHash, SignalType, GrantedFunctionsType, + RevokeAgentKeyResponse, } from "@holochain/client"; import assert from "node:assert"; import { Buffer } from "node:buffer"; @@ -30,6 +30,99 @@ import { FIXTURE_DNA_URL, FIXTURE_HAPP_URL } from "../fixture"; const SERVER_URL = new URL(`ws://${TRYCP_SERVER_HOST}:${TRYCP_SERVER_PORT}`); const ROLE_NAME = "test"; +test("TryCP Conductor - default conductor has DPKI enabled", async (t) => { + const localTryCpServer = await TryCpServer.start(); + const { servicesProcess, signalingServerUrl } = await runLocalServices(); + const client = await TryCpClient.create(SERVER_URL); + client.signalingServerUrl = signalingServerUrl; + const conductor = await createTryCpConductor(client); + const agent_key = await conductor.adminWs().generateAgentPubKey(); + const appInfo = await conductor.adminWs().installApp({ + path: FIXTURE_HAPP_URL.pathname, + agent_key, + membrane_proofs: {}, + }); + await conductor + .adminWs() + .enableApp({ installed_app_id: appInfo.installed_app_id }); + const cellIds = await conductor.adminWs().listCellIds(); + t.equal(cellIds.length, 2, "Conductor includes DPKI cell id"); + + await stopLocalServices(servicesProcess); + await client.cleanUp(); + await localTryCpServer.stop(); +}); + +test("TryCP Conductor - startup DPKI disabled conductor", async (t) => { + const localTryCpServer = await TryCpServer.start(); + const { servicesProcess, signalingServerUrl } = await runLocalServices(); + const client = await TryCpClient.create(SERVER_URL); + client.signalingServerUrl = signalingServerUrl; + const conductor = await createTryCpConductor(client, { noDpki: true }); + const agent_key = await conductor.adminWs().generateAgentPubKey(); + const appInfo = await conductor.adminWs().installApp({ + path: FIXTURE_HAPP_URL.pathname, + agent_key, + membrane_proofs: {}, + }); + await conductor + .adminWs() + .enableApp({ installed_app_id: appInfo.installed_app_id }); + const cellIds = await conductor.adminWs().listCellIds(); + t.equal(cellIds.length, 1, "Conductor contains only the app cell"); + + await stopLocalServices(servicesProcess); + await client.cleanUp(); + await localTryCpServer.stop(); +}); + +test("TryCP Conductor - revoke agent key", async (t) => { + const localTryCpServer = await TryCpServer.start(); + const { servicesProcess, signalingServerUrl } = await runLocalServices(); + const client = await TryCpClient.create(SERVER_URL); + client.signalingServerUrl = signalingServerUrl; + const conductor = await createTryCpConductor(client); + const aliceHapp = await conductor.installApp({ + path: FIXTURE_HAPP_URL.pathname, + }); + const adminWs = conductor.adminWs(); + const { port } = await adminWs.attachAppInterface(); + const issued = await adminWs.issueAppAuthenticationToken({ + installed_app_id: aliceHapp.installed_app_id, + }); + await conductor.connectAppInterface(issued.token, port); + const appWs = await conductor.connectAppWs(issued.token, port); + const alice = await enableAndGetAgentApp(adminWs, appWs, aliceHapp); + + // Alice can create an entry before revoking her key. + const entryContent = "test-content"; + const createEntryResponse: EntryHash = await alice.cells[0].callZome({ + zome_name: "coordinator", + fn_name: "create", + payload: entryContent, + }); + t.ok(createEntryResponse, "entry created successfully"); + + const response: RevokeAgentKeyResponse = await conductor + .adminWs() + .revokeAgentKey({ app_id: alice.appId, agent_key: alice.agentPubKey }); + t.deepEqual(response, [], "revoked key on all cells"); + + // After revoking her key, Alice should no longer be able to create an entry. + await t.rejects( + alice.cells[0].callZome({ + zome_name: "coordinator", + fn_name: "create", + payload: entryContent, + }), + "creating an entry is not allowed any more" + ); + + await stopLocalServices(servicesProcess); + await client.cleanUp(); + await localTryCpServer.stop(); +}); + test("TryCP Conductor - stop and restart a conductor", async (t) => { const localTryCpServer = await TryCpServer.start(); const { servicesProcess, signalingServerUrl } = await runLocalServices(); @@ -293,7 +386,7 @@ test("TryCP Conductor - request storage info", async (t) => { client.signalingServerUrl = signalingServerUrl; const conductor = await createTryCpConductor(client); const agentPubKey = await conductor.adminWs().generateAgentPubKey(); - await conductor.adminWs().installApp({ + const appInfo = await conductor.adminWs().installApp({ path: FIXTURE_HAPP_URL.pathname, agent_key: agentPubKey, membrane_proofs: {}, @@ -306,7 +399,11 @@ test("TryCP Conductor - request storage info", async (t) => { t.ok(storageInfo.blobs[0].dna.dht_data_size_on_disk > 0); t.ok(storageInfo.blobs[0].dna.cache_data_size > 0); t.ok(storageInfo.blobs[0].dna.cache_data_size_on_disk > 0); - t.deepEqual(storageInfo.blobs[0].dna.used_by, ["entry-happ"]); + t.assert( + storageInfo.blobs.some((blob) => + blob.dna.used_by.includes(appInfo.installed_app_id) + ) + ); await stopLocalServices(servicesProcess); await client.cleanUp(); @@ -323,6 +420,7 @@ test("TryCP Conductor - request network info", async (t) => { const appInfo = await conductor.adminWs().installApp({ path: FIXTURE_HAPP_URL.pathname, agent_key: agentPubKey, + network_seed: Date.now().toString(), membrane_proofs: {}, }); await conductor @@ -770,7 +868,7 @@ test("TryCP Conductor - clone cell management", async (t) => { }); await appWs.disableCloneCell({ - clone_cell_id: cloneCell.cell_id, + clone_cell_id: cloneCell.cell_id[0], }); await t.rejects( appWs.callZome({ @@ -804,11 +902,11 @@ test("TryCP Conductor - clone cell management", async (t) => { t.equal(readEntryResponse, testContent, "enabled clone cell can be called"); await appWs.disableCloneCell({ - clone_cell_id: cloneCell.cell_id, + clone_cell_id: cloneCell.cell_id[0], }); await conductor .adminWs() - .deleteCloneCell({ app_id: appId, clone_cell_id: cloneCell.cell_id }); + .deleteCloneCell({ app_id: appId, clone_cell_id: cloneCell.cell_id[0] }); await t.rejects( appWs.enableCloneCell({ clone_cell_id: cloneCell.clone_id, @@ -821,7 +919,7 @@ test("TryCP Conductor - clone cell management", async (t) => { await localTryCpServer.stop(); }); -test.skip("TryCP Conductor - create and read an entry, 2 conductors, 2 cells, 2 agents", async (t) => { +test("TryCP Conductor - create and read an entry, 2 conductors, 2 cells, 2 agents", async (t) => { const localTryCpServer = await TryCpServer.start(); const { servicesProcess, bootstrapServerUrl, signalingServerUrl } = await runLocalServices(); diff --git a/ts/test/trycp/scenario.ts b/ts/test/trycp/scenario.ts index f19c119f..0b6eb875 100644 --- a/ts/test/trycp/scenario.ts +++ b/ts/test/trycp/scenario.ts @@ -1,8 +1,11 @@ -import { Signal, SignalCb, EntryHash, SignalType } from "@holochain/client"; +import { EntryHash, Signal, SignalCb, SignalType } from "@holochain/client"; import { URL } from "node:url"; import test from "tape-promise/tape.js"; import { runLocalServices } from "../../src/common.js"; -import { TryCpScenario } from "../../src/trycp/conductor/scenario.js"; +import { + ClientPlayers, + TryCpScenario, +} from "../../src/trycp/conductor/scenario.js"; import { TRYCP_SERVER_HOST, TRYCP_SERVER_PORT, @@ -14,6 +17,49 @@ import { FIXTURE_HAPP_URL } from "../fixture/index.js"; const SERVER_URL = new URL(`ws://${TRYCP_SERVER_HOST}:${TRYCP_SERVER_PORT}`); +test("TryCP Scenario - default player has DPKI enabled", async (t) => { + const tryCpServer = await TryCpServer.start(); + + const scenario = new TryCpScenario(); + ({ + servicesProcess: scenario.servicesProcess, + signalingServerUrl: scenario.signalingServerUrl, + } = await runLocalServices()); + const client = await scenario.addClient(SERVER_URL); + t.ok(client, "client set up"); + + const player = await scenario.addPlayerWithApp(client, { + path: FIXTURE_HAPP_URL.pathname, + }); + const cellIds = await player.conductor.adminWs().listCellIds(); + t.equal(cellIds.length, 2, "conductor has 1 app cell and 1 DPKI cell"); + + await scenario.cleanUp(); + await tryCpServer.stop(); +}); + +test("TryCP Scenario - can create player without DPKI", async (t) => { + const tryCpServer = await TryCpServer.start(); + + const scenario = new TryCpScenario(); + ({ + servicesProcess: scenario.servicesProcess, + signalingServerUrl: scenario.signalingServerUrl, + } = await runLocalServices()); + const client = await scenario.addClient(SERVER_URL); + t.ok(client, "client set up"); + + scenario.noDpki = true; + const player = await scenario.addPlayerWithApp(client, { + path: FIXTURE_HAPP_URL.pathname, + }); + const cellIds = await player.conductor.adminWs().listCellIds(); + t.equal(cellIds.length, 1, "conductor has 1 app cell and no DPKI cell"); + + await scenario.cleanUp(); + await tryCpServer.stop(); +}); + test("TryCP Scenario - create a conductor", async (t) => { const tryCpServer = await TryCpServer.start(); @@ -133,7 +179,11 @@ test("TryCP Scenario - list everything", async (t) => { ); const listCellIds = await alice.conductor.adminWs().listCellIds(); - t.equal(listCellIds.length, 1, "alice's conductor lists 1 cell id"); + t.equal( + listCellIds.length, + 2, + "alice's conductor lists 2 cell ids including DPKI" + ); const listedDnas = await alice.conductor.adminWs().listDnas(); t.equal(listedDnas.length, 1, "alice's conductor lists 1 DNA"); @@ -232,7 +282,6 @@ test("TryCp Scenario - create and read an entry, 2 conductors", async (t) => { payload: content, }); - await scenario.shareAllAgents(); await dhtSync([alice, bob], alice.cells[0].cell_id[0]); const readContent = await bob.cells[0].callZome({ @@ -261,7 +310,6 @@ test("TryCP Scenario - conductor maintains data after shutdown and restart", asy { appBundleSource: { path: FIXTURE_HAPP_URL.pathname } }, { appBundleSource: { path: FIXTURE_HAPP_URL.pathname } }, ]); - await scenario.shareAllAgents(); const content = "Before shutdown"; const createEntryHash = await alice.cells[0].callZome({ @@ -327,9 +375,14 @@ test("TryCP Scenario - connect to multiple clients by passing a list of URLs", a servicesProcess: scenario.servicesProcess, signalingServerUrl: scenario.signalingServerUrl, } = await runLocalServices()); - await scenario.addClientsPlayers(serverUrls, { - app: { path: FIXTURE_HAPP_URL.pathname }, - }); + + // As all of the servers are on the same machine, creating players has to be done in sequence to + // avoid identical admin ports being assigned multiple times. + for (let i = 0; i < numberOfServers; i++) { + await scenario.addClientsPlayers([serverUrls[i]], { + app: { path: FIXTURE_HAPP_URL.pathname }, + }); + } t.ok( scenario.clients.length === numberOfServers, "scenario has expected number of clients" @@ -345,10 +398,8 @@ test("TryCP Scenario - connect to multiple clients by passing a list of URLs", a await stopAllTryCpServers(tryCpServers); }); -test("TryCP Scenario - create multiple agents for multiple conductors for multiple clients", async (t) => { +test("TryCP Scenario - connect to multiple clients without DPKI", async (t) => { const numberOfServers = 2; - const numberOfConductorsPerClient = 2; - const numberOfAgentsPerConductor = 3; const tryCpServers: TryCpServer[] = []; const serverUrls: URL[] = []; @@ -360,17 +411,66 @@ test("TryCP Scenario - create multiple agents for multiple conductors for multip serverUrls.push(serverUrl); } + const scenario = new TryCpScenario(); + scenario.noDpki = true; + ({ + servicesProcess: scenario.servicesProcess, + signalingServerUrl: scenario.signalingServerUrl, + } = await runLocalServices()); + const clientsPlayers: ClientPlayers[] = []; + for (let i = 0; i < numberOfServers; i++) { + // As all of the servers are on the same machine, creating players has to be done in sequence to + // avoid identical admin ports being assigned multiple times. + const clientPlayers = await scenario.addClientsPlayers([serverUrls[i]], { + app: { path: FIXTURE_HAPP_URL.pathname }, + }); + clientsPlayers.push(...clientPlayers); + } + + for (const client of clientsPlayers) { + for (const player of client.players) { + const cellIds = await player.conductor.adminWs().listCellIds(); + t.equal(cellIds.length, 1, "conductor has 1 app cell and no DPKI cell"); + } + } + + await scenario.cleanUp(); + await stopAllTryCpServers(tryCpServers); +}); + +test("TryCP Scenario - create multiple agents for multiple conductors for multiple clients", async (t) => { + const numberOfServers = 2; + const numberOfConductorsPerClient = 1; + const numberOfAgentsPerConductor = 3; + const tryCpServers: TryCpServer[] = []; + const serverUrls: URL[] = []; + const scenario = new TryCpScenario(); ({ servicesProcess: scenario.servicesProcess, bootstrapServerUrl: scenario.bootstrapServerUrl, signalingServerUrl: scenario.signalingServerUrl, } = await runLocalServices()); - const clientsPlayers = await scenario.addClientsPlayers(serverUrls, { - numberOfConductorsPerClient, - numberOfAgentsPerConductor, - app: { path: FIXTURE_HAPP_URL.pathname }, - }); + + for (let i = 0; i < numberOfServers; i++) { + const serverPort = TRYCP_SERVER_PORT + i; + const serverUrl = new URL(`ws://${TRYCP_SERVER_HOST}:${serverPort}`); + const tryCpServer = await TryCpServer.start(serverPort); + tryCpServers.push(tryCpServer); + serverUrls.push(serverUrl); + } + + // As all of the servers are on the same machine, creating players has to be done in sequence to + // avoid identical admin ports being assigned multiple times. + const clientsPlayers: ClientPlayers[] = []; + for (let i = 0; i < numberOfServers; i++) { + const clientPlayers = await scenario.addClientsPlayers([serverUrls[i]], { + numberOfConductorsPerClient, + numberOfAgentsPerConductor, + app: { path: FIXTURE_HAPP_URL.pathname }, + }); + clientsPlayers.push(...clientPlayers); + } clientsPlayers.forEach((clientPlayers, i) => t.equal( @@ -380,8 +480,6 @@ test("TryCP Scenario - create multiple agents for multiple conductors for multip ) ); - await scenario.shareAllAgents(); - // Testing if agents that are installed on two different tryCP servers are able to communicate with each other const alice = clientsPlayers[0].players[0]; const bob = clientsPlayers[1].players[0];