Skip to content

Add typed reply draft operation - #87

Open
code-monger-givenall wants to merge 1 commit into
basecamp:mainfrom
code-monger-givenall:agent/reply-draft-sdk
Open

Add typed reply draft operation#87
code-monger-givenall wants to merge 1 commit into
basecamp:mainfrom
code-monger-givenall:agent/reply-draft-sdk

Conversation

@code-monger-givenall

@code-monger-givenall code-monger-givenall commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

HEY already serves the reply composer as JSON, including the recipients it resolves for the selected entry. Without a typed SDK operation, clients have to scrape the HTML reply form to get that envelope.

This adds NewEntryReply for GET /entries/{entryId}/replies/new.json and exposes it as Entries().NewReply. It returns the existing MessageDraft model, so callers get the subject, sender context, and To, CC, and BCC contacts HEY prepared.

The generated client, behavior model, route artifacts, wrapper, unit test, and path conformance case are included.

Validation:

  • make check
  • 146 conformance cases passed

Summary by cubic

Adds a typed SDK operation to fetch the live reply draft envelope for an entry, eliminating the need to scrape the HTML reply form. The new NewEntryReply GET returns a MessageDraft with subject, sender context, and HEY-resolved To/CC/BCC recipients.

  • New API surface: NewEntryReply at GET /entries/{entryId}/replies/new.json in openapi.json and spec/hey.smithy; route added in go/pkg/hey/url-routes.json.
  • Client support: Client.NewEntryReply and ClientWithResponses.NewEntryReplyWithResponse in go/pkg/generated/client.gen.go; returns MessageDraft.
  • Wrapper: Entries().NewReply(ctx, entryID) in go/pkg/hey.
  • Reliability: readonly GET retried on 429/503 with exponential backoff (base 1000ms, max 3).
  • Tests and artifacts: path conformance case, runner support, unit test for Entries().NewReply, and behavior/coverage updates.

Written for commit cbb4fb7. Summary will update on new commits.

Review in cubic

Copilot AI balanced review requested due to automatic review settings August 19, 2026 19:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds typed Go SDK support for fetching HEY’s prepared reply envelope and resolved recipients.

Changes:

  • Models and generates the NewEntryReply operation.
  • Exposes it as Entries().NewReply.
  • Adds unit and path-conformance coverage.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
spec/hey.smithy Defines the operation and response.
spec/shape-fingerprint.json Records the new operation fingerprint.
spec/route-coverage.json Adds route coverage metadata.
openapi.json Includes generated OpenAPI definitions.
behavior-model.json Records operation behavior and retries.
go/pkg/generated/client.gen.go Generates the typed Go client operation.
go/pkg/hey/entries.go Adds the public NewReply wrapper.
go/pkg/hey/services_test.go Tests draft and recipient decoding.
go/pkg/hey/url-routes.json Registers the generated route mapping.
conformance/runner/go/main.go Enables conformance execution.
conformance/tests/paths.json Verifies the request path.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants