@corbet-labs/ccht 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +307 -0
- package/LICENSE.md +25 -0
- package/LICENSES/GPL-3.0-only.txt +232 -0
- package/LICENSES/LGPL-3.0-only.txt +304 -0
- package/LICENSES/dependencies/agent-client-protocol-2.1.0/LICENSE +191 -0
- package/LICENSES/dependencies/agent-client-protocol-derive-2.1.0/LICENSE +191 -0
- package/LICENSES/dependencies/agent-client-protocol-schema-1.7.0/LICENSE +190 -0
- package/LICENSES/dependencies/android_system_properties-0.1.6/LICENSE-APACHE +13 -0
- package/LICENSES/dependencies/android_system_properties-0.1.6/LICENSE-MIT +20 -0
- package/LICENSES/dependencies/anyhow-1.0.104/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/anyhow-1.0.104/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/async-channel-2.5.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/async-channel-2.5.0/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/async-io-2.6.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/async-io-2.6.0/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/async-lock-3.4.2/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/async-lock-3.4.2/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/async-process-2.5.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/async-process-2.5.0/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/async-signal-0.2.14/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/async-signal-0.2.14/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/async-task-4.7.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/async-task-4.7.1/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/atomic-waker-1.1.2/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/atomic-waker-1.1.2/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/atomic-waker-1.1.2/LICENSE-THIRD-PARTY +45 -0
- package/LICENSES/dependencies/autocfg-1.5.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/autocfg-1.5.1/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/base64-0.22.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/base64-0.22.1/LICENSE-MIT +21 -0
- package/LICENSES/dependencies/base64-0.23.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/base64-0.23.1/LICENSE-MIT +21 -0
- package/LICENSES/dependencies/bitflags-1.3.2/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/bitflags-1.3.2/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/bitflags-2.13.2/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/bitflags-2.13.2/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/blocking-1.7.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/blocking-1.7.0/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/bs58-0.5.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/bs58-0.5.1/LICENSE-MIT +20 -0
- package/LICENSES/dependencies/bumpalo-3.20.3/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/bumpalo-3.20.3/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/cc-1.4.5/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/cc-1.4.5/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/cfg-if-1.0.4/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/cfg-if-1.0.4/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/chrono-0.4.45/LICENSE.txt +240 -0
- package/LICENSES/dependencies/concurrent-queue-2.5.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/concurrent-queue-2.5.0/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/convert_case-0.10.0/LICENSE +21 -0
- package/LICENSES/dependencies/core-foundation-sys-0.8.7/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/core-foundation-sys-0.8.7/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/crossbeam-deque-0.8.8/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/crossbeam-deque-0.8.8/LICENSE-MIT +27 -0
- package/LICENSES/dependencies/crossbeam-epoch-0.9.21/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/crossbeam-epoch-0.9.21/LICENSE-MIT +27 -0
- package/LICENSES/dependencies/crossbeam-utils-0.8.23/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/crossbeam-utils-0.8.23/LICENSE-MIT +27 -0
- package/LICENSES/dependencies/darling-0.24.1/LICENSE +21 -0
- package/LICENSES/dependencies/darling_core-0.24.1/LICENSE +21 -0
- package/LICENSES/dependencies/darling_macro-0.24.1/LICENSE +21 -0
- package/LICENSES/dependencies/defmt-1.1.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/defmt-1.1.1/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/defmt-macros-1.1.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/defmt-macros-1.1.1/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/defmt-parser-1.0.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/defmt-parser-1.0.0/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/deranged-0.5.8/LICENSE-Apache +202 -0
- package/LICENSES/dependencies/deranged-0.5.8/LICENSE-MIT +19 -0
- package/LICENSES/dependencies/derive_more-2.1.1/LICENSE +21 -0
- package/LICENSES/dependencies/derive_more-impl-2.1.1/LICENSE +21 -0
- package/LICENSES/dependencies/dyn-clone-1.0.20/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/dyn-clone-1.0.20/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/either-1.18.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/either-1.18.0/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/equivalent-1.0.2/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/equivalent-1.0.2/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/errno-0.3.14/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/errno-0.3.14/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/event-listener-5.4.2/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/event-listener-5.4.2/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/event-listener-strategy-0.5.4/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/event-listener-strategy-0.5.4/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/fallible-iterator-0.3.0/LICENSE-APACHE +202 -0
- package/LICENSES/dependencies/fallible-iterator-0.3.0/LICENSE-MIT +19 -0
- package/LICENSES/dependencies/fastrand-2.5.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/fastrand-2.5.0/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/find-msvc-tools-0.1.12/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/find-msvc-tools-0.1.12/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/fixedbitset-0.5.7/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/fixedbitset-0.5.7/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/foldhash-0.2.0/LICENSE +19 -0
- package/LICENSES/dependencies/futures-0.3.34/LICENSE-APACHE +202 -0
- package/LICENSES/dependencies/futures-0.3.34/LICENSE-MIT +26 -0
- package/LICENSES/dependencies/futures-channel-0.3.34/LICENSE-APACHE +202 -0
- package/LICENSES/dependencies/futures-channel-0.3.34/LICENSE-MIT +26 -0
- package/LICENSES/dependencies/futures-concurrency-7.7.1/LICENSE-APACHE +190 -0
- package/LICENSES/dependencies/futures-concurrency-7.7.1/LICENSE-MIT +21 -0
- package/LICENSES/dependencies/futures-core-0.3.34/LICENSE-APACHE +202 -0
- package/LICENSES/dependencies/futures-core-0.3.34/LICENSE-MIT +26 -0
- package/LICENSES/dependencies/futures-executor-0.3.34/LICENSE-APACHE +202 -0
- package/LICENSES/dependencies/futures-executor-0.3.34/LICENSE-MIT +26 -0
- package/LICENSES/dependencies/futures-io-0.3.34/LICENSE-APACHE +202 -0
- package/LICENSES/dependencies/futures-io-0.3.34/LICENSE-MIT +26 -0
- package/LICENSES/dependencies/futures-lite-2.6.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/futures-lite-2.6.1/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/futures-lite-2.6.1/LICENSE-THIRD-PARTY +45 -0
- package/LICENSES/dependencies/futures-macro-0.3.34/LICENSE-APACHE +202 -0
- package/LICENSES/dependencies/futures-macro-0.3.34/LICENSE-MIT +26 -0
- package/LICENSES/dependencies/futures-sink-0.3.34/LICENSE-APACHE +202 -0
- package/LICENSES/dependencies/futures-sink-0.3.34/LICENSE-MIT +26 -0
- package/LICENSES/dependencies/futures-task-0.3.34/LICENSE-APACHE +202 -0
- package/LICENSES/dependencies/futures-task-0.3.34/LICENSE-MIT +26 -0
- package/LICENSES/dependencies/futures-util-0.3.34/LICENSE-APACHE +202 -0
- package/LICENSES/dependencies/futures-util-0.3.34/LICENSE-MIT +26 -0
- package/LICENSES/dependencies/getrandom-0.4.3/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/getrandom-0.4.3/LICENSE-MIT +26 -0
- package/LICENSES/dependencies/gimli-0.32.3/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/gimli-0.32.3/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/hashbrown-0.12.3/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/hashbrown-0.12.3/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/hashbrown-0.16.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/hashbrown-0.16.1/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/hashbrown-0.17.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/hashbrown-0.17.1/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/heck-0.5.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/heck-0.5.0/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/hermit-abi-0.5.3/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/hermit-abi-0.5.3/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/hex-0.4.3/LICENSE-APACHE +202 -0
- package/LICENSES/dependencies/hex-0.4.3/LICENSE-MIT +20 -0
- package/LICENSES/dependencies/iana-time-zone-0.1.65/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/iana-time-zone-0.1.65/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/iana-time-zone-haiku-0.1.2/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/iana-time-zone-haiku-0.1.2/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/id-arena-2.3.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/id-arena-2.3.0/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/ident_case-1.0.1/LICENSE +19 -0
- package/LICENSES/dependencies/indexmap-1.9.3/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/indexmap-1.9.3/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/indexmap-2.14.2/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/indexmap-2.14.2/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/itoa-1.0.18/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/itoa-1.0.18/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/jiff-0.2.35/COPYING +3 -0
- package/LICENSES/dependencies/jiff-0.2.35/LICENSE-MIT +21 -0
- package/LICENSES/dependencies/jiff-0.2.35/UNLICENSE +24 -0
- package/LICENSES/dependencies/jiff-core-0.1.0/COPYING +3 -0
- package/LICENSES/dependencies/jiff-core-0.1.0/LICENSE-MIT +21 -0
- package/LICENSES/dependencies/jiff-core-0.1.0/UNLICENSE +24 -0
- package/LICENSES/dependencies/jiff-static-0.2.35/COPYING +3 -0
- package/LICENSES/dependencies/jiff-static-0.2.35/LICENSE-MIT +21 -0
- package/LICENSES/dependencies/jiff-static-0.2.35/UNLICENSE +24 -0
- package/LICENSES/dependencies/jiff-tzdb-0.1.8/COPYING +3 -0
- package/LICENSES/dependencies/jiff-tzdb-0.1.8/LICENSE-MIT +21 -0
- package/LICENSES/dependencies/jiff-tzdb-0.1.8/UNLICENSE +24 -0
- package/LICENSES/dependencies/jiff-tzdb-platform-0.1.3/COPYING +3 -0
- package/LICENSES/dependencies/jiff-tzdb-platform-0.1.3/LICENSE-MIT +21 -0
- package/LICENSES/dependencies/jiff-tzdb-platform-0.1.3/UNLICENSE +24 -0
- package/LICENSES/dependencies/js-sys-0.3.105/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/js-sys-0.3.105/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/leb128-0.2.7/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/leb128-0.2.7/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/leb128fmt-0.1.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/leb128fmt-0.1.0/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/libc-0.2.189/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/libc-0.2.189/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/linux-raw-sys-0.12.1/COPYRIGHT +29 -0
- package/LICENSES/dependencies/linux-raw-sys-0.12.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/linux-raw-sys-0.12.1/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
- package/LICENSES/dependencies/linux-raw-sys-0.12.1/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/log-0.4.34/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/log-0.4.34/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/memchr-2.8.3/COPYING +3 -0
- package/LICENSES/dependencies/memchr-2.8.3/LICENSE-MIT +21 -0
- package/LICENSES/dependencies/memchr-2.8.3/UNLICENSE +24 -0
- package/LICENSES/dependencies/mio-1.2.3/LICENSE +19 -0
- package/LICENSES/dependencies/num-conv-0.2.2/LICENSE-Apache +177 -0
- package/LICENSES/dependencies/num-conv-0.2.2/LICENSE-MIT +19 -0
- package/LICENSES/dependencies/num-traits-0.2.19/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/num-traits-0.2.19/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/once_cell-1.21.4/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/once_cell-1.21.4/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/parking-2.2.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/parking-2.2.1/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/parking-2.2.1/LICENSE-THIRD-PARTY +9 -0
- package/LICENSES/dependencies/pin-project-1.1.13/LICENSE-APACHE +177 -0
- package/LICENSES/dependencies/pin-project-1.1.13/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/pin-project-internal-1.1.13/LICENSE-APACHE +177 -0
- package/LICENSES/dependencies/pin-project-internal-1.1.13/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/pin-project-lite-0.2.17/LICENSE-APACHE +177 -0
- package/LICENSES/dependencies/pin-project-lite-0.2.17/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/piper-0.2.5/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/piper-0.2.5/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/polling-3.11.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/polling-3.11.0/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/portable-atomic-1.15.0/LICENSE-APACHE +177 -0
- package/LICENSES/dependencies/portable-atomic-1.15.0/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/portable-atomic-util-0.2.8/LICENSE-APACHE +177 -0
- package/LICENSES/dependencies/portable-atomic-util-0.2.8/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/powerfmt-0.2.0/LICENSE-Apache +202 -0
- package/LICENSES/dependencies/powerfmt-0.2.0/LICENSE-MIT +19 -0
- package/LICENSES/dependencies/proc-macro2-1.0.107/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/proc-macro2-1.0.107/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/quote-1.0.47/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/quote-1.0.47/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/r-efi-6.0.0/AUTHORS +75 -0
- package/LICENSES/dependencies/rayon-1.12.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/rayon-1.12.0/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/rayon-core-1.13.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/rayon-core-1.13.0/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/ref-cast-1.0.27/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/ref-cast-1.0.27/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/ref-cast-impl-1.0.27/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/ref-cast-impl-1.0.27/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/rustc-demangle-0.1.28/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/rustc-demangle-0.1.28/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/rustc-hash-2.1.3/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/rustc-hash-2.1.3/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/rustc_version-0.4.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/rustc_version-0.4.1/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/rustix-1.1.4/COPYRIGHT +29 -0
- package/LICENSES/dependencies/rustix-1.1.4/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/rustix-1.1.4/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
- package/LICENSES/dependencies/rustix-1.1.4/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/rustversion-1.0.23/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/rustversion-1.0.23/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/schemars-0.9.0/LICENSE +21 -0
- package/LICENSES/dependencies/schemars-1.2.2/LICENSE +21 -0
- package/LICENSES/dependencies/schemars_derive-1.2.2/LICENSE +21 -0
- package/LICENSES/dependencies/semver-1.0.28/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/semver-1.0.28/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/serde-1.0.229/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/serde-1.0.229/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/serde_core-1.0.229/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/serde_core-1.0.229/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/serde_derive-1.0.229/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/serde_derive-1.0.229/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/serde_derive_internals-0.30.0/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/serde_derive_internals-0.30.0/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/serde_json-1.0.151/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/serde_json-1.0.151/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/serde_with-3.23.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/serde_with-3.23.0/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/serde_with_macros-3.23.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/serde_with_macros-3.23.0/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/shell-words-1.1.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/shell-words-1.1.1/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/shlex-2.0.1/LICENSE-APACHE +13 -0
- package/LICENSES/dependencies/shlex-2.0.1/LICENSE-MIT +21 -0
- package/LICENSES/dependencies/signal-hook-registry-1.4.8/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/signal-hook-registry-1.4.8/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/slab-0.4.12/LICENSE +25 -0
- package/LICENSES/dependencies/smallvec-1.16.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/smallvec-1.16.0/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/socket2-0.6.5/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/socket2-0.6.5/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/stable_deref_trait-1.2.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/stable_deref_trait-1.2.1/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/strsim-0.11.1/LICENSE +23 -0
- package/LICENSES/dependencies/strum-0.28.0/LICENSE +21 -0
- package/LICENSES/dependencies/strum_macros-0.28.0/LICENSE +21 -0
- package/LICENSES/dependencies/syn-2.0.119/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/syn-2.0.119/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/syn-3.0.5/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/syn-3.0.5/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/thiserror-2.0.20/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/thiserror-2.0.20/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/thiserror-impl-2.0.20/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/thiserror-impl-2.0.20/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/time-0.3.55/LICENSE-Apache +177 -0
- package/LICENSES/dependencies/time-0.3.55/LICENSE-MIT +19 -0
- package/LICENSES/dependencies/time-core-0.1.9/LICENSE-Apache +177 -0
- package/LICENSES/dependencies/time-core-0.1.9/LICENSE-MIT +19 -0
- package/LICENSES/dependencies/time-macros-0.2.32/LICENSE-Apache +177 -0
- package/LICENSES/dependencies/time-macros-0.2.32/LICENSE-MIT +19 -0
- package/LICENSES/dependencies/tinyvec-1.13.2/LICENSE-APACHE.md +202 -0
- package/LICENSES/dependencies/tinyvec-1.13.2/LICENSE-MIT.md +5 -0
- package/LICENSES/dependencies/tinyvec-1.13.2/LICENSE-ZLIB.md +11 -0
- package/LICENSES/dependencies/tinyvec_macros-0.1.1/LICENSE-APACHE.md +202 -0
- package/LICENSES/dependencies/tinyvec_macros-0.1.1/LICENSE-MIT.md +21 -0
- package/LICENSES/dependencies/tinyvec_macros-0.1.1/LICENSE-ZLIB.md +20 -0
- package/LICENSES/dependencies/tokio-1.53.1/LICENSE +21 -0
- package/LICENSES/dependencies/tokio-macros-2.7.2/LICENSE +22 -0
- package/LICENSES/dependencies/tracing-0.1.44/LICENSE +25 -0
- package/LICENSES/dependencies/tracing-attributes-0.1.31/LICENSE +25 -0
- package/LICENSES/dependencies/tracing-core-0.1.36/LICENSE +25 -0
- package/LICENSES/dependencies/unicode-ident-1.0.24/LICENSE-APACHE +176 -0
- package/LICENSES/dependencies/unicode-ident-1.0.24/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/unicode-ident-1.0.24/LICENSE-UNICODE +39 -0
- package/LICENSES/dependencies/unicode-segmentation-1.13.3/COPYRIGHT +7 -0
- package/LICENSES/dependencies/unicode-segmentation-1.13.3/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/unicode-segmentation-1.13.3/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/unicode-xid-0.2.6/COPYRIGHT +7 -0
- package/LICENSES/dependencies/unicode-xid-0.2.6/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/unicode-xid-0.2.6/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/uuid-1.26.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/uuid-1.26.1/LICENSE-MIT +26 -0
- package/LICENSES/dependencies/walrus-0.26.5/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/walrus-0.26.5/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/walrus-macro-0.26.0/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/walrus-macro-0.26.0/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/wasi-0.11.1+wasi-snapshot-preview1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/wasi-0.11.1+wasi-snapshot-preview1/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
- package/LICENSES/dependencies/wasi-0.11.1+wasi-snapshot-preview1/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/wasm-bindgen-0.2.128/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/wasm-bindgen-0.2.128/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/wasm-bindgen-cli-support-0.2.128/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/wasm-bindgen-cli-support-0.2.128/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/wasm-bindgen-macro-0.2.128/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/wasm-bindgen-macro-0.2.128/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/wasm-bindgen-macro-support-0.2.128/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/wasm-bindgen-macro-support-0.2.128/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/wasm-bindgen-shared-0.2.128/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/wasm-bindgen-shared-0.2.128/LICENSE-MIT +25 -0
- package/LICENSES/dependencies/wasm-encoder-0.245.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/wasm-encoder-0.245.1/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
- package/LICENSES/dependencies/wasm-encoder-0.245.1/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/wasmparser-0.245.1/LICENSE-APACHE +201 -0
- package/LICENSES/dependencies/wasmparser-0.245.1/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
- package/LICENSES/dependencies/wasmparser-0.245.1/LICENSE-MIT +23 -0
- package/LICENSES/dependencies/windows-core-0.62.2/license-apache-2.0 +201 -0
- package/LICENSES/dependencies/windows-core-0.62.2/license-mit +21 -0
- package/LICENSES/dependencies/windows-implement-0.60.2/license-apache-2.0 +201 -0
- package/LICENSES/dependencies/windows-implement-0.60.2/license-mit +21 -0
- package/LICENSES/dependencies/windows-interface-0.59.3/license-apache-2.0 +201 -0
- package/LICENSES/dependencies/windows-interface-0.59.3/license-mit +21 -0
- package/LICENSES/dependencies/windows-link-0.2.1/license-apache-2.0 +201 -0
- package/LICENSES/dependencies/windows-link-0.2.1/license-mit +21 -0
- package/LICENSES/dependencies/windows-result-0.4.1/license-apache-2.0 +201 -0
- package/LICENSES/dependencies/windows-result-0.4.1/license-mit +21 -0
- package/LICENSES/dependencies/windows-strings-0.5.1/license-apache-2.0 +201 -0
- package/LICENSES/dependencies/windows-strings-0.5.1/license-mit +21 -0
- package/LICENSES/dependencies/windows-sys-0.61.2/license-apache-2.0 +201 -0
- package/LICENSES/dependencies/windows-sys-0.61.2/license-mit +21 -0
- package/LICENSES/dependencies/zmij-1.0.23/LICENSE-MIT +23 -0
- package/README.md +185 -0
- package/THIRD-PARTY.md +45 -0
- package/index.d.ts +47 -0
- package/index.js +28 -0
- package/package.json +36 -0
- package/source/.cargo/config.toml +5 -0
- package/source/.ci/upstream-notices/PROVENANCE.json +198 -0
- package/source/.ci/upstream-notices/agent-client-protocol-2.1.0/LICENSE +191 -0
- package/source/.ci/upstream-notices/agent-client-protocol-derive-2.1.0/LICENSE +191 -0
- package/source/.ci/upstream-notices/agent-client-protocol-schema-1.7.0/LICENSE +190 -0
- package/source/.ci/upstream-notices/defmt-parser-1.0.0/LICENSE-APACHE +201 -0
- package/source/.ci/upstream-notices/defmt-parser-1.0.0/LICENSE-MIT +25 -0
- package/source/.ci/upstream-notices/r-efi-6.0.0/AUTHORS +75 -0
- package/source/.ci/upstream-notices/wasm-encoder-0.245.1/LICENSE-APACHE +201 -0
- package/source/.ci/upstream-notices/wasm-encoder-0.245.1/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
- package/source/.ci/upstream-notices/wasm-encoder-0.245.1/LICENSE-MIT +23 -0
- package/source/.ci/upstream-notices/wasmparser-0.245.1/LICENSE-APACHE +201 -0
- package/source/.ci/upstream-notices/wasmparser-0.245.1/LICENSE-Apache-2.0_WITH_LLVM-exception +220 -0
- package/source/.ci/upstream-notices/wasmparser-0.245.1/LICENSE-MIT +23 -0
- package/source/.ci/wasm-bundle/Cargo.toml +10 -0
- package/source/.ci/wasm-bundle/src/main.rs +17 -0
- package/source/CHANGELOG.md +11 -0
- package/source/Cargo.lock +1622 -0
- package/source/Cargo.toml +48 -0
- package/source/LICENSE +307 -0
- package/source/LICENSE.md +25 -0
- package/source/LICENSES/GPL-3.0-only.txt +232 -0
- package/source/LICENSES/LGPL-3.0-only.txt +304 -0
- package/source/README.md +185 -0
- package/source/THIRD-PARTY.md +45 -0
- package/source/dependencies.tar.gz +0 -0
- package/source/examples/native.rs +45 -0
- package/source/src/conversation.rs +557 -0
- package/source/src/lib.rs +27 -0
- package/source/src/native/client.rs +417 -0
- package/source/src/native/fixture.py +104 -0
- package/source/src/native/mod.rs +249 -0
- package/source/src/native/session.rs +541 -0
- package/source/src/native/tests.rs +427 -0
- package/source/src/web.rs +35 -0
- package/wasm/ccht.d.ts +60 -0
- package/wasm/ccht.js +275 -0
- package/wasm/ccht_bg.wasm +0 -0
- package/wasm/ccht_bg.wasm.d.ts +13 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
//! Native ACP sessions driven by the upstream Apache-2.0 Rust SDK.
|
|
2
|
+
//!
|
|
3
|
+
//! The SDK owns process spawning, protocol dispatch, session routing, and process
|
|
4
|
+
//! cleanup. Applications own agent installation, subscription login, workspace
|
|
5
|
+
//! isolation, and authorization policy. Denying permission requests is not a
|
|
6
|
+
//! sandbox: an agent can have tools that do not ask the client for permission.
|
|
7
|
+
|
|
8
|
+
mod client;
|
|
9
|
+
mod session;
|
|
10
|
+
|
|
11
|
+
#[cfg(test)]
|
|
12
|
+
mod tests;
|
|
13
|
+
|
|
14
|
+
pub use client::NativeClient;
|
|
15
|
+
pub use session::{NativeSession, SessionHandle};
|
|
16
|
+
|
|
17
|
+
use std::collections::BTreeMap;
|
|
18
|
+
use std::path::PathBuf;
|
|
19
|
+
use std::time::Duration;
|
|
20
|
+
|
|
21
|
+
use crate::acp::{McpServer, RequestPermissionOutcome};
|
|
22
|
+
|
|
23
|
+
/// An explicitly installed ACP executable; no implicit shell or installer is used.
|
|
24
|
+
#[derive(Clone)]
|
|
25
|
+
pub struct AgentCommand {
|
|
26
|
+
/// Executable path or name resolved by the operating system.
|
|
27
|
+
pub program: PathBuf,
|
|
28
|
+
/// Arguments passed directly to the executable.
|
|
29
|
+
pub args: Vec<String>,
|
|
30
|
+
/// Additional child environment. Values are excluded from debug output.
|
|
31
|
+
pub env: BTreeMap<String, String>,
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
impl AgentCommand {
|
|
35
|
+
/// Select an existing executable without arguments or environment overrides.
|
|
36
|
+
pub fn new(program: impl Into<PathBuf>) -> Self {
|
|
37
|
+
Self {
|
|
38
|
+
program: program.into(),
|
|
39
|
+
args: Vec::new(),
|
|
40
|
+
env: BTreeMap::new(),
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/// Set arguments without shell parsing.
|
|
45
|
+
pub fn args(mut self, args: impl IntoIterator<Item = impl Into<String>>) -> Self {
|
|
46
|
+
self.args = args.into_iter().map(Into::into).collect();
|
|
47
|
+
self
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/// Start in a directory through an installed Linux or macOS `env` launcher.
|
|
51
|
+
///
|
|
52
|
+
/// This changes the process startup directory, independently of ACP session
|
|
53
|
+
/// `cwd`. The SDK still owns the process and its cleanup. Linux resolves
|
|
54
|
+
/// `env` through the caller's PATH and requires GNU `--chdir`; macOS uses
|
|
55
|
+
/// `/usr/bin/env -C`. An unsupported launcher fails before executing the
|
|
56
|
+
/// agent. No shell parsing is involved. Windows has no implementation here.
|
|
57
|
+
pub fn with_working_directory(self, cwd: impl AsRef<std::path::Path>) -> Result<Self> {
|
|
58
|
+
if !cfg!(any(target_os = "linux", target_os = "macos")) {
|
|
59
|
+
return Err(NativeError::Unsupported(
|
|
60
|
+
"a startup-directory launcher on this platform",
|
|
61
|
+
));
|
|
62
|
+
}
|
|
63
|
+
let cwd = cwd.as_ref();
|
|
64
|
+
if !cwd.is_absolute() || !cwd.is_dir() {
|
|
65
|
+
return Err(NativeError::InvalidOptions(
|
|
66
|
+
"startup cwd must be an existing absolute directory",
|
|
67
|
+
));
|
|
68
|
+
}
|
|
69
|
+
let directory = cwd
|
|
70
|
+
.to_str()
|
|
71
|
+
.ok_or(NativeError::InvalidOptions("startup cwd must be UTF-8"))?;
|
|
72
|
+
let program = self
|
|
73
|
+
.program
|
|
74
|
+
.to_str()
|
|
75
|
+
.ok_or(NativeError::InvalidOptions("executable must be UTF-8"))?;
|
|
76
|
+
let (launcher, mut args) = if cfg!(target_os = "macos") {
|
|
77
|
+
(
|
|
78
|
+
"/usr/bin/env",
|
|
79
|
+
vec!["-C".into(), directory.into(), "--".into(), program.into()],
|
|
80
|
+
)
|
|
81
|
+
} else {
|
|
82
|
+
(
|
|
83
|
+
"env",
|
|
84
|
+
vec![format!("--chdir={directory}"), "--".into(), program.into()],
|
|
85
|
+
)
|
|
86
|
+
};
|
|
87
|
+
args.extend(self.args);
|
|
88
|
+
Ok(Self {
|
|
89
|
+
program: launcher.into(),
|
|
90
|
+
args,
|
|
91
|
+
env: self.env,
|
|
92
|
+
})
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
impl std::fmt::Debug for AgentCommand {
|
|
97
|
+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
98
|
+
f.debug_struct("AgentCommand")
|
|
99
|
+
.field("program", &self.program)
|
|
100
|
+
.field("argument_count", &self.args.len())
|
|
101
|
+
.field("environment_keys", &self.env.keys().collect::<Vec<_>>())
|
|
102
|
+
.finish()
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/// How requests that reach the client are handled; this does not sandbox an agent.
|
|
107
|
+
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
|
|
108
|
+
pub enum PermissionPolicy {
|
|
109
|
+
/// Cancel every permission request without granting authority.
|
|
110
|
+
#[default]
|
|
111
|
+
Deny,
|
|
112
|
+
/// Emit a permission event and await an explicit, valid response.
|
|
113
|
+
Ask,
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/// A permission response uses ACP's exact selected-option or cancellation type.
|
|
117
|
+
pub type PermissionDecision = RequestPermissionOutcome;
|
|
118
|
+
|
|
119
|
+
/// Resource limits and permission policy for a native connection.
|
|
120
|
+
#[derive(Debug, Clone)]
|
|
121
|
+
pub struct NativeOptions {
|
|
122
|
+
/// Limit for initialization, session creation/restoration, and configuration.
|
|
123
|
+
pub operation_timeout: Duration,
|
|
124
|
+
/// Maximum duration of a prompt, including permission waits.
|
|
125
|
+
pub prompt_timeout: Duration,
|
|
126
|
+
/// Maximum time an unanswered permission request may remain pending.
|
|
127
|
+
pub permission_timeout: Duration,
|
|
128
|
+
/// Grace period for cancellation and SDK connection shutdown.
|
|
129
|
+
pub shutdown_timeout: Duration,
|
|
130
|
+
/// Maximum queued application events per session.
|
|
131
|
+
pub event_capacity: usize,
|
|
132
|
+
/// Policy applied to every incoming permission request.
|
|
133
|
+
pub permissions: PermissionPolicy,
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
impl Default for NativeOptions {
|
|
137
|
+
fn default() -> Self {
|
|
138
|
+
Self {
|
|
139
|
+
operation_timeout: Duration::from_secs(30),
|
|
140
|
+
prompt_timeout: Duration::from_secs(600),
|
|
141
|
+
permission_timeout: Duration::from_secs(120),
|
|
142
|
+
shutdown_timeout: Duration::from_secs(5),
|
|
143
|
+
event_capacity: 256,
|
|
144
|
+
permissions: PermissionPolicy::Deny,
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/// Application-owned workspace and optional agent session configuration.
|
|
150
|
+
#[derive(Debug, Clone)]
|
|
151
|
+
pub struct SessionOptions {
|
|
152
|
+
/// Absolute existing directory supplied to the agent; not an isolation boundary.
|
|
153
|
+
pub cwd: PathBuf,
|
|
154
|
+
/// Exact advertised model option value, or the agent's default when absent.
|
|
155
|
+
pub model: Option<String>,
|
|
156
|
+
/// Application-owned MCP server descriptors passed to the agent.
|
|
157
|
+
pub mcp_servers: Vec<McpServer>,
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
impl SessionOptions {
|
|
161
|
+
/// Use an explicit workspace and the agent's default model without MCP servers.
|
|
162
|
+
pub fn new(cwd: impl Into<PathBuf>) -> Self {
|
|
163
|
+
Self {
|
|
164
|
+
cwd: cwd.into(),
|
|
165
|
+
model: None,
|
|
166
|
+
mcp_servers: Vec::new(),
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/// Native errors deliberately exclude raw agent messages, stderr, and error data.
|
|
172
|
+
#[derive(Debug, Clone, thiserror::Error, PartialEq, Eq)]
|
|
173
|
+
pub enum NativeError {
|
|
174
|
+
/// A Tokio runtime is required to drive the connection.
|
|
175
|
+
#[error("a Tokio runtime is required for native ACP sessions")]
|
|
176
|
+
RuntimeUnavailable,
|
|
177
|
+
/// Configuration is incomplete or inconsistent.
|
|
178
|
+
#[error("invalid native configuration: {0}")]
|
|
179
|
+
InvalidOptions(&'static str),
|
|
180
|
+
/// The operation exceeded its configured deadline.
|
|
181
|
+
#[error("native ACP operation timed out")]
|
|
182
|
+
Timeout,
|
|
183
|
+
/// The connection or session has closed.
|
|
184
|
+
#[error("native ACP connection or session is closed")]
|
|
185
|
+
Closed,
|
|
186
|
+
/// A session already has an active prompt.
|
|
187
|
+
#[error("this session already has an active prompt")]
|
|
188
|
+
Busy,
|
|
189
|
+
/// The agent did not advertise the requested operation or content type.
|
|
190
|
+
#[error("the agent does not support {0}")]
|
|
191
|
+
Unsupported(&'static str),
|
|
192
|
+
/// Agent-owned authentication is required; no alternate billing path is tried.
|
|
193
|
+
#[error("authenticate using the selected agent's native login, then reconnect")]
|
|
194
|
+
AuthenticationRequired,
|
|
195
|
+
/// A protocol error code, without possibly sensitive server text or data.
|
|
196
|
+
#[error("the agent returned ACP error {0}")]
|
|
197
|
+
Protocol(i32),
|
|
198
|
+
/// An application failed to keep up with the bounded event stream.
|
|
199
|
+
#[error("session event buffer is full; the connection was closed")]
|
|
200
|
+
EventBufferFull,
|
|
201
|
+
/// The session's sole event receiver has already been taken.
|
|
202
|
+
#[error("the session event stream has already been taken")]
|
|
203
|
+
EventsTaken,
|
|
204
|
+
/// No pending permission request has the supplied identifier.
|
|
205
|
+
#[error("permission request is absent, expired, or already answered")]
|
|
206
|
+
UnknownPermission,
|
|
207
|
+
/// A selected permission option was not offered by the agent.
|
|
208
|
+
#[error("the selected permission option was not offered")]
|
|
209
|
+
InvalidPermissionOption,
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
impl NativeError {
|
|
213
|
+
/// Stable category suitable for a product's structured error event.
|
|
214
|
+
pub fn code(&self) -> &'static str {
|
|
215
|
+
match self {
|
|
216
|
+
Self::RuntimeUnavailable => "runtime_unavailable",
|
|
217
|
+
Self::InvalidOptions(_) => "invalid_options",
|
|
218
|
+
Self::Timeout => "timeout",
|
|
219
|
+
Self::Closed => "closed",
|
|
220
|
+
Self::Busy => "busy",
|
|
221
|
+
Self::Unsupported(_) => "unsupported",
|
|
222
|
+
Self::AuthenticationRequired => "authentication_required",
|
|
223
|
+
Self::Protocol(_) => "protocol",
|
|
224
|
+
Self::EventBufferFull => "event_buffer_full",
|
|
225
|
+
Self::EventsTaken => "events_taken",
|
|
226
|
+
Self::UnknownPermission => "unknown_permission",
|
|
227
|
+
Self::InvalidPermissionOption => "invalid_permission_option",
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
impl From<agent_client_protocol::Error> for NativeError {
|
|
233
|
+
fn from(error: agent_client_protocol::Error) -> Self {
|
|
234
|
+
if error.code == crate::acp::ErrorCode::AuthRequired {
|
|
235
|
+
Self::AuthenticationRequired
|
|
236
|
+
} else {
|
|
237
|
+
Self::Protocol(error.code.into())
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/// Result returned by native ACP operations.
|
|
243
|
+
pub type Result<T> = std::result::Result<T, NativeError>;
|
|
244
|
+
|
|
245
|
+
fn lock<T>(mutex: &std::sync::Mutex<T>) -> std::sync::MutexGuard<'_, T> {
|
|
246
|
+
mutex
|
|
247
|
+
.lock()
|
|
248
|
+
.unwrap_or_else(std::sync::PoisonError::into_inner)
|
|
249
|
+
}
|