feat: feat(cluster-protocol): add capability-gated read-only agent attach#795
Merged
Conversation
…ead-only agent attach
tomdps
enabled auto-merge
July 24, 2026 20:50
Greptile SummaryAdds capability-advertised, read-only
Confidence Score: 3/5The encoding-failure subscription path needs to notify or disconnect the client before this PR is safe to merge. An unencodable attachment event stops the server-side forwarding loop without a terminal notification, leaving the client-side subscription registered and waiting indefinitely. crates/openengine-cluster-server/src/stdio/subscription.rs Important Files Changed
Sequence DiagramsequenceDiagram
participant C as Client
participant T as NDJSON Transport
participant S as Cluster Server
participant B as Backend
C->>T: agent/attach(execution)
T->>S: JSON-RPC request
S->>B: agent_attach(context, params, capacity)
alt unknown or inactive execution
B-->>S: BackendError
S-->>T: JSON-RPC error
T-->>C: Typed RPC error
else attachment established
B-->>S: result, event stream, handle
S-->>T: AgentAttachResult(subscriptionId)
T-->>C: result and event stream
loop live attachment events
B-->>S: Working / Output / Settled
S-->>T: event notification
T-->>C: typed event
end
C->>T: subscription/cancel
T->>S: cancel notification
S->>B: release attachment handle
end
Reviews (1): Last reviewed commit: "feat: implement #749 - feat(cluster-prot..." | Re-trigger Greptile |
Comment on lines
+180
to
+188
| run_established_subscription(established, channels, move |item| { | ||
| let encoded = match item { | ||
| BoundedStreamItem::Event(event) => encode_event(encode_subscription_id.clone(), event), | ||
| BoundedStreamItem::Closed { reason } => { | ||
| encode_closed(encode_subscription_id.clone(), reason) | ||
| } | ||
| }; | ||
| encoded.ok() | ||
| }) |
There was a problem hiding this comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #749