Skip to content

Convert interfaces into concrete structs#240

Draft
zombiezen wants to merge 3 commits intongrok:mainfrom
zombiezen:push-kmsztwwklzzy
Draft

Convert interfaces into concrete structs#240
zombiezen wants to merge 3 commits intongrok:mainfrom
zombiezen:push-kmsztwwklzzy

Conversation

@zombiezen
Copy link
Copy Markdown
Contributor

This is a breaking change and should not be merged without a major version bump and a migration strategy from v2.

Also fix race condition in AgentSession.

Part of AGENT-445

Also copy memory to avoid having fields race or allowing user modification.

Part of AGENT-445
@zombiezen zombiezen marked this pull request as draft April 14, 2026 19:15
@zombiezen zombiezen requested a review from bmpngrok April 14, 2026 19:15
Comment thread endpoint.go
// EndpointForwarder.
// Endpoint is the interface implemented by both
// [*EndpointListener] and [*EndpointForwarder].
type Endpoint interface {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was hacking on some other code over the weekend, and realized there's a better way of representing fixed sets of types like this: https://bsky.app/profile/zombiezen.com/post/3mjvmecvd5k26

(Reworking Endpoint to use this and implement some common methods is left as an exercise to the reader.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant