Skip to content

Conversation

@threepointone
Copy link
Contributor

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jan 27, 2026

🦋 Changeset detected

Latest commit: 5b62434

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
hono-agents Patch
@cloudflare/codemode Patch
@cloudflare/ai-chat Patch
agents Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@claude
Copy link

claude bot commented Jan 27, 2026

Claude Code Review

Critical Issue - Missing Type Definition

The return type changes in packages/agents/src/internal_context.ts reference EmailSendResult which is not defined or imported:

forward: (rcptTo: string, headers?: Headers) => Promise<EmailSendResult>;
reply: (options: {
  from: string;
  to: string;
  raw: string;
}) => Promise<EmailSendResult>;

This type appears to come from Cloudflare Workers runtime types (based on the mock return values { messageId: string }). You need to either:

  1. Import it from @cloudflare/workers-types if it exists there
  2. Define it locally in internal_context.ts:
    export type EmailSendResult = { messageId: string };

Note: The test mocks and example code use the correct shape { messageId: string }, so the implementation is correct - just missing the type definition.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/agents@800

commit: 5b62434

agents-git-bot bot pushed a commit to cloudflare/cloudflare-docs that referenced this pull request Jan 27, 2026
Update documentation to reflect that email forward() and reply() methods
now return Promise<EmailSendResult> instead of Promise<void>. This change
corresponds to agents PR #800 which updates dependencies including
@cloudflare/workers-types.

Changes:
- Updated AgentEmail interface documentation in agents/concepts/agent-class.mdx
- Added examples showing how to use the returned messageId
- Updated ForwardableEmailMessage interface in email-routing runtime API
- Added EmailSendResult type definition

Related: cloudflare/agents#800
@threepointone threepointone merged commit a54edf5 into main Jan 27, 2026
5 checks passed
@threepointone threepointone deleted the update-deps branch January 27, 2026 01:37
@github-actions github-actions bot mentioned this pull request Jan 27, 2026
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