Check the real callback shape
A To-only mapper covers a To-only callback. Adding CC or BCC to the callback changes its destination surface.
A function tool that sends to CC or BCC needs more than a To-only resource. The new host adapter derives a complete recipient key, rechecks it against frozen arguments, and keeps the tool callback behind an exact policy rule.
Bounded comparison. The earlier generic adapter can be correct for a To-only callback. Here, its callback also accepts CC and BCC but its example mapper still reads only To. Both paths use in-memory callbacks. No message is sent and no person is asked to approve.
Each case invokes both actual Node adapters. Inspect the plan, receipt, and callback count for the same proposed mail arguments.
A To-only mapper covers a To-only callback. Adding CC or BCC to the callback changes its destination surface.
The narrow mail adapter validates To, CC, and BCC and uses their canonical manifest as an exact policy resource.
A matching resource is still not a send approval. Host policy, authenticated approval, and actual provider behavior remain host responsibilities.
The host supplies its intended recipient rule, approval flow, and mail service. The wrapper freezes arguments, maps the complete target, and returns a plan and receipt.
import { createMailGuardedToolExecute } from "./pilots/action-boundary/mail-guarded-tool.mjs";
import { mailTargetResource } from "./pilots/action-boundary/mail-target-manifest.mjs";
const intended = mailTargetResource({ to: "team@example.test" });
const policy = { protocol: "aml-action-policy/1", rules: [{
tool: "send_message", effect: "send", resource: intended.resource,
requires_approval: true
}] };
const execute = createMailGuardedToolExecute({
purpose: "Send a team update", policy, requestApproval: hostApproval,
consumeApproval: hostClaim, execute: hostMailCallback
});