mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-26 18:31:34 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Connections give agents controlled access to external services. > - Experimental channels already map conversations to tasks and durable work queues. > - Email needs inbox ownership, recipient envelopes, delivery records, and explicit sends. > - This pull request adds AgentMail to that infrastructure and keeps the provider key in the server vault. > - Agents can receive and send email from local or sandbox execution while the board follows each conversation in its task. ## Linked Issues or Issue Description **Problem or motivation** Agents need dedicated email addresses. Incoming email should become assigned work. Internal task comments and progress must never become outgoing email by accident. **Proposed solution** Add experimental AgentMail connections, an inbox assignment wizard, durable email intake and publication, task email cards, and authenticated API, CLI, and native runtime actions. Agents use Paperclip credentials to request sends. Paperclip owns the provider key and enforces access and task authority. **Alternatives considered** A general mailbox MCP connector does not provide durable task binding or publication boundaries. A separate mailbox application duplicates task collaboration. The board instead directs the agent through the normal task conversation. **Roadmap alignment** This extends the existing experimental connections and task infrastructure. Product scope and interaction design were reviewed with the maintainer. Related connection authority work: #11831 and #11818. The duplicate search found no competing task-based AgentMail integration. ## What Changed - Add AgentMail catalog data, shared contracts, company-scoped email records, and an additive migration. - Add vaulted setup, inbox assignment, access grants, trust guidance, and provider-side allowlist guidance. - Support WebSocket and signed-webhook intake through a shared durable pipeline, deduplication, catch-up, and task wakeups. - Queue explicit new conversations and replies with immutable send intents, idempotency, delivery state, and uncertain-send resolution. - Show inbound and outbound email cards in normal task conversations. Keep internal messages internal. - Add task-scoped CLI actions and the sandbox callback routes required for Daytona execution. - Provide a dedicated AgentMail skill automatically only to agents with active authorized inbox assignments. Keep email instructions out of the universal Paperclip skill. - Advertise connector-owned `agentmail_inboxes`, `agentmail_read_thread`, `agentmail_send`, and `agentmail_delivery` tools only in eligible native sessions. Recheck live authority on execution. - Isolate Codex CLI connector skills by agent and skill revision. Deliver the assigned skill in the run prompt for adapters that use shared skill directories, including resumed turns. Keep automatic skills out of manual persistent sync. Show them as read-only and document the pattern in the connector playbook. - Fix AgentMail health checks that entered local-stdio validation and optional missing Codex credential cleanup in sandboxes. - Add API, pipeline, authorization, sandbox, browser, and Storybook coverage. ## Verification - Live AgentMail testing covered WebSocket intake, signed webhooks, restart catch-up, and a full receive → task → Daytona Codex CLI → explicit reply → Delivered round trip. The reply was verified in the other inbox. The normal task composer also initiated an outgoing email child task. - The connector-skill change was verified in the browser: AgentMail appears once as an automatic, read-only skill with its assigned address. Disabling experimental chat connections removes it; re-enabling restores it. A regression test covers assignment data arriving after library data. - Connector regression coverage passed 178 runtime utility, email integration, skill-route, and heartbeat tests. All 17 Codex execution tests passed, including per-agent skill isolation, model identity, revision changes, removal, and prompt delivery without shared skill files. - After rebasing onto master, all 44 focused email, heartbeat, and native-authority tests passed. All 313 native-session executor tests passed. The UI regression suite passed all 3 tests. These test sets overlap earlier focused runs. - Full workspace typecheck and build passed after the rebase. Token gates passed. Earlier focused Playwright task/setup coverage and the Storybook build also passed. - Native connector tool execution uses deterministic integration tests. Live Daytona qualification used the Codex CLI adapter; the new shared-home prompt fallback has deterministic coverage. - The full repository suite is run by CI. The earlier unsharded local full-suite attempt was stopped after the equivalent CI suites passed and is not reported as a completed local run. Greptile reviewed `7e57dc267a8446d3c906e3cc5b8abc94fb8860eb` at 5/5 with no unresolved threads. All server, workspace, serialized server, and browser suites passed in CI. The build job hit a five-second timeout in a runner transport test; both variants and the full 80-test file passed locally with unchanged timeouts. The build passed on retry on the same commit without code or timeout changes. All required CI gates, including the final `ci / verify` and `ci / e2e` summaries, are green on `7e57dc267a8446d3c906e3cc5b8abc94fb8860eb`. ## Risks - Email from external senders can start normal agent work. Setup recommends a low-trust agent and AgentMail sender controls. Sender addresses never grant board membership. - Provider timeouts can leave uncertain sends. Retries retain their idempotency key; expired windows require reconciliation or operator resolution. - Connector skills and native tools are assignment-dependent and require current access. Revocation denies retained calls; assignment changes select a new runtime context. - Activation remains behind the experimental-channel setting. The native runner path has deterministic coverage; live Daytona qualification used the Codex CLI adapter. - Schema changes are additive. Inbox ownership is unique across companies. Disconnect preserves provider inboxes and task history. ## Model Used OpenAI GPT-6 (Codex). Used reasoning, repository tools, code execution, and browser testing. The exact deployment model ID and context-window size were not exposed in this session. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Paperclip <noreply@paperclip.ing>
69 lines
5.1 KiB
TypeScript
69 lines
5.1 KiB
TypeScript
import a0 from "./app-definitions/agentmail.json" with { type: "json" };
|
|
import a1 from "./app-definitions/zapier.json" with { type: "json" };
|
|
import a2 from "./app-definitions/github.json" with { type: "json" };
|
|
import a3 from "./app-definitions/slack.json" with { type: "json" };
|
|
import a4 from "./app-definitions/microsoft-teams.json" with { type: "json" };
|
|
import a5 from "./app-definitions/telegram.json" with { type: "json" };
|
|
import a6 from "./app-definitions/discord.json" with { type: "json" };
|
|
import a7 from "./app-definitions/notion.json" with { type: "json" };
|
|
import a8 from "./app-definitions/posthog.json" with { type: "json" };
|
|
import a9 from "./app-definitions/linear.json" with { type: "json" };
|
|
import a10 from "./app-definitions/context7.json" with { type: "json" };
|
|
import a11 from "./app-definitions/shopify.json" with { type: "json" };
|
|
import a12 from "./app-definitions/composio.json" with { type: "json" };
|
|
import a13 from "./app-definitions/oauth-generic.json" with { type: "json" };
|
|
import a14 from "./app-definitions/api-key-generic.json" with { type: "json" };
|
|
import a15 from "./app-definitions/sentry.json" with { type: "json" };
|
|
import a16 from "./app-definitions/vercel.json" with { type: "json" };
|
|
import a17 from "./app-definitions/anthropic.json" with { type: "json" };
|
|
import a18 from "./app-definitions/jira.json" with { type: "json" };
|
|
import a19 from "./app-definitions/airtable.json" with { type: "json" };
|
|
import a20 from "./app-definitions/beehiiv.json" with { type: "json" };
|
|
import a21 from "./app-definitions/bitly.json" with { type: "json" };
|
|
import a22 from "./app-definitions/candid.json" with { type: "json" };
|
|
import a23 from "./app-definitions/cloudflare.json" with { type: "json" };
|
|
import a24 from "./app-definitions/cloudinary.json" with { type: "json" };
|
|
import a25 from "./app-definitions/coda.json" with { type: "json" };
|
|
import a26 from "./app-definitions/hugging-face.json" with { type: "json" };
|
|
import a27 from "./app-definitions/kernel.json" with { type: "json" };
|
|
import a28 from "./app-definitions/local-falcon.json" with { type: "json" };
|
|
import a29 from "./app-definitions/make.json" with { type: "json" };
|
|
import a30 from "./app-definitions/manufact.json" with { type: "json" };
|
|
import a31 from "./app-definitions/miro.json" with { type: "json" };
|
|
import a32 from "./app-definitions/netlify.json" with { type: "json" };
|
|
import a33 from "./app-definitions/oreilly.json" with { type: "json" };
|
|
import a34 from "./app-definitions/planetscale.json" with { type: "json" };
|
|
import a35 from "./app-definitions/resend.json" with { type: "json" };
|
|
import a36 from "./app-definitions/ticktick.json" with { type: "json" };
|
|
import a37 from "./app-definitions/todoist.json" with { type: "json" };
|
|
import a38 from "./app-definitions/webflow.json" with { type: "json" };
|
|
import a39 from "./app-definitions/wix.json" with { type: "json" };
|
|
import a40 from "./app-definitions/brex.json" with { type: "json" };
|
|
import a41 from "./app-definitions/clickhouse.json" with { type: "json" };
|
|
import a42 from "./app-definitions/egnyte.json" with { type: "json" };
|
|
import a43 from "./app-definitions/embat.json" with { type: "json" };
|
|
import a44 from "./app-definitions/mixpanel.json" with { type: "json" };
|
|
import a45 from "./app-definitions/postman.json" with { type: "json" };
|
|
import a46 from "./app-definitions/razorpay.json" with { type: "json" };
|
|
import a47 from "./app-definitions/sanity.json" with { type: "json" };
|
|
import a48 from "./app-definitions/stripe.json" with { type: "json" };
|
|
import a49 from "./app-definitions/supabase.json" with { type: "json" };
|
|
import a50 from "./app-definitions/ticket-tailor.json" with { type: "json" };
|
|
import a51 from "./app-definitions/asana.json" with { type: "json" };
|
|
import a52 from "./app-definitions/box.json" with { type: "json" };
|
|
import a53 from "./app-definitions/mem0.json" with { type: "json" };
|
|
import a54 from "./app-definitions/pagerduty.json" with { type: "json" };
|
|
import a55 from "./app-definitions/similarweb.json" with { type: "json" };
|
|
import a56 from "./app-definitions/xero.json" with { type: "json" };
|
|
import a57 from "./app-definitions/gmail.json" with { type: "json" };
|
|
import a58 from "./app-definitions/google-drive.json" with { type: "json" };
|
|
import a59 from "./app-definitions/google-docs.json" with { type: "json" };
|
|
import a60 from "./app-definitions/google-sheets.json" with { type: "json" };
|
|
import a61 from "./app-definitions/google-slides.json" with { type: "json" };
|
|
import a62 from "./app-definitions/google-calendar.json" with { type: "json" };
|
|
import a63 from "./app-definitions/google-chat.json" with { type: "json" };
|
|
import a64 from "./app-definitions/google-people.json" with { type: "json" };
|
|
import a65 from "./app-definitions/google-workspace-search.json" with { type: "json" };
|
|
import type { AppDefinition } from "./types/app-definition.js";
|
|
export const APP_DEFINITIONS=[a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a16,a17,a18,a19,a20,a21,a22,a23,a24,a25,a26,a27,a28,a29,a30,a31,a32,a33,a34,a35,a36,a37,a38,a39,a40,a41,a42,a43,a44,a45,a46,a47,a48,a49,a50,a51,a52,a53,a54,a55,a56,a57,a58,a59,a60,a61,a62,a63,a64,a65] as AppDefinition[];
|