From a65f539769c8068f7158ebc264bfe8c3fcde0efe Mon Sep 17 00:00:00 2001 From: devolutionsbot <31221910+devolutionsbot@users.noreply.github.com> Date: Wed, 5 Aug 2026 15:04:39 -0400 Subject: [PATCH 1/3] chore(release): prepare for publishing --- Cargo.lock | 32 ++++---- policies/rust/now-policy-api/CHANGELOG.md | 76 +++++++++++++++++++ policies/rust/now-policy-api/Cargo.toml | 2 +- .../now-policy-server-template/CHANGELOG.md | 76 +++++++++++++++++++ .../now-policy-server-template/Cargo.toml | 4 +- 5 files changed, 171 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0c74f63..6caad97 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 4 [[package]] name = "aho-corasick" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" dependencies = [ "memchr", ] @@ -34,9 +34,9 @@ dependencies = [ [[package]] name = "android_system_properties" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" dependencies = [ "libc", ] @@ -197,13 +197,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac70aa55017e108007fbaf5aa0f54b021c98f92ff8af59d42eda9da96e3dd4f" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] @@ -363,9 +363,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "http" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" dependencies = [ "bytes", "itoa", @@ -626,7 +626,7 @@ dependencies = [ [[package]] name = "now-policy-api" -version = "0.2.0" +version = "0.3.0" dependencies = [ "chrono", "derive_more", @@ -641,7 +641,7 @@ dependencies = [ [[package]] name = "now-policy-server-template" -version = "0.2.0" +version = "0.3.0" dependencies = [ "aide", "async-trait", @@ -762,9 +762,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.16" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" dependencies = [ "aho-corasick", "memchr", @@ -1083,13 +1083,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6328af13490e73a9b4694030fafd93f8c8c6a9dede33e821c3fc63eddf8042ba" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] diff --git a/policies/rust/now-policy-api/CHANGELOG.md b/policies/rust/now-policy-api/CHANGELOG.md index 719aad1..0edccc2 100644 --- a/policies/rust/now-policy-api/CHANGELOG.md +++ b/policies/rust/now-policy-api/CHANGELOG.md @@ -6,6 +6,82 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [[0.3.0](https://github.com/Devolutions/now-libraries/compare/now-policy-api-v0.2.0...now-policy-api-v0.3.0)] - 2026-08-05 + +### Features + +- Add package operation cancelation support ([#88](https://github.com/Devolutions/now-libraries/issues/88)) ([d8ba0f8515](https://github.com/Devolutions/now-libraries/commit/d8ba0f85153f2d1c54953a4c2f7dd4e6a37e5448)) + +- Add per-operation event channel protocol ([#89](https://github.com/Devolutions/now-libraries/issues/89)) ([d25e7eb631](https://github.com/Devolutions/now-libraries/commit/d25e7eb631b1f6c00ef1ee27c5b1d16a1381d298)) + + ## Summary + + Adds a **per-operation event channel** for delivering operation output + and status-change notifications from the broker to the client, replacing + HTTP polling for output entirely. + + For each executed operation the broker (when it supports event channels) + opens a dedicated channel and returns an expandable `EventChannel` + descriptor in the execution response: + + ```json + "EventChannel": { + "Kind": "LocalPipe", + "Path": "Devolutions.Now.PackageBroker.Operation.op-…" + } + ``` + + The channel always carries status-change notifications; the + `CaptureOutput` request flag only controls whether stdout/stderr data + frames are pushed over it. + + The client connects to the pipe and reads a minimal one-way binary frame + protocol (`NOW_BROKER` frames): + + | Frame | Kind | Body | + |---|---|---| + | Hello | 0x0000 | `u16` version major + `u16` version minor | + | StatusUpdated | 0x0001 | empty — client should issue a `GetStatus` + HTTP request | + | Finish | 0x0002 | empty — operation finished, pipe can be closed | + | Stdout | 0x0003 | UTF-8 data (agent ensures char boundaries) | + | Stderr | 0x0004 | UTF-8 data | + | StdoutOverflow | 0x0005 | `u32` bytes skipped | + | StderrOverflow | 0x0006 | `u32` bytes skipped | + + Frame layout is `u32 body_size | u16 kind | body` (little-endian, 64 KiB + body cap). Decoders ignore unknown frame kinds, keeping the protocol + extendable; end-of-stream mid-frame is treated as a truncated-stream + error. Full spec: `policies/docs/event-channel-protocol.md`. + + ## Changes + + - **Rust** (`now-policy-api`): new `event_channel` module — + `EventChannel` descriptor model, `EventFrame` enum, + `encode`/`decode_body`, incremental `EventFrameDecoder`; + `OperationSubmission.event_channel` field. + - **.NET** (`Devolutions.Now.Policy.Api`): `EventChannel.cs` — mirrored + DTO, `EventFrame` hierarchy, `EventFrameDecoder`. + - **.NET client** (`Devolutions.Now.Policy.Client`): + `BrokerClient.OpenEventChannel(ExecutionResponse)` connects to the + advertised pipe and returns an `OperationEventChannel` reader — + `ReadFrame()` for the raw frame stream, `ReadEvents()` + (`IAsyncEnumerable`) which skips unknown frames and completes after + `Finish` or EOF. + - Shared binary fixture + (`assets/samples/frames/event-channel.frames.bin`) validated + byte-for-byte by both Rust and .NET test suites, including unknown-frame + tolerance; .NET integration tests exercise a real local named pipe, + including pipe-closure and mid-frame truncation cases. + - OpenAPI schema regenerated; docs/READMEs updated. + + No crate/package or protocol version bumps (API stays `1.0`; + pre-release). + + --------- + + + ## [[0.2.0](https://github.com/Devolutions/now-libraries/compare/now-policy-api-v0.1.0...now-policy-api-v0.2.0)] - 2026-07-27 ### Features diff --git a/policies/rust/now-policy-api/Cargo.toml b/policies/rust/now-policy-api/Cargo.toml index 5943701..30930f9 100644 --- a/policies/rust/now-policy-api/Cargo.toml +++ b/policies/rust/now-policy-api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "now-policy-api" -version = "0.2.0" +version = "0.3.0" edition = "2024" license.workspace = true homepage.workspace = true diff --git a/policies/rust/now-policy-server-template/CHANGELOG.md b/policies/rust/now-policy-server-template/CHANGELOG.md index 05b0c07..ebc9cf2 100644 --- a/policies/rust/now-policy-server-template/CHANGELOG.md +++ b/policies/rust/now-policy-server-template/CHANGELOG.md @@ -6,6 +6,82 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [[0.3.0](https://github.com/Devolutions/now-libraries/compare/now-policy-server-template-v0.2.0...now-policy-server-template-v0.3.0)] - 2026-08-05 + +### Features + +- Add package operation cancelation support ([#88](https://github.com/Devolutions/now-libraries/issues/88)) ([d8ba0f8515](https://github.com/Devolutions/now-libraries/commit/d8ba0f85153f2d1c54953a4c2f7dd4e6a37e5448)) + +- Add per-operation event channel protocol ([#89](https://github.com/Devolutions/now-libraries/issues/89)) ([d25e7eb631](https://github.com/Devolutions/now-libraries/commit/d25e7eb631b1f6c00ef1ee27c5b1d16a1381d298)) + + ## Summary + + Adds a **per-operation event channel** for delivering operation output + and status-change notifications from the broker to the client, replacing + HTTP polling for output entirely. + + For each executed operation the broker (when it supports event channels) + opens a dedicated channel and returns an expandable `EventChannel` + descriptor in the execution response: + + ```json + "EventChannel": { + "Kind": "LocalPipe", + "Path": "Devolutions.Now.PackageBroker.Operation.op-…" + } + ``` + + The channel always carries status-change notifications; the + `CaptureOutput` request flag only controls whether stdout/stderr data + frames are pushed over it. + + The client connects to the pipe and reads a minimal one-way binary frame + protocol (`NOW_BROKER` frames): + + | Frame | Kind | Body | + |---|---|---| + | Hello | 0x0000 | `u16` version major + `u16` version minor | + | StatusUpdated | 0x0001 | empty — client should issue a `GetStatus` + HTTP request | + | Finish | 0x0002 | empty — operation finished, pipe can be closed | + | Stdout | 0x0003 | UTF-8 data (agent ensures char boundaries) | + | Stderr | 0x0004 | UTF-8 data | + | StdoutOverflow | 0x0005 | `u32` bytes skipped | + | StderrOverflow | 0x0006 | `u32` bytes skipped | + + Frame layout is `u32 body_size | u16 kind | body` (little-endian, 64 KiB + body cap). Decoders ignore unknown frame kinds, keeping the protocol + extendable; end-of-stream mid-frame is treated as a truncated-stream + error. Full spec: `policies/docs/event-channel-protocol.md`. + + ## Changes + + - **Rust** (`now-policy-api`): new `event_channel` module — + `EventChannel` descriptor model, `EventFrame` enum, + `encode`/`decode_body`, incremental `EventFrameDecoder`; + `OperationSubmission.event_channel` field. + - **.NET** (`Devolutions.Now.Policy.Api`): `EventChannel.cs` — mirrored + DTO, `EventFrame` hierarchy, `EventFrameDecoder`. + - **.NET client** (`Devolutions.Now.Policy.Client`): + `BrokerClient.OpenEventChannel(ExecutionResponse)` connects to the + advertised pipe and returns an `OperationEventChannel` reader — + `ReadFrame()` for the raw frame stream, `ReadEvents()` + (`IAsyncEnumerable`) which skips unknown frames and completes after + `Finish` or EOF. + - Shared binary fixture + (`assets/samples/frames/event-channel.frames.bin`) validated + byte-for-byte by both Rust and .NET test suites, including unknown-frame + tolerance; .NET integration tests exercise a real local named pipe, + including pipe-closure and mid-frame truncation cases. + - OpenAPI schema regenerated; docs/READMEs updated. + + No crate/package or protocol version bumps (API stays `1.0`; + pre-release). + + --------- + + + ## [[0.2.0](https://github.com/Devolutions/now-libraries/compare/now-policy-server-template-v0.1.0...now-policy-server-template-v0.2.0)] - 2026-07-27 ### Features diff --git a/policies/rust/now-policy-server-template/Cargo.toml b/policies/rust/now-policy-server-template/Cargo.toml index 58a67e4..f8b03f5 100644 --- a/policies/rust/now-policy-server-template/Cargo.toml +++ b/policies/rust/now-policy-server-template/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "now-policy-server-template" -version = "0.2.0" +version = "0.3.0" edition = "2024" license.workspace = true homepage.workspace = true @@ -21,7 +21,7 @@ policy-compat = ["dep:now-policy", "now-policy-api/policy-compat"] aide = { version = "0.14", features = ["axum", "axum-json"] } async-trait = "0.1" axum = { version = "0.8", default-features = false, features = ["json"] } -now-policy-api = { version = "0.2", path = "../now-policy-api" } +now-policy-api = { version = "0.3", path = "../now-policy-api" } now-policy = { version = "0.2", path = "../now-policy", optional = true } schemars = "0.8" serde = { version = "1", features = ["derive"] } From 714778cccc3b947d2573017d094a479b4b65f572 Mon Sep 17 00:00:00 2001 From: Vladyslav Nikonov Date: Wed, 5 Aug 2026 22:13:14 +0300 Subject: [PATCH 2/3] Update CHANGELOG for v0.3.0 features and breaking changes Updated CHANGELOG to reflect breaking changes and new features including package operation cancellation and per-operation event channel protocol. --- policies/rust/now-policy-api/CHANGELOG.md | 72 +---------------------- 1 file changed, 2 insertions(+), 70 deletions(-) diff --git a/policies/rust/now-policy-api/CHANGELOG.md b/policies/rust/now-policy-api/CHANGELOG.md index 0edccc2..034d5c2 100644 --- a/policies/rust/now-policy-api/CHANGELOG.md +++ b/policies/rust/now-policy-api/CHANGELOG.md @@ -10,77 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Features -- Add package operation cancelation support ([#88](https://github.com/Devolutions/now-libraries/issues/88)) ([d8ba0f8515](https://github.com/Devolutions/now-libraries/commit/d8ba0f85153f2d1c54953a4c2f7dd4e6a37e5448)) - -- Add per-operation event channel protocol ([#89](https://github.com/Devolutions/now-libraries/issues/89)) ([d25e7eb631](https://github.com/Devolutions/now-libraries/commit/d25e7eb631b1f6c00ef1ee27c5b1d16a1381d298)) - - ## Summary - - Adds a **per-operation event channel** for delivering operation output - and status-change notifications from the broker to the client, replacing - HTTP polling for output entirely. - - For each executed operation the broker (when it supports event channels) - opens a dedicated channel and returns an expandable `EventChannel` - descriptor in the execution response: - - ```json - "EventChannel": { - "Kind": "LocalPipe", - "Path": "Devolutions.Now.PackageBroker.Operation.op-…" - } - ``` - - The channel always carries status-change notifications; the - `CaptureOutput` request flag only controls whether stdout/stderr data - frames are pushed over it. - - The client connects to the pipe and reads a minimal one-way binary frame - protocol (`NOW_BROKER` frames): - - | Frame | Kind | Body | - |---|---|---| - | Hello | 0x0000 | `u16` version major + `u16` version minor | - | StatusUpdated | 0x0001 | empty — client should issue a `GetStatus` - HTTP request | - | Finish | 0x0002 | empty — operation finished, pipe can be closed | - | Stdout | 0x0003 | UTF-8 data (agent ensures char boundaries) | - | Stderr | 0x0004 | UTF-8 data | - | StdoutOverflow | 0x0005 | `u32` bytes skipped | - | StderrOverflow | 0x0006 | `u32` bytes skipped | - - Frame layout is `u32 body_size | u16 kind | body` (little-endian, 64 KiB - body cap). Decoders ignore unknown frame kinds, keeping the protocol - extendable; end-of-stream mid-frame is treated as a truncated-stream - error. Full spec: `policies/docs/event-channel-protocol.md`. - - ## Changes - - - **Rust** (`now-policy-api`): new `event_channel` module — - `EventChannel` descriptor model, `EventFrame` enum, - `encode`/`decode_body`, incremental `EventFrameDecoder`; - `OperationSubmission.event_channel` field. - - **.NET** (`Devolutions.Now.Policy.Api`): `EventChannel.cs` — mirrored - DTO, `EventFrame` hierarchy, `EventFrameDecoder`. - - **.NET client** (`Devolutions.Now.Policy.Client`): - `BrokerClient.OpenEventChannel(ExecutionResponse)` connects to the - advertised pipe and returns an `OperationEventChannel` reader — - `ReadFrame()` for the raw frame stream, `ReadEvents()` - (`IAsyncEnumerable`) which skips unknown frames and completes after - `Finish` or EOF. - - Shared binary fixture - (`assets/samples/frames/event-channel.frames.bin`) validated - byte-for-byte by both Rust and .NET test suites, including unknown-frame - tolerance; .NET integration tests exercise a real local named pipe, - including pipe-closure and mid-frame truncation cases. - - OpenAPI schema regenerated; docs/READMEs updated. - - No crate/package or protocol version bumps (API stays `1.0`; - pre-release). - - --------- - +- [**breaking**] Add package operation cancelation support ([#88](https://github.com/Devolutions/now-libraries/issues/88)) ([d8ba0f8515](https://github.com/Devolutions/now-libraries/commit/d8ba0f85153f2d1c54953a4c2f7dd4e6a37e5448)) +- [**breaking**] Add per-operation event channel protocol ([#89](https://github.com/Devolutions/now-libraries/issues/89)) ([d25e7eb631](https://github.com/Devolutions/now-libraries/commit/d25e7eb631b1f6c00ef1ee27c5b1d16a1381d298)) ## [[0.2.0](https://github.com/Devolutions/now-libraries/compare/now-policy-api-v0.1.0...now-policy-api-v0.2.0)] - 2026-07-27 From eb95f012050cbadfaa558f169d0ab441db73a5d9 Mon Sep 17 00:00:00 2001 From: Vladyslav Nikonov Date: Wed, 5 Aug 2026 22:13:45 +0300 Subject: [PATCH 3/3] Refactor CHANGELOG.md to remove summary and changes Removed detailed summary and changes sections from CHANGELOG.md to streamline the document. --- .../now-policy-server-template/CHANGELOG.md | 68 ------------------- 1 file changed, 68 deletions(-) diff --git a/policies/rust/now-policy-server-template/CHANGELOG.md b/policies/rust/now-policy-server-template/CHANGELOG.md index ebc9cf2..1726eb2 100644 --- a/policies/rust/now-policy-server-template/CHANGELOG.md +++ b/policies/rust/now-policy-server-template/CHANGELOG.md @@ -14,74 +14,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Add per-operation event channel protocol ([#89](https://github.com/Devolutions/now-libraries/issues/89)) ([d25e7eb631](https://github.com/Devolutions/now-libraries/commit/d25e7eb631b1f6c00ef1ee27c5b1d16a1381d298)) - ## Summary - - Adds a **per-operation event channel** for delivering operation output - and status-change notifications from the broker to the client, replacing - HTTP polling for output entirely. - - For each executed operation the broker (when it supports event channels) - opens a dedicated channel and returns an expandable `EventChannel` - descriptor in the execution response: - - ```json - "EventChannel": { - "Kind": "LocalPipe", - "Path": "Devolutions.Now.PackageBroker.Operation.op-…" - } - ``` - - The channel always carries status-change notifications; the - `CaptureOutput` request flag only controls whether stdout/stderr data - frames are pushed over it. - - The client connects to the pipe and reads a minimal one-way binary frame - protocol (`NOW_BROKER` frames): - - | Frame | Kind | Body | - |---|---|---| - | Hello | 0x0000 | `u16` version major + `u16` version minor | - | StatusUpdated | 0x0001 | empty — client should issue a `GetStatus` - HTTP request | - | Finish | 0x0002 | empty — operation finished, pipe can be closed | - | Stdout | 0x0003 | UTF-8 data (agent ensures char boundaries) | - | Stderr | 0x0004 | UTF-8 data | - | StdoutOverflow | 0x0005 | `u32` bytes skipped | - | StderrOverflow | 0x0006 | `u32` bytes skipped | - - Frame layout is `u32 body_size | u16 kind | body` (little-endian, 64 KiB - body cap). Decoders ignore unknown frame kinds, keeping the protocol - extendable; end-of-stream mid-frame is treated as a truncated-stream - error. Full spec: `policies/docs/event-channel-protocol.md`. - - ## Changes - - - **Rust** (`now-policy-api`): new `event_channel` module — - `EventChannel` descriptor model, `EventFrame` enum, - `encode`/`decode_body`, incremental `EventFrameDecoder`; - `OperationSubmission.event_channel` field. - - **.NET** (`Devolutions.Now.Policy.Api`): `EventChannel.cs` — mirrored - DTO, `EventFrame` hierarchy, `EventFrameDecoder`. - - **.NET client** (`Devolutions.Now.Policy.Client`): - `BrokerClient.OpenEventChannel(ExecutionResponse)` connects to the - advertised pipe and returns an `OperationEventChannel` reader — - `ReadFrame()` for the raw frame stream, `ReadEvents()` - (`IAsyncEnumerable`) which skips unknown frames and completes after - `Finish` or EOF. - - Shared binary fixture - (`assets/samples/frames/event-channel.frames.bin`) validated - byte-for-byte by both Rust and .NET test suites, including unknown-frame - tolerance; .NET integration tests exercise a real local named pipe, - including pipe-closure and mid-frame truncation cases. - - OpenAPI schema regenerated; docs/READMEs updated. - - No crate/package or protocol version bumps (API stays `1.0`; - pre-release). - - --------- - - - ## [[0.2.0](https://github.com/Devolutions/now-libraries/compare/now-policy-server-template-v0.1.0...now-policy-server-template-v0.2.0)] - 2026-07-27 ### Features