EXECUTABLE INTEGRATION / 31

One tool.
Every recipient.

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.

1 → 0callbacks for an added BCC
7executed integration cases
0real mail sends or approvals

Follow the callback.

Each case invokes both actual Node adapters. Inspect the plan, receipt, and callback count for the same proposed mail arguments.

Loading the checked-in report…
01 / EXPOSE

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.

02 / BIND

Commit every supported role

The narrow mail adapter validates To, CC, and BCC and uses their canonical manifest as an exact policy resource.

03 / DECIDE

Keep authority with the host

A matching resource is still not a send approval. Host policy, authenticated approval, and actual provider behavior remain host responsibilities.

HOST INTEGRATION

Use the complete mail wrapper for this schema.

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
});